/* Otatva Gallery page — page-specific layout. Shared branding is in styles.css. */
:root {
  --gallery-ink: #30153b;
  --gallery-purple: #56216d;
  --gallery-gold: #b7802b;
  --gallery-cream: #fffaf2;
  --gallery-muted: #726679;
}
.gallery-page { color: var(--gallery-ink); background: var(--gallery-cream); }
.gallery-page a:focus-visible,
.gallery-page button:focus-visible { outline: 3px solid #c99b42; outline-offset: 4px; }
.gallery-page [id] { scroll-margin-top: 112px; }

/* Panoramic hero. */
.gallery-hero { min-height: clamp(390px, 37vw, 520px); position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; background: #f6ead7; }
.gallery-hero__image { position: absolute; z-index: -3; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.gallery-hero__veil { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(255,250,242,.98) 0%, rgba(255,250,242,.94) 26%, rgba(255,250,242,.78) 43%, rgba(255,250,242,.20) 64%, rgba(255,250,242,.02) 100%), linear-gradient(0deg, rgba(255,247,237,.35), transparent 30%); }
.gallery-hero__inner { position: relative; z-index: 1; }
.gallery-hero__copy { width: min(690px, 62%); padding: 56px 0 62px; }
.gallery-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 13px; color: #a76d1b; font-size: 12px; font-weight: 700; letter-spacing: .15em; line-height: 1.5; text-transform: uppercase; }
.gallery-kicker span { color: #5a276b; }
.gallery-kicker i { color: #b9822f; font-style: normal; }
.gallery-breadcrumb { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; color: #746779; font-size: 13px; }
.gallery-breadcrumb a { color: #57236c; text-decoration: underline; text-decoration-color: rgba(87,35,108,.3); text-underline-offset: 3px; }
.gallery-breadcrumb span[aria-hidden="true"] { color: #b78a48; }
.gallery-hero h1 { max-width: 690px; margin: 0 0 16px; color: #2e1539; font: 700 clamp(44px, 5vw, 70px)/.99 var(--serif); letter-spacing: -.035em; }
.gallery-hero h1 em { color: #b47b27; font-weight: 500; }
.gallery-hero__copy > p:not(.gallery-kicker) { max-width: 570px; margin: 0 0 24px; color: #55485d; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.75; }
.gallery-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gallery-hero__actions .button { min-height: 48px; padding-inline: 24px; font-size: 14px; }
.gallery-hero__ornament { position: absolute; top: 11%; right: 6%; color: rgba(184,135,47,.55); font-size: 48px; pointer-events: none; }

/* Intro and filters. */
.gallery-intro { padding: 68px 0 38px; background: linear-gradient(110deg, #fffaf2, #fffdf9 58%, #f8eff6); text-align: center; }
.gallery-intro__inner { max-width: 900px; }
.gallery-kicker--center { justify-content: center; }
.gallery-intro h2 { margin: 0 0 12px; color: #32163f; font: 700 clamp(36px, 3.8vw, 52px)/1.04 var(--serif); letter-spacing: -.02em; }
.gallery-intro h2 em { color: #b47d28; font-weight: 500; }
.gallery-intro__inner > p:last-child { max-width: 760px; margin: 0 auto; color: #6b5f72; font-size: 17px; line-height: 1.75; }
.gallery-collection { padding: 52px 0 88px; background: #fbf6ee; }
.gallery-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.gallery-section-heading .gallery-kicker { margin-bottom: 7px; }
.gallery-section-heading h2 { margin: 0; color: #32163f; font: 700 clamp(34px, 3.7vw, 50px)/1.05 var(--serif); }
.gallery-section-heading h2 em { color: #b47d28; font-weight: 500; }
.gallery-count { margin: 0 0 7px; color: #7c6f80; font-size: 14px; white-space: nowrap; }
.gallery-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; }
.gallery-filter { min-height: 42px; padding: 9px 17px; border: 1px solid rgba(164,119,52,.28); border-radius: 999px; color: #624c69; background: rgba(255,255,255,.72); font: 600 14px/1.2 var(--sans); cursor: pointer; transition: color .2s, background .2s, border-color .2s, transform .2s; }
.gallery-filter:hover { transform: translateY(-1px); border-color: #b98943; }
.gallery-filter.is-active { color: #fffaf4; border-color: #58206f; background: linear-gradient(120deg, #6b2581, #421452); box-shadow: 0 6px 14px rgba(72,24,91,.14); }
.gallery-preview-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 27px; padding: 12px 15px; border: 1px solid rgba(183,132,45,.23); border-radius: 12px; color: #69596c; background: rgba(255,255,255,.6); font-size: 13px; line-height: 1.55; }
.gallery-preview-note span { flex: 0 0 auto; color: #b7802b; }

/* Responsive editorial grid with varied image proportions. */
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
.gallery-item { display: block; min-width: 0; overflow: hidden; border: 1px solid rgba(114,75,120,.14); border-radius: 18px; color: inherit; background: #fffdf9; box-shadow: 0 12px 28px rgba(55,30,59,.07); text-decoration: none; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.gallery-item:hover { transform: translateY(-4px); border-color: rgba(183,132,45,.5); box-shadow: 0 18px 34px rgba(55,30,59,.12); }
.gallery-item[hidden] { display: none !important; }
.gallery-item__media { position: relative; display: block; overflow: hidden; aspect-ratio: 1.34 / 1; background: #eadcc9; }
.gallery-item--feature .gallery-item__media { aspect-ratio: 1.7 / 1; }
.gallery-item__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover .gallery-item__media img { transform: scale(1.045); }
.gallery-item__view { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.48); border-radius: 999px; color: white; background: rgba(43,19,53,.72); backdrop-filter: blur(8px); font-size: 12px; font-weight: 600; opacity: 0; transform: translateY(5px); transition: opacity .2s, transform .2s; }
.gallery-item__view span { font-size: 19px; line-height: .7; }
.gallery-item:hover .gallery-item__view, .gallery-item:focus-visible .gallery-item__view { opacity: 1; transform: translateY(0); }
.gallery-item__body { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 16px 18px 18px; }
.gallery-item__category { color: #ab7626; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.gallery-item__body strong { color: #351a42; font: 700 23px/1.12 var(--serif); }
.gallery-item__body > span:last-child { color: #75687a; font-size: 14px; line-height: 1.5; }
.gallery-empty { margin: 28px 0 0; padding: 22px; border: 1px dashed rgba(168,125,56,.4); border-radius: 12px; color: #76697b; text-align: center; }

/* Native dialog lightbox with keyboard and touch-friendly controls. */
.gallery-lightbox { width: min(1120px, calc(100% - 32px)); max-width: none; max-height: calc(100% - 36px); padding: 0; overflow: visible; border: 1px solid rgba(255,255,255,.25); border-radius: 18px; color: #fff; background: #1f1424; box-shadow: 0 24px 80px rgba(14,7,19,.48); }
.gallery-lightbox::backdrop { background: rgba(19,10,25,.88); backdrop-filter: blur(5px); }
.gallery-lightbox__panel { position: relative; display: grid; grid-template-columns: 54px minmax(0,1fr) 54px; align-items: center; gap: 10px; padding: 18px; }
.gallery-lightbox__figure { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 13px; min-width: 0; margin: 0; }
.gallery-lightbox__figure img { display: block; width: 100%; max-height: min(72vh, 760px); object-fit: contain; border-radius: 8px; }
.gallery-lightbox__figure figcaption { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 0 4px 4px; text-align: center; }
.gallery-lightbox__figure figcaption strong { color: #f9e8bf; font: 600 25px/1.1 var(--serif); }
.gallery-lightbox__figure figcaption span { color: #e1d6e5; font-size: 13px; line-height: 1.5; }
.gallery-lightbox__close, .gallery-lightbox__nav { display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: white; background: rgba(255,255,255,.12); cursor: pointer; transition: background .2s, transform .2s; }
.gallery-lightbox__close:hover, .gallery-lightbox__nav:hover { background: rgba(255,255,255,.24); transform: scale(1.04); }
.gallery-lightbox__close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 42px; height: 42px; font-size: 30px; line-height: 1; }
.gallery-lightbox__nav { width: 46px; height: 46px; font-size: 36px; line-height: 1; }
.gallery-lightbox__prev { grid-column: 1; grid-row: 1; }
.gallery-lightbox__next { grid-column: 3; grid-row: 1; }

/* Closing invitation. */
.gallery-cta { position: relative; isolation: isolate; overflow: hidden; padding: 64px 0; color: #fffaf4; background: #34133f; }
.gallery-cta::before, .gallery-cta::after { position: absolute; z-index: -1; color: rgba(224,190,122,.11); font: 250px/1 var(--serif); pointer-events: none; }
.gallery-cta::before { content: "✺"; left: -35px; top: -25px; }
.gallery-cta::after { content: "❀"; right: -10px; bottom: -80px; }
.gallery-cta__veil { position: absolute; z-index: -2; inset: 0; background: radial-gradient(ellipse at 50% 0, #59246b, #2c1037 70%); }
.gallery-cta__inner { text-align: center; }
.gallery-cta .gallery-kicker { justify-content: center; color: #f1d58e; }
.gallery-cta h2 { max-width: 850px; margin: 0 auto 12px; color: #fffaf4; font: 700 clamp(34px, 4vw, 52px)/1.04 var(--serif); }
.gallery-cta h2 em { color: #f0d18b; font-weight: 500; }
.gallery-cta__inner > p:not(.gallery-kicker) { max-width: 720px; margin: 0 auto 22px; color: #eddfef; font-size: 16px; line-height: 1.7; }
.gallery-cta .button { font-size: 14px; }

/* Floating WhatsApp and Back-to-Top buttons stay separated. */
.gallery-float { position: fixed; z-index: 1200; right: max(24px, env(safe-area-inset-right)); display: grid; place-items: center; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; color: #fff; box-shadow: 0 8px 22px rgba(31,18,38,.24); transition: transform .2s, opacity .2s, visibility .2s; -webkit-tap-highlight-color: transparent; }
.gallery-float:hover { transform: translateY(-3px); }
.gallery-float svg { display: block; width: 29px; height: 29px; }
.gallery-float--whatsapp { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); color: #fff; background: #20c76a; }
.gallery-float--top { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); color: #fff; background: linear-gradient(145deg, #702588, #431253); opacity: 0; visibility: hidden; pointer-events: none; }
.gallery-float--top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.gallery-float--top svg { width: 25px; height: 25px; }

@media (max-width: 1100px) {
  .gallery-hero__copy { width: min(640px, 67%); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
  .gallery-item--feature .gallery-item__media { aspect-ratio: 1.34 / 1; }
}
@media (max-width: 760px) {
  .gallery-page [id] { scroll-margin-top: 88px; }
  .gallery-hero { min-height: 0; display: block; }
  .gallery-hero__image { object-position: 70% center; }
  .gallery-hero__veil { background: linear-gradient(90deg, rgba(255,250,242,.98), rgba(255,250,242,.90) 58%, rgba(255,250,242,.55)), linear-gradient(0deg, rgba(255,247,237,.55), transparent 50%); }
  .gallery-hero__copy { width: 100%; max-width: 610px; padding: 44px 0 50px; }
  .gallery-hero h1 { font-size: clamp(42px, 10vw, 58px); }
  .gallery-hero__copy > p:not(.gallery-kicker) { font-size: 16px; }
  .gallery-hero__actions { gap: 9px; }
  .gallery-hero__actions .button { min-height: 45px; padding-inline: 16px; font-size: 13px; }
  .gallery-hero__ornament { top: 7%; right: 5%; font-size: 30px; }
  .gallery-intro { padding: 52px 0 30px; }
  .gallery-intro h2 { font-size: clamp(34px, 8vw, 44px); }
  .gallery-intro__inner > p:last-child { font-size: 15px; line-height: 1.7; }
  .gallery-collection { padding: 44px 0 60px; }
  .gallery-section-heading { align-items: flex-start; }
  .gallery-section-heading h2 { font-size: clamp(34px, 8vw, 44px); }
  .gallery-filters { gap: 8px; }
  .gallery-filter { min-height: 39px; padding: 8px 13px; font-size: 13px; }
  .gallery-preview-note { font-size: 12px; }
  .gallery-grid { gap: 13px; }
  .gallery-item { border-radius: 14px; }
  .gallery-item__body { padding: 13px 12px 15px; }
  .gallery-item__category { font-size: 10px; }
  .gallery-item__body strong { font-size: 21px; }
  .gallery-item__body > span:last-child { font-size: 13px; }
  .gallery-item__view { opacity: 1; transform: none; right: 8px; bottom: 8px; padding: 6px 9px; font-size: 10px; }
  .gallery-cta { padding: 50px 0; }
  .gallery-cta__inner > p:not(.gallery-kicker) { font-size: 15px; }
  .gallery-float { width: 52px; height: 52px; right: max(15px, env(safe-area-inset-right)); }
  .gallery-float--whatsapp { bottom: calc(91px + env(safe-area-inset-bottom, 0px)); }
  .gallery-float--top { bottom: calc(19px + env(safe-area-inset-bottom, 0px)); }
  .gallery-float svg { width: 26px; height: 26px; }
  .gallery-float--top svg { width: 23px; height: 23px; }
  .gallery-lightbox { width: calc(100% - 18px); border-radius: 12px; }
  .gallery-lightbox__panel { grid-template-columns: 36px minmax(0,1fr) 36px; gap: 4px; padding: 12px 8px; }
  .gallery-lightbox__nav { width: 34px; height: 34px; font-size: 27px; }
  .gallery-lightbox__close { top: 8px; right: 8px; width: 36px; height: 36px; }
  .gallery-lightbox__figure img { max-height: 70vh; }
  .gallery-lightbox__figure figcaption strong { font-size: 22px; }
}
@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: 1fr; gap: 15px; }
  .gallery-item__media, .gallery-item--feature .gallery-item__media { aspect-ratio: 1.45 / 1; }
  .gallery-section-heading { flex-direction: column; gap: 8px; }
  .gallery-count { margin: 0; }
  .gallery-lightbox__panel { grid-template-columns: minmax(0,1fr); }
  .gallery-lightbox__figure { grid-column: 1; }
  .gallery-lightbox__prev, .gallery-lightbox__next { position: absolute; top: 45%; z-index: 2; }
  .gallery-lightbox__prev { left: 8px; }
  .gallery-lightbox__next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-item, .gallery-item__media img, .gallery-filter, .gallery-float, .gallery-item__view { transition: none; }
  .gallery-item:hover { transform: none; }
}

/* Desktop heading alignment: keep the two requested lines on one row. */
@media (min-width: 1280px) {
  .gallery-intro__inner {
    max-width: none;
  }

  .gallery-intro__inner > p:last-child {
    max-width: none;
    white-space: nowrap;
  }

  .gallery-cta h2 {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(38px, 3.1vw, 50px);
  }

  .gallery-cta__inner > p:not(.gallery-kicker) {
    max-width: none;
    white-space: nowrap;
  }
}
