/* =====================
   ALBUMY (MODELS.PHP)
===================== */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 1400px) {
  .albums-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .albums-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .albums-grid {
    grid-template-columns: 1fr;
  }
}

.album-thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: #fff;
}

@media (min-width:1000px){
  .album-layout {
    overflow: visible;
  }
}

.album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* transform: scale(1.15);
  transition: transform .6s ease;
  */
   transform: scale(1.045);
  transition:
    transform 900ms cubic-bezier(.19,1,.22,1);
  will-change: transform;

}

.album-thumb:hover img,
.album-tile:hover img {
  transform: scale(1);
}

.album-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
    padding: 18px 12px;
  transition: opacity .5s ease;
  /* font-family: inherit; */
  font-family: Roboto, sans-serif; 
  font-size: 11px;
  letter-spacing: .08em;
  /* text-transform: uppercase; */
    color: #fff;
 background: linear-gradient(to top,
    rgba(0,0,0,.45),
    rgba(0,0,0,0) 55%
  );
  
}

/* Ukrywanie tekstu po najechaniu na kontener */
.album-thumb:hover .album-overlay {
  opacity: 0;
  pointer-events: none; /* Zapobiega interakcji z ukrytym tekstem */
  transition-delay: 0s; /* Tutaj ustawiasz czas "po chwili" (np. pół sekundy) */
}

/* =====================
   MODEL.PHP – LAYOUT
===================== */
.album-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
}

@media (max-width: 900px) {
  .album-layout {
    grid-template-columns: 1fr;
  }
  .album-meta {
    order: -1;
    margin-bottom: 32px;
  }
}

/* =====================
   META / OPIS
===================== */

.album-meta {
  max-width: 340px; /* lub 380px */
    width: 100%;
  justify-self: start;
}
.album-meta h1 {
  font-size: 17px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.album-description {
  font-size: 14px;
  line-height: 1.6;
  opacity: .75;
  padding: 0;
  margin-top: 1rem;
  
}

.album-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 0px;
  font-size: 18px;
}

@media (max-width:999px){

  .album-meta .album-nav {
    box-shadow: 0 -6px 18px rgba(0,0,0,.12);
  }

  .album-meta .album-nav.is-hidden {
    box-shadow: none;
  }
}

.album-nav a {
  text-decoration: none;
  color: inherit;
  opacity: .6;
}

.album-nav a:hover {
  opacity: 1;
}

@media (min-width:1000px){
  .album-meta {
    position: sticky;
    top: 2rem; /* zgodne z headerem */
    align-self: flex-start;
  }
}

/* =====================
   MASONRY 
===================== */
.masonry {
  column-count: 3;
  column-gap: 16px;
}

@media (max-width: 1200px) { .masonry { column-count: 2; } }
@media (max-width: 700px)  { .masonry { column-count: 1; } }

.photo-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 16px;
}

.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .4s ease, opacity .4s ease;
  user-select: none;
  pointer-events: none;
}

.photo-item:hover img {
  transform: scale(0.985);
  opacity: .95;
}
/* === MODEL PAGE ONLY === */
.model-masonry {
  column-gap: 24px;
}

.model-masonry .photo-item img {
  transition: transform .4s ease, opacity .4s ease;
}

.model-masonry .photo-item:hover img {
  transform: scale(0.985);
}

/* =====================
   ANTY DOWNLOAD
===================== */
.photo-item {
  pointer-events: auto;
}
.photo-item img {
  pointer-events: none;
}

/* =====================
   SAFETY RESET
===================== */
.masonry,
.masonry * {
  position: static !important;
  float: none !important;
  box-sizing: border-box;
}


/* ===== STANDARD GRID (weddings, events itd.) ===== */
/* ===== EVENTS / WEDDINGS – LEKKI MASONRY ===== */
.photos-grid {
  column-count: 3;
  column-gap: 24px;
    margin-top: 24px;

    
}

@media (max-width: 1400px) {
  .photos-grid { column-count: 3; }
}
@media (max-width: 900px) {
  .photos-grid { column-count: 2; }
}
@media (max-width: 600px) {
  .photos-grid { column-count: 1; }
}

.photos-grid .photo-item {
  break-inside: avoid;
  margin-bottom: 12px;
}

.photos-grid .photo-item img {
  width: 100%;
  height: auto;
  display: block;
    transition: transform .4s ease, opacity .4s ease;
}
.photos-grid .photo-item:hover img {
  transform: scale(0.985);
  opacity: .95;
}

/* === SAFETY RESET FOR GALLERIES === */
.photos-grid,
.photos-grid * {
  box-sizing: border-box;
}
/* =========================
   ALBUM VIEW (NO GRID)
========================= */

.album-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: start;
}

/* ZDJĘCIA – JEDNO POD DRUGIM */
.album-photos {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.album-photo img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .4s ease, opacity .4s ease;
}

.album-photo:hover img {
  transform: scale(0.99);
  opacity: .95;
}

/* PRAWA KOLUMNA – ZAWSZE WIDOCZNY OPIS */
.album-meta {
  width: 100%;
  max-width: 18rem;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-self: start;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.album-meta video,
.album-meta img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}


/* MOBILE */
@media (max-width: 900px) {
  .album-layout {
    grid-template-columns: 1fr;
  }

  .album-meta {
    position: static;
    order: -1;
    margin-bottom: 32px;
 
  }
}
/* =====================
   GLIGHTBOX 
===================== */

/* ukryj numerację */
.gslide-counter {
  display: none !important;
}

/* tło */
.glightbox-clean .gslide-description {
  background: transparent;
}

/* przyciski */
.glightbox-clean .gprev,
.glightbox-clean .gnext,
.glightbox-clean .gclose {
  background: none;
  width: 48px;
  height: 48px;
  opacity: .6;
  transition: opacity .3s ease;
}

.glightbox-clean .gprev:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gclose:hover {
  opacity: 1;
}

/* USUŃ SVG */
.glightbox-clean svg {
  display: none;
}

/* STRZAŁKA WSTECZ */
.glightbox-clean .gprev::before {
  content: "←";
  font-size: 32px;
  color: #fff;
}

/* STRZAŁKA DALEJ */
.glightbox-clean .gnext::before {
  content: "→";
  font-size: 32px;
  color: #fff;
}

/* ZAMKNIJ */
.glightbox-clean .gclose::before {
  content: "□";
  font-size: 26px;
  color: #fff;
}
/* =====================
   SCROLL REVEAL
===================== */

.album-photo {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}

.album-photo.is-visible {
  opacity: 1;
  transform: translateY(0);
}
/* =====================
   SCROLL REVEAL – GRID
===================== */

.photos-grid .photo-item {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}

.photos-grid .photo-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SCROLL REVEAL (GLOBAL) ===== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity .6s ease,
    transform .6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* delikatniejsze dla zdjęć */
.photo-item.reveal,
.album-photo.reveal {
  transform: translateY(8px);
}

/* ===============================
   ALBUM VIDEOS – PRO VERSION
=============================== */

.album-videos {
  margin-top: 24px;
    display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 0;
}

.album-video {
  width: 100%;
  display: block;
  background: #000;
  cursor: pointer;
  border-radius: 2px;
  position: relative;
}

/* ▶ PLAY ICON (only when paused) */
.album-video::after {
  content: '▶';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #fff;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.album-video.is-paused::after {
  opacity: .6;
}

/* subtle hover */
.album-video:hover {
  opacity: .96;
}

/* REVEAL */
.reveal-video {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal-video.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.album-sidebar {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
    padding-left: 0;
  padding-right: 0;
}
.album-videos video {
  width: 100%;
  height: auto;
  display: block;
  max-width: none;

}

/* tylko widok albumu- pozbycie się prawej wolnej przestrzeni */
body.template-album .content {
  max-width: none;
  padding-right: 0;
}

body.template-album .album-layout {
  width: 100%;
  max-width: 100%;
}


/* ================================
   ALBUM META – STICKY DO KOŃCA
================================ */

@media (min-width:1000px){

  /* rodzic = granica sticky */
  .album-layout {
    position: relative;
    overflow: visible;
  }

  /* prawa kolumna */
  .album-meta {
    position: sticky;
    top: 2rem; /* zgodne z headerem */
    align-self: flex-start;

    max-width: 18rem;
  }

  /* estetyka */
  .album-meta h1 {
    font-size: 17px;
    line-height: 1.3;
  }

  .album-description {
    padding: 0;
    margin-top: 1rem;
    font-size: 14px;
    line-height: 1.6;
    opacity: .75;
  }
}

/* =================================
   ALBUM NAV – MOBILE UX SOLUTION
================================= */

/* domyślnie: dolna nawigacja ukryta */
.album-nav--bottom {
  display: none;
}

/* MOBILE */
@media (max-width:999px){

  /* górna nawigacja znika */
  .album-meta .album-nav {
    display: none;
  }

  /* dolna NA KOŃCU ALBUMU */
  .album-nav--bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 48px;
    padding: 16px 0;

    font-size: 20px;
    border-top: 1px solid rgba(0,0,0,.08);
  }

  .album-nav--bottom a {
    text-decoration: none;
    color: inherit;
    opacity: .75;
  }

  .album-nav--bottom a:hover {
    opacity: 1;
  }
}

/* ===============================
   MOBILE ALBUM NAV – FIXED BOTTOM
================================ */

@media (max-width:999px){

  /* meta NIE sticky na mobile */
  .album-meta {
    position: static;
  }

  /* NAWIGACJA → fixed bottom */
  .album-meta .album-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    z-index: 999;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 20px;

    background: rgba(255,255,255,.96);
    backdrop-filter: blur(6px);

    border-top: 1px solid rgba(0,0,0,.08);

    font-size: 20px;
  }

  .album-meta .album-nav a,
  .album-meta .album-nav span {
    opacity: .8;
  }

  /* żeby zdjęcia NIE wchodziły pod nav */
  body.template-album main {
    padding-bottom: 70px;
  }
}

/* ===============================
   PREMIUM MOBILE ALBUM NAV
================================ */

@media (max-width:999px){

  .album-meta .album-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    z-index: 999;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 20px;

    background: rgba(255,255,255,.94);
    backdrop-filter: blur(8px);

    border-top: 1px solid rgba(0,0,0,.08);

    font-size: 20px;

    transform: translateY(0);
    transition: transform .35s ease;
    will-change: transform;
  }

  /* hidden state */
  .album-meta .album-nav.is-hidden {
    transform: translateY(100%);
  }

  /* space for nav */
  body.template-album main {
    padding-bottom: 72px;
  }
}

