/* ==========================================================================
   Instituto Médico Haddad — Design System
   A premium, minimalist medical clinic stylesheet.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. GOOGLE FONTS
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. CSS RESET / NORMALIZE (minimal)
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  max-width: 100%;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --------------------------------------------------------------------------
   2. DESIGN TOKENS (Custom Properties)
   -------------------------------------------------------------------------- */
:root {
  /* ── Colors ── */
  --clr-primary-dark:    #5A1A22; /* Soft Deep Wine Red (25% softer) */
  --clr-primary:         #7F2F3B; /* Soft Medium Wine Red */
  --clr-primary-light:   #A24E5B; /* Soft Light Wine Red */
  --clr-gold:            #c9a96e; /* Elegant Gold */
  --clr-gold-light:      #d4b87a;
  --clr-gold-hover:      #b8944f;

  --clr-bg:              #FAF7F7; /* Softer Warm White */
  --clr-card:            #ffffff;
  --clr-text:            #38292b; /* Softer Dark Text */
  --clr-text-secondary:  #705f61;
  --clr-text-light:      #9c898b;
  --clr-border:          #eae2e3;
  --clr-hero-overlay:    rgba(90, 26, 34, 0.7); /* Lighter and softer overlay */

  --clr-whatsapp:        #25D366;
  --clr-whatsapp-hover:  #1da851;

  /* ── Typography ── */
  --ff-heading: 'Playfair Display', serif;
  --ff-body:    'Inter', sans-serif;

  --fs-xs:   0.75rem;    /* 12px */
  --fs-sm:   0.875rem;   /* 14px */
  --fs-base: 1rem;       /* 16px */
  --fs-md:   1.125rem;   /* 18px */
  --fs-lg:   1.25rem;    /* 20px */
  --fs-xl:   1.5rem;     /* 24px */
  --fs-2xl:  2rem;       /* 32px */
  --fs-3xl:  2.5rem;     /* 40px */
  --fs-4xl:  3rem;       /* 48px */

  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --lh-tight:  1.2;
  --lh-normal: 1.6;
  --lh-loose:  1.8;

  /* ── Spacing ── */
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 5rem;
  --space-5xl: 6rem;

  /* ── Borders & Radii ── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* ── Shadows ── */
  --shadow-sm:   0 1px 3px  rgba(0, 0, 0, 0.06);
  --shadow-md:   0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:   0 8px 30px rgba(0, 0, 0, 0.10);
  --shadow-xl:   0 12px 40px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 4px 20px rgba(201, 169, 110, 0.25);

  /* ── Transitions ── */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration:    0.3s;

  /* ── Layout ── */
  --container-max: 1200px;
  --nav-height:    80px;
  --z-nav:         1000;
  --z-whatsapp:    999;
}

/* --------------------------------------------------------------------------
   3. BASE STYLES
   -------------------------------------------------------------------------- */
body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  line-height: var(--lh-normal);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--clr-primary-dark);
}

p {
  color: var(--clr-text-secondary);
  line-height: var(--lh-loose);
}

section {
  padding: var(--space-2xl) 0; /* Compact padding on mobile (3rem / 48px) */
  scroll-margin-top: calc(var(--nav-height) + 15px); /* Offset for fixed header + comfort margin */
}

/* --------------------------------------------------------------------------
   4. UTILITY CLASSES
   -------------------------------------------------------------------------- */

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl));
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: var(--fs-md);
  max-width: 600px;
  margin-inline: auto;
}

/* Golden underline decoration */
.section-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-gold), var(--clr-gold-light));
  margin: var(--space-lg) auto 0;
  border-radius: var(--radius-full);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--clr-gold), var(--clr-gold-light));
  color: var(--clr-primary-dark);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease-smooth);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--clr-gold-hover), var(--clr-gold));
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(201, 169, 110, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 13px 35px;
  background: transparent;
  color: var(--clr-primary);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 2px solid var(--clr-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration) var(--ease-smooth);
}

.btn-secondary:hover {
  background-color: var(--clr-primary);
  color: var(--clr-card);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 14px 36px;
  background-color: var(--clr-whatsapp);
  color: #ffffff;
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease-smooth);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background-color: var(--clr-whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:active {
  transform: translateY(0);
}

/* ── Fade-in (JS scroll reveal) ── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-smooth),
              transform 0.6s var(--ease-smooth);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Large button modifier ── */
.btn-lg {
  padding: 16px 42px;
  font-size: var(--fs-base);
}

/* ── Outline button (alias for secondary) ── */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 28px;
  background: transparent;
  color: var(--clr-primary);
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.5px;
  border: 2px solid var(--clr-primary);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration) var(--ease-smooth);
}

.btn-outline:hover {
  background-color: var(--clr-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ── Pulsing CTA button ── */
.btn-cta-pulse {
  animation: pulse 2.5s infinite;
}

/* --------------------------------------------------------------------------
   5. NAVIGATION (header)
   -------------------------------------------------------------------------- */
header,
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: var(--z-nav);
  transition: all var(--duration) var(--ease-smooth);
}

header .container,
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* ── Transparent state (default) ── */
header:not(.scrolled),
.header:not(.scrolled) {
  background: transparent;
}

header:not(.scrolled) .nav-link,
.header:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

header:not(.scrolled) .nav-link:hover,
.header:not(.scrolled) .nav-link:hover {
  color: var(--clr-gold-light);
}

header:not(.scrolled) .logo,
.header:not(.scrolled) .logo {
  color: #ffffff;
}

/* ── Scrolled state — glassmorphism ── */
header.scrolled,
.header.scrolled {
  background: rgba(255, 255, 255, 0.5); /* Higher transparency */
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(232, 229, 224, 0.3);
  box-shadow: var(--shadow-sm);
}

header.scrolled .nav-link,
.header.scrolled .nav-link {
  color: var(--clr-text);
}

header.scrolled .nav-link:hover,
.header.scrolled .nav-link:hover {
  color: var(--clr-primary);
}

header.scrolled .logo,
.header.scrolled .logo {
  color: var(--clr-primary-dark);
}

/* ── Logo ── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--ff-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  transition: color var(--duration) var(--ease-smooth);
  white-space: nowrap; /* Prevent wrapping on small screens */
}

.logo span {
  color: var(--clr-gold);
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  color: var(--clr-gold);
}

.logo-icon svg {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-size: var(--fs-lg);
  letter-spacing: 0.3px;
}

.logo-text strong {
  font-weight: var(--fw-bold);
}

/* ── Nav links ── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: 0.3px;
  position: relative;
  transition: color var(--duration) var(--ease-smooth);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--clr-gold);
  border-radius: var(--radius-full);
  transition: width var(--duration) var(--ease-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ── Nav CTA ── */
.nav-cta {
  padding: 10px 24px;
  font-size: var(--fs-xs);
}

/* ── Mobile-only CTA (hidden on desktop) ── */
.mobile-only-cta,
.menu-close-btn {
  display: none !important;
}

/* ── Hamburger / Mobile toggle ── */
.menu-toggle,
.nav-toggle {
  display: none;
  position: relative; /* CRITICAL: Enables z-index stacking context */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: calc(var(--z-nav) + 1);
}

.menu-toggle span,
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: var(--radius-full);
  transition: all var(--duration) var(--ease-smooth);
}

header.scrolled .menu-toggle span,
.header.scrolled .nav-toggle span {
  background: var(--clr-primary-dark);
}

/* Hamburger → X animation */
body.nav-open .menu-toggle span:nth-child(1),
body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .menu-toggle span:nth-child(2),
body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .menu-toggle span:nth-child(3),
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .hero-bg img {
    position: fixed;
    top: 0;
    left: 0;
  }
}

.hero-overlay,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--clr-hero-overlay);
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: var(--space-xl);
}

.hero-tagline {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--clr-gold-light);
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: #ffffff;
  margin-bottom: var(--space-lg);
  font-weight: var(--fw-bold);
}

.hero-title em {
  font-style: normal;
  color: var(--clr-gold-light);
}

.hero-subtitle {
  font-size: clamp(var(--fs-base), 2vw, var(--fs-lg));
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-2xl);
  font-weight: var(--fw-light);
  line-height: var(--lh-loose);
  max-width: 600px;
  margin-inline: auto;
}

/* Golden decorative separator */
.hero-separator {
  display: block;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--clr-gold), transparent);
  margin: 0 auto var(--space-2xl);
  border-radius: var(--radius-full);
}

.hero-actions,
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Hero secondary button white variant */
.hero-actions .btn-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  color: #ffffff;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: fadeInUp 1.5s ease-in-out infinite alternate;
  opacity: 0.5;
  color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   7. ABOUT SECTION
   -------------------------------------------------------------------------- */
.about {
  background-color: var(--clr-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

/* ── Section label ── */
.section-label {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--clr-gold);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl));
  margin-bottom: var(--space-sm);
}

.section-title em {
  font-style: normal;
  color: var(--clr-gold);
}

.section-line {
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-gold), var(--clr-gold-light));
  border-radius: var(--radius-full);
  margin-top: var(--space-md);
}

.section-header .section-line {
  margin-inline: auto;
}

.section-header--left {
  text-align: left;
}

.section-header--left .section-line {
  margin-inline: 0;
}

/* ── About content area ── */
.about-content h3,
.about-text h3 {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-lg);
}

.about-content p,
.about-text p {
  margin-bottom: var(--space-md);
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-smooth);
}

.about-image:hover img {
  transform: scale(1.03);
}

/* ── Stats Row ── */
.stats,
.stats-row {
  display: grid;
  grid-template-columns: 1fr; /* Stack vertically on mobile */
  gap: var(--space-lg);
  margin-top: var(--space-3xl);
  padding: var(--space-2xl);
  background: var(--clr-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-md);
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: inline;
  font-family: var(--ff-heading);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--clr-gold);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-suffix {
  font-family: var(--ff-heading);
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--clr-gold);
  line-height: 1;
}

.stat-label {
  font-size: var(--fs-sm);
  color: var(--clr-text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: var(--fw-medium);
}

/* --------------------------------------------------------------------------
   8. SPECIALTIES SECTION
   -------------------------------------------------------------------------- */
.specialties {
  background-color: var(--clr-card);
}

.specialties-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.specialty-card {
  background: var(--clr-card);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--duration) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.specialty-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-gold), var(--clr-gold-light));
  transform: scaleX(0);
  transition: transform var(--duration) var(--ease-smooth);
}

.specialty-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.specialty-card:hover::after {
  transform: scaleX(1);
}

.specialty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(45, 90, 63, 0.08), rgba(74, 124, 92, 0.08));
  margin-bottom: var(--space-lg);
  font-size: var(--fs-xl);
  color: var(--clr-primary);
  transition: all var(--duration) var(--ease-smooth);
}

.specialty-card:hover .specialty-icon {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-light));
  color: #ffffff;
  transform: scale(1.1);
}

.specialty-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-sm);
}

.specialty-card p {
  font-size: var(--fs-sm);
  line-height: var(--lh-loose);
}

/* --------------------------------------------------------------------------
   9. TEAM SECTION
   -------------------------------------------------------------------------- */
.team {
  background-color: var(--clr-bg);
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

.team-card {
  background: var(--clr-card);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  border: 1px solid var(--clr-border);
  transition: all var(--duration) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-primary-light));
  opacity: 0;
  transition: opacity var(--duration) var(--ease-smooth);
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.team-card:hover::before {
  opacity: 1;
}

.team-photo {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0 auto var(--space-lg);
  border: 4px solid var(--clr-border);
  transition: border-color var(--duration) var(--ease-smooth);
}

.team-card:hover .team-photo {
  border-color: var(--clr-gold);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-smooth);
}

.team-card:hover .team-photo img {
  transform: scale(1.05);
}

.team-name,
.team-card h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-xs);
}

.team-specialty {
  display: inline-block;
  font-size: var(--fs-sm);
  color: var(--clr-primary);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-xs);
}

.team-crm {
  display: block;
  font-size: var(--fs-xs);
  color: var(--clr-text-light);
  margin-bottom: var(--space-md);
}

.team-bio,
.team-card > p {
  font-size: var(--fs-sm);
  max-width: 400px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
}

.team-info {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --------------------------------------------------------------------------
   10. TESTIMONIALS SECTION
   -------------------------------------------------------------------------- */
.testimonials {
  background-color: #f5f4f0;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.testimonial-card {
  background: var(--clr-card);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  position: relative;
  transition: all var(--duration) var(--ease-smooth);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Quote icon decoration */
.testimonial-card::before {
  content: '\201C'; /* Left double quotation mark */
  position: absolute;
  top: var(--space-md);
  left: var(--space-xl);
  font-family: var(--ff-heading);
  font-size: 4rem;
  color: var(--clr-gold);
  opacity: 0.3;
  line-height: 1;
}

.testimonial-text {
  font-size: var(--fs-base);
  font-style: italic;
  color: var(--clr-text-secondary);
  line-height: var(--lh-loose);
  margin-bottom: var(--space-lg);
  padding-top: var(--space-lg);
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-bottom: var(--space-sm);
  color: var(--clr-gold);
  font-size: var(--fs-md);
}

.testimonial-author {
  font-weight: var(--fw-semibold);
  color: var(--clr-text);
  font-size: var(--fs-sm);
}

.testimonial-name {
  font-weight: var(--fw-semibold);
  color: var(--clr-text);
}

.testimonial-role {
  font-size: var(--fs-xs);
  color: var(--clr-text-light);
  font-weight: var(--fw-regular);
}

/* --------------------------------------------------------------------------
   11. CTA SECTION
   -------------------------------------------------------------------------- */
.cta-section {
  background: linear-gradient(135deg, var(--clr-primary-dark), var(--clr-primary));
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle background pattern */
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(201, 169, 110, 0.05) 0%, transparent 50%);
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-title,
.cta-section h2 {
  font-size: clamp(var(--fs-2xl), 4vw, var(--fs-3xl));
  color: #ffffff;
  margin-bottom: var(--space-md);
}

.cta-title em {
  font-style: normal;
  color: var(--clr-gold-light);
}

.cta-text,
.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-md);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.cta-phone {
  margin-top: var(--space-lg);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-sm);
}

.cta-phone a {
  color: var(--clr-gold-light);
  font-weight: var(--fw-medium);
  transition: color var(--duration) var(--ease-smooth);
}

.cta-phone a:hover {
  color: var(--clr-gold);
}

.cta-content {
  position: relative;
  z-index: 1;
}

/* Pulsing CTA button */
.cta-section .btn-primary {
  animation: pulse 2.5s infinite;
}

/* --------------------------------------------------------------------------
   12. LOCATION SECTION
   -------------------------------------------------------------------------- */
.location {
  background-color: var(--clr-bg);
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.location-info {
  background: var(--clr-card);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  border: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
}

.location-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--clr-border);
}

.location-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.location-item:first-child {
  padding-top: 0;
}

.location-icon {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(45, 90, 63, 0.08), rgba(74, 124, 92, 0.08));
  color: var(--clr-primary);
  font-size: var(--fs-md);
  padding-top: 12px;
}

.location-item h3,
.location-item h4 {
  font-family: var(--ff-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.location-item p {
  font-size: var(--fs-sm);
}

.location-item a {
  color: var(--clr-primary);
  transition: color var(--duration) var(--ease-smooth);
}

.location-item a:hover {
  color: var(--clr-gold);
}

.location-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

.location-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--clr-border);
  min-height: 350px;
}

.location-map iframe {
  width: 100%;
  height: 100%;
  min-height: 350px;
  border: none;
}

/* --------------------------------------------------------------------------
   13. FOOTER
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--clr-primary-dark);
  padding: var(--space-4xl) 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-3xl);
}

/* ── Footer brand column ── */
.footer-brand .logo {
  color: #ffffff;
  margin-bottom: var(--space-md);
  display: inline-block;
}

.footer-desc,
.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-sm);
  max-width: 300px;
}

.footer-logo {
  margin-bottom: var(--space-md);
}

/* ── Footer links columns ── */
.footer-links h4,
.footer-contact h4 {
  font-family: var(--ff-body);
  color: #ffffff;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-lg);
}

.footer-links nav,
.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--duration) var(--ease-smooth);
}

.footer-links a:hover {
  color: var(--clr-gold-light);
}

.footer-contact p {
  font-size: var(--fs-sm);
  margin-bottom: var(--space-xs);
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--duration) var(--ease-smooth);
}

.footer-contact a:hover {
  color: var(--clr-gold-light);
}

/* ── Footer contact ── */
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: var(--fs-sm);
}

.footer-contact-item i,
.footer-contact-item svg {
  color: var(--clr-gold);
  margin-top: 2px;
  min-width: 16px;
}

/* ── Social media icons ── */
.footer-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.social-link,
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-md);
  transition: all var(--duration) var(--ease-smooth);
}

.social-link:hover,
.footer-social a:hover {
  background-color: var(--clr-gold);
  border-color: var(--clr-gold);
  color: var(--clr-primary-dark);
  transform: translateY(-3px);
}

/* ── Copyright bar ── */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-lg) 0;
  text-align: center;
}

.footer-bottom p {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.4);
}

/* --------------------------------------------------------------------------
   14. FLOATING WHATSAPP BUTTON
   -------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-whatsapp);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background-color: var(--clr-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 28px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: all var(--duration) var(--ease-smooth);
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
  background-color: var(--clr-whatsapp-hover);
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg,
.whatsapp-float i {
  font-size: 28px;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   15. KEYFRAME ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.25);
  }
  50% {
    box-shadow: 0 4px 30px rgba(201, 169, 110, 0.5);
  }
  100% {
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.25);
  }
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6),
                0 0 0 8px rgba(37, 211, 102, 0.1);
  }
  100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  }
}

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

/* --------------------------------------------------------------------------
   16. SCROLL-DRIVEN ANIMATIONS (Modern CSS)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .fade-in {
      animation: fadeInUp 1s linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%;
    }

    /* Override JS-based transitions since scroll-driven handles it */
    .fade-in.visible {
      transition: none;
    }
  }
}

/* --------------------------------------------------------------------------
   17. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }

  .hero-bg {
    background-attachment: scroll;
  }

  .whatsapp-float {
    animation: none;
  }

  .cta-section .btn-primary {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   18. RESPONSIVE — MOBILE-FIRST BREAKPOINTS
   -------------------------------------------------------------------------- */

/* ── ≥ 480px  (Larger phones) ── */
@media (min-width: 480px) {
  .specialties-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats,
  .stats-row {
    gap: var(--space-xl);
  }
}

/* ── ≥ 768px  (Tablets) ── */
@media (min-width: 768px) {
  section {
    padding: var(--space-5xl) 0;
  }

  .container {
    padding-inline: var(--space-xl);
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .location-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-actions,
  .hero-buttons {
    flex-direction: row;
  }

  .stats,
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── ≥ 1024px (Desktop) ── */
@media (min-width: 1024px) {
  .menu-toggle,
  .nav-toggle {
    display: none !important;
  }

  .nav-menu {
    display: flex !important;
  }

  .specialties-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* ── ≥ 1200px (Large desktop) ── */
@media (min-width: 1200px) {
  .container {
    padding-inline: var(--space-lg);
  }

  .hero-title {
    font-size: 4rem;
  }
}

/* ── < 1024px (Tablet & mobile — hamburger menu) ── */
@media (max-width: 1023px) {
  .menu-toggle,
  .nav-toggle {
    display: flex;
    position: fixed;
    top: 25px;
    right: var(--space-lg);
    z-index: 1005;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(80vw, 360px);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xl);
    background: var(--clr-primary-dark);
    padding: var(--space-2xl);
    transform: translateX(100%);
    transition: transform var(--duration) var(--ease-smooth);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    z-index: var(--z-nav);
  }

  body.nav-open .nav-menu {
    transform: translateX(0);
  }

  /* Lock body scroll when menu is open */
  body.nav-open {
    overflow: hidden;
  }

  .nav-menu .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--fs-lg);
  }

  .nav-menu .nav-link:hover {
    color: var(--clr-gold-light);
  }

  /* Hide header CTA on mobile using ID selector to avoid specificity issues and crowding */
  #nav-cta {
    display: none !important;
  }

  /* Add padding-top to hero on mobile/tablet to prevent header from cutting off content */
  .hero {
    padding-top: calc(var(--nav-height) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
  }

  /* Show mobile-only CTA inside mobile slide-out menu */
  .nav-menu .mobile-only-cta {
    display: inline-flex !important;
    align-self: flex-start;
    margin-top: var(--space-lg);
    font-size: var(--fs-sm);
  }

  /* Display and style close button inside the mobile drawer */
  .nav-menu .menu-close-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 20px;
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--duration) var(--ease-smooth);
    z-index: 1010;
  }

  .nav-menu .menu-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  /* Hide the main hamburger button when menu drawer is active */
  body.nav-open .menu-toggle,
  body.nav-open .nav-toggle {
    display: none !important;
  }

  /* Mobile backdrop overlay */
  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-nav) - 1);
  }
}

/* ── Small phones ── */
@media (max-width: 479px) {
  .stat-number {
    font-size: var(--fs-2xl);
  }

  .stats,
  .stats-row {
    gap: var(--space-md);
  }

  .team-photo {
    width: 160px;
    height: 160px;
  }

  .hero-actions,
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .whatsapp-float {
    width: 54px;
    height: 54px;
    bottom: 16px;
    right: 16px;
    font-size: 24px;
  }
}
