/*
 Theme Name:     Cahillbrand - Divi Child Theme
 Theme URI:      https://cahillbrand.co.uk
 Description:    Cahillbrand - Divi Child Theme
 Author:         Cahillbrand Ltd
 Author URI:     https://cahillbrand.co.uk
 Template:       Divi
 Version:        1.0.0
*/

/* ----------------------------------------------------------
   FULLSCREEN MOBILE MENU — Calm Mind Solutions 
   ---------------------------------------------------------- */

/* Prevent background scrolling when overlay is open */
html.cms-menu-open,
body.cms-menu-open {
  overflow: hidden;
  height: 100%;
}

/* Safety: re-enable on desktop just in case */
@media (min-width: 981px) {
  html.cms-menu-open,
  body.cms-menu-open {
    overflow: auto;
    height: auto;
  }
}

.cms-main-menu .et_mobile_menu {
  display: none !important;
}

/* Base overlay container */
.cms-mobile-menu-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: #fabdbd; /* Replace with brand pink if needed */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s ease, opacity 0.35s ease;
  z-index: 99999;
}

/* Slide-in active */
.cms-mobile-menu-overlay.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Close button */
.cms-mobile-menu-close {
  position: absolute;
  top: 22px;
  right: 26px;
  font-size: 36px;
  color: #1b3b5b;
  cursor: pointer;
}

body.admin-bar .cms-mobile-menu-close {
  margin-top: 32px;
}

/* Menu list */
#cmsMobileMenuList {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  line-height: 55px;
}

#cmsMobileMenuList li {
  margin: 14px 0;
}

#cmsMobileMenuList a {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  color: #1b3b5b;
  text-decoration: none;
}

/* Fade links in after panel slides in */
.cms-mobile-menu-overlay.is-open #cmsMobileMenuList li {
  animation: cmsMenuFadeUp 0.5s ease forwards;
}

@keyframes cmsMenuFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Base menu item link – padding + setup for underline */
.cms-main-menu .et-menu > li > a {
  position: relative; /* needed for the ::after underline */
  display: inline-block; /* keeps underline tied to the text width */
  padding: 0 22px; /* LEFT/RIGHT PADDING FOR MENU ITEMS */
}

/* Remove any extra padding Divi puts on the <li> itself */
.cms-main-menu .et-menu > li {
  padding-left: 0;
  padding-right: 0;
}

/* Underline (hidden by default) */
.cms-main-menu .et-menu > li > a::after {
  content: '';
  position: absolute;
  left: 22px; /* matches link padding – keeps underline inset */
  right: 22px;
  height: 2px;
  background-color: #b7abf5; /* lavender blue – brand accent */
  bottom: -6px; /* CONTROLS THE GAP BETWEEN TEXT & UNDERLINE */
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: center;
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

/* Hover + active state – show underline */
.cms-main-menu .et-menu > li > a:hover::after,
.cms-main-menu .et-menu > li.current-menu-item > a::after,
.cms-main-menu .et-menu > li.current_page_item > a::after {
  opacity: 1;
  transform: scaleX(1);
}

/* .et-l--header {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
} */

/* Desktop only – sticky header */
@media (min-width: 981px) {
  .et-l--header {
    position: sticky;
    top: 0;
    z-index: 9999;
  }

  /* If logged into WP admin, offset below admin bar */
  body.admin-bar .et-l--header {
    top: 32px;
  }
}

/* Mobile / tablet – normal scrolling header */
@media (max-width: 980px) {
  .et-l--header {
    position: static;
  }
}

.cms-hero {
  position: relative;
  overflow: hidden;
  background:
    /* lavender blob top-right */ radial-gradient(
      circle at 78% 18%,
      rgba(184, 171, 246, 0.45) 0,
      rgba(184, 171, 246, 0) 48%
    ),
    /* peach blob mid-right */
      radial-gradient(
        circle at 90% 55%,
        rgba(255, 206, 165, 0.55) 0,
        rgba(255, 206, 165, 0) 50%
      ),
    /* pink tint lower-right */
      radial-gradient(
        circle at 80% 85%,
        rgba(250, 189, 189, 0.35) 0,
        rgba(250, 189, 189, 0) 52%
      ),
    #fafafa;
}

/* Right-hand hero visual container (column) */
.cms-hero-visual {
  display: flex;
  justify-content: flex-end; /* push blobs to fill the right side */
  align-items: center;
}

/* The area that holds the blobs */
.cms-hero .et_pb_row,
.cms-hero .et_pb_column,
.cms-hero-blobs {
  overflow: visible !important;
}

.cms-hero-blobs {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
}

/* Base blob shape – keep as you have */
.cms-hero-blob {
  position: absolute;
  width: 56%;
  height: 56%;
  border-radius: 65% 75% 70% 80% / 78% 68% 75% 70%;
  opacity: 0.75;
  mix-blend-mode: multiply;
  will-change: transform, border-radius;
  transform-origin: center;
}

/* Peach blobs */
.cms-hero-blob--1 {
  background: #ffcea5;
  top: -5%;
  left: 22%;
  animation: cmsBlobMove1 26s ease-in-out infinite alternate;
}

.cms-hero-blob--4 {
  background: #ffcea5;
  top: 42%;
  right: -6%;
  width: 46%;
  height: 46%;
  opacity: 0.55;
  animation: cmsBlobMove4 34s ease-in-out infinite alternate;
}

/* Lavender blobs */
.cms-hero-blob--2 {
  background: #b8abf6;
  top: -6%;
  right: -6%;
  animation: cmsBlobMove2 32s ease-in-out infinite alternate;
}

.cms-hero-blob--5 {
  background: #b8abf6;
  bottom: -14%;
  left: 14%;
  width: 50%;
  height: 50%;
  opacity: 0.5;
  animation: cmsBlobMove5 40s ease-in-out infinite alternate;
}

/* Pink blob */
.cms-hero-blob--3 {
  background: #fabdbd;
  bottom: 0%;
  left: 30%;
  animation: cmsBlobMove3 38s ease-in-out infinite alternate;
}

/* Lava-lamp style animations */
/* Smooth, organic, constantly-changing shapes */
@keyframes cmsBlobMove1 {
  0% {
    transform: translate(0%, 0%) scale(0.96) rotate(0deg);
    border-radius: 68% 78% 72% 82% / 80% 70% 76% 68%;
  }
  25% {
    transform: translate(10%, 8%) scale(1.12) rotate(8deg);
    border-radius: 72% 64% 78% 70% / 74% 82% 68% 76%;
  }
  50% {
    transform: translate(4%, 24%) scale(0.9) rotate(-6deg);
    border-radius: 80% 70% 68% 76% / 72% 78% 70% 82%;
  }
  75% {
    transform: translate(-6%, 16%) scale(1.06) rotate(4deg);
    border-radius: 70% 82% 74% 68% / 78% 72% 80% 66%;
  }
  100% {
    transform: translate(-10%, 22%) scale(0.98) rotate(-10deg);
    border-radius: 76% 68% 80% 72% / 82% 76% 70% 74%;
  }
}

@keyframes cmsBlobMove2 {
  0% {
    transform: translate(0%, 0%) scale(1.08) rotate(0deg);
    border-radius: 74% 66% 82% 70% / 76% 84% 68% 72%;
  }
  25% {
    transform: translate(-14%, 14%) scale(0.92) rotate(-6deg);
    border-radius: 82% 72% 70% 80% / 70% 78% 84% 66%;
  }
  50% {
    transform: translate(-8%, 30%) scale(1.14) rotate(10deg);
    border-radius: 68% 80% 76% 72% / 84% 70% 72% 78%;
  }
  75% {
    transform: translate(8%, 8%) scale(0.9) rotate(-12deg);
    border-radius: 78% 68% 82% 74% / 72% 86% 70% 80%;
  }
  100% {
    transform: translate(4%, -4%) scale(1.1) rotate(6deg);
    border-radius: 84% 72% 74% 82% / 80% 74% 86% 70%;
  }
}

@keyframes cmsBlobMove3 {
  0% {
    transform: translate(0%, 0%) scale(1.02) rotate(0deg);
    border-radius: 70% 82% 76% 84% / 78% 72% 80% 70%;
  }
  25% {
    transform: translate(14%, -18%) scale(0.9) rotate(10deg);
    border-radius: 84% 70% 72% 80% / 72% 86% 74% 82%;
  }
  50% {
    transform: translate(-12%, -8%) scale(1.18) rotate(-8deg);
    border-radius: 72% 86% 80% 70% / 82% 74% 86% 72%;
  }
  75% {
    transform: translate(-6%, 20%) scale(0.94) rotate(6deg);
    border-radius: 86% 76% 74% 84% / 78% 82% 70% 86%;
  }
  100% {
    transform: translate(6%, 10%) scale(1.06) rotate(-12deg);
    border-radius: 76% 84% 86% 72% / 86% 76% 82% 74%;
  }
}

@keyframes cmsBlobMove4 {
  0% {
    transform: translate(0%, 0%) scale(1) rotate(0deg);
    border-radius: 80% 70% 86% 74% / 76% 82% 72% 86%;
  }
  25% {
    transform: translate(-10%, -10%) scale(1.12) rotate(-8deg);
    border-radius: 72% 86% 78% 84% / 86% 74% 80% 72%;
  }
  50% {
    transform: translate(-4%, 16%) scale(0.9) rotate(12deg);
    border-radius: 84% 72% 86% 78% / 80% 86% 76% 74%;
  }
  75% {
    transform: translate(8%, 6%) scale(1.04) rotate(-6deg);
    border-radius: 76% 80% 72% 86% / 84% 76% 82% 78%;
  }
  100% {
    transform: translate(0%, 22%) scale(0.94) rotate(8deg);
    border-radius: 88% 74% 80% 72% / 82% 88% 74% 80%;
  }
}

@keyframes cmsBlobMove5 {
  0% {
    transform: translate(0%, 0%) scale(0.94) rotate(0deg);
    border-radius: 76% 80% 84% 72% / 82% 76% 88% 74%;
  }
  25% {
    transform: translate(12%, -20%) scale(1.18) rotate(8deg);
    border-radius: 86% 74% 76% 88% / 78% 86% 72% 84%;
  }
  50% {
    transform: translate(-12%, -6%) scale(0.9) rotate(-10deg);
    border-radius: 72% 88% 82% 76% / 86% 78% 80% 74%;
  }
  75% {
    transform: translate(4%, 22%) scale(1.1) rotate(6deg);
    border-radius: 84% 76% 88% 72% / 80% 90% 76% 86%;
  }
  100% {
    transform: translate(-6%, 12%) scale(0.96) rotate(-8deg);
    border-radius: 78% 86% 80% 74% / 88% 78% 84% 76%;
  }
}

/* Mobile spacing – keep visual under text nicely */
@media (max-width: 980px) {
  .cms-hero-visual {
    justify-content: center;
  }

  .cms-hero-blobs {
    max-width: 100vw;
  }
}

/* CMS Service Cards - Homepage */

.cms-service-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 32px 28px 28px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.04);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cms-service-card h3 {
  font-size: 22px;
  margin-bottom: 4px;
  color: #1b3b5b;
}

.cms-service-card p {
  margin-bottom: 0;
}

/* Hover lift */
.cms-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease-out;
}

/* Base service icon blob */
.cms-service-icon {
  width: 64px;
  height: 64px;
  opacity: 0.9;
  margin-bottom: 16px;
  display: inline-block;
}

/* =======================================================
   SERVICE ICON BLOBS – BASE SET
   (your existing styles, left as-is)
   ======================================================= */

/* Assessments – lavender blob */
.cms-service-icon-assessment {
  background: #b8abf6; /* lavender */
  border-radius: 45% 55% 60% 40%;
}

/* Courses & events – peach blob */
.cms-service-icon-event {
  background: #ffcea5; /* peach */
  border-radius: 60% 40% 50% 70%;
}

/* Ongoing support – pink blob */
.cms-service-icon-support {
  background: #fabdbd; /* pink */
  border-radius: 55% 65% 45% 70%;
}

/* =======================================================
   VARIANTS – SAME COLOURS, NEW SHAPES
   Use these to add visual variety across the site.
   ======================================================= */

/* ---------- Assessments (lavender) variants ---------- */

/* Slightly taller, more organic blob */
.cms-service-icon-assessment-alt {
  background: #b8abf6;
  border-radius: 65% 45% 55% 35%;
}

/* Squishier, more horizontal blob */
.cms-service-icon-assessment-alt2 {
  background: #b8abf6;
  border-radius: 35% 70% 40% 65%;
}

/* ---------- Courses & events (peach) variants ---------- */

/* Softer, almost pill-like but still blobby */
.cms-service-icon-event-alt {
  background: #ffcea5;
  border-radius: 50% 60% 55% 45%;
}

/* More asymmetric / playful */
.cms-service-icon-event-alt2 {
  background: #ffcea5;
  border-radius: 70% 35% 60% 40%;
}

/* ---------- Ongoing support (pink) variants ---------- */

/* Slightly chunkier top, softer base */
.cms-service-icon-support-alt {
  background: #fabdbd;
  border-radius: 60% 55% 40% 65%;
}

/* More “droplet” style */
.cms-service-icon-support-alt2 {
  background: #fabdbd;
  border-radius: 40% 75% 55% 45%;
}

.cms-events-card {
  margin: 0 auto;
  border-radius: 20px;
  padding: 36px 40px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.04);
  border-top: 4px solid transparent;
  border-radius: 20px;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, #b8abf6, #ffcea5) border-box;
  width: 100%;
}

.cms-email-cta-row .cms-email-form {
  position: relative;
  z-index: 1;
}

.cms-email-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cms-email-form,
.cms-email-field {
  width: 100%;
}

.cms-email-form input[type='text'],
.cms-email-form input[type='email'] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  background-color: #ffffff;
}

.cms-email-consent {
  font-size: 12px;
  color: #555;
  line-height: 15px;
  margin: 1rem 0 0 0;
}

.cms-email-submit button {
  background-color: var(--gcid-heading-color) !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  border-width: 1px !important;
  border-color: var(--gcid-heading-color) !important;
  border-style: solid !important;
  margin-top: 1rem;
}

/* SR-only labels */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile */
@media (max-width: 767px) {
  .cms-email-row {
    grid-template-columns: 1fr;
  }

  .cms-email-submit button {
    width: 100%;
    text-align: center;
  }
}

/* Base team card style */
.cms-team-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 18px 40px rgba(15, 35, 52, 0.06);
}

/* Make the founder card feel a bit more substantial */
.cms-team-card--founder {
  padding: 20px 18px;
}

/* Make images inside cards rounded and consistent */
.cms-team-card img {
  border-radius: 18px;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.cms-team-card .et_pb_module_header {
  padding-bottom: 0;
}

.cms-team-card .et_pb_member_position {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* Make all team images the same visual size */
.cms-team-card .et_pb_team_member_image img {
  display: block;
  width: 100%;
  height: 260px; /* adjust this value to taste */
  object-fit: cover; /* crops neatly without distortion */
  border-radius: 18px;
}

.cms-team-card {
  position: relative;
  overflow: hidden;
}

/* Turn the team card into a vertical flex container */
.cms-team-card {
  display: flex;
  flex-direction: column;
  height: 100%; /* ensures equal height across cards */
}

/* Ensure image stays at top and doesn't stretch weirdly */
.cms-team-card .et_pb_member_image {
  margin-bottom: 16px; /* adjust as needed */
  flex-shrink: 0;
}

/* Put the content wrapper into a flex column too */
.cms-team-card .et_pb_member_description {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Push the bio text down if needed */
.cms-team-card .et_pb_member_description p:last-child {
  margin-top: auto; /* magic ✨ */
}

/* Base team card style */
.cms-team-card {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 18px 40px rgba(15, 35, 52, 0.06);

  display: flex;
  flex-direction: column;
  height: 100%;
}

.cms-team-card:hover {
  transform: translateY(-4px);
}

/* Make sure real content sits above the blob layer */
.cms-team-card > * {
  position: relative;
  z-index: 1;
}

/* Shared blob layer – we’ll override background per person */
.cms-team-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

/* Colours for reference:
   lavender: #B8ABF6 (184, 171, 246)
   peach:    #FFCEA5 (255, 206, 165)
   pink:     #FABDBD (250, 189, 189)
*/
/* Clodagh – 4 blobs, clearly in view */
.cms-team-card--clodagh::before {
  background-image: radial-gradient(
      150px 150px at 10% 0%,
      rgba(255, 206, 165, 0.55),
      transparent 60%
    ),
    radial-gradient(
      140px 140px at 90% 15%,
      rgba(184, 171, 246, 0.45),
      transparent 60%
    ),
    radial-gradient(
      130px 130px at 0% 85%,
      rgba(250, 189, 189, 0.4),
      transparent 60%
    ),
    radial-gradient(
      120px 120px at 60% 100%,
      rgba(184, 171, 246, 0.3),
      transparent 60%
    );
}

/* Jamie – 4 blobs, diagonals + bottom */
.cms-team-card--jamie::before {
  background-image: radial-gradient(
      150px 150px at 85% 0%,
      rgba(250, 189, 189, 0.5),
      transparent 60%
    ),
    radial-gradient(
      140px 140px at 15% 25%,
      rgba(184, 171, 246, 0.45),
      transparent 60%
    ),
    radial-gradient(
      150px 150px at 90% 80%,
      rgba(255, 206, 165, 0.4),
      transparent 60%
    ),
    radial-gradient(
      130px 130px at 30% 100%,
      rgba(250, 189, 189, 0.3),
      transparent 60%
    );
}

/* Norvie – 4 blobs, more vertical sweep */
.cms-team-card--norvie::before {
  background-image: radial-gradient(
      150px 150px at 50% 0%,
      rgba(184, 171, 246, 0.5),
      transparent 60%
    ),
    radial-gradient(
      140px 140px at 5% 40%,
      rgba(255, 206, 165, 0.45),
      transparent 60%
    ),
    radial-gradient(
      150px 150px at 100% 55%,
      rgba(250, 189, 189, 0.4),
      transparent 60%
    ),
    radial-gradient(
      130px 130px at 50% 100%,
      rgba(184, 171, 246, 0.3),
      transparent 60%
    );
}

/* RESET: allow normal scrolling by default */
body {
  overflow-x: visible !important;
}

#page-container {
  overflow-y: visible !important;
}
