/* ============================================================
   ENHANCEMENTS.CSS
   Extensions for videos.html and testimonials.html.
   All variables reference the existing design tokens from styles.css.
   Nothing in this file overrides existing selectors.
   ============================================================ */

/* ============================================================
   YOUTUBE CHANNEL BADGE (page header)
   ============================================================ */
.yt-channel-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-5);
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background var(--dur-1), transform var(--dur-1);
  text-decoration: none;
}
.yt-channel-link:hover {
  background: #ff0000;
  transform: translateY(-1px);
}
.yt-channel-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ============================================================
   FEATURED VIDEO CARD
   ============================================================ */
.vid-featured-section {
  padding-top:    var(--space-6);
  padding-bottom: var(--space-2);
}

.vid-featured-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;  /* thumbnail slightly wider */
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.vid-featured-card:hover {
  box-shadow: var(--shadow-3);
  transform: translateY(-3px);
}

/* Thumbnail side */
.vid-featured-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-3);
  overflow: hidden;
}
.vid-featured-thumb .img-ph {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
/* Reuse the existing .video-thumbnail class injected by scripts.js */
.vid-featured-thumb .video-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease);
}
.vid-featured-card:hover .vid-featured-thumb .video-thumbnail {
  transform: scale(1.04);
}

/* Play button overlay */
.vid-featured-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
}
.vid-featured-play-bg {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 27, 0.3);
  transition: background var(--dur-2);
}
.vid-featured-card:hover .vid-featured-play-bg {
  background: rgba(26, 31, 27, 0.18);
}
.vid-featured-play svg {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  background: var(--bg);
  color: var(--sage);
  border-radius: 50%;
  padding: 20px;
  transition: transform var(--dur-2) var(--ease), background var(--dur-2);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25));
}
.vid-featured-card:hover .vid-featured-play svg {
  transform: scale(1.1);
  background: var(--sage);
  color: var(--bg);
}

/* "Featured" badge */
.vid-featured-badge {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 3;
  background: var(--terracotta);
  color: var(--bg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-pill);
}

/* Info panel */
.vid-featured-info {
  padding: var(--space-6) var(--space-6);   /* tighter than space-7 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
}
.vid-featured-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.6vw, 1.55rem); /* scaled down — less crowded */
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink);
  margin-top: var(--space-1);
  /* Clamp at 3 lines so card stays compact */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vid-featured-desc {
  font-size: 0.88rem;   /* slightly smaller — breathes better */
  line-height: 1.6;
  color: var(--ink-2);
  /* Clamp description at 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vid-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--sage);
  color: var(--bg);
  padding: 0.6rem 1.1rem;
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
  transition: background var(--dur-1), transform var(--dur-1);
}
.vid-featured-card:hover .vid-play-btn {
  background: var(--sage-2);
  transform: translateX(3px);
}

/* Responsive: stack on mobile */
@media (max-width: 767px) {
  .vid-featured-card {
    grid-template-columns: 1fr;
  }
  .vid-featured-thumb {
    aspect-ratio: 16 / 9;
  }
  .vid-featured-info {
    padding: var(--space-5) var(--space-5);
    gap: var(--space-3);
  }
  .vid-featured-play svg {
    width: 52px;
    height: 52px;
    padding: 14px;
  }
  .vid-featured-title {
    font-size: clamp(1rem, 4vw, 1.3rem);
    -webkit-line-clamp: 4;
  }
}

/* ============================================================
   VIDEO GRID  —  extends .video-grid from styles.css
   ============================================================ */
.video-grid {
  margin-top: var(--space-5);
}

/* Card hidden state when filtered out */
.media-card[hidden],
.media-card.is-filtered {
  display: none;
}

/* Empty state message */
.vid-empty-state {
  text-align: center;
  padding: var(--space-8) 0;
  color: var(--muted);
  font-size: 0.97rem;
}

/* Channel CTA row */
.vid-channel-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-soft);
}
.vid-channel-cta p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}
.vid-yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ============================================================
   GOOGLE REVIEWS SECTION
   ============================================================ */
.gr-section {
  padding: var(--space-9) 0;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border-soft);
}

.gr-header {
  text-align: center;
  margin-bottom: var(--space-7);
}
.gr-header h2 {
  margin-bottom: var(--space-4);
}

/* Rating badge */
.gr-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-pill);
  padding: 0.5rem 1.1rem;
  box-shadow: var(--shadow-1);
  margin-top: var(--space-3);
}
.gr-score {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.gr-stars {
  display: flex;
  gap: 2px;
  color: #f59e0b;
}
.gr-stars svg {
  width: 18px;
  height: 18px;
}
.gr-count {
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* Widget slot — wraps the Elfsight embed */
.gr-widget-slot {
  margin-bottom: var(--space-5);
}

/* Placeholder shown when widget hasn't loaded yet */
.gr-widget-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-8);
  text-align: center;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  color: var(--muted);
}
.gr-widget-placeholder p {
  font-size: 0.9rem;
  max-width: 40ch;
  margin: 0;
  line-height: 1.6;
}
.gr-widget-placeholder code {
  background: var(--bg-3);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--terracotta);
  font-family: ui-monospace, SFMono-Regular, monospace;
}

/* ── Google Reviews Cards (rendered by js/reviews.js) ── */
.gr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.gr-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: box-shadow var(--dur-2), transform var(--dur-2);
}
.gr-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.gr-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.gr-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage-tint);
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--sage);
}
.gr-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gr-card-meta {
  flex: 1;
  min-width: 0;
}
.gr-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gr-card-date {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.gr-card-stars {
  display: flex;
  gap: 2px;
  color: #f59e0b;
}
.gr-card-stars svg {
  width: 16px;
  height: 16px;
}

.gr-card-text {
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--ink-2);
  flex: 1;
}
/* Clamp long reviews to 4 lines with "read more" expand */
.gr-card-text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gr-card-expand {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sage);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color var(--dur-1);
}
.gr-card-expand:hover { color: var(--sage-2); }

/* Google logo attribution (required by Google TOS) */
.gr-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-soft);
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.gr-card-footer svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* "Write a review" row */
.gr-cta-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-6);
}
.gr-review-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.gr-cta-note {
  font-size: 0.88rem;
  color: var(--muted);
}

/* Loading skeleton for reviews */
.gr-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.gr-skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: var(--space-5);
  animation: grPulse 1.4s ease-in-out infinite;
}
@keyframes grPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.gr-skel-line {
  height: 12px;
  background: var(--bg-3);
  border-radius: var(--r-sm);
  margin-bottom: var(--space-3);
}
.gr-skel-line:last-child { width: 60%; }

/* Error state */
.gr-error {
  text-align: center;
  padding: var(--space-6);
  color: var(--muted);
  font-size: 0.93rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
}
.gr-error a { color: var(--sage); text-decoration: underline; }

/* ============================================================
   RESPONSIVE — small screens
   ============================================================ */
@media (max-width: 640px) {
  .gr-grid {
    grid-template-columns: 1fr;
  }
  .gr-rating-badge {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: var(--r-md);
  }
  .vid-channel-cta {
    flex-direction: column;
    text-align: center;
  }
}


/* ============================================================
   YOUTUBE DYNAMIC LOADER — skeleton & load-more styles
   ============================================================ */

/* Skeleton grid shown while API fetches */
.yt-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.yt-skeleton-grid[hidden] { display: none; }

.yt-skel-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  animation: ytPulse 1.4s ease-in-out infinite;
}
@keyframes ytPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}
.yt-skel-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-3);
}
.yt-skel-line {
  height: 13px;
  background: var(--bg-3);
  border-radius: var(--r-sm);
  margin: var(--space-3) var(--space-4);
}

/* Featured card skeleton pulse */
.yt-featured-skeleton {
  animation: ytPulse 1.4s ease-in-out infinite;
  background: var(--bg-3) !important;
}

/* Load More button wrapper */
.yt-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--space-7);
}
.yt-load-more-wrap[hidden] { display: none; }

.yt-load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 180px;
  justify-content: center;
}
.yt-load-more-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Error state */
.yt-load-error {
  text-align: center;
  padding: var(--space-6);
  color: var(--muted);
  font-size: 0.93rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  margin-top: var(--space-5);
}
.yt-load-error a {
  color: var(--sage);
  text-decoration: underline;
}


/* ============================================================
   YOUTUBE TABS, SEARCH, SHORTS & PLAYLISTS
   ============================================================ */

/* ── Toolbar (tabs + search row) ── */
.yt-browser-section { padding-top: 0; }

.yt-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-soft);
}

/* ── Tab buttons ── */
.yt-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  flex: 1;
}

.yt-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--r-pill);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1);
  white-space: nowrap;
}
.yt-tab:hover {
  background: var(--bg-2);
  border-color: var(--sage-3);
  color: var(--ink);
}
.yt-tab.is-active {
  background: var(--sage);
  color: var(--bg);
  border-color: var(--sage);
  font-weight: 600;
}
.yt-tab:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

/* ── Search bar ── */
.yt-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
  max-width: 320px;
  flex-shrink: 0;
}
.yt-search-icon {
  position: absolute;
  left: 0.75rem;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}
.yt-search-input {
  width: 100%;
  padding: 0.55rem 2.4rem 0.55rem 2.2rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 0.88rem;
  color: var(--ink);
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
  outline: none;
}
.yt-search-input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(63, 87, 64, 0.12);
}
.yt-search-input::placeholder { color: var(--muted); }
.yt-search-clear {
  position: absolute;
  right: 0.6rem;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--muted);
  border-radius: 50%;
  transition: color var(--dur-1), background var(--dur-1);
}
.yt-search-clear:hover { color: var(--ink); background: var(--bg-2); }
.yt-search-clear[hidden] { display: none; }
.yt-search-clear svg { width: 13px; height: 13px; }

/* ── Search results notice ── */
.yt-search-notice {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-2);
  border-radius: var(--r-sm);
}
.yt-search-notice[hidden] { display: none; }

/* ── Shorts card — portrait aspect ratio ── */
.media-card.is-short .media-card-thumb,
.media-card-thumb.is-short-thumb {
  aspect-ratio: 9 / 16;
  max-height: 320px;
}

/* ── Shorts tab grid — same card width as All tab Shorts row ── */
.video-grid:has(.media-card.is-short) {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-4);
}

/* Portrait thumbnail fills correctly in the Shorts grid */
.video-grid .media-card.is-short .media-card-thumb {
  aspect-ratio: 9 / 16;
  position:     relative;
  overflow:     hidden;
}
.video-grid .media-card.is-short .media-card-thumb .video-thumbnail,
.video-grid .media-card.is-short .media-card-thumb img {
  position:        absolute;
  inset:           0;
  width:           100%;
  height:          100%;
  object-fit:      cover;
  object-position: center top;
}

/* Fallback for browsers without :has() */
@supports not (selector(:has(*))) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ── Live badge ── */
.media-card-type.is-live-badge {
  background: #e53935;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Playlist grid ── */
.yt-playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.yt-playlist-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--dur-2), transform var(--dur-2);
}
.yt-playlist-card:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.yt-playlist-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-3);
}
.yt-playlist-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-3) var(--ease);
}
.yt-playlist-card:hover .yt-playlist-thumb img { transform: scale(1.04); }

.yt-playlist-count {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  background: rgba(26, 31, 27, 0.82);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  backdrop-filter: blur(4px);
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .yt-toolbar { flex-direction: column; align-items: stretch; }
  .yt-search-wrap { max-width: 100%; }
  .yt-tabs { gap: var(--space-1); }
  .yt-tab { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
  .yt-playlist-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   MASONRY LAYOUT — All tab only
   Applied via .is-masonry class toggled by youtube-loader.js.
   Uses CSS columns for true browser-native masonry flow.
   Cards get data-size="lg|md|sm" for genuine height variation.
   ============================================================ */

/* ── Grid becomes a column-based masonry container ── */
/* Default (large screens ≥ 1200px): 4 columns                    */
/* Tablet (900–1199px)             : 3 columns                    */
/* Small tablet (541–899px)        : 2 columns                    */
/* Mobile (≤ 540px)                : 1 column (handled below)     */
.video-grid.is-masonry {
  display:    block;
  columns:    4 220px;   /* 4 columns on large screens */
  column-gap: var(--space-4);
  margin-top: var(--space-5);
}

/* Each card breaks cleanly without splitting across columns */
.video-grid.is-masonry .media-card {
  break-inside:      avoid;
  page-break-inside: avoid;
  display:           inline-block;
  width:             100%;
  margin-bottom:     var(--space-4);
  vertical-align:    top;
  animation: masonryFade 0.4s ease both;
}

@keyframes masonryFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* Stagger entrance — 16 cards to cover a full 4-col first row */
.video-grid.is-masonry .media-card:nth-child(1)  { animation-delay: 0ms; }
.video-grid.is-masonry .media-card:nth-child(2)  { animation-delay: 35ms; }
.video-grid.is-masonry .media-card:nth-child(3)  { animation-delay: 70ms; }
.video-grid.is-masonry .media-card:nth-child(4)  { animation-delay: 105ms; }
.video-grid.is-masonry .media-card:nth-child(5)  { animation-delay: 140ms; }
.video-grid.is-masonry .media-card:nth-child(6)  { animation-delay: 175ms; }
.video-grid.is-masonry .media-card:nth-child(7)  { animation-delay: 210ms; }
.video-grid.is-masonry .media-card:nth-child(8)  { animation-delay: 245ms; }
.video-grid.is-masonry .media-card:nth-child(9)  { animation-delay: 280ms; }
.video-grid.is-masonry .media-card:nth-child(10) { animation-delay: 315ms; }
.video-grid.is-masonry .media-card:nth-child(11) { animation-delay: 350ms; }
.video-grid.is-masonry .media-card:nth-child(12) { animation-delay: 385ms; }
.video-grid.is-masonry .media-card:nth-child(13) { animation-delay: 420ms; }
.video-grid.is-masonry .media-card:nth-child(14) { animation-delay: 455ms; }
.video-grid.is-masonry .media-card:nth-child(15) { animation-delay: 490ms; }
.video-grid.is-masonry .media-card:nth-child(16) { animation-delay: 525ms; }

/* ── Thumbnail height variations — creates genuine masonry heights ──
   lg  →  4:3   (taller portrait-ish feel)
   md  →  16:9  (default landscape, no override needed)
   sm  →  21:9  (wide cinematic crop)
   Thumbnails use object-fit:cover so cropping is always clean.
── */
/* data-size only applies to non-Short cards — Shorts keep natural portrait ratio */
.video-grid.is-masonry .media-card:not(.is-short)[data-size="lg"] .media-card-thumb {
  aspect-ratio: 4 / 3;
}
/* data-size="md" uses the default .video-thumbnail aspect-ratio: 16/9 */
/* NOTE: data-size="sm" is intentionally NOT defined — sm cards use default 16:9 */

/* ── Hover lift — slightly more pronounced in masonry ── */
.video-grid.is-masonry .media-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-3);
}

/* ── Responsive column count ── */
/* Tablet: 1200px–900px → 3 columns */
@media (max-width: 1199px) {
  .video-grid.is-masonry {
    columns: 3 200px;
  }
}
/* Small tablet: 900px–541px → 2 columns */
@media (max-width: 899px) {
  .video-grid.is-masonry {
    columns: 2 200px;
  }
}
/* Short cards in masonry: portrait + constrained width so they don't 
   dominate a column. Shorts naturally create the height variation masonry needs. */
.video-grid.is-masonry .media-card.is-short {
  /* Shorts don't get data-size — their portrait ratio IS the size variation */
}
.video-grid.is-masonry .media-card.is-short .media-card-thumb {
  aspect-ratio: 9 / 16;
  max-height: 340px;
  /* Ensure the thumb is a positioning context */
  position: relative;
  overflow: hidden;
}
/* Fix the injected <img> so it fills the portrait container */
.video-grid.is-masonry .media-card.is-short .media-card-thumb .video-thumbnail,
.video-grid.is-masonry .media-card.is-short .media-card-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;      /* fill — no black bars, no left-align */
  object-position: center top; /* keep face/top of frame visible */
}

@media (max-width: 540px) {
  .video-grid.is-masonry {
    columns: 1;
  }
  /* Single column: revert to standard 16:9 for readability */
  .video-grid.is-masonry .media-card:not(.is-short)[data-size="lg"] .media-card-thumb {
    aspect-ratio: 16 / 9;
  }
  /* Shorts: slightly less tall on mobile */
  .video-grid.is-masonry .media-card.is-short .media-card-thumb {
    aspect-ratio: 3 / 4;
    max-height: 260px;
  }
}


/* ============================================================
   MASONRY — MIXED CONTENT VISUAL POLISH
   Subtle visual cues to distinguish Shorts vs Videos in All tab
   ============================================================ */

/* Short cards get a softer border tint to visually group them */
.video-grid.is-masonry .media-card.is-short {
  border-color: var(--border);
}

/* Short card type badge — distinct color so it reads clearly */
.video-grid.is-masonry .media-card.is-short .media-card-type {
  background: rgba(63, 87, 64, 0.88); /* sage-tinted instead of ink */
}

/* Play circle slightly smaller on Short portrait cards */
.video-grid.is-masonry .media-card.is-short .media-card-play-circle {
  width: 44px;
  height: 44px;
}

/* Tighter body padding on portrait short cards (less content area) */
.video-grid.is-masonry .media-card.is-short .media-card-body {
  padding: var(--space-4);
}

/* On tablet, 2 columns — shorts sit naturally in the flow */
@media (min-width: 541px) and (max-width: 900px) {
  .video-grid.is-masonry .media-card.is-short .media-card-thumb {
    max-height: 280px;
  }
}

/* ============================================================
   SHORT CARD THUMBNAIL FIX — all contexts (masonry + Shorts tab)
   Ensures the injected <img> always fills its portrait container.
   ============================================================ */
.media-card.is-short .media-card-thumb {
  position: relative;
  overflow: hidden;
}
.media-card.is-short .media-card-thumb .video-thumbnail,
.media-card.is-short .media-card-thumb img {
  position: absolute;
  inset: 0;
  width:  100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ── Masonry section spacing — balanced top/bottom rhythm ── */
.yt-browser-section {
  padding-top: var(--space-5);
}


/* ============================================================
   EXTRACTED FROM HTML INLINE STYLES
   All previously inline styles, now properly in the stylesheet.
   ============================================================ */

/* ── Mobile drawer CTA heading (was inline on every page) ── */
.drawer-cta-heading {
  display:     block;
  font-family: var(--font-display);
  font-size:   1.2rem;
  margin-bottom: 0.5rem;
}

/* ── Footer clinic hours note (was inline on every page) ── */
.footer-hours-note {
  font-size: 0.82rem;
  opacity:   0.7;
}

/* ── Utility: flex-1 ── */
.flex-1 { flex: 1; }

/* ── Contact page: info highlight box ── */
.contact-info-box {
  background:    var(--sage-tint);
  color:         var(--sage);
  padding:       var(--space-4);
  border-radius: var(--r-sm);
  margin-bottom: var(--space-4);
}

/* ── Contact page: info box heading ── */
.contact-info-title {
  font-family:   var(--font-display);
  font-size:     1.4rem;
  font-weight:   500;
  margin-bottom: var(--space-4);
}

/* ── Icon sizes — replaces inline width/height on SVGs ── */
.icon-xs  { width: 14px; height: 14px; flex-shrink: 0; }
.icon-sm  { width: 18px; height: 18px; flex-shrink: 0; }
.icon-md  { width: 24px; height: 24px; flex-shrink: 0; }
.icon-lg  { width: 32px; height: 32px; }
.icon-sage { color: var(--sage); }

/* ── Skeleton line widths (videos page) ── */
.yt-skel-line.w-30 { width: 30%; }
.yt-skel-line.w-35 { width: 35%; }
.yt-skel-line.w-40 { width: 40%; }
.yt-skel-line.w-45 { width: 45%; }
.yt-skel-line.w-50 { width: 50%; }
.yt-skel-line.w-55 { width: 55%; }
.yt-skel-line.w-60 { width: 60%; }
.yt-skel-line.w-65 { width: 65%; }
.yt-skel-line.w-70 { width: 70%; }
.yt-skel-line.w-75 { width: 75%; }
.yt-skel-line.w-80 { width: 80%; }
.yt-skel-line.w-85 { width: 85%; }
.yt-skel-line.w-90 { width: 90%; }

/* ============================================================
   HERO — Real photo with CURVED bottom blend
   Radial gradient centred at top-centre of the image.
   The ellipse edge creates a natural inward-curving arc at the
   bottom — not a straight line like linear gradients produce.
   Badge rotation stopped — text stays upright.
   ============================================================ */

/* Strip all box styling */
.hero-figure.has-real-photo {
  background:    none    !important;
  box-shadow:    none    !important;
  border-radius: 0       !important;
  overflow:      visible !important;
  aspect-ratio:  unset   !important;
  position:      relative;
  margin-top:    20px;
  margin-right:  -60px;
  margin-bottom: 0;
  align-self:    stretch;
}

/* Doctor image — curved arc fade using top-anchored radial mask */
.hero-doctor-img {
  display:         block;
  width:           100%;
  max-width:       none;
  height:          auto;
  object-fit:      contain;
  object-position: top center;

  /*
    HOW THE CURVE WORKS:
    radial-gradient centred at 50% 5% (top of image).
    The gradient radiates OUTWARD from that point.
    Pixels near the centre (top) are opaque — face visible.
    Pixels far from the centre (bottom corners) are transparent.
    The boundary between opaque and transparent is the CURVED
    edge of the ellipse — giving a natural arc at the bottom,
    exactly like the bottom of a stadium or bowl shape.

    ellipse 95% 90% sets:
      95% = how wide the ellipse is (relative to image width)
      90% = how tall the ellipse is (relative to image height)

    Stops:
      0–55%  fully opaque  → face + upper body crisp
      55–70% gentle fade   → mid body softens
      70–85% strong fade   → lower body dissolves
      85%+   transparent   → completely gone = page bg shows
  */
  -webkit-mask-image: radial-gradient(
    ellipse 95% 90% at 50% 5%,
    black              0%,
    black              55%,
    rgba(0,0,0,0.82)   65%,
    rgba(0,0,0,0.45)   75%,
    rgba(0,0,0,0.12)   83%,
    transparent        92%
  );
  mask-image: radial-gradient(
    ellipse 95% 90% at 50% 5%,
    black              0%,
    black              55%,
    rgba(0,0,0,0.82)   65%,
    rgba(0,0,0,0.45)   75%,
    rgba(0,0,0,0.12)   83%,
    transparent        92%
  );
}

/* Stamp chip */
.hero-figure.has-real-photo .hero-figure-stamp {
  z-index: 3;
}

/* Badge — static, no spin */
.hero-figure.has-real-photo .hero-figure-badge {
  animation: none !important;
  transform:  none !important;
  bottom: var(--space-8);
  right:  -20px;
  z-index: 4;
}

/* ── Tablet 980–1200px ── */
@media (min-width: 980px) and (max-width: 1200px) {
  .hero-figure.has-real-photo {
    margin-top:   -50px;
    margin-right: -30px;
  }
  .hero-figure.has-real-photo .hero-figure-badge {
    right:  -10px;
    bottom: var(--space-7);
  }
}

/* ── Mobile < 980px ── */
@media (max-width: 979px) {
  .hero-figure.has-real-photo {
    margin-top:    0;
    margin-right:  auto;
    margin-left:   auto;
    margin-bottom: 0;
    width:         80%;
  }
  .hero-doctor-img {
    -webkit-mask-image: radial-gradient(
      ellipse 92% 88% at 50% 5%,
      black              0%,
      black              52%,
      rgba(0,0,0,0.80)   64%,
      rgba(0,0,0,0.38)   76%,
      transparent        90%
    );
    mask-image: radial-gradient(
      ellipse 92% 88% at 50% 5%,
      black              0%,
      black              52%,
      rgba(0,0,0,0.80)   64%,
      rgba(0,0,0,0.38)   76%,
      transparent        90%
    );
  }
  .hero-figure.has-real-photo .hero-figure-badge {
    bottom: var(--space-5);
    right:  var(--space-5);
  }
}



/* Override grid layout when All tab rows mode is active */
.video-grid.is-rows {
  display:               block !important;
  grid-template-columns: none  !important;
  columns:               unset !important;
  gap:                   0;
}

/* ============================================================
   YOUTUBE-STYLE HORIZONTAL ROWS — All tab
   Pixel-matched to YouTube Home tab layout.
   Videos row on top, Shorts row below.
   ============================================================ */

/* ── Row container ── */
.yt-row {
  margin-bottom: 36px;
}

/* ── Row header ── */
.yt-row-header {
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  margin-bottom:   12px;
}

/* Row title — "Videos" / "Shorts" */
.yt-row-title {
  font-family:    var(--font-body);
  font-size:      1.1rem;
  font-weight:    700;
  color:          var(--ink);
  letter-spacing: 0;
  display:        flex;
  align-items:    center;
  gap:            8px;
}

/* Red Shorts icon (injected by JS for Shorts row) */
.yt-shorts-icon {
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  width:           24px;
  height:          24px;
  background:      #ff0000;
  border-radius:   6px;
  flex-shrink:     0;
}
.yt-shorts-icon svg {
  width:  14px;
  height: 14px;
  fill:   #fff;
}

/* "View all" button — subtle text link */
.yt-row-view-all {
  font-size:   0.8rem;
  font-weight: 600;
  color:       var(--sage);
  background:  transparent;
  border:      none;
  cursor:      pointer;
  padding:     4px 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition:  opacity var(--dur-1);
  white-space: nowrap;
}
.yt-row-view-all:hover { opacity: 0.7; }

/* ── Horizontal scroll strip ── */
.yt-row-scroll {
  display:            flex;
  gap:                12px;
  overflow-x:         auto;
  scroll-snap-type:   x mandatory;
  scrollbar-width:    none;
  -ms-overflow-style: none;
  padding-bottom:     4px;
}
.yt-row-scroll::-webkit-scrollbar { display: none; }

/* ── VIDEO cards in scroll row ── */
.yt-row-scroll .media-card {
  flex:              0 0 220px;   /* landscape card width */
  scroll-snap-align: start;
  margin-bottom:     0;
  display:           flex;
  flex-direction:    column;
  background:        var(--surface);
  border:            1px solid var(--border-soft);
  border-radius:     8px;
  overflow:          hidden;
  box-shadow:        none;
  transition:        transform var(--dur-2) var(--ease),
                     box-shadow var(--dur-2) var(--ease);
}
.yt-row-scroll .media-card:hover {
  transform:  translateY(-3px);
  box-shadow: var(--shadow-2);
}

/* Thumbnail: 16:9, rounded top */
.yt-row-scroll .media-card .media-card-thumb {
  aspect-ratio: 16 / 9;
  width:        100%;
  position:     relative;
  overflow:     hidden;
  border-radius: 8px 8px 0 0;
  background:   var(--bg-3);
}
.yt-row-scroll .media-card .media-card-thumb .video-thumbnail,
.yt-row-scroll .media-card .media-card-thumb img {
  position:        absolute;
  inset:           0;
  width:           100%;
  height:          100%;
  object-fit:      cover;
  object-position: center;
}

/* Card body: compact spacing */
.yt-row-scroll .media-card .media-card-body {
  padding:        10px 10px 12px;
  flex:           1;
  display:        flex;
  flex-direction: column;
  gap:            4px;
}

/* Title: 2 lines max, YouTube-weight */
.yt-row-scroll .media-card .media-card-title {
  font-family:     var(--font-body);
  font-size:       0.82rem;
  font-weight:     600;
  line-height:     1.4;
  color:           var(--ink);
  display:         -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:        hidden;
  margin:          0;
}

/* Meta: type label */
.yt-row-scroll .media-card .media-card-meta {
  font-size:  0.73rem;
  color:      var(--muted);
  margin-top: auto;
}

/* ── SHORT cards in scroll row ── */
.yt-row-scroll .media-card.is-short {
  flex:          0 0 220px;   /* portrait card width — matches YouTube Shorts */
  border-radius: 12px;
}

/* Portrait thumbnail: 9:16 */
.yt-row-scroll .media-card.is-short .media-card-thumb {
  aspect-ratio:  9 / 16;
  max-height:    294px;       /* 165 * 16/9 ≈ 294px */
  border-radius: 12px 12px 0 0;
}
/* Ensure portrait fill */
.yt-row-scroll .media-card.is-short .media-card-thumb .video-thumbnail,
.yt-row-scroll .media-card.is-short .media-card-thumb img {
  position:        absolute;
  inset:           0;
  width:           100%;
  height:          100%;
  object-fit:      cover;
  object-position: center top;
}

/* Short card body: slightly tighter */
.yt-row-scroll .media-card.is-short .media-card-body {
  padding: 8px 10px 10px;
}
.yt-row-scroll .media-card.is-short .media-card-title {
  font-size: 0.8rem;
}

/* ── Type badge: hidden in rows (title/meta tells you enough) ── */
.yt-row-scroll .media-card .media-card-type { display: none; }

/* ── Play button: smaller in rows ── */
.yt-row-scroll .media-card .media-card-play-circle {
  width:  42px;
  height: 42px;
}

/* ── Responsive: tablet ── */
@media (max-width: 980px) {
  .yt-row-scroll .media-card        { flex: 0 0 190px; }
   .yt-row-scroll .media-card.is-short { flex: 0 0 190px; }
  .yt-row-scroll .media-card.is-short .media-card-thumb { max-height: 258px; }
}

/* ── Responsive: mobile ── */
@media (max-width: 600px) {
  .yt-row-scroll                       { gap: 10px; }
  .yt-row-scroll .media-card           { flex: 0 0 165px; }
  .yt-row-scroll .media-card.is-short  { flex: 0 0 165px; }
  .yt-row-scroll .media-card.is-short .media-card-thumb { max-height: 213px; }
}
/* ============================================================
   ROW SLIDER ARROWS
   ============================================================ */

/* Wrapper — positions arrows outside the scroll strip */
.yt-row-wrap {
  position: relative;
}

/* Arrow buttons */
.yt-row-arrow {
  position:        absolute;
  top:             50%;
  transform:       translateY(-50%);
  z-index:         10;
  width:           40px;
  height:          40px;
  border-radius:   50%;
  background:      var(--surface);
  border:          1px solid var(--border-soft);
  box-shadow:      var(--shadow-2);
  cursor:          pointer;
  display:         grid;
  place-items:     center;
  transition:      opacity var(--dur-2), transform var(--dur-2),
                   box-shadow var(--dur-2);
  color:           var(--ink);
}
.yt-row-arrow svg {
  width:  18px;
  height: 18px;
  flex-shrink: 0;
}
.yt-row-arrow:hover {
  box-shadow: var(--shadow-3);
  transform:  translateY(-50%) scale(1.08);
}

/* Positions */
.yt-row-arrow-prev {
  left:    -20px;
  opacity: 0;             /* hidden at start — no back-scroll yet */
  pointer-events: none;
}
.yt-row-arrow-next {
  right: -20px;
}

/* Hide arrows on touch devices — they use native swipe */
@media (hover: none) {
  .yt-row-arrow { display: none; }
}

/* ============================================================
   v4 UPDATES — Nov 2026
   Adds:
   - Mobile drawer submenu (collapsible Media section)
   - Active-state styling for nav-dropdown menu items
   - Typography consistency pass across all components
   ============================================================ */

/* ---------- Mobile drawer: Media submenu ---------- */
.mobile-submenu {
  border-bottom: 1px solid var(--border-soft);
}
.mobile-submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-display);
  font-size: 1.6rem;
  padding: 0.5rem 0;
  color: var(--ink);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}
.mobile-submenu-toggle .mobile-submenu-chevron {
  width: 18px;
  height: 18px;
  opacity: 0.5;
  transition: transform var(--dur-1) var(--ease);
  flex-shrink: 0;
}
.mobile-submenu.is-open .mobile-submenu-chevron {
  transform: rotate(180deg);
}
.mobile-submenu-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.4rem 0 0.6rem var(--space-4);
  border-left: 2px solid var(--sage-tint);
  margin: 0.2rem 0 0.6rem 0.2rem;
}
.mobile-submenu-panel[hidden] {
  display: none;
}
.mobile-submenu-link {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  padding: 0.55rem 0;
  color: var(--ink-2);
  border-bottom: none !important; /* override mobile-drawer nav a rule */
  display: block;
  transition: color var(--dur-1);
}
.mobile-submenu-link:hover,
.mobile-submenu-link:focus {
  color: var(--sage);
}
.mobile-submenu-link.is-active {
  color: var(--sage);
  font-weight: 600;
}

/* The base .mobile-drawer nav a rule sets a border-bottom and padding via
   the > a selector. Make sure that doesn't apply to our submenu links. */
.mobile-drawer nav .mobile-submenu-link {
  border-bottom: none;
}

/* ---------- Desktop dropdown: active state for menu items ---------- */
.nav-dropdown-menu a.is-active {
  background: var(--bg-2);
  color: var(--sage);
  font-weight: 600;
}
.nav-dropdown-menu a {
  font-family: var(--font-body);
}

/* ---------- TYPOGRAPHY CONSISTENCY ENFORCEMENT ----------
   The site uses a single font family across all elements:
     Stack: "Segoe UI", SegoeUI, "Helvetica Neue", Helvetica, Arial, sans-serif
   Both --font-display (headings) and --font-body (UI, body, nav,
   cards, buttons, forms) resolve to this stack. These rules
   guarantee every interactive and structural element inherits
   the correct family, no matter where it appears.
   ---------------------------------------------------------- */

/* Force every non-heading element to use the body font */
body,
input, textarea, select, button, label, legend, fieldset,
nav, nav a, nav button,
.utility-bar, .utility-bar a,
.site-header, .site-header a,
.main-nav, .main-nav a, .main-nav button,
.btn, .btn-call-header,
.brand-name, .brand-tag,
.media-card-meta, .media-card-cat, .media-card-type,
.eyebrow, .lede,
.faq-item, .faq-question, .faq-answer,
.chip, .filter-chips,
.footer-grid, .footer-col, .footer-col h4, .footer-col li, .footer-col a,
.footer-bottom, .footer-hours-note,
.contact-band, .contact-numbers, .contact-number-row,
.mobile-drawer-cta,
.yt-tab, .yt-search-input, .yt-row-title, .yt-row-view-all,
.yt-playlist-card, .yt-load-more-btn,
.video-modal-info, .video-modal-info p,
.breadcrumb, .breadcrumb a,
.page-header, .page-header span,
.testimonial, .testimonial-meta, .testimonial-card,
.team-card, .team-card-name, .team-card-role,
.service-card, .service-card-title, .service-card-desc,
p, ul, ol, li, dl, dt, dd,
table, th, td, caption,
small, strong, em, code, pre, blockquote, cite, q {
  font-family: var(--font-body);
}

/* Display family — headings, brand mark, italic accent */
h1, h2, h3, h4, h5, h6,
.brand-mark,
.italic,
.vid-featured-title,
.media-card-title {
  font-family: var(--font-display);
}

/* Brand tag wants the body font (it's the supporting line) */
.brand-tag {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* h6 — small caps treatment for section labels */
h6 {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Footer headings — keep them in body font for editorial weight */
.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Card titles consistent across the whole site */
.media-card-title,
.team-card-name,
.service-card-title,
.vid-featured-title {
  letter-spacing: -0.01em;
  line-height: 1.25;
}

/* Form fields — uniform body font + size for predictable rhythm */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="password"],
input[type="date"],
textarea,
select {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}

/* Buttons — body font, never serif */
button,
.btn,
.btn-primary,
.btn-secondary,
.btn-call-header,
.yt-tab,
.yt-row-view-all,
.yt-row-arrow,
.yt-load-more-btn,
.chip,
.menu-toggle,
.mobile-drawer-close {
  font-family: var(--font-body);
}

/* Final fallback — anything we forgot inherits from body */
* {
  font-family: inherit;
}
/* ...except elements we explicitly want in display face */
h1, h2, h3, h4, h5, h6,
.brand-mark, .italic,
.vid-featured-title, .media-card-title,
.team-card-name, .service-card-title {
  font-family: var(--font-display);
}

/* ---------- Breadcrumb: ensure the new "Media — Page" text reads cleanly ---------- */
.breadcrumb .current {
  color: var(--ink);
  font-weight: 600;
}

/* ============================================================
   v5 UPDATES — May 2026
   Nav refresh + premium typography pass
   (Apple India / Microsoft-inspired scale & rhythm)
   ============================================================ */

/* ---------- Premium typography refinements ----------
   These build on the existing tokens — they don't replace the
   underlying scale. The goal is sharper hierarchy, tighter
   letter-spacing on display sizes, and a calmer body voice. */

body {
  font-feature-settings: "kern", "liga", "ss01", "cv11";
  text-rendering: optimizeLegibility;
}

/* Slightly tighter display tracking and a touch more line-height room. */
h1 {
  letter-spacing: -0.035em;
  line-height: 1.02;
}
h2 {
  letter-spacing: -0.025em;
  line-height: 1.08;
}
h3 {
  letter-spacing: -0.015em;
  line-height: 1.18;
}
h4 {
  letter-spacing: -0.01em;
  line-height: 1.28;
  font-weight: 600;
}

/* Calmer body reading — 17px base is good; refine line-length & line-height. */
p, li {
  line-height: 1.65;
}
.lede {
  font-size: 1.18rem;
  line-height: 1.55;
  letter-spacing: -0.005em;
  max-width: 60ch;
}

/* ---------- Navigation typography pass ----------
   Apple / MS sites: 14–15px nav, 500 weight, tighter spacing. */
.main-nav a.nav-link {
  font-size: 0.9375rem;   /* 15px */
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.main-nav ul {
  gap: var(--space-5);    /* tighten gap from --space-6 for more nav items */
}
.main-nav a.nav-link:hover {
  color: var(--sage);
}
.main-nav a.nav-link.is-active {
  color: var(--sage);
  font-weight: 600;
}
.main-nav a.nav-link.is-active::after {
  background: var(--sage);
}

/* Dropdown menu items: align with nav scale */
.nav-dropdown-menu a {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
}

/* Call-now button: keep prominent and accessible */
.btn-call-header {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 0.65rem 1.15rem;
  box-shadow: 0 1px 2px rgba(26,31,27,0.06);
}
.btn-call-header:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

/* Utility bar: slightly more polished */
.utility-bar {
  font-feature-settings: "tnum";
}

/* Brand text: a touch tighter so the lockup reads as one unit */
.brand-name {
  letter-spacing: -0.015em;
}
.brand-tag {
  letter-spacing: 0.2em;
  font-weight: 500;
}

/* ---------- Mobile drawer typography ---------- */
.mobile-drawer nav a {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-weight: 400;
}
.mobile-drawer nav a.is-active {
  color: var(--sage);
}
.mobile-submenu-toggle {
  letter-spacing: -0.02em;
}

/* ---------- Buttons: tighten label rhythm ---------- */
.btn {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* ---------- Eyebrow/labels: a hair smaller, more refined ---------- */
.eyebrow,
.hero-eyebrow {
  letter-spacing: 0.22em;
  font-weight: 500;
}

/* ---------- Header polish: subtle bottom border on scroll-y feel ---------- */
.site-header {
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2);
}

/* ============================================================
   FAQ PAGE LAYOUT
   New page-specific styles for /faq.html
   ============================================================ */
.faq-page-grid {
  display: grid;
  gap: var(--space-7);
  max-width: 880px;        /* readable single-column width */
  margin-inline: auto;
}
.faq-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.faq-group-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-soft);
}
/* Reset the .faq-mini margin when used inside the grouped FAQ page list */
.faq-list.faq-mini {
  margin-top: 0;
}
/* Slightly larger question text on the dedicated FAQ page for readability */
.faq-page-grid .faq-question {
  font-size: 1.05rem;
  padding: var(--space-4) 0;
}
.faq-page-grid .faq-answer {
  font-size: 1rem;
  line-height: 1.65;
  max-width: 70ch;
}
.faq-page-grid .faq-answer a {
  color: var(--sage);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.faq-page-grid .faq-answer a:hover {
  color: var(--ink);
}

@media (max-width: 720px) {
  .faq-page-grid {
    gap: var(--space-6);
  }
  .faq-page-grid .faq-mini {
    padding: var(--space-5);
  }
}

/* ============================================================
   RESPONSIVE NAV TUNING
   ============================================================ */
/* Tablet zone: 6 nav items + brand + Call now can crowd. Tighten gap. */
@media (max-width: 1180px) and (min-width: 981px) {
  .main-nav ul { gap: var(--space-4); }
  .main-nav a.nav-link { font-size: 0.9rem; }
  .btn-call-header { padding: 0.6rem 1rem; font-size: 0.9rem; }
}

/* Ensure the Call now button stays prominent on mobile (icon-only state). */
@media (max-width: 980px) {
  .btn-call-header {
    width: 44px;
    height: 44px;
    padding: 0;
    box-shadow: 0 2px 6px rgba(63,87,64,0.18);
  }
}

/* ============================================================
   Responsive Google Map embed
   Reusable, fluid container — no fixed width in the layout.
   The iframe fills the wrapper; aspect-ratio keeps it tidy
   across desktop / tablet / mobile without ever overflowing.
   ============================================================ */
.map-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;            /* mobile-first: a touch taller for usability */
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-3);        /* graceful tint while the map loads */
}
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (min-width: 768px) {
  .map-embed { aspect-ratio: 16 / 9; }
}

/* Fill variant — used where the parent already defines the box
   (e.g. the home page contact-band figure). The map simply
   fills its container edge to edge. */
.map-embed--fill {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  height: 100%;
  border-radius: 0;
}

/* Contact page map block: parent already rounds + borders,
   so the inner map sits flush. Slightly wider on large screens
   to echo the original 21/9 framing. */
.map-block .map-embed {
  border-radius: 0;
  background: transparent;
}
@media (min-width: 980px) {
  .map-block .map-embed { aspect-ratio: 21 / 9; }
}

/* Footer location reference link (replaces the static address text) */
.footer-map-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.4;
}
.footer-map-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 2px;
}

/* Contact page "Address" row as a get-directions link */
a.contact-detail-value.map-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.35rem;
}
a.contact-detail-value.map-link svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 3px;
}

/* ============================================================
   About intro — balance the portrait with the text column
   The bio + credentials now share the right column; the portrait
   stretches to match its height so the two columns end together
   (removes the large empty gap beside the tall portrait).
   ============================================================ */
@media (min-width: 980px) {
  .about-intro { align-items: stretch; }
  .about-intro .about-portrait {
    aspect-ratio: auto;     /* let height follow the text column */
    height: 100%;
    min-height: 520px;      /* keep a dignified portrait height if text is short */
  }
}
/* Credentials card now sits inside the bio column */
.about-text .credentials-card {
  margin: var(--space-6) 0 0;
}

/* ── Contact form: inline validation + success/error states ──────────────────
   Added for the updated contact form (js/contact-form.js). Uses existing
   palette variables only — no change to the overall design language. */
.field-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--terracotta);
}
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: var(--terracotta);
}
.form-field input[aria-invalid="true"]:focus,
.form-field textarea[aria-invalid="true"]:focus {
  border-color: var(--terracotta);
}
/* Error variant of the existing .contact-info-box (success keeps sage default) */
.contact-info-box--error {
  background: rgba(184, 89, 58, 0.10); /* terracotta tint */
  color: var(--terracotta);
}
/* Fallback "open WhatsApp" link inside the success box */
.contact-form-wa-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 600;
  text-decoration: underline;
}
