/* Route-specific styles: Smile gallery. Shared tokens and utilities stay in globals.css. */
.gallery-hero { position: relative; overflow: hidden; padding: 100px 0 104px; color: white; background: var(--purple-dark); }
.gallery-hero::after { content: ""; position: absolute; right: -120px; bottom: -300px; width: 600px; height: 600px; border: 1px solid rgba(255,255,255,0.13); border-radius: 50%; box-shadow: 0 0 0 74px rgba(255,255,255,0.025), 0 0 0 148px rgba(255,255,255,0.018); }
.gallery-hero-inner { position: relative; z-index: 1; }
.gallery-hero h1 { max-width: 900px; color: white; }
.gallery-hero h1 em { color: #ffe39a; }
.gallery-hero-inner > p:last-child { max-width: 680px; margin: 28px 0 0; color: #ddd5e7; font-size: 1.1rem; line-height: 1.7; }
.smile-gallery-section { padding: 78px 0 108px; background: var(--paper); }
.gallery-intro { display: flex; align-items: center; justify-content: space-between; gap: 48px; margin-bottom: 42px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.gallery-intro > p { max-width: 780px; margin: 0; color: var(--muted); line-height: 1.7; }
.gallery-intro .text-link { flex: 0 0 auto; }
.smile-gallery-grid { columns: 3 320px; column-gap: 22px; }
.smile-card { break-inside: avoid; margin: 0 0 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 14px 34px rgba(61,43,101,0.08); }
.smile-card a { display: block; }
.smile-card-media { position: relative; display: block; overflow: hidden; transition: transform 220ms ease; }
.smile-card-media > img:first-child { display: block; width: 100%; height: auto; }
.smile-card:hover .smile-card-media { transform: scale(1.015); }
.smile-card figcaption { padding: 16px 18px 18px; color: var(--muted); font-size: 0.92rem; line-height: 1.55; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .gallery-hero { padding: 78px 0 82px; }
  .gallery-intro { align-items: flex-start; flex-direction: column; gap: 20px; }
}
.smile-card-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: white; cursor: zoom-in; }
.smile-card-open:focus-visible { outline: 4px solid var(--purple); outline-offset: -4px; }
.smile-enlarge-label { position: absolute; right: 12px; bottom: 12px; padding: 8px 12px; border-radius: 4px; color: white; background: var(--purple-dark); font: 750 .875rem/1.4 var(--sans); }
.smile-lightbox { width: min(1000px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; border-radius: 10px; background: white; color: var(--ink); }
.smile-lightbox::backdrop { background: rgba(22,13,36,.85); }
.smile-lightbox-content { padding: 24px; }
.smile-lightbox-heading, .smile-lightbox-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.smile-lightbox-heading h2 { font: 750 1.125rem/1.4 var(--sans); letter-spacing: 0; }
.smile-lightbox figure { margin: 20px 0; }
.smile-lightbox figure img { max-height: 68dvh; width: 100%; height: auto; object-fit: contain; }
.smile-lightbox figcaption { margin-top: 16px; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.smile-lightbox button:focus-visible { outline-color: var(--purple-ink); }
@media (max-width: 620px) {
  .smile-lightbox-content { padding: 14px; }
  .smile-lightbox-controls .button { padding-inline: 14px; }
}

/* Neutral fallback preserves the supplied image aspect ratio without inventing patient results. */
.smile-image-unavailable { display: grid; place-items: center; width: 100%; min-height: 120px; padding: 16px; background: var(--lavender); color: var(--purple-dark); font: 650 1rem/1.5 var(--sans); text-align: center; }
.smile-lightbox:not([open]) { display: none; }
