/* ==========================================================
   Dr. Janos Barrera MD — Professional Website
   Design: Editorial Minimalism
   ========================================================== */

/* ----------------------------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------------------------- */
:root {
  /* Colors */
  --color-bg:           #F8F7F4;
  --color-surface:      #FFFFFF;
  --color-text:         #1A1A1A;
  --color-muted:        #6B6B6B;
  --color-accent:       #1B3A5C;
  --color-accent-light: #E8EFF6;
  --color-border:       #E2E0DA;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale */
  --text-hero:    clamp(3rem, 8vw, 4.5rem);
  --text-h2:      clamp(2rem, 5vw, 3rem);
  --text-h3:      clamp(1.25rem, 3vw, 2rem);
  --text-body:    1.125rem;
  --text-small:   0.875rem;

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   6rem;
  --space-2xl:  9rem;

  /* Layout */
  --max-width:  1200px;
  --nav-height: 72px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-base: 0.6s;
}


/* ----------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* ----------------------------------------------------------
   3. NAVIGATION
   ---------------------------------------------------------- */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#main-nav.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-accent);
  white-space: nowrap;
}

.nav-logo span {
  font-weight: 300;
  color: var(--color-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-left: var(--space-lg);
}

.nav-links li {
  white-space: nowrap;
}

.nav-links a {
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.25s var(--ease-out);
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Patient Resources dropdown — desktop */
.nav-links li.has-dropdown {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 240px;
  background: rgba(248, 247, 244, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

/* Invisible hover bridge so the cursor can travel from the
   nav link down to the panel without closing the dropdown. */
.nav-dropdown::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.nav-links li.has-dropdown:hover .nav-dropdown,
.nav-links li.has-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown li {
  white-space: nowrap;
}

.nav-dropdown a {
  display: block;
  padding: 0.55rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--color-text);
}

.nav-dropdown a::after {
  display: none;
}

.nav-dropdown a:hover {
  color: var(--color-accent);
  background: rgba(0, 0, 0, 0.035);
}

/* Hamburger button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--color-text);
  transition: all 0.3s var(--ease-out);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile overlay */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  background-color: #F8F7F4;
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: var(--space-lg) var(--space-md);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: center;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 300;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.mobile-menu a:hover {
  color: var(--color-accent);
}

/* Patient Resources submenu — mobile (inline expanded under the parent link) */
.mobile-submenu {
  list-style: none;
  margin: 0.75rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.mobile-submenu a {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 300;
  color: var(--color-muted);
}

.mobile-submenu a:hover {
  color: var(--color-accent);
}


/* ----------------------------------------------------------
   4. SECTION LAYOUT HELPERS
   ---------------------------------------------------------- */
section {
  padding: var(--space-xl) 0;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-alt {
  background: var(--color-surface);
}

.section-header {
  max-width: 640px;
  margin-bottom: var(--space-lg);
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section-header h2 {
  font-size: var(--text-h2);
  margin-bottom: var(--space-sm);
}

.section-intro {
  font-size: var(--text-body);
  color: var(--color-muted);
  line-height: 1.7;
}

.body-text {
  color: var(--color-muted);
  line-height: 1.8;
  margin-bottom: var(--space-sm);
}


/* ----------------------------------------------------------
   5. HERO
   ---------------------------------------------------------- */
#hero {
  min-height: 100svh;
  padding-top: var(--nav-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero-content {
  min-width: 0;
}

.hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 440px;
  justify-self: end;
  width: 100%;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  filter: grayscale(10%) contrast(1.02);
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .hero-photo {
    order: -1;
    max-width: 280px;
    justify-self: center;
  }
}

.hero-eyebrow {
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

#hero h1 {
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-md);
  max-width: 14ch;
}

.hero-sub {
  font-size: 1rem;
  color: var(--color-muted);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
}

/* Decorative SVG */
.hero-decor {
  position: absolute;
  right: -10vw;
  top: 50%;
  transform: translateY(-50%);
  width: min(520px, 50vw);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.hero-scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  left: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  z-index: 2;
}

.hero-scroll-hint span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-accent) 0%, transparent 100%);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}


/* ----------------------------------------------------------
   6. BUTTONS
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.75em;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: 1.5px solid var(--color-accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--color-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

.phone-icon {
  font-size: 1.1em;
}


/* ----------------------------------------------------------
   7. ABOUT
   ---------------------------------------------------------- */
.about-grid {
  display: block;
}

.about-grid .about-bio {
  max-width: 780px;
  margin: 0 auto;
}

.about-photo-wrap {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
}

.about-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--color-accent-light);
  border: 1px solid var(--color-border);
  overflow: hidden;
  position: relative;
}

.about-photo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: var(--color-accent-light);
}

.photo-fallback span:first-child {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-accent);
}

.photo-fallback span:last-child {
  font-size: var(--text-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Hide fallback when image loads */
.about-photo-placeholder img:not([style*="display: none"]) + .photo-fallback {
  opacity: 0;
}

/* Show fallback when image errors */
.about-photo-placeholder:has(img[style*="display: none"]) .photo-fallback,
.about-photo-placeholder:not(:has(img)) .photo-fallback {
  opacity: 1;
}

.credential-badges {
  display: flex;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.badge {
  flex: 1;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-align: center;
}

.badge-abbr {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-accent);
}

.badge-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 2px;
}

.about-bio {
  padding-top: var(--space-lg);
}

.about-bio .section-label {
  margin-bottom: var(--space-xs);
}

.about-bio h2 {
  font-size: var(--text-h2);
  margin-bottom: var(--space-md);
}

.bio-credentials {
  margin-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.cred-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.cred-item dt {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.cred-item dd {
  font-size: var(--text-small);
  color: var(--color-text);
}

.affiliations {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
}

.affiliations img {
  height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(0%);
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.affiliations img:hover {
  opacity: 1;
}

@media (max-width: 600px) {
  .affiliations {
    gap: 1.25rem;
  }
  .affiliations img {
    height: 44px;
  }
}


/* ----------------------------------------------------------
   8. EXPERTISE
   ---------------------------------------------------------- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.expertise-card {
  padding: var(--space-lg) var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.expertise-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 40px rgba(27, 58, 92, 0.08);
}

.expertise-icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.expertise-card h3 {
  font-size: var(--text-h3);
  margin-bottom: var(--space-sm);
}

.expertise-card p {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.card-link {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  text-transform: uppercase;
  position: relative;
}

.card-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.25s var(--ease-out);
}

.card-link:hover::after {
  width: 100%;
}


/* ----------------------------------------------------------
   9. PROCEDURES
   ---------------------------------------------------------- */
.procedures-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.procedure-group-title {
  font-size: 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: var(--space-md);
}

.procedure-list li {
  padding: 0.6em 0;
  font-size: 0.95rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: color 0.2s ease, padding-left 0.2s ease;
  cursor: default;
}

.procedure-list li:hover {
  color: var(--color-accent);
  padding-left: 0.5em;
}


/* ----------------------------------------------------------
   10. RESEARCH
   ---------------------------------------------------------- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.research-card {
  padding: var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  position: relative;
}

.research-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  display: inline-block;
  padding: 3px 8px;
  margin-bottom: var(--space-sm);
}

.research-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-sm);
}

.research-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}


/* ----------------------------------------------------------
   10b. PATIENT RESOURCES CALLOUT
   ---------------------------------------------------------- */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.resource-card {
  padding: var(--space-md);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  color: var(--color-text);
}

.resource-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 32px rgba(27, 58, 92, 0.08);
  transform: translateY(-2px);
}

.resource-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.resource-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.resource-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}


/* ----------------------------------------------------------
   11. APPOINTMENTS
   ---------------------------------------------------------- */
.appointments-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.appointments-content h2 {
  font-size: var(--text-h2);
  margin-bottom: var(--space-md);
}

.appointments-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.locations-title {
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-md);
  padding-top: var(--space-md);
}

.location-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.location-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.location-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.location-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}

.location-system {
  font-size: var(--text-small);
  color: var(--color-muted);
}

.location-phone {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-accent);
  white-space: nowrap;
}

.location-phone:hover {
  text-decoration: underline;
}

.appointments-header {
  max-width: 720px;
  margin-bottom: var(--space-lg);
}

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

.office-alt-name {
  color: var(--color-muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: -0.35rem !important;
  margin-bottom: 0.65rem !important;
}

.office-contact {
  margin-top: 0.75rem !important;
  color: var(--color-text) !important;
}

.office-contact a {
  color: var(--color-accent);
  font-weight: 500;
}

.office-contact a:hover { text-decoration: underline; }

.office-booking {
  margin-top: 0.75rem !important;
  font-size: 0.9rem;
}

.office-booking a {
  color: var(--color-accent);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 58, 92, 0.25);
  padding-bottom: 1px;
  transition: border-color 0.15s ease;
}

.office-booking a:hover {
  border-bottom-color: var(--color-accent);
}

@media (max-width: 700px) {
  .offices-grid { grid-template-columns: 1fr; }
}


/* ----------------------------------------------------------
   12. FOOTER
   ---------------------------------------------------------- */
footer {
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-lg);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--color-bg);
  margin-bottom: var(--space-xs);
}

.footer-logo span {
  font-weight: 300;
  opacity: 0.6;
}

.footer-tagline {
  font-size: var(--text-small);
  color: rgba(248, 247, 244, 0.5);
  line-height: 1.6;
}

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

.footer-nav a {
  font-size: var(--text-small);
  color: rgba(248, 247, 244, 0.6);
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--color-bg);
}

.footer-social-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(248, 247, 244, 0.4);
  margin-bottom: var(--space-sm);
}

.social-links {
  display: flex;
  gap: var(--space-sm);
}

.social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(248, 247, 244, 0.6);
  transition: all 0.2s ease;
  border-radius: 2px;
}

.social-link svg {
  width: 16px;
  height: 16px;
}

.social-link:hover {
  background: rgba(255,255,255,0.1);
  color: var(--color-bg);
  border-color: rgba(255,255,255,0.3);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.disclaimer {
  font-size: 11px;
  color: rgba(248, 247, 244, 0.35);
  max-width: 60ch;
  line-height: 1.6;
}

.copyright {
  font-size: 11px;
  color: rgba(248, 247, 244, 0.35);
  white-space: nowrap;
}


/* ----------------------------------------------------------
   13. SCROLL ANIMATIONS
   ---------------------------------------------------------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp var(--duration-base) var(--ease-out) forwards;
}

.fade-in.delay-1 { animation-delay: 0.15s; }
.fade-in.delay-2 { animation-delay: 0.30s; }
.fade-in.delay-3 { animation-delay: 0.45s; }

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

/* Intersection Observer triggered reveals */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.12s; }
.reveal.delay-2 { transition-delay: 0.24s; }
.reveal.delay-3 { transition-delay: 0.36s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-line { animation: none; }
}


/* ----------------------------------------------------------
   14. RESPONSIVE — TABLET (≤900px)
   ---------------------------------------------------------- */
@media (max-width: 900px) {
  .expertise-grid,
  .research-grid,
  .resources-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about-photo-wrap {
    position: static;
    max-width: 400px;
  }

  .about-bio {
    padding-top: 0;
  }

  .appointments-inner {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}


/* ----------------------------------------------------------
   14b. PATIENT RESOURCES
   ---------------------------------------------------------- */
.pr-page {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.pr-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.pr-back {
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.2s ease;
}

.pr-back:hover { color: var(--color-accent); }

.pr-lang-toggle {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding: 0.4em 0.9em;
  border: 1.5px solid var(--color-border);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.pr-lang-toggle:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.pr-lang-group {
  display: inline-flex;
  border: 1.5px solid var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.pr-lang-group a {
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 0.4em 0.85em;
  transition: all 0.2s ease;
  border-left: 1px solid var(--color-border);
}

.pr-lang-group a:first-child { border-left: none; }

.pr-lang-group a.active {
  background: var(--color-accent);
  color: #fff;
}

.pr-lang-group a:not(.active):hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.pr-location-group {
  margin-bottom: var(--space-md);
}

.pr-location-group h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.pr-location-group ul li {
  font-size: 0.98rem;
}

.pr-location-group strong {
  color: var(--color-text);
}

.pr-hero {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) var(--space-lg);
  text-align: left;
}

.pr-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.pr-hero h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.pr-hero .pr-subtitle {
  font-size: 1.2rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.pr-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-2xl);
}

.pr-content section {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
}

.pr-content section:first-of-type { border-top: none; padding-top: 0; }

.pr-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 400;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.pr-content h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

.pr-content p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.pr-content ul {
  margin: var(--space-sm) 0 var(--space-md);
  padding-left: 0;
}

.pr-content ul li {
  position: relative;
  padding-left: 1.5em;
  margin-bottom: 0.6em;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text);
}

.pr-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.7em;
  height: 1px;
  background: var(--color-accent);
}

.pr-callout {
  background: var(--color-accent-light);
  border-left: 3px solid var(--color-accent);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

.pr-callout strong {
  display: block;
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.pr-callout p { margin: 0; font-size: 1rem; }

.pr-redflags {
  background: #FEF3F2;
  border-left: 3px solid #B42318;
}

.pr-redflags strong { color: #B42318; }

.pr-cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.pr-illustration {
  margin: var(--space-md) 0 var(--space-lg);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  text-align: center;
}

.pr-illustration img {
  max-width: 100%;
  height: auto;
  max-height: 360px;
  display: inline-block;
}

.pr-illustration figcaption {
  margin-top: var(--space-sm);
  font-size: var(--text-small);
  color: var(--color-muted);
  line-height: 1.5;
}

.pr-illustration figcaption a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--color-border);
}

.pr-illustration .pr-credit {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--color-muted);
  opacity: 0.7;
  letter-spacing: 0.02em;
  font-style: italic;
  line-height: 1.4;
}

.pr-figures {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
}

.pr-figures .pr-illustration {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

.pr-figures .pr-illustration img {
  max-height: 640px;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.pr-illustration.pr-figure-single {
  padding: 0;
  background: transparent;
  border: none;
}

.pr-illustration.pr-figure-single img {
  max-height: 560px;
  width: auto;
  max-width: 100%;
}

@media (max-width: 720px) {
  .pr-figures {
    grid-template-columns: 1fr;
  }
  .pr-figures .pr-illustration img {
    max-height: 520px;
  }
  .pr-illustration.pr-figure-single img {
    max-height: 420px;
  }
}

/* Landing page grid */
.pr-landing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

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

.pr-card {
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  display: block;
}

.pr-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 6px 24px rgba(27, 58, 92, 0.06);
  transform: translateY(-2px);
}

.pr-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.pr-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  text-transform: none;
  letter-spacing: -0.01em;
}

.pr-card p {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.6;
  margin: 0;
}

.pr-section-title {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.pr-subsection-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 500;
  color: var(--color-dark);
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

.pr-subsection-title:first-of-type {
  margin-top: 0;
}

.pr-conditions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

.pr-subsection-title + .pr-conditions-grid {
  margin-bottom: var(--space-md);
}

.pr-condition-card {
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}

.pr-condition-card:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  padding-left: calc(var(--space-md) + 0.25em);
}

.pr-footer {
  background: var(--color-surface);
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  margin-top: var(--space-lg);
}

.pr-office-list {
  list-style: none;
  padding: 0;
  color: var(--color-text);
}

.pr-office-list li {
  color: var(--color-text);
  font-size: var(--text-small);
  margin-bottom: 0.25rem;
}

.pr-footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  text-align: center;
}

.pr-footer p {
  font-size: var(--text-small);
  color: var(--color-muted);
  margin-bottom: var(--space-xs);
}

.pr-footer a { color: var(--color-accent); font-weight: 500; }

@media (max-width: 700px) {
  .pr-landing-grid { grid-template-columns: 1fr; }
  .pr-conditions-grid { grid-template-columns: 1fr; }
  .pr-hero { padding-top: var(--space-sm); }
  .pr-header { padding-top: var(--space-md); }
}


/* ----------------------------------------------------------
   15. RESPONSIVE — NAV COLLAPSE (≤900px)
   ---------------------------------------------------------- */
@media (max-width: 900px) {
  /* Show hamburger, hide desktop nav at tablet widths too */
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
  }
}

/* ----------------------------------------------------------
   15b. RESPONSIVE — MOBILE (≤600px)
   ---------------------------------------------------------- */
@media (max-width: 600px) {
  :root {
    --space-xl:  3.5rem;
    --space-2xl: 5rem;
  }

  /* Hero */
  .hero-decor {
    display: none;
  }

  .hero-scroll-hint {
    display: none;
  }

  /* Grids → single column */
  .expertise-grid,
  .research-grid,
  .resources-grid,
  .procedures-grid {
    grid-template-columns: 1fr;
  }

  /* Credentials table */
  .cred-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  /* Location items */
  .location-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .location-system {
    text-align: left;
  }

  .location-phone {
    font-size: 1rem;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-xs);
  }

  /* Credential badges */
  .credential-badges {
    flex-wrap: wrap;
  }
}

/* Patient resources: Leaflet map */
.pr-map-section {
  margin: var(--space-md) 0;
}

.pr-map-wrap {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(27, 58, 92, 0.12);
  background: #eef1f4;
}

#pr-map {
  width: 100%;
  height: 100%;
}

.pr-map-legend {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-size: 14px;
  color: var(--color-muted);
}

.pr-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.pr-map-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

.pr-map-dot.office { background: #1B3A5C; }
.pr-map-dot.therapy { background: #D97706; }
.pr-map-dot.emg { background: #059669; }
.pr-map-dot.imaging { background: #7C3AED; }

.pr-map-popup strong { display: block; margin-bottom: 2px; }
.pr-map-popup a { color: var(--color-accent, #1B3A5C); }
