/* =============================================================================
   Medical Rhapsody — Component Classes
   Imports tokens.css → all values via CSS custom properties.
   No raw hex values here. All color/spacing/shadow references use tokens.
   ============================================================================= */

@import url('./tokens.css');


/* ── BASE RESET ──────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  font-size: 16px; /* rem base */
}

html { overflow-x: hidden; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-text-dark);
  background: var(--color-bg-white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  color: inherit;
}

img { display: block; max-width: 100%; }


/* ── SKIP LINK ───────────────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  z-index: var(--z-skip);
  text-decoration: none;
  transition: top var(--duration-normal) ease;
}
.skip-link:focus { top: 0; }


/* ── GLOBAL FOCUS RING ───────────────────────────────────────────────────── */

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}


/* ── BUTTONS ─────────────────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  padding: 0.675rem 1.4rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: none;
  min-height: 44px;
  transition:
    background var(--duration-normal) ease,
    transform  var(--duration-fast)   ease,
    box-shadow var(--duration-normal) ease;
  box-shadow: var(--shadow-cta);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: scale(1.03);
  box-shadow: var(--shadow-cta-hover);
}
.btn-primary:active  { transform: scale(0.99); }
.btn-primary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--color-text-inverse);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  padding: 0.675rem 1.4rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.45);
  min-height: 44px;
  transition:
    border-color var(--duration-normal) ease,
    background   var(--duration-normal) ease,
    transform    var(--duration-fast)   ease;
}
.btn-ghost:hover {
  border-color: var(--color-text-inverse);
  background: rgba(255,255,255,0.08);
  transform: scale(1.02);
}
.btn-ghost:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

/* Dark-surface ghost variant with teal border (product cards) */
.btn-ghost-accent {
  border-color: var(--color-accent-border);
  color: var(--color-text-inverse-65);
}
.btn-ghost-accent:hover {
  border-color: var(--color-accent-border-h);
  color: var(--color-text-inverse);
  background: var(--color-accent-subtle);
}


/* ── SECTION HELPERS ─────────────────────────────────────────────────────── */

.section-label {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-label);
  color: var(--color-secondary);
  margin-bottom: var(--space-3);
  display: block;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--color-secondary);
  border-radius: 2px;
}


/* ── NAVIGATION ──────────────────────────────────────────────────────────── */

.nav-bar {
  background: var(--gradient-dark-section);
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  box-shadow: var(--shadow-nav);
  border-bottom: 1px solid var(--color-border-soft);
}

/* (Logo image only — text logo class removed in favour of <img>) */
.nav-logo-text {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text-inverse);
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1;
}
.nav-logo-text span { color: var(--color-accent); }

.nav-link {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  color: var(--color-text-inverse-65);
  text-decoration: none;
  padding: var(--space-2) 0;
  transition: color var(--duration-normal) ease;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}
.nav-link:hover { color: var(--color-text-inverse); }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -1rem;
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-floating);
  min-width: 210px;
  padding: var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity    var(--duration-slow)   ease,
    transform  var(--duration-slow)   ease,
    visibility var(--duration-slow);
  z-index: var(--z-dropdown);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: 0.675rem var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) ease, color var(--duration-fast) ease;
}
.nav-dropdown-item:hover {
  background: rgba(11,42,74,0.06);
  color: var(--color-accent);
}


/* ── MOBILE MENU ─────────────────────────────────────────────────────────── */

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 88vw);
  height: 100dvh;
  background: var(--gradient-dark-section);
  z-index: var(--z-drawer);
  padding: 1.75rem var(--space-6);
  border-left: var(--border-inverse-rule);
  transition: right var(--duration-slow) var(--ease-drawer);
  overflow-y: auto;
}
.mobile-menu.open { right: 0; }

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-slow) ease, visibility var(--duration-slow);
}
.mobile-overlay.open { opacity: 1; visibility: visible; }

.mobile-nav-link {
  display: block;
  color: var(--color-text-inverse);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: var(--weight-medium);
  text-decoration: none;
  padding: 0.9rem 0;
  border-bottom: var(--border-inverse-rule);
  transition: color var(--duration-fast) ease, padding-left var(--duration-fast) ease;
}
.mobile-nav-link:hover { color: var(--color-accent); padding-left: var(--space-2); }

.mobile-sub-link {
  display: block;
  color: var(--color-text-inverse-65);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  text-decoration: none;
  padding: 0.65rem 0 0.65rem var(--space-4);
  border-bottom: 1px solid var(--color-border-nav);
  transition: color var(--duration-fast) ease;
}
.mobile-sub-link:hover { color: var(--color-accent); }


/* ── HERO ────────────────────────────────────────────────────────────────── */

.hero {
  background: var(--gradient-dark-section);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  pointer-events: none;
}

.hero-asset-placeholder {
  border: 1.5px solid var(--color-accent-border-h);
  border-radius: var(--radius-2xl);
  background: var(--color-accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 7/6;
  position: relative;
  box-shadow: var(--shadow-hero-placeholder);
}
.hero-asset-placeholder::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-2xl);
  background: var(--gradient-hero-placeholder);
  z-index: -1;
}


/* ── TRUST BAR (University Logos) ────────────────────────────────────────── */

.trust-bar { background: #ffffff; }

.trust-bar-eyebrow {
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.6875rem;       /* 11px */
  font-weight: var(--weight-semibold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
}

.trust-logo-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  align-items: center;
  justify-items: center;
}
@media (max-width: 768px) {
  .trust-logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1.5rem;
  }
}
@media (max-width: 480px) {
  .trust-logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.trust-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: background var(--duration-normal) ease;
}
.trust-logo-wrap:hover { background: rgba(255,255,255,0.7); }

.trust-logo {
  height: 100px;
  max-height: 100px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: grayscale(20%) opacity(0.78);
  transition:
    filter    var(--duration-slow) ease,
    transform var(--duration-normal) ease,
    opacity   var(--duration-normal) ease;
}
.trust-logo:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.05);
}


/* ── STATS / CREDIBILITY BAR ─────────────────────────────────────────────── */

.stats-section { background: var(--gradient-dark-section); }

.stat-number {
  font-family: var(--font-serif);
  font-size: var(--text-stat);
  font-weight: var(--weight-bold);
  color: var(--color-secondary);
  line-height: var(--leading-stat);
  display: block;
}


/* ── PRODUCT CARDS ───────────────────────────────────────────────────────── */

.products-section { background: var(--gradient-dark-section); }

.product-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border-inverse);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition:
    transform     var(--duration-slow) ease,
    border-color  var(--duration-slow) ease,
    box-shadow    var(--duration-slow) ease;
}
.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent-border-h);
  box-shadow: var(--shadow-product-hover);
}
.product-card img {
  width: 100%;
  height: 268px;
  object-fit: cover;
  display: block;
}

.product-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--text-base);
  color: var(--color-text-inverse-65);
  margin-bottom: 0.55rem;
  line-height: var(--leading-ui);
}
.product-feature-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  margin-top: 0.5rem;
  flex-shrink: 0;
}


/* ── TESTIMONIAL CARDS ───────────────────────────────────────────────────── */

.testimonial-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  border-left: 4px solid var(--color-secondary);
  box-shadow: var(--shadow-base);
  transition: transform var(--duration-slow) ease, box-shadow var(--duration-slow) ease;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
}

.testimonial-avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--color-secondary);
  flex-shrink: 0;
}


/* ── AUTHORITY / DR. TORRES ──────────────────────────────────────────────── */

.authority-section { background: var(--gradient-dark-section); }

.authority-photo {
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 420px;
  object-fit: cover;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow-deep);
}

.credential-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: var(--border-inverse-rule);
}
.credential-icon {
  width: 42px;
  height: 42px;
  background: rgba(37, 164, 218, 0.12);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


/* ── EDUCATION SECTION ───────────────────────────────────────────────────── */

.education-section { background: var(--color-bg-soft); }

.webinar-img {
  border-radius: var(--radius-2xl);
  width: 100%;
  object-fit: cover;
  box-shadow: var(--shadow-image);
}


/* ── REFERRAL CARDS ──────────────────────────────────────────────────────── */

.referral-section { background: var(--gradient-dark-section); }

.referral-card {
  background: var(--color-accent-subtle);
  border: var(--border-accent-rule);
  border-radius: var(--radius-xl);
  padding: var(--space-7) var(--space-6);
  text-align: center;
  transition:
    background    var(--duration-slow) ease,
    border-color  var(--duration-slow) ease,
    transform     var(--duration-slow) ease;
}
.referral-card:hover {
  background: rgba(0,168,168,0.10);
  border-color: var(--color-accent-border-h);
  transform: translateY(-3px);
}

.referral-icon {
  width: 52px;
  height: 52px;
  background: rgba(0,168,168,0.15);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
}


/* ── FORM ────────────────────────────────────────────────────────────────── */

.form-group { display: flex; flex-direction: column; gap: var(--space-1); }

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  font-family: var(--font-sans);
}
.form-label .required { color: var(--color-error); margin-left: 2px; }

.form-input {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-text-dark);
  background: var(--color-bg-white);
  border: var(--border) solid var(--color-border-soft);
  border-radius: var(--radius-md);
  padding: 0.75rem var(--space-4);
  min-height: 44px;
  width: 100%;
  transition: border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}
.form-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
  outline: none;
}
.form-input.error { border-color: var(--color-error); }

.form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  display: none;
  font-family: var(--font-sans);
  margin-top: 2px;
}
.form-error.visible { display: block; }


/* ── FOOTER ──────────────────────────────────────────────────────────────── */

.footer-section { background: var(--gradient-dark-section); }

.footer-link {
  color: var(--color-text-inverse-60);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: var(--leading-ui);
  display: block;
  margin-bottom: 0.55rem;
  transition: color var(--duration-normal) ease;
}
.footer-link:hover { color: var(--color-text-inverse); }

.footer-heading {
  color: var(--color-text-inverse);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-stat);
  margin-bottom: var(--space-4);
}


/* ── WHATSAPP FAB ────────────────────────────────────────────────────────── */

.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  background: var(--color-whatsapp);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-whatsapp);
  z-index: var(--z-fixed);
  text-decoration: none;
  transition: transform var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-whatsapp-hover);
}
.whatsapp-float:focus-visible {
  outline: 3px solid var(--color-text-inverse);
  outline-offset: 3px;
}


/* ── REDUCED MOTION ──────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
