/* ═══════════════════════════════════════════════
   Bloom Maternal Fetal Medicine — styles.css
   Fonts loaded in index.html via Google Fonts
   Icons via Font Awesome 6.5 (CDN in index.html)
═══════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --plum:        #893165;
  --plum-dark:   #6b2550;
  --plum-mid:    #a03d7a;
  --pink:        #f4b6dd;
  --pink-soft:   #fce8f5;
  --white:       #ffffff;
  --off-white:   #f7f7f7;
  --black:       #1c1c1c;
  --gray:        #6b6b6b;
  --gray-light:  #999;
  --shadow-sm:   0 4px 16px rgba(137,49,101,0.10);
  --shadow:      0 8px 32px rgba(137,49,101,0.14);
  --shadow-lg:   0 16px 48px rgba(137,49,101,0.22);
  --radius:      22px;
  --radius-sm:   14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--pink); border-radius: 3px; }

/* ═══════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(137,49,101,0.08);
  height: 74px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  transition: box-shadow 0.35s;
}
#navbar.scrolled { box-shadow: 0 4px 24px rgba(137,49,101,0.12); }

.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}
.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--black);
  font-size: 0.84rem; font-weight: 700;
  letter-spacing: 0.03em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--plum); }
.nav-cta {
  background: var(--plum) !important; color: white !important;
  padding: 0.6rem 1.5rem; border-radius: 50px;
  box-shadow: 0 4px 16px rgba(137,49,101,0.3);
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s !important;
}
.nav-cta:hover {
  background: var(--plum-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(137,49,101,0.4) !important;
}

/* ═══════════════════════════════════════
   HERO SLIDER
═══════════════════════════════════════ */
#hero {
  position: relative; height: 100vh; min-height: 640px; overflow: hidden;
}

.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 1.1s ease; z-index: 1;
}
.slide.active { opacity: 1; z-index: 2; }

.slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.06);
  transition: transform 9s ease;
}
.slide.active .slide-bg { transform: scale(1); }

/* Full-bleed colour tint over the image — tweak rgba opacity per slide */
.slide-overlay {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
}

/* Fallback gradient backgrounds (used when no image is set) */
.slide-1-bg { background: radial-gradient(ellipse at 30% 50%, #6b2550 0%, #893165 45%, #3d1030 100%); }
.slide-2-bg { background: radial-gradient(ellipse at 70% 40%, #a03d7a 0%, #6b2550 50%, #2a0d20 100%); }
.slide-3-bg { background: radial-gradient(ellipse at 50% 60%, #7a2a5a 0%, #893165 40%, #450f30 100%); }

.blob { position: absolute; border-radius: 50%; pointer-events: none; }

.slide-content {
  position: relative; z-index: 5;
  text-align: center; color: white;
  max-width: 820px; padding: 2rem;
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s ease 0.35s, transform 0.9s ease 0.35s;
}
.slide.active .slide-content { opacity: 1; transform: translateY(0); }

.slide-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(244,182,221,0.18);
  border: 1px solid rgba(244,182,221,0.4);
  color: var(--pink); font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.45rem 1.3rem; border-radius: 50px;
  margin-bottom: 1.6rem;
  backdrop-filter: blur(6px);
}
.slide-pill::before { content: '✦'; font-size: 0.6rem; }

.slide-h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 700; line-height: 1.2;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.slide-h1 em { font-style: italic; color: var(--pink); }

.slide-p {
  font-size: 1.05rem; font-weight: 400; line-height: 1.8;
  opacity: 0.9; margin-bottom: 2.5rem;
  max-width: 600px; margin-left: auto; margin-right: auto;
}

.slide-btn {
  display: inline-block; background: white; color: var(--plum);
  font-family: 'Nunito', sans-serif; font-weight: 800;
  font-size: 0.88rem; letter-spacing: 0.06em;
  padding: 0.95rem 2.5rem; border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 6px 28px rgba(0,0,0,0.22);
  transition: all 0.3s;
}
.slide-btn:hover {
  background: var(--pink); transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
}

.slide-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; width: 50px; height: 50px; border-radius: 50%;
  background: rgba(255,255,255,0.13); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25); color: white;
  font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s, transform 0.25s;
}
.slide-arrow:hover { background: rgba(255,255,255,0.28); transform: translateY(-50%) scale(1.08); }
.slide-arrow.prev { left: 2rem; }
.slide-arrow.next { right: 2rem; }

.slide-dots {
  position: absolute; bottom: 5.5rem; left: 50%;
  transform: translateX(-50%); z-index: 10;
  display: flex; gap: 0.6rem; align-items: center;
}
.dot {
  width: 9px; height: 9px; border-radius: 5px;
  background: rgba(255,255,255,0.35); border: none; cursor: pointer;
  padding: 0; transition: all 0.35s;
}
.dot.active { width: 26px; background: white; }

.hero-wave {
  position: absolute; bottom: -1px; left: 0; right: 0; z-index: 8;
}

/* ═══════════════════════════════════════
   SHARED SECTION STYLES
═══════════════════════════════════════ */
section { padding: 6rem 2.5rem; }
.container { max-width: 1180px; margin: 0 auto; }

.sec-label {
  display: inline-block;
  font-size: 0.70rem; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--plum); margin-bottom: 0.6rem;
}
.sec-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700; line-height: 1.25;
  margin-bottom: 1.1rem; color: var(--black);
}
.sec-title em { font-style: italic; color: var(--plum); }
.sec-desc { font-size: 0.98rem; line-height: 1.85; color: var(--gray); max-width: 600px; }

/* Fade-up animation */
.fu { opacity: 0; transform: translateY(32px); transition: opacity 0.75s ease, transform 0.75s ease; }
.fu.vis { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════
   ABOUT
═══════════════════════════════════════ */
#about { background: var(--off-white); }

.about-wrap {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: 5rem; align-items: center;
}

.about-img-col { position: relative; }
.about-img-frame {
  border-radius: 28px; overflow: hidden;
  aspect-ratio: 4/5; position: relative;
  box-shadow: var(--shadow-lg);
}
.about-img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.about-float {
  position: absolute; bottom: -2rem; right: -2rem;
  background: var(--plum);
  border-radius: var(--radius); padding: 1.6rem 1.8rem;
  color: white; box-shadow: var(--shadow-lg);
  text-align: center;
}
.about-float-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem; font-weight: 700; line-height: 1;
}
.about-float-label { font-size: 0.72rem; font-weight: 700; opacity: 0.8; margin-top: 0.3rem; }

.about-text-col { padding-right: 1rem; }

.about-features {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.9rem; margin-top: 2rem;
}
.af-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: white; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.af-icon {
  width: 38px; height: 38px; min-width: 38px;
  background: var(--pink-soft); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--plum); font-size: 0.9rem;
}
.af-text { font-size: 0.83rem; font-weight: 700; color: var(--black); line-height: 1.45; }

/* ═══════════════════════════════════════
   WHO WE HELP
═══════════════════════════════════════ */
#who { background: white; }
.who-head { text-align: center; margin-bottom: 3.5rem; }
.who-head .sec-desc { margin: 0 auto; }

.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }

.who-card {
  position: relative; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 4/3;
  box-shadow: var(--shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  cursor: default;
}
.who-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-lg); }

.who-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  transition: transform 0.55s ease;
}
.who-card:hover .who-bg { transform: scale(1.07); }

.who-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(107,37,80,0.92) 0%, rgba(137,49,101,0.45) 55%, transparent 100%);
}

.who-info {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 1.4rem 1.6rem;
  color: white;
}
.who-icon-box {
  width: 42px; height: 42px;
  background: rgba(244,182,221,0.22);
  border: 1px solid rgba(244,182,221,0.45);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--pink); font-size: 1.05rem;
  margin-bottom: 0.7rem; backdrop-filter: blur(4px);
}
.who-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.who-desc { font-size: 0.78rem; opacity: 0.82; line-height: 1.5; }

/* ═══════════════════════════════════════
   SERVICES
═══════════════════════════════════════ */
#services { background: var(--off-white); }

/* Centered heading block */
.svc-head { text-align: center; margin-bottom: 3.5rem; }
.svc-head .sec-desc { margin: 0 auto; max-width: 680px; }

/* 3-column layout: list | image | list */
.svc-wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2.5rem;
  align-items: center;
}

/* Left list items slide in from left, right from right */
.svc-col-left  .svc-item:hover { border-color: var(--pink); transform: translateX(5px); }
.svc-col-right .svc-item:hover { border-color: var(--pink); transform: translateX(-5px); }

.svc-list { display: flex; flex-direction: column; gap: 0.65rem; }

.svc-item {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.85rem 1.1rem;
  background: white; border-radius: var(--radius-sm);
  border-left: 3px solid var(--plum);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, transform 0.25s;
}
/* Right column items — border on the right side instead */
.svc-col-right .svc-item {
  border-left: none;
  border-right: 3px solid var(--plum);
  flex-direction: row-reverse;
  text-align: right;
}
.svc-item i { color: var(--plum); font-size: 0.85rem; flex-shrink: 0; }
.svc-item span { font-size: 0.86rem; font-weight: 600; color: var(--black); line-height: 1.4; }

/* Center image column */
.svc-visual {
  position: relative;
  width: 300px;
}
.svc-stat-badge {
  position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); z-index: 2;
  background: var(--pink); border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  white-space: nowrap;
}
.svc-stat-n {
  font-family: 'Playfair Display', serif;
  font-size: 2rem; font-weight: 700; color: var(--plum-dark); line-height: 1;
}
.svc-stat-label { font-size: 0.68rem; font-weight: 700; color: var(--plum); margin-top: 0.2rem; }

.svc-img {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-lg);
  margin-top: 1.5rem;
}
.svc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ═══════════════════════════════════════
   TEAM
═══════════════════════════════════════ */
#team { background: white; }
.team-head { text-align: center; margin-bottom: 3.5rem; }
.team-head .sec-desc { margin: 0 auto; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }

.team-card {
  background: var(--off-white);
  border-radius: var(--radius); padding: 2rem 1.6rem;
  text-align: center;
  transition: transform 0.35s, box-shadow 0.35s;
  border: 1px solid rgba(137,49,101,0.06);
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.team-avatar-wrap { position: relative; width: 106px; height: 106px; margin: 0 auto 1.3rem; }
.team-avatar {
  width: 106px; height: 106px; border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 18px rgba(137,49,101,0.16);
}
.team-ring {
  position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--pink); opacity: 0.7;
}

.team-name { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 600; margin-bottom: 0.3rem; }
.team-role {
  font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--plum); margin-bottom: 0.85rem;
}
.team-bio { font-size: 0.82rem; color: var(--gray); line-height: 1.65; }

/* ═══════════════════════════════════════
   AFFILIATIONS
═══════════════════════════════════════ */
#affiliations {
  background: linear-gradient(135deg, var(--plum-dark) 0%, var(--plum) 60%, var(--plum-mid) 100%);
  padding: 5rem 2.5rem;
  position: relative; overflow: hidden;
}
#affiliations::before {
  content: '';
  position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: rgba(244,182,221,0.06);
  top: -150px; right: -100px; pointer-events: none;
}

.affil-head { text-align: center; margin-bottom: 3rem; }
.affil-head .sec-label { color: var(--pink); }
.affil-head .sec-title { color: white; }
.affil-head .sec-title em { color: var(--pink); }
.affil-head .sec-desc { color: rgba(255,255,255,0.72); margin: 0 auto; }

.affil-marquee-wrap {
  position: relative; overflow: hidden;
  padding: 1rem 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image:         linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.affil-track {
  display: flex; gap: 1.4rem; width: max-content;
  animation: marqueeScroll 32s linear infinite;
}
.affil-marquee-wrap:hover .affil-track { animation-play-state: paused; }

@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Card sized at exactly half the source (480×160 → 240×80 display) keeping 3:1 ratio */
.affil-logo-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255,255,255);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  width: 240px;
  padding: 1.2rem 1.6rem;
  transition: background 0.3s, transform 0.3s;
  cursor: default;
}
.affil-logo-card:hover {
  background: rgba(255,255,255,);
  transform: translateY(-3px);
}

/* Logo image — natural 480×160 aspect ratio, displayed at 208×69 */
.affil-logo-img {
  width: 208px;
  height: 69px;
  object-fit: contain;
  /*
    filter: brightness(0) invert(1);
    ↑ Uncomment this line if your logos are dark-colored and need to appear white.
    Leave it commented if your logos are already white or light.
  */
  opacity: 0.88;
  transition: opacity 0.3s;
  display: block;
}
.affil-logo-card:hover .affil-logo-img { opacity: 1; }

/* Optional small label under the logo */
.affil-logo-type {
  color: rgba(244,182,221,0.65);
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

/* ═══════════════════════════════════════
   CONTACT
═══════════════════════════════════════ */
#contact { background: var(--off-white); }
.contact-head { text-align: center; margin-bottom: 3.5rem; }
.contact-head .sec-desc { margin: 0 auto; }

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.contact-card {
  background: white; border-radius: var(--radius);
  padding: 2.8rem 2rem; text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(137,49,101,0.06);
  transition: transform 0.35s, box-shadow 0.35s;
}
.contact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.cc-icon {
  width: 68px; height: 68px; border-radius: 20px;
  background: linear-gradient(135deg, var(--plum), var(--plum-mid));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.5rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 6px 20px rgba(137,49,101,0.3);
}
.cc-tag {
  font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--plum); margin-bottom: 0.4rem;
}
.cc-title { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 600; margin-bottom: 0.6rem; }
.cc-value { font-size: 0.9rem; color: var(--gray); line-height: 1.7; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  background: var(--black); color: white;
  text-align: center; padding: 2.5rem 2rem;
}
footer .ft-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem; color: var(--pink); margin-bottom: 0.5rem;
}
footer p { font-size: 0.8rem; opacity: 0.55; line-height: 1.7; }
footer a { color: var(--pink); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   WAVE DIVIDERS
═══════════════════════════════════════ */
.wave-wrap { line-height: 0; display: block; }
.wave-wrap svg { display: block; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .about-wrap { grid-template-columns: 1fr; gap: 3rem; }
  .who-grid, .team-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .about-img-col { order: -1; }
  .about-float { right: 0; }
  .nav-links li:not(:last-child) { display: none; }

  /* Services: stack into single column on tablet */
  .svc-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .svc-visual { width: 100%; max-width: 340px; margin: 0 auto; }
  .svc-col-right .svc-item { flex-direction: row; text-align: left; border-right: none; border-left: 3px solid var(--plum); }
  .svc-col-right .svc-item:hover { transform: translateX(5px); }
}
@media (max-width: 600px) {
  .who-grid, .team-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }
  section { padding: 4rem 1.5rem; }
}
