/* =========================================================
   RetroBlysk — Galeria klienta
   Kolory: #c7b197 (złoty), #e22658 (accent), #fff, #111
   Fonty: Playfair Display, Lora, Inter
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+SC:wght@300;400;500&family=Inter:wght@300;400;500;600&family=Lato:wght@100;300;400&family=Lora:ital,wght@0,400;1,400&family=Montserrat:wght@300;400;500;600&family=Playfair+Display:wght@400;600&family=Questrial&display=swap');

:root {
  --rb-gold:    #c7b197;
  --rb-gold-pale: #f3ebe6;
  --rb-red:     #e22658;
  --rb-text:    #161616;
  --rb-muted:   #6d6d6d;
  --rb-border:  #e4ddd6;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
}
html, body { 
  margin: 0; 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
  background: #fff; 
  color: #111; 
  -webkit-font-smoothing: antialiased; 
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
}
html {
  overflow-x: hidden;
}
body {
  position: relative;
  /* Usunięto overflow-x: hidden z body, co często blokuje 'sticky' w niektórych przeglądarkach */
}
/* Blokada scrollowania tła podczas logowania (naprawia problem "przewijania pod spodem" przy liście kont) */
body.is-login-active {
  overflow: hidden;
  height: 100%;
}

/* Klasa dodawana do tagu <body> przez JavaScript, gdy modal/lightbox jest otwarty — iOS robust fix */
body.modal-open-no-scroll {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  overscroll-behavior: none !important;
}

/* HTML [hidden] attribute must always win over display:flex/grid/block */
[hidden] { display: none !important; }
.desktop-only { display: flex !important; }
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
}

[hidden] {
  display: none !important;
}

/* ── iOS / Safari Input Fixes ── */
/* Removed user-select: text overrides because they break iOS 26 focus heuristics */
@media screen and (max-width: 768px) {
  input, textarea, [contenteditable], .login-box input {
    font-size: 16px !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   LOGIN — mobile-first, identyczny z retroblysk.pl/strefa-klienta
   ══════════════════════════════════════════════════════════════════ */

/* ── Login view: desktop = pełny ekran ze zdjęciem, mobile = IDENTYCZNIE jak admin ──
   Admin auth-view działa na iOS bez problemu:
     position:fixed; flex; align-items:center; overflow:hidden; touch-action:manipulation
   Na mobile kopiujemy dokładnie tę strukturę — bez scroll kontenera, bez image-repaint. */
/* ═══════════════════════════════════════════════════
   WIDOK LOGOWANIA (PREMIUM MASTERPIECE v24)
═══════════════════════════════════════════════════ */
.login-view {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Native Premium v27 — Maksymalna widoczność zdjęcia */
  background: 
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.2) 100%),
    url("/assets/hero-strefa-klienta.jpg") no-repeat center center / cover;
  padding: 40px 20px;
  touch-action: manipulation;
  overscroll-behavior: auto;
  z-index: 9000;
}

@media (max-width: 768px) {
  .login-view {
    padding: 24px 16px;
    background-attachment: scroll;
    /* Przywrócenie ciemnego overlayu na mobile */
    background-image: 
      linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
      url("/assets/hero-strefa-klienta.jpg");
  }
}

.login-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  /* Styl Premium: Balans między przezroczystością a czytelnością (Item 1) */
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(199, 177, 151, 0.15);
  border-radius: 12px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  z-index: 9001;
}

@media (max-width: 768px) {
  .login-box {
    padding: 45px 28px;
    max-width: 380px;
  }
  .share-guest-box {
    z-index: 10001 !important;
  }
}

.login-logo-link {
  display: inline-block;
  margin-bottom: 20px; /* Zmniejszono z 25px */
  transition: transform 0.3s ease, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.login-logo-link:hover { transform: scale(1.02); opacity: 0.9; }

.login-logo {
  height: auto;
  max-width: 165px; /* Zwiększono z 140px */
  width: 100%;
  display: block;
  margin: 0 auto;
  filter: invert(63%) sepia(21%) saturate(928%) hue-rotate(347deg) brightness(85%) contrast(87%) !important;
  /* Mix-blend-mode usunięty by filtr koloru działał poprawnie na PNG */
}
.logo-white {
  filter: brightness(0) invert(1) !important;
}
@media (max-width: 768px) {
  .login-logo { height: 32px; } /* Zwiększono z 26px */
  .login-logo-link { margin-bottom: 12px; }
}

.login-box h1 {
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: 22px; /* Zmniejszono z 32px */
  letter-spacing: 4px;
  color: #111; /* Przywrócono czarny */  line-height: 1.2;
  margin-bottom: 6px; 
  text-transform: uppercase;
  white-space: nowrap; /* W jednej linii */
}
@media (max-width: 768px) {
  .login-box h1 { font-size: 16px; letter-spacing: 2px; }
}

.login-box p {
  font-family: "Inter", sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  color: #111; /* Przywrócono czarny */
  text-transform: uppercase;
  margin-bottom: 25px;
}
@media (max-width: 768px) {
  .login-box p { margin-bottom: 20px; }
}

/* ── FORMULARZ LOGOWANIA ── */
.login-box form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.h1-ico {
  font-size: 16px;
  opacity: 0.7;
  margin-right: 10px;
  vertical-align: middle;
  position: relative;
  top: -2px;
  display: inline-block;
}

.login-box p {
  font-family: "Questrial", "Inter", sans-serif;
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 3.5px;
  color: #111;
  margin: 4px 0 35px;
}

.share-subtitle {
  font-family: "Questrial", sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  color: #111;
  margin-bottom: 25px;
  text-transform: uppercase;
}

.share-context-box {
  background: rgba(199, 177, 151, 0.05);
  border-left: 3px solid #c7b197;
  padding: 12px 15px;
  margin-bottom: 30px;
  text-align: left;
}

.share-context-box p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #666;
  letter-spacing: 0;
  text-transform: none;
}

.share-guest-box .btn-primary {
  margin-top: 10px;
  letter-spacing: 2px;
}

/* Strony statyczne (polityka itd.) — ta sama ramka i tło co login, treść jak tekst ciągły */
.login-box.login-box--legal {
  max-width: 560px;
  text-align: left;
  padding: 28px 26px 26px;
}
.login-box--legal h1 {
  text-align: center;
}
.login-box--legal > .legal-subtitle {
  font-family: "Questrial", "Inter", sans-serif;
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #494949;
  margin: 4px 0 22px;
  text-align: center;
}
.login-box--legal .legal-body {
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,0.85);
}
.login-box--legal .legal-body p {
  margin: 0 0 14px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 14px;
  font-family: Inter, system-ui, sans-serif;
  color: #3a3a3a;
}
.login-box--legal .legal-body p:last-child {
  margin-bottom: 0;
}
.login-box--legal .legal-body a {
  color: var(--rb-gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login-box--legal .legal-body a:hover {
  color: #8a6640;
}
.login-box--legal .legal-back {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(180, 160, 140, 0.35);
  text-align: center;
}
.login-box--legal .legal-back .link-btn {
  display: inline-block;
  width: auto;
  margin-top: 0;
}

.login-box form { display: grid; gap: 0; }

/* ── Wrapper pola (unifikuje zwykłe pole i pass-wrap) ── */
/* ── FORMULARZ: STRUKTURA (Admin-style) ── */
.field {
  position: relative;
  margin-bottom: 20px;
  text-align: left;
  touch-action: manipulation;
}
.field label {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #c7b197; /* Złoty akcent etykiet */
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 6px;
  margin-left: 2px;
}
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(199, 177, 151, 0.25);
  padding: 14px 18px;
  border-radius: 4px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #333;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  /* iOS Stability Core: ensure inputs are always responsive */
  position: relative;
  z-index: 1;              /* Było 9999 — to blokowało przycisk podglądu hasła */
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-user-select: text !important;
  user-select: text !important;
}
.field input:focus {
  border-color: #c7b197;
  background: #fff;
}


/* 
  ADMIN PANEL FIX: Disable all transitions on touch devices. 
  Firing concurrent GPU compositing passes during focus/blur creates deadlocks that freeze WebKit.
*/
@media (hover: none) and (pointer: coarse) {
  .field input, .field select, .field textarea {
    transition: none !important;
  }
}

/* iOS Workaround: simulate password field with type="text" */
.password-mask {
  -webkit-text-security: disc !important;
}

.input-eye {
  position: relative;
  width: 100%;
  display: block;
}

.input-eye input {
  position: relative;
  z-index: 1;
  padding-right: 48px !important;
  width: 100%;
  box-sizing: border-box;
}
/* Ukrycie systemowych ikon w Edge/IE */
.input-eye input::-ms-reveal,
.input-eye input::-ms-clear {
  display: none;
}

/* Przycisk oka MUSI BYC z-index WYZEJ NIZ INPUT */
.input-eye .eye-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  z-index: 2;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s;
}
.input-eye .eye-btn:hover,
.input-eye .eye-btn:focus { color: #c7b197; outline: none; }
.input-eye .eye-btn svg { pointer-events: none; display: block; }




/* Pole z przyciskiem oka — padding-right by nie nachodziło */
.login-box .field input[type="password"] { padding-right: 46px; }

/* Wrapper input+button — przycisk jest rodzeństwem inputa, pozycjonowany względem niego */
.input-row {
  position: relative;
  width: 100%;
}
.input-row input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 48px;
}
.input-row input::-ms-reveal,
.input-row input::-ms-clear { display: none; }

.input-row .eye-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color .2s;
}
.input-row .eye-btn:hover { color: #c7b197; }
.input-row .eye-btn svg { pointer-events: none; display: block; }


/* Focus — subtelna złota linia na dole (elegancka, nie neonowa) */
.login-box .field input:focus,
.login-box input:focus {
  outline: none !important;
  border-color: rgba(173,136,100,.7);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 1px 0 0 rgba(173,136,100,.5);
}

/* Placeholder — spójny */
.login-box .field input::placeholder,
.login-box input::placeholder {
  color: #b0a090;
  font-size: 13px;
  letter-spacing: .5px;
}

/* Przycisk oka — absolutnie wyśrodkowany, zawsze taki sam */
.eye-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 44px; /* Większy obszar kliknięcia (standard touch) */
  background: none;
  border: none;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  padding: 0;
  z-index: 10 !important;
  transition: color .2s ease;
}
.eye-btn:hover { color: #c7b197; }
.eye-btn svg {
  display: block;
  pointer-events: none;
}

/* ── PRZYCISK ZALOGUJ ── */
.login-box button[type="submit"] {
  margin-top: 20px;
  width: 100%;
  padding: 16px 20px;
  background: #2a2a2a;
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: "Questrial", "Inter", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
  /* Specific transitions only — no 'transition:all' which would animate every property */
  transition: background .2s ease, box-shadow .2s ease, transform .15s ease, opacity .15s ease;
}
@media (min-width: 1024px) {
  .login-box button[type="submit"] {
    font-size: 14px;
    letter-spacing: 3px;
    padding: 18px 24px;
  }
}
.login-box button[type="submit"]:hover {
  background: #1a1a1a;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2), 0 0 0 2px rgba(173,136,100,0.2);
  transform: translateY(-1px);
}
.login-box button[type="submit"]:active { background: #000; transform: translateY(0); }
.login-box button[type="submit"]:disabled { opacity: .5; cursor: default; }

/* ── GDPR MODAL ── */
.gdpr-overlay {
  position: fixed; 
  top: 0; left: 0; width: 100vw; height: 100dvh;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex; align-items: center; justify-content: center;
  z-index: 11000;
  padding: 16px;
  overscroll-behavior: contain;
  touch-action: none;
}
.gdpr-box {
  background: #ffffff;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  color: #111;
  max-width: 500px;
  width: 100%;
  padding: 42px 36px;
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.08);
  border: 1px solid rgba(199, 177, 151, 0.2);
  text-align: center;
}
.gdpr-logo-wrap {
  margin-bottom: 8px;
}
.gdpr-logo {
  height: 40px;
  width: auto;
  display: block;
  margin: 0 auto;
  filter: invert(63%) sepia(21%) saturate(928%) hue-rotate(347deg) brightness(85%) contrast(87%);
}
.gdpr-box h2 {
  font-family: "Playfair Display", serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 20px 0 16px;
  color: #111;
}
.gdpr-box p  { 
  font-size: 14px; 
  line-height: 1.7; 
  color: #444; 
  margin: 0 0 18px; 
}
.gdpr-box a  { 
  color: var(--rb-gold); 
  text-decoration: underline;
  font-weight: 500;
}
.gdpr-checkbox-row {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 13px; color: #555; line-height: 1.6; margin: 28px 0 24px;
  text-align: left;
}
.gdpr-checkbox-row input[type="checkbox"] {
  margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px;
  accent-color: var(--rb-gold);
  cursor: pointer;
}
.gdpr-btn {
  width: 100%;
  padding: 16px;
  background: #c7b197;
  color: #fff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all .25s ease;
}
.gdpr-btn:hover:not(:disabled) { 
  background: #8a6640;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1), 0 0 0 2px rgba(173,136,100,0.15);
  transform: translateY(-1px);
}
.gdpr-btn:disabled { opacity: .3; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════════════
   WIDOK GALERII — nowy layout (hero + meta-bar + grid)
   ══════════════════════════════════════════════════════════════════ */
#galleryView { 
  background: #ffffff !important; 
  color: #111 !important; 
  min-height: 100dvh;
  width: 100%;
  max-width: none !important;
  margin: 0;
  padding: 0;
  display: block;
}


/* ── HERO — pełna szerokość ── */
.gallery-hero {
  position: relative;
  width: 100%;
  height: calc(100svh - var(--admin-bar-height, 0px)); /* Sztywna wysokość na mobile (zapobiega skokom/zoom) */
  overflow: hidden;
  background: #ffffff !important;
  /* Ramka na desktopie */
  padding: 0; /* Usunięto padding, aby zdjęcie wypełniało całą przestrzeń lub tło było białe */
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .gallery-hero {
    padding: 0;
  }
}

.gallery-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Premium stability: zapobiega "skakaniu" jakości na iOS/Safari podczas scrollowania */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
  image-rendering: -webkit-optimize-contrast;
}



/* removed .gallery-single-photo .gallery-hero hide */

.hero-img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 50%, #fff 100%);
  pointer-events: none;
  z-index: 2;
  opacity: 0; /* Pojawia się tylko podczas scrollowania (main.js) */
  transition: opacity 0.1s ease-out;
  will-change: opacity;
}

/* Mobile: user prefers no hero gradient overlay. */
@media (max-width: 768px) {
  .hero-overlay { display: none !important; }
}

/* ── HERO TITLE BOX (V5-5: floating, white, premium) ── */
.hero-title-box {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-bottom: none; /* Usunięto dziwną linię (Item 10) */
  padding: 30px 60px;
  text-align: center;
  z-index: 10;
  min-width: 300px;
  width: min(90vw, 1200px);
  /* Wygląd ze zrzutu ekranu: prostokąt bez zaokrągleń u dołu */
  border-radius: 4px 4px 0 0;
}
@media (max-width: 768px) {
  .hero-title-box {
    width: min(85vw, 320px) !important; /* Jeszcze węższa etykieta */
    padding: 20px 15px !important; /* Bardziej kompaktowe wnętrze */
    bottom: 0 !important; /* Przyklejony do dolnej krawędzi hero */
    border-radius: 4px 4px 0 0 !important; /* Zaokrąglone tylko górne rogi jak na desktop */
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: block !important;
    z-index: 100;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.08); /* Cień u góry */
  }
}

.hero-title-box h1 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
  color: #111;
}

@media (max-width: 768px) {
  .hero-title-box h1 {
    font-size: 18px;
    letter-spacing: 0.15em;
  }
}

.hero-title-box p {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 8px 0 0;
  color: #888;
}

@media (max-width: 768px) {
  .hero-title-box p {
    font-size: 8px;
    letter-spacing: 0.2em;
    margin-top: 6px;
  }
}

.nav-gallery-name {
  display: none; /* Ukryte na mobile wg życzenia użytkownika */
  font-family: 'Cormorant SC', serif;
  font-size: 28px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #111;
  font-weight: 500;
}

/* Desktop tweak: mniejszy napis w belce + więcej oddechu nad siatką */
@media (min-width: 900px) {
  .nav-gallery-name {
    display: block;
    font-size: 22px;
    line-height: 1.15;
  }
  .grid {
    padding-top: 10px;
  }
}

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



@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Spacing handled by the main gallery definitions below */



/* Cleaned up redundant definition */





.meta-brand-left {
  flex: 1;
  font-family: 'Cormorant SC', serif;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #111;
}

.meta-studio-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
  z-index: 110;
}
.meta-studio-center > * { pointer-events: auto; }

.gallery-meta-right, .meta-brand-left {
  flex: 1;
}

.meta-brand-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.meta-brand-left .nav-gallery-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}



.studio-name {
  font-family: 'Lato', sans-serif;
  font-weight: 100;
  font-size: 18px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #111;
  margin-bottom: 4px;
}


.studio-tagline {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-top: 2px;
}

.gallery-meta-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 768px) {
  .gallery-meta-bar {
    padding: 10px 16px;
    min-height: 64px;
  }
  .meta-brand-left {
    align-items: center;
    text-align: center;
  }
  .meta-studio-center {
    position: static;
    transform: none;
    flex: 1;
  }
}

.gallery-couple-name {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(16px, 4.5vw, 22px);
  font-weight: 400;
  letter-spacing: 2px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.gallery-couple-name {
  text-align: center;
  font-family: 'Cormorant SC', serif;
  font-size: clamp(20px, 6vw, 28px);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0;
  width: 100%;
}
.gallery-event-date {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--rb-muted);
  text-transform: uppercase;
}

/* ── Tytuł pary (V5-2: Alicja style) ── */
.gallery-title {
  text-align: center;
  font-family: 'Georgia', serif;
  font-size: 32px;
  color: #1e1a17;
  letter-spacing: 0.05em;
}

/* ── Logo lwów — ukryte (V5-3) ── */
.gallery-logo-lion { display: none !important; }

/* ── Akcje po prawej ── */
.gallery-meta-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.meta-action-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #555;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, color .18s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.meta-action-btn svg { width: 20px; height: 20px; }
.meta-action-btn:hover { background: #f0f0f0; color: #111; }

/* ZIP WebP tag (mała etykieta, żeby nie myliło się z Full) */
.meta-action-btn--tag {
  background: rgba(199, 177, 151, 0.10);
  color: #1a1714;
  box-shadow: inset 0 0 0 1px rgba(199, 177, 151, 0.22);
}
.meta-action-btn--tag:hover {
  background: rgba(199, 177, 151, 0.16);
  color: #111;
}
.meta-action-btn--tag .meta-action-tag {
  position: absolute;
  left: 50%;
  bottom: 5px;
  transform: translateX(-50%);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .08em;
  font-weight: 700;
  padding: 3px 6px 2px;
  border-radius: 6px;
  background: rgba(199, 177, 151, .92);
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  pointer-events: none;
}

.meta-action-btn--primary-download {
  width: auto;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  gap: 4px;
  border-radius: 20px;
  background: #c7b197;
  color: #fff;
  box-shadow: none;
}
.meta-action-btn--primary-download:hover {
  background: #b09d82;
  color: #fff;
}
.meta-action-btn--primary-download .meta-download-label {
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}
@media (max-width: 640px) {
  .meta-action-btn--primary-download .meta-download-label {
    display: none;
  }
  .meta-action-btn--primary-download {
    width: 38px;
    padding: 0;
  }
}

.meta-center-studio-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(30, 26, 23, 0.5);
  line-height: 1.2;
}

/* Dropdown ⋮ — ikony SVG jak w pasku, bez emoji; jedna linia tekstu */
.meta-menu-wrap { position: relative; }
.meta-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 236px;
  max-width: min(92vw, 280px);
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.12);
  z-index: 9999 !important;
}
/* Gdy pozycjonujemy przez JS (clamp do viewportu) */
.meta-menu-dropdown.meta-menu-dropdown--fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 9999 !important;
}
.meta-menu-dropdown .meta-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 11px 12px;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #2c2620;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.meta-menu-dropdown .meta-menu-item:hover {
  background: rgba(199, 177, 151, 0.12);
  color: #1a1512;
}
.meta-menu-dropdown .meta-menu-item:active {
  background: rgba(199, 177, 151, 0.18);
}
.meta-menu-dropdown .meta-menu-ico {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rb-gold, #c7b197);
  opacity: 0.92;
}
.meta-menu-dropdown .meta-menu-item:hover .meta-menu-ico {
  opacity: 1;
  color: #b09d82;
}
.meta-menu-dropdown .meta-menu-ico svg {
  width: 20px;
  height: 20px;
}
.meta-menu-dropdown .meta-menu-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #2c2620; /* Wymuszenie koloru tekstu w menu */
}

/* ── STUDIO INFO ── */
.gallery-studio-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 24px 14px;
  text-align: center;
}
.studio-name {
  font-family: "Playfair Display", serif;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #333;
}
.studio-tagline {
  font-family: "Questrial", "Inter", sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--rb-muted);
}
.studio-links {
  display: flex; gap: 12px; margin-top: 4px;
}
.studio-links a {
  color: var(--rb-muted);
  transition: color .18s;
  display: flex; align-items: center;
}
.studio-links a:hover { color: var(--rb-gold); }

/* ── SEPARATOR ── */
.gallery-divider {
  height: 1px;
  background: #ebebeb;
  margin: 0 24px 8px;
}

/* ── Stopka galerii ── */
.gallery-footer {
  margin-top: 32px;
  padding: 16px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-family: 'Lato', sans-serif;
  font-weight: 100;
  font-size: 11px;
  color: rgba(80,70,60,.45);
  letter-spacing: .5px;
  border-top: 1px solid #ebebeb;
}
.gallery-footer .footer-sep { opacity: .4; }
.gallery-footer .footer-credit {
  color: rgba(80, 70, 60, 0.52);
  text-decoration: none;
  border-bottom: 1px dotted rgba(199, 177, 151, 0.4);
  transition: color 0.15s, border-color 0.15s;
}
.gallery-footer .footer-credit:hover {
  color: var(--rb-gold);
  border-bottom-color: var(--rb-gold);
}

/* ── PHOTO GRID — JS Masonry (kolumny flex) ── */
.grid {
  position: relative;
  z-index: 40;
  background: #fff;
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 4px;
  padding: 0 4px;
  box-sizing: border-box;
}

.grid-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 0;
  min-width: 0;
}


body:has(#adminBar) .grid {
  scroll-margin-top: max(100px, env(safe-area-inset-top));
}

html {
  scroll-behavior: auto; /* Zmienione na auto dla uniknięcia skakania na mobile */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.grid-item {
  display: block;
  width: 100%;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
  /* Optymalizacja renderowania dla dużej ilości elementów (1000+) */
  content-visibility: auto;
  contain-intrinsic-size: 1px 300px;
}


.grid-item:hover {
  transform: scale(1.01);
  z-index: 5;
}



@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


.grid-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  transition: opacity .4s ease;
}




.grid-item .grid-item-media {
  position: relative;
  overflow: hidden;
  border-radius: 1px;
  background: rgba(0,0,0,0.03);
  width: 100%;
  display: block;
  /* Kluczowa zmiana dla stabilności na mobile — padding-bottom hack */
  height: 0;
  padding-bottom: var(--aspect-ratio-padding, 66.66%);
}

.grid-item .grid-item-media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease-out;
  /* Wymuszenie warstwy GPU pomaga na błędy renderowania "widoczne tylko po hoverze" */
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}


.grid-item .grid-item-media img.loaded {
  opacity: 1;
}

.grid-item.admin-photo-selected .grid-item-media {
  outline: 3px solid var(--rb-gold);
  outline-offset: -3px;
}
.gallery-meta-bar {
  z-index: 2200; /* Zwiększono by być nad zakładkami (z-index: 2100) i dropdown działał poprawnie */
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border-top: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow .3s ease;
}
@media (min-width: 769px) {
  .gallery-meta-bar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: var(--admin-bar-height, 0) !important;
  }
}
@media (max-width: 768px) {
  .gallery-meta-bar {
    position: static !important;
  }
}
.no-hero .gallery-meta-bar {
  padding-top: 40px; /* Dodatkowy margines gdy brak zdjęcia nagłówka */
}
@media (max-width: 768px) {
  .no-hero .gallery-meta-bar { padding-top: 20px; }
}

.meta-top-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px 32px;
  min-height: 72px;
  box-sizing: border-box;
}

.meta-center-studio {
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 0;
  box-sizing: border-box;
}
.hero-title-box h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 4.5vw, 42px); /* Elastyczny rozmiar czcionki (Item 3) */
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  color: #1a1a1a;
  overflow-wrap: break-word;
  line-height: 1.2;
}
.meta-center-studio-tel {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: rgba(30, 26, 23, 0.55);
  letter-spacing: 0.14em;
  line-height: 1.2;
}

.meta-center-social {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.meta-center-social .social-circle-mini {
  width: 24px;
  height: 24px;
}
.meta-center-social .social-circle-mini svg {
  width: 12px;
  height: 12px;
}

.meta-center-social .social-circle-mini {
  border-color: var(--rb-gold);
  color: var(--rb-gold);
}

.meta-center-social .social-circle-mini:hover {
  border-color: #b09d82;
  color: #b09d82;
  background: rgba(199, 177, 151, 0.08);
}

.social-circle-mini {
  width: 20px;
  height: 20px;
  border: 1px solid #d0d0d0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: all 0.2s;
  background: #fff;
}

.social-circle-mini:hover {
  border-color: #c7b197; color: #c7b197;
}

.meta-brand-left { margin-left: 0; }



@media (max-width: 1024px) { /* Zmieniono z 768px by na tabletach też się układało pionowo (Item 9) */
  .gallery-meta-bar {
    padding: 0;
    flex-direction: column;
    gap: 0;
    text-align: center;
  }
  .meta-top-row {
    min-height: 60px;
    padding: 12px 16px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 12px;
  }
  .meta-brand-left {
    display: block; /* Pokazujemy też na mobile, ale w pionie */
    margin: 0;
    font-size: 16px;
  }
  .meta-center-studio { padding: 8px 0; }
  .meta-center-studio-name { font-size: 14px; letter-spacing: 3.2px; }
}
.grid-item:hover .grid-item-media img {
  transform: scale(1.022);
  filter: contrast(1.04);
}

/* ── LIGHTBOX ── */
/* ══════════════════════════════════════════════════════════════════
   LIGHTBOX — elegancki, animowany, responsywny
   ══════════════════════════════════════════════════════════════════ */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  z-index: 5000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.4s;
  
  /* Fix for iOS jumping and notch/indicator */
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
}

/* Scroll lock (prevents background scroll bleed on mobile) */
html.lb-open,
body.lb-open {
  overflow: hidden;
}
.lightbox {
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}
.lightbox.lb-visible { 
  opacity: 1; 
  visibility: visible;
}

/* ── Górny pasek ── */
.lb-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  /* padding-top handled by .lightbox parent for better iOS stability */
  background: linear-gradient(to bottom, rgba(255,255,255,.95) 0%, transparent 100%);
  z-index: 10;
  flex-shrink: 0;
}
.lb-topbar-left, .lb-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

#backToGalleryBtn {
  display: none !important;
}


.lb-counter {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  color: #111;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Przyciski ikony (zamknij / pobierz) ── */
.lb-icon-btn {
  width: 42px; height: 42px;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 50%;
  color: #111;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, transform .15s, color .18s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.lb-icon-btn:hover  { background: #111; color: #fff; }
.lb-icon-btn:active { transform: scale(.92); }

/* ── Obszar zdjęcia ── */
.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

/* ── Kontener zdjęcia — animacja ── */
.lb-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  padding: 0 56px; /* miejsce na strzałki */
  box-sizing: border-box;
  position: relative;
}

.lb-img {
  max-width: calc(100vw - 120px);
  max-height: calc(100dvh - 90px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: block;
}

.lb-img.lb-loading {
  filter: saturate(.9);
}
.lb-img-wrap.lb-loading::after {
  content: "";
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.08);
  border-top-color: var(--rb-gold);
  animation: spin .9s linear infinite;
}
.lb-img.lb-fade {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
}


/* ── Strzałki nawigacji — po bokach (desktop) ── */
.lb-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 50%;
  color: #111;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 15;
  transition: opacity .2s, background .2s, color .2s, transform .15s;
  opacity: 0.15;
}
.lb-stage:hover .lb-arrow { opacity: 1; }
.lb-arrow-l { left: 12px; }
.lb-arrow-r { right: 12px; }
.lb-arrow:hover  { background: #111; color: #fff; opacity: 1; }
.lb-arrow:active { transform: translateY(-50%) scale(.9); }

/* Disabled — gdy nie ma poprzedniego/następnego */
.lb-arrow:disabled { opacity: 0 !important; pointer-events: none; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ══ V4-5: Desktop bottom action bar (always visible) ═══════════ */
.lb-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(255,255,255,.98) 60%, rgba(255,255,255,0) 100%);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 110;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@media (min-width: 769px) {
  .lb-bottombar {
    display: none !important;
  }
}
#likePhotoBtn.is-liked {
  color: #c7b197 !important;
  fill: #c7b197;
}
#likePhotoBtn.is-liked svg {
  fill: #c7b197;
}
.lb-bottom-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, transform .15s, color .18s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.lb-bottom-btn svg { width: 20px; height: 20px; }
.lb-bottom-btn:hover { background: rgba(255,255,255,.22); color: #fff; border-color: rgba(255,255,255,.3); }
.lb-bottom-btn:active { transform: scale(.9); }
.lb-stage { padding-bottom: 72px; }

/* ── Na mobile: strzałki zawsze widoczne, mniejsze ── */
@media (max-width: 768px) {
  .lb-img-wrap { padding: 0 8px; }

  /* Mobile: maximize photo area (fill screen) */
  .lb-img-wrap {
    padding: 0;
  }
  .lb-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .lb-arrow {
    opacity: 1;
    width: 40px; height: 40px;
    background: rgba(0,0,0,.35);
    border-color: rgba(255,255,255,.12);
  }
  .lb-arrow-l { left: 6px; }
  .lb-arrow-r { right: 6px; }
  .lb-arrow:active { transform: translateY(-50%) scale(.88); }

  .lb-counter { font-size: 12px; letter-spacing: 1.5px; }
}

/* Removed redundant back-to-home-btn block */

/* ── TOAST / STATUS ── */
.toast {
  position: fixed;
  bottom: 20px; right: 20px;
  background: #222;
  color: #fff;
  padding: 12px 18px;
  border-radius: 3px;
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.gold  { border-left: 3px solid var(--rb-gold); }
.toast.red   { border-left: 3px solid var(--rb-red); }


/* ── ZIP PROGRESS PANEL (czytelniejszy niż toast) ── */
.zip-progress{
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.92);
  color: #fff;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  border-left: 3px solid var(--rb-gold);
  z-index: 9999;
}
.zip-progress-title{
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: .2px;
}
.zip-progress-bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.zip-progress-fill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(173,136,100,1), rgba(226,38,88,0.95));
  border-radius: 999px;
  transition: width 0.8s ease-out; /* Płynniejszy ruch zamiast skoków */
}
.zip-progress-meta{
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: rgba(255,255,255,.82);
}
.zip-progress-extra{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

/* ── LIGHTBOX INFO (legacy — zastąpione przez .lb-counter) ── */
.lightbox-info {
  color: rgba(255,255,255,.5);
  font-size: 12px;
  letter-spacing: 2px;
  margin-top: 8px;
}

/* ── BŁĘDY / KOMUNIKATY FORMULARZY (jasne tło w login-box) ── */
.form-error {
  background: rgba(226,38,88,.08);
  border: 1px solid #d9534f;
  color: #c0392b;
  padding: 8px 12px;
  font-size: 12px;
  margin-top: 8px;
  letter-spacing: .5px;
  text-align: center;
}
.form-msg {
  padding: 8px 12px;
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
  letter-spacing: .5px;
}
.form-msg.ok  { background: rgba(39,174,96,.1); border: 1px solid #27ae60; color: #1e7e34; }
.form-msg.err { background: rgba(226,38,88,.08); border: 1px solid #d9534f; color: #c0392b; }

/* ── LINK BUTTON (Zapomniałem hasła / Powrót) ── */
.link-btn {
  background: none; border: none;
  color: var(--rb-gold);
  font-family: "Playfair Display", serif;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: block;
  width: 100%;
  text-align: center;
}
.link-btn:hover { color: #8a6640; }
.auth-context-note {
  margin: 6px 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #7a6d62;
}

/* ── PRZYCISK GHOST (w nagłówku) ── */
.btn-ghost {
  background: none;
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.7);
  padding: 8px 14px;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── ZAKŁADKI FOTO / VIDEO ── */
.gallery-tabs {
  display: flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 2px;
  padding: 0 24px;
  background: #fafafa;
  z-index: 2100; /* Poniżej meta-bar (2200) by menu go nie zasłaniało */
  border-bottom: 1px solid #f0f0f0;
}
@media (min-width: 769px) {
  .gallery-tabs {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: calc(var(--admin-bar-height, 0px) + var(--meta-bar-height, 72px)) !important;
  }
}
@media (max-width: 768px) {
  .gallery-tabs {
    position: static !important;
  }
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #1e1a17;
  padding: 8px 16px;
  font-size: 16px;
  font-family: 'Georgia', serif;
  letter-spacing: 0;
  cursor: pointer;
  transition: all .2s;
}
.tab-btn.active { color: #c9a96e; border-bottom-color: #c9a96e; }
.tab-btn:hover  { color: #c9a96e; }

/* ══════════════════════════════════════════════════════════════════
   VIDEO SECTION — siatka responsywna (wiele kolumn na szerokim ekranie)
   ══════════════════════════════════════════════════════════════════ */

#videoSection {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.video-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, clamp(320px, 44vw, 600px)), 600px));
  justify-content: center;
  gap: clamp(20px, 2.8vw, 36px);
  padding: clamp(18px, 2.8vw, 40px) clamp(14px, 3.2vw, 40px);
  max-width: 1400px; /* Zwiększono max-width */
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  align-items: start;
}

/* Specjalny layout gdy jest tylko jeden film (Item 11/13) */
.video-list--solo {
  grid-template-columns: 1fr;
  max-width: 1400px;
  margin: 0 auto;
}
.video-list--solo .video-card {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.18);
}
.video-list--solo .video-wrap {
  aspect-ratio: 16 / 9; /* Standardowy by uzyskać większą wysokość */
  max-height: calc(100vh - 280px); /* Dopasowanie do wysokości ekranu (minus logo i marginesy) */
}
@media (min-width: 1600px) {
  .video-list--solo .video-wrap {
    max-height: 75vh;
  }
}
@media (max-width: 768px) {
  .video-list--solo .video-wrap {
    aspect-ratio: 16 / 9;
    max-height: none;
  }
}
#videoSection.video-section--solo {
  padding-top: 30px;
  padding-bottom: 80px;
}

.video-card {
  position: relative;
  min-width: 0;
  width: min(100%, 820px);
  background: #111;
  border-radius: 6px;
  overflow: visible;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
}

/* Kontener wideo — utrzymuje proporcje 16:9 */

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

/* HLS: pasek .video-chrome jest pod <video> — proporcje tylko na wideo, nie na całym wrap */
.video-wrap--hls {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
}
/* Oryginał MP4 + natywne controls: stały prostokąt 16:9 (bez „kurczenia” do rozmiaru klatki) */
.video-wrap--hls.video-wrap--native-mp4 {
  display: block;
  aspect-ratio: 16 / 9;
  position: relative;
}
.video-wrap--hls.video-wrap--native-mp4 .video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  max-height: none;
  object-fit: contain;
}
.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.video-wrap--hls .video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  cursor: pointer;
}

/* Pełny ekran (przycisk FS): cały wrap jest fullscreen */
.video-wrap--hls:not(.video-wrap--native-mp4):fullscreen,
.video-wrap--hls:not(.video-wrap--native-mp4):-webkit-full-screen {
  border-radius: 0;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}
.video-wrap--hls:not(.video-wrap--native-mp4):fullscreen .video-player,
.video-wrap--hls:not(.video-wrap--native-mp4):-webkit-full-screen .video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: 100%;
  aspect-ratio: unset;
  object-fit: contain;
}
.video-wrap--hls:not(.video-wrap--native-mp4):fullscreen .video-chrome,
.video-wrap--hls:not(.video-wrap--native-mp4):-webkit-full-screen .video-chrome {
  position: absolute;
}

/* Oryginał MP4 + własny pasek: ten sam układ w FS, żeby chrome nie wypadał poza kadr */
.video-wrap--hls.video-wrap--native-mp4:fullscreen,
.video-wrap--hls.video-wrap--native-mp4:-webkit-full-screen {
  border-radius: 0;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  aspect-ratio: unset;
  position: relative;
  overflow: hidden;
}
.video-wrap--hls.video-wrap--native-mp4:fullscreen .video-player,
.video-wrap--hls.video-wrap--native-mp4:-webkit-full-screen .video-player {
  position: relative;
  width: 100%;
  height: auto;
  max-height: 100%;
  aspect-ratio: unset;
  object-fit: contain;
  inset: auto;
}
.video-wrap--hls.video-wrap--native-mp4:fullscreen .video-chrome,
.video-wrap--hls.video-wrap--native-mp4:-webkit-full-screen .video-chrome {
  position: absolute;
}

/* Pełny ekran: po ~3 s bez ruchu myszy — schowaj pasek i ⋮ (klasa .video-wrap--fs-ui-hidden na wrapie, ustawiana w JS) */
.video-wrap--hls:fullscreen .video-chrome,
.video-wrap--hls:-webkit-full-screen .video-chrome,
.video-wrap--hls:fullscreen .video-hls-ui.video-hls-ui--overlay,
.video-wrap--hls:-webkit-full-screen .video-hls-ui.video-hls-ui--overlay {
  transition: opacity 0.35s ease, transform 0.35s ease;
}
/* Schowany pasek: nie tylko opacity — wyzeruj zajętość w flexie (inaczej zostaje „czarna poświata” paska) */
.video-wrap--hls:fullscreen.video-wrap--fs-ui-hidden .video-chrome,
.video-wrap--hls:-webkit-full-screen.video-wrap--fs-ui-hidden .video-chrome {
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
}
.video-wrap--hls:fullscreen.video-wrap--fs-ui-hidden .video-hls-ui.video-hls-ui--overlay,
.video-wrap--hls:-webkit-full-screen.video-wrap--fs-ui-hidden .video-hls-ui.video-hls-ui--overlay {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  visibility: hidden;
}

/* Tylko wideo na całym pełnym ekranie: wypełnij viewport (object-fit: cover usuwa letterbox z contain) */
.video-wrap--hls:fullscreen.video-wrap--fs-ui-hidden .video-player,
.video-wrap--hls:-webkit-full-screen.video-wrap--fs-ui-hidden .video-player {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover;
}
.video-wrap--hls.video-wrap--native-mp4:fullscreen.video-wrap--fs-ui-hidden .video-player,
.video-wrap--hls.video-wrap--native-mp4:-webkit-full-screen.video-wrap--fs-ui-hidden .video-player {
  position: relative;
  inset: auto;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover;
}

/* Chromium / WebKit / Opera: po przejściu z MSE (blob) na MP4 przeglądarka potrafi narysować
   natywne kontrolki mimo controls=false — ukrywamy je, gdy nie używamy trybu .video-wrap--native-mp4 */
.video-wrap--hls:not(.video-wrap--native-mp4) .video-player::-webkit-media-controls,
.video-wrap--hls:not(.video-wrap--native-mp4) .video-player::-webkit-media-controls-enclosure,
.video-wrap--hls:not(.video-wrap--native-mp4) .video-player::-webkit-media-controls-panel {
  display: none !important;
}

/* Własny pasek zamiast natywnych controls (HLS + hls.js + CSP blob:) */
.video-chrome {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.45), rgba(0,0,0,.15));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

/* Fullscreen: zostaw większy oddech + uwzględnij safe-area na iOS */
.video-wrap--hls:fullscreen .video-chrome,
.video-wrap--hls:-webkit-full-screen .video-chrome {
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
}

/* Pasek postępu z tooltip — pozycjonowanie relative dla absolutnego tooltipu */
.vcc-seek-wrap {
  position: relative;
  flex: 1;
  min-width: 60px;
}
.video-progress-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
  font-family: Inter, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

/* Volume slider styling */
.video-volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.video-volume-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: opacity .15s;
}
.video-volume-btn:hover { opacity: .7; }
.video-volume-slider {
  width: 72px;
  height: 6px;
  cursor: pointer;
  accent-color: var(--rb-gold, #c7b197);
}
.video-chrome[hidden] {
  display: none !important;
}
.vcc-play,
.vcc-fs {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: rgba(199, 177, 151, 0.45); /* Półprzezroczysty złoty (Item 10) */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.vcc-play:hover,
.vcc-fs:hover {
  filter: brightness(1.15);
}
.vcc-seek {
  left: 0; right: 0; top: 0; bottom: 0;
  width: 100%;
  height: 6px;
  cursor: pointer;
  accent-color: var(--rb-gold, #c7b197);
}
.vcc-time {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(255,255,255,.78);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-family: Inter, system-ui, sans-serif;
}
.vcc-sep { opacity: .45; }

/* Menu ⋮ jakości — nakładka nad obszarem wideo (nie w pasku), żeby ⋮ było zawsze dostępne */
.video-wrap--hls .video-hls-ui.video-hls-ui--overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  pointer-events: none;
}
.video-wrap--hls .video-hls-ui.video-hls-ui--overlay > * {
  pointer-events: auto;
}
.video-quality-gear.vcc-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255,255,255,.92);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}
.video-hls-ui--overlay .video-quality-gear.vcc-menu-btn {
  backdrop-filter: blur(6px);
}
.video-quality-gear.vcc-menu-btn:hover {
  background: rgba(173,136,100,.25);
  border-color: rgba(173,136,100,.45);
}
.vcc-dots {
  display: block;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  transform: translateY(-1px);
}
/* Otwarte menu: pozycja ustawiana w JS (fixed), żeby mieściło się w viewport (mobile / wąski panel) */
.video-quality-popover.video-quality-popover--fixed {
  margin-top: 0 !important;
}

.video-mp4-fallback-hint {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,200,100,.85);
  background: rgba(255,160,0,.08);
  border: 1px solid rgba(255,180,60,.2);
  border-radius: 8px;
  max-width: 100%;
}
.video-mp4-fallback-title {
  font-weight: 600;
  color: rgba(255,220,160,.95);
}
.video-mp4-fallback-body {
  color: rgba(255,255,255,.65);
  font-size: 11px;
}

/* Overlay "trwa przetwarzanie" */
.video-processing-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  z-index: 6;
  pointer-events: none;
}

/* Wizytówka/miniatura przed odtworzeniem */
.video-poster-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.10), rgba(0,0,0,0) 40%),
              linear-gradient(140deg, rgba(0,0,0,.55), rgba(0,0,0,.78));
  background-size: cover;
  background-position: center;
  cursor: pointer;
}
.video-wrap.video-wrap--poster-visible .video-poster-layer {
  display: block;
}
.video-poster-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.video-poster-play {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.30);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.video-poster-play:hover {
  background: rgba(173,136,100,.22);
  border-color: rgba(173,136,100,.38);
}
.video-poster-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  z-index: 1;
  pointer-events: none;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-family: Inter, system-ui, sans-serif;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vpo-inner {
  text-align: center;
  color: rgba(255,255,255,.8);
  font-family: "Questrial", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
.vpo-inner small { opacity: .6; font-size: 12px; }

/* Dolny pasek z info i przyciskami */
.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.06);
  border-radius: 0 0 6px 6px;
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.video-name {
  color: #1e1a17;
  font-size: 13px;
  font-family: 'Cormorant SC', serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}

/* Badge jakości HLS */
.hls-badge {
  font-size: 11px;
  letter-spacing: .5px;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-block;
  width: fit-content;
}
.hls-badge.ready   { background: rgba(173,136,100,.15); color: var(--rb-gold); border: 1px solid rgba(173,136,100,.3); }
.hls-badge.pending { background: rgba(255,200,0,.08); color: rgba(255,200,0,.7); border: 1px solid rgba(255,200,0,.2); }

/* ETA w badge jakości */
.hls-badge .eta-text { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* Pulsująca animacja dla statusu „w kolejce” */
@keyframes eta-pulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}
.video-processing-overlay .vpo-inner p small.eta-queued {
  animation: eta-pulse 2s ease-in-out infinite;
}

/* Pasek „Jakość” pod odtwarzaczem — poza warstwą natywnych kontrolek <video> */
.video-hls-ui {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 14px;
  background: #141414;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap;
  gap: 8px;
}
.video-quality-gear {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid rgba(173,136,100,.45);
  border-radius: 8px;
  background: rgba(173,136,100,.12);
  color: var(--rb-gold);
  cursor: pointer;
  font-family: Inter, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  transition: background .15s, border-color .15s, color .15s;
}
.video-quality-gear:hover {
  background: rgba(173,136,100,.22);
  border-color: var(--rb-gold);
  color: #fff;
}
.video-quality-gear:active {
  transform: scale(0.98);
}
.video-quality-gear-svg {
  display: block;
  flex-shrink: 0;
  opacity: .95;
}
.video-quality-gear-label {
  line-height: 1;
}
.video-quality-popover {
  position: absolute;
  top: 100%;
  bottom: auto;
  right: 14px;
  margin-top: 8px;
  margin-bottom: 0;
  min-width: min(232px, calc(100vw - 24px));
  max-width: min(92vw, 300px);
  max-height: min(55vh, 320px);
  background: rgba(22,22,22,.98);
  border: 1px solid rgba(173,136,100,.28);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0,0,0,.65);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 9999 !important;
}

/* Ensure dropdown/popover menus render above everything */
.popover {
  z-index: 9999 !important;
  position: fixed;
}
.video-quality-popover-head {
  padding: 11px 16px 7px;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.48);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-family: Inter, sans-serif;
}
.video-quality-options {
  list-style: none;
  margin: 0;
  padding: 2px 0 10px;
}
.video-quality-options li {
  margin: 0;
}
.video-quality-opt {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  gap: 12px;
  padding: 11px 16px;
  margin: 0 6px;
  width: calc(100% - 12px);
  box-sizing: border-box;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255,255,255,.92);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  font-family: Inter, sans-serif;
}
.video-quality-opt:hover:not(.is-disabled) {
  background: rgba(255,255,255,.1);
}
.video-quality-opt.is-selected {
  color: var(--rb-gold);
}
.video-quality-opt.is-disabled {
  opacity: .8;
  cursor: default;
}
.video-quality-opt .vq-check {
  width: 1.35em;
  flex-shrink: 0;
  text-align: center;
  font-size: 13px;
}
.video-quality-opt .vq-label {
  flex: 1;
  line-height: 1.35;
}

.video-quality-li-msg {
  list-style: none;
  margin: 0;
  padding: 0 12px 12px;
}
.video-quality-mp4-msg {
  margin: 0;
  padding: 8px 4px 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,.78);
  font-family: Inter, sans-serif;
}
.video-quality-mp4-msg p {
  margin: 0 0 12px;
}
.video-quality-mp4-msg p:last-child {
  margin-bottom: 0;
}
.video-quality-code {
  font-size: 12px;
  background: rgba(0,0,0,.35);
  padding: 2px 6px;
  border-radius: 4px;
  word-break: break-all;
}

.video-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.btn-download-video {
  background: #fff;
  color: #1e1a17;
  border: 1px solid rgba(0,0,0,.14);
  padding: 8px 16px;
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s, border-color .18s, color .18s;
  min-height: 38px;
}
.btn-download-video:hover  { background: rgba(0,0,0,.03); border-color: rgba(0,0,0,.22); }
.btn-download-video:active { background: rgba(0,0,0,.06); }

/* ── MODAL ZMIANA HASŁA ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(22, 22, 22, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  overflow: hidden; /* Zapobiega podwójnemu scrollbarowi na overlayu */
}
.modal-box {
  position: relative;
  background: #1a1512; /* Przywrócono ciemne tło modalne */
  border-radius: 12px;
  padding: 36px 30px; /* Nieco mniejszy padding by oszczędzić miejsce na mobile */
  width: 100%;
  max-width: 440px;
  max-height: 85vh; /* Nieco mniejszy by nie dotykał krawędzi */
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Tylko lista w środku ma scrollować */
  border: 1px solid rgba(199, 177, 151, 0.15);
}
.modal-box--wide { max-width: 480px; }
.modal-lead {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(232, 216, 195, 0.75);
  margin: 0 0 22px;
}
.modal-box .modal-lead strong { color: #fff; }
#shareGalleryModal .modal.share-url-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 10px;
}
.share-url-field {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-size: 14px;
  font-family: ui-monospace, monospace;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(199, 177, 151, 0.28);
  border-radius: 8px;
  color: #fff !important;
  -webkit-text-fill-color: #fff; /* iOS Safari fix for readonly/disabled */
  opacity: 1; /* iOS Safari fix */
  outline: none;
}
.share-url-field:focus {
  border-color: var(--rb-gold);
}
.btn-secondary-inline {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(199, 177, 151, 0.35);
  border-radius: 8px;
  color: #fff !important;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary-inline:hover {
  border-color: var(--rb-gold);
  color: var(--rb-gold) !important;
  background: rgba(199, 177, 151, 0.15);
}
.btn-secondary-inline.success {
  background: #27ae60 !important;
  border-color: #27ae60 !important;
  color: #fff !important;
}
#shareGalleryModal .modal-box {
  padding: 40px 36px 34px;
}
#shareGalleryModal .btn-primary {
  margin-top: 28px;
}
.share-result-block {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(199, 177, 151, 0.2);
}

/* ── WYBÓR GALERII (MULTILOGIN) ── */
.gallery-pick-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1; /* Zajmuje całą dostępną przestrzeń */
  margin-right: -10px; /* Offset dla scrollbara by nie nachodził na treść */
  padding-right: 10px;
  scrollbar-color: #c7b197 rgba(0,0,0,0.1);
  -webkit-overflow-scrolling: touch;
}
.gallery-pick-list::-webkit-scrollbar { width: 4px; }
.gallery-pick-list::-webkit-scrollbar-thumb { background: #c7b197; border-radius: 10px; }

.gallery-pick-item {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(199, 177, 151, 0.2);
  padding: 16px 20px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gallery-pick-item:hover {
  background: rgba(199, 177, 151, 0.14);
  border-color: var(--rb-gold);
  transform: translateY(-2px);
}
.gallery-pick-item:active { transform: translateY(0); }

.gallery-pick-title {
  font-family: "Questrial", "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: #fff;
}
.gallery-pick-sub {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  color: rgba(232, 216, 195, 0.7);
  margin-top: 4px;
}
.gallery-pick-sub code {
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-weight: 500;
  border: 1px solid rgba(199, 177, 151, 0.2);
}

@media (max-width: 768px) {
  .modal-overlay { padding: 20px 15px; align-items: center; } /* Wymuszenie środka na mobile */
  .gallery-pick-list { max-height: none; } /* Resetujemy, bo flex:1 się tym zajmuje */
}
.share-url-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 10px;
}
.share-url-field {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-size: 12px;
  font-family: ui-monospace, monospace;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(199, 177, 151, 0.28);
  border-radius: 6px;
  color: rgba(255, 252, 248, 0.95);
}
.btn-secondary-inline {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(199, 177, 151, 0.35);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.btn-secondary-inline:hover {
  background: rgba(199, 177, 151, 0.18);
  border-color: rgba(199, 177, 151, 0.55);
}

/* ── STOPKA PREMIUM ── */
.gallery-footer-premium {
  padding: 100px 40px 40px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.footer-line {
  width: 100%;
  max-width: 800px;
  height: 1px;
  background: rgba(0,0,0,0.1);
}

.footer-studio-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-studio-text {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.studio-name-inline {
  font-family: 'Cormorant SC', serif;
  font-size: 16px;
  letter-spacing: 2px;
  color: #1e1a17;
  text-transform: uppercase;
  font-weight: 500;
}

.studio-tel-inline {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: #888;
  letter-spacing: 0.5px;
}

.footer-social-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.social-circle-small {
  width: 24px;
  height: 24px;
  border: 1px solid #d0d0d0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: all 0.2s;
  background: #fff;
}

.social-circle-small:hover {
  border-color: #c7b197;
  color: #c7b197;
}

.footer-bottom-credit {
  width: 100%;
  max-width: 800px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-system {
  color: #999;
}



.share-guest-box { max-width: 440px; }
.share-guest-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
}
.share-guest-footer a { color: var(--rb-gold); }

.modal-box h2 {
  font-family: "Playfair Display", serif;
  font-weight: 400;
  color: var(--rb-gold);
  font-size: 22px;
  margin: 0 0 20px;
  padding-right: 36px;
  line-height: 1.25;
}
.modal-box label {
  display: block;
  color: rgba(232, 216, 195, 0.78);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 8px;
  margin-top: 18px;
}
.modal-box form > label:first-of-type {
  margin-top: 4px;
}
.modal-label-inline {
  display: flex !important;
  gap: 10px;
  align-items: center;
  margin: 12px 0 16px;
  color: rgba(255, 255, 255, 0.9) !important;
  text-transform: none !important;
  font-size: 13px !important;
  letter-spacing: normal !important;
  font-weight: 400 !important;
  cursor: pointer;
}
/* Pola w modalach — ten sam klimat co .share-url-field (nie białe „systemowe”) */
.modal-box .field-wrap {
  position: relative;
  margin: 0;
  box-sizing: border-box;
}
.modal-box .field-wrap input[type="text"],
.modal-box .field-wrap input[type="password"],
.modal-box .field-wrap input[type="email"],
.modal-box .field-wrap input[type="date"] {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: Inter, system-ui, sans-serif;
  color: rgba(255, 252, 248, 0.96);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(199, 177, 151, 0.3);
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
  -webkit-user-select: text !important;
  user-select: text !important;
}
.modal-box .field-wrap input[type="password"] {
  padding-right: 48px;
}
/* „Oko” w polu hasła — bez domyślnego białego tła przycisku (wcześniej brak position:relative na .field-wrap) */
/* redundant style removed */

.modal-box .field-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.02em;
}
.modal-box .field-wrap input:focus {
  border-color: rgba(199, 177, 151, 0.55);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 2px rgba(199, 177, 151, 0.16);
}
.modal-box .field-wrap input[type="date"] {
  font-variant-numeric: tabular-nums;
  min-height: 46px;
  color-scheme: dark;
}
.modal-box .field-wrap input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.88) opacity(0.65);
  cursor: pointer;
  padding: 4px;
  margin-left: 4px;
}
.modal-box .field-wrap input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 0.95;
}
.modal-box .form-msg {
  border-radius: 4px;
  margin-top: 14px;
}
.modal-box .form-msg.err {
  background: rgba(226, 38, 88, 0.14);
  border: 1px solid rgba(255, 120, 140, 0.35);
  color: #ffc9d0;
}
.modal-box .form-msg.ok {
  background: rgba(72, 180, 120, 0.12);
  border: 1px solid rgba(100, 200, 150, 0.35);
  color: #b8f5d4;
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(199, 177, 151, 0.22);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(199, 177, 151, 0.35);
}

/* Modal „Zmiana hasła” — rytm etykiet i pól */
#changePassModal .modal-box h2 {
  margin-bottom: 24px;
}
#changePassModal .modal-box form > label:first-of-type {
  margin-top: 0;
}
#changePassModal .modal-box label {
  margin-top: 16px;
  margin-bottom: 6px;
  color: rgba(212, 190, 160, 0.75);
  letter-spacing: 1.6px;
}
#changePassModal .modal-box .field-wrap {
  margin-bottom: 0;
}
#changePassModal .modal-box .btn-primary {
  margin-top: 20px;
}

.btn-primary {
  width: 100%;
  background: linear-gradient(180deg, #c7b197 0%, #b09d82 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 24px;
  transition: filter 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 6px 20px rgba(199, 177, 151, 0.25);
}
.btn-primary:active {
  transform: translateY(1px);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(40%);
  transform: none;
  box-shadow: none;
}

/* ── GDPR LOGO ── */
.gdpr-logo {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  letter-spacing: 4px;
  color: var(--rb-gold);
  margin-bottom: 12px;
  text-align: center;
}

/* .pass-wrap — zastąpiony przez .field-wrap (patrz blok formularza logowania) */

/* ══════════════════════════════════════════════════════════════════
   TRYB ADMINA — floating toolbar + delete buttons
   ══════════════════════════════════════════════════════════════════ */

/* Sticky admin toolbar u góry ekranu */
.admin-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 12px;
  padding: 10px 16px;
  background: #1a1a2e;
  border-bottom: 2px solid var(--rb-gold);
  box-shadow: 0 2px 16px rgba(0,0,0,.4);
  font-family: Inter, sans-serif;
}

.admin-bar-left   { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
.admin-bar-center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 280px;
  min-width: 0;
}
.admin-bar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.admin-bar-btn-danger:not(:disabled) {
  background: rgba(160, 40, 40, .45);
  border-color: rgba(255, 120, 120, .45);
}
.admin-bar-btn-danger:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-bar-badge {
  background: var(--rb-gold);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  white-space: nowrap;
}

.admin-bar-gallery {
  color: rgba(255,255,255,.7);
  font-size: 13px;
  letter-spacing: .5px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 2px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  letter-spacing: .5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, border-color .18s;
  -webkit-tap-highlight-color: transparent;
}
.admin-bar-btn:hover, .admin-bar-btn:active {
  background: rgba(173,136,100,.3);
  border-color: var(--rb-gold);
}

.admin-bar-upload {
  position: relative;
  overflow: hidden;
}

/* Wysokość #adminBar ustawia JS (--admin-bar-height); fallback do pierwszego paint zanim zmierzy ResizeObserver */
body.admin-mode-active #galleryView { padding-top: var(--admin-bar-height, 108px); }
body.admin-mode-active .gallery-meta-bar { top: var(--admin-bar-height, 108px) !important; }

/* Checkbox zaznaczania (tryb admin) — lewy górny róg */
.admin-select-wrap {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 4;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.92);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.admin-select-wrap input {
  width: 18px;
  height: 18px;
  accent-color: var(--rb-gold);
  cursor: pointer;
  margin: 0;
}

/* ── Przycisk delete na zdjęciu (pojawia się przy hover) ── */
.grid-item .admin-delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(220, 50, 50, .85);
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .18s, transform .18s;
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: transparent;
}
.grid-item .admin-cover-btn {
  position: absolute;
  top: 6px;
  right: 44px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(199, 177, 151, .88);
  border: none;
  color: rgba(255,255,255,.95);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .18s, transform .18s;
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: transparent;
}
.grid-item:hover .admin-cover-btn,
.grid-item:focus-within .admin-cover-btn { opacity: 1; }
.admin-cover-btn:hover { transform: scale(1.12); background: rgba(199, 177, 151, .98); }
.grid-item:hover .admin-delete-btn,
.grid-item:focus-within .admin-delete-btn { opacity: 1; }
.admin-delete-btn:hover { transform: scale(1.12); background: rgba(200,30,30,.95); }

/* Na mobile: zawsze widoczny (no hover) */
@media (pointer: coarse) {
  .grid-item .admin-delete-btn { opacity: .75; }
  .grid-item .admin-cover-btn { opacity: .75; }
}

/* ── Przycisk delete dla video ── */
.btn-delete-video {
  padding: 6px 12px;
  background: rgba(220,50,50,.9);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 12px;
  cursor: pointer;
  transition: background .18s;
  margin-left: 8px;
}
.btn-delete-video:hover { background: rgb(200,30,30); }

/* Checkbox na karcie video (tryb admin) */
.video-wrap .admin-select-wrap {
  top: 10px;
  left: 10px;
  z-index: 6;
}
.video-card.admin-video-selected .video-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid var(--rb-gold);
  border-radius: 0;
  pointer-events: none;
  z-index: 2;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE — mobile first (od najmniejszego do największego)
   ══════════════════════════════════════════════════════════════════ */

/* ─ Małe mobile (<360px) ─ */
@media (max-width: 360px) {
  .login-logo { height: 40px; }
  .login-box h1 { font-size: 22px; }
}

/* ─ Landscape na mobile — kompaktowy formularz ─ */
@media (max-height: 520px) and (orientation: landscape) {
  .login-view { justify-content: flex-start; padding-top: 20px; overflow-y: auto; }
  .login-box { margin: 20px auto; padding: 30px; }
}

/* ══ VIDEO — mobile responsive ════════════════════════════════════ */
@media (max-width: 600px) {
  .video-list {
    grid-template-columns: 1fr;
    padding: 12px 10px;
    gap: 18px;
  }
  .video-card { border-radius: 0; }
  .video-meta { padding: 10px 14px; flex-direction: column; align-items: flex-start; }
  .video-name { max-width: 90vw; }
  .video-actions { width: 100%; justify-content: flex-end; }

  /* V4-2: lighter overlay + smaller padding on small screens */
  @media (max-width: 480px) {
    .video-chrome {
      left: 8px;
      right: 8px;
      bottom: 8px;
      padding: 9px 10px 10px;
      background: linear-gradient(to top, rgba(0,0,0,.58), rgba(0,0,0,.30)) !important;
      backdrop-filter: blur(9px);
      -webkit-backdrop-filter: blur(9px);
    }
    .vcc-play,
    .vcc-fs {
      width: 40px;
      height: 40px;
      border-radius: 10px;
    }
    .video-volume-slider { width: 58px; }
  }
}

/* Overrides removed to allow clean masonry and hero styles */


/* Mobile: przywrócenie ciemnego tła lightboxa (zgodnie z życzeniem 1:1) */
@media (max-width: 768px) {
  .lightbox {
    background: #ffffff; /* Powrót do białego tła również na mobile */
  }
  .lb-topbar {
    background: linear-gradient(to bottom, rgba(255,255,255,.95) 0%, transparent 100%);
  }
  .lb-counter { color: #111; }
  .lb-icon-btn {
    background: rgba(0,0,0,.04) !important;
    border-color: rgba(0,0,0,.08) !important;
    color: #111 !important;
  }
  .lb-icon-btn:hover {
    background: rgba(199, 177, 151, .4) !important;
  }
  .lb-arrow {
    background: rgba(0,0,0,.35) !important;
    border-color: rgba(255,255,255,.15) !important;
    color: #fff !important;
    top: calc(50% - 36px) !important;
  }
  .lb-arrow:hover {
    background: rgba(199, 177, 151, .4) !important;
  }
  .lb-img {
    box-shadow: none !important;
  }

  .lb-bottombar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: #ffffff;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 110;
  }
  
  .lb-bottom-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.1);
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, transform .15s, color .18s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
  }

  .lb-bottom-btn svg {
    width: 22px;
    height: 22px;
  }

  .lb-bottom-btn:hover {
    background: rgba(58,53,48,.9);
    color: #fff;
    border-color: rgba(58,53,48,.9);
  }

  .lb-bottom-btn:active {
    transform: scale(.9);
  }

  /* Ensure lightbox stage has bottom padding so content isn't hidden behind bar */
  .lb-stage {
    padding-bottom: 72px;
  }
}

@media (max-width: 760px) {
  .gallery-header { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .gallery-actions button { font-size: 12px; padding: 8px 10px; }
  .gallery-tabs { padding: 0 12px; }
  
  /* Fix iOS Safari input focus (Item 7) */
  .login-box input, .field-wrap input {
    -webkit-user-select: text !important;
    user-select: text !important;
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {
  .modal-box { padding: 24px 18px; width: 95vw; }
  #shareGalleryModal .modal-box { padding: 28px 18px 22px; }
}

/* ══════════════════════════════════════════════════════════════════
   NAVIGATION — desktop + mobile hamburger menu (V4-4)
   ══════════════════════════════════════════════════════════════════ */

/* ── Desktop nav bar (always visible ≥768px) ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: #111;
  border-bottom: 1px solid #222;
}

/* ── Logo / brand link inside nav ── */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--rb-gold);
  font-family: "Playfair Display", serif;
  font-size: 16px;
  letter-spacing: 2px;
}

/* ── Desktop nav links (horizontal row) ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-family: Inter, sans-serif;
  font-size: 13px;
  letter-spacing: .8px;
  padding: 10px 4px;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}

.nav-links li a:hover {
  color: #fff;
  border-bottom-color: var(--rb-gold);
}

/* ── Hamburger button (hidden on desktop) ── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  cursor: pointer;
  padding: 10px;
  gap: 5px;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s, border-color .2s;
}

.hamburger-btn:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--rb-gold);
}

/* Three horizontal lines */
.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.75);
  border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease;
}

/* Active (open) state — X icon */
.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile dropdown panel (hidden by default on mobile) ── */
.mobile-menu-panel {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 998;
  background: rgba(17,17,17,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: calc(80px + env(safe-area-inset-top, 0px));
  overflow-y: auto;
}

.mobile-menu-panel.is-open {
  display: flex;
}

/* ── Mobile nav links (vertical list) ── */
.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.mobile-nav-links li {
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.mobile-nav-links li a {
  display: block;
  padding: 18px 24px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-family: "Playfair Display", serif;
  font-size: 18px;
  letter-spacing: 1.5px;
  transition: color .2s, background .2s;
}

.mobile-nav-links li a:hover,
.mobile-nav-links li a:focus {
  color: var(--rb-gold);
  background: #fff;
}

/* ── Close button inside mobile panel ── */
.mobile-menu-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  color: rgba(255,255,255,.7);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s, color .2s;
}

.mobile-menu-close:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

/* ── Overlay backdrop (click outside to close) ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 997;
  background: transparent;
}

.nav-overlay.is-active {
  display: block;
}

/* ══════════════════════════════════════════════════════════════════
   MOBILE — hamburger menu (≤768px)
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Hide regular desktop nav links, show hamburger */
  .nav-links { display: none; }
  .hamburger-btn { display: flex; }
}

/* back-to-home-btn removed (as requested) */
