/* =========================
   GALLERY BACKGROUND FIX
========================= */

.vl24-gallery{
  position:relative;
  overflow:hidden;
}

.vl24-gallery-bg{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  z-index:0;
}

.vl24-gallery > .container{
  position:relative;
  z-index:2;
}

/* =========================
   GALLERY FILTERS
========================= */

.vl24-gallery-filters{
  display:flex;
  gap:12px;
  margin:30px 0 40px;
  flex-wrap:wrap;
}

.vl24-gallery-filter{
  border:1px solid #ddd;
  background:#fff;
  padding:10px 18px;
  border-radius:999px;
  cursor:pointer;
  transition:.25s;
}

.vl24-gallery-filter.active{
  background:#111;
  color:#fff;
  border-color:#111;
}

/* GRID BASE */
.vl24-gallery-grid{
  column-gap:24px;
}

/* columns from admin */
.vl24-gallery-grid.cols-1{ column-count:1; }
.vl24-gallery-grid.cols-2{ column-count:2; }
.vl24-gallery-grid.cols-3{ column-count:3; }
.vl24-gallery-grid.cols-4{ column-count:4; }

/* masonry items */
.vl24-gallery-item{
  break-inside:avoid;
  margin-bottom:24px;
}

/* =====================================
   VL24 GALLERY — SIGNATURE SYSTEM
===================================== */

.vl24-gallery{
  position:relative;
  padding:80px 0;
  overflow:hidden;
}

/* BG IMAGE */
.vl24-gallery-bg{
  position:absolute;
  inset:0;

  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;

  z-index:0;
}

/* WHITE GLASS LAYER */
.vl24-gallery-overlay{
  position:absolute;
  inset:0;

  background:
    linear-gradient(
      to bottom,
      rgba(255,255,255,.65),
      rgba(255,255,255,.45),
      rgba(255,255,255,.25)
    );

  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px);

  z-index:1;
}

/* CONTENT ABOVE */
.vl24-gallery .container{
  position:relative;
  z-index:2;
}

/* HEADER */

.vl24-gallery-head{
  max-width:900px;
  margin:0 auto 60px;
  text-align:center;
}

.vl24-gallery-title{
  font-size:44px;
  font-weight:900;
  letter-spacing:-.02em;
}

.vl24-gallery-text{
  margin-top:12px;
  opacity:.8;
}

/* FILTERS */

.vl24-gallery-filters{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:50px;
}

.vl24-gallery-filter{
  border-radius:999px;
  padding:10px 22px;

  font-weight:700;
  font-size:14px;

  background: rgba(255,255,255,.35);
  border:1px solid rgba(15,23,42,.08);

  backdrop-filter: blur(12px);

  cursor:pointer;
  transition:.25s;
}

.vl24-gallery-filter:hover{
  transform:translateY(-2px);
}

.vl24-gallery-filter.active{
  background:#0f172a;
  color:#fff;
  border-color:#0f172a;
}

/* CARD BLOCK */

.vl24-gallery-card-block{
  margin-bottom:80px;
}

.vl24-gallery-card-title{
  font-size:28px;
  font-weight:900;
  margin-bottom:10px;
}

.vl24-gallery-card-text{
  max-width:700px;
  opacity:.8;
  margin-bottom:30px;
}

/* ITEM */

.vl24-gallery-item{
  display:block;
  position:relative;

  border-radius:22px;
  overflow:hidden;

  background:#fff;

  box-shadow:
    0 18px 60px rgba(0,0,0,.08);

  transition:.3s;
}

/* hover lift */
.vl24-gallery-item:hover{
  transform:translateY(-6px);
  box-shadow:
    0 28px 90px rgba(0,0,0,.18);
}

/* image */
.vl24-gallery-item img{
  width:100%;
  display:block;
  object-fit:cover;
}

/* ARROW */

.vl24-gallery-arrow{
  position:absolute;
  top:16px;
  right:16px;

  width:42px;
  height:42px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:50%;

  background:rgba(15,23,42,.85);
  color:#fff;

  opacity:0;
  transition:.25s;
}

.vl24-gallery-item:hover .vl24-gallery-arrow{
  opacity:1;
}

/* ============================
   VL24 GALLERY — GLOBAL STYLE MATCH
   (same system as why-cards / apt)
============================ */

.vl24-gallery{
  position:relative;
  padding:110px 0 130px;
  overflow:hidden;
  isolation:isolate;
}

/* content above glass */
.vl24-gallery > *{
  position:relative;
  z-index:2;
}

/* =========================
   FILTER BUTTONS — VL24 SYSTEM
========================= */

.vl24-gallery-filters{
  display:flex;
  gap:14px;
  justify-content:center;
  margin:40px 0 60px;
}

.vl24-gallery-filter{
  height:46px;
  padding:0 28px;

  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);

  background:rgba(255,255,255,.45);

  backdrop-filter:blur(12px);

  font-weight:700;
  cursor:pointer;

  transition:.2s;
}

.vl24-gallery-filter:hover{
  transform:translateY(-1px);
}

.vl24-gallery-filter.active{
  background:#0f172a;
  color:#fff;
  border-color:#0f172a;
}

/* =========================================
   VL24 GALLERY — BG + GLASS (CORRECT SYSTEM)
   sama loogika nagu apartment-single
========================================= */

.vl24-gallery{
  position:relative;
  padding:110px 0 130px;
  overflow:hidden;
  isolation:isolate;
}

/* REAL BACKGROUND IMAGE */
.vl24-gallery-bg{
  position:absolute;
  inset:0;

  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;

  z-index:-2; /* ⭐ oluline */
}

/* GLASS LAYER */
.vl24-gallery-overlay{
  position:absolute;
  inset:10px 0 0 0; /* sama offset nagu apartment */

  background: linear-gradient(
    to bottom,
    rgba(255,255,255,.55) 0%,
    rgba(255,255,255,.38) 45%,
    rgba(255,255,255,.18) 70%,
    rgba(255,255,255,.05) 100%
  );

  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px);

  z-index:-1; /* ⭐ oluline */
}

/* CONTENT ABOVE */
.vl24-gallery .container{
  position:relative;
  z-index:2;
}

/* =====================================
   VL24 GALLERY — LIGHT HEADING SYSTEM
   (same as why-cards)
===================================== */

/* eyebrow */
.vl24-gallery .section-eyebrow{
  display:block;

  font-size:12px;
  letter-spacing:.16em;
  text-transform:uppercase;

  color:#64748b;
  margin-bottom:14px;
}

/* MAIN TITLE — GOLD SHINE */
.vl24-gallery .vl24-gallery-title{
  font-size:48px;
  line-height:1.05;
  margin:0 0 18px;

  font-weight:700;
  letter-spacing:-.01em;

  background:
    linear-gradient(
      120deg,
      #120b05 0%,
      #2a1a0b 15%,
      #6b4a1f 30%,
      #c9a15a 45%,
      #fff3c9 50%,
      #c9a15a 55%,
      #6b4a1f 70%,
      #2a1a0b 85%,
      #120b05 100%
    );

  background-size:300% 100%;

  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;

  text-shadow:
    0 1px 2px rgba(0,0,0,.25);

  animation:vl24GoldShine 6s linear infinite;
}

/* shine animation */
@keyframes vl24GoldShine{
  0%{background-position:0% 0}
  50%{background-position:100% 0}
  100%{background-position:0% 0}
}

/* intro text */
.vl24-gallery .vl24-gallery-text{
  font-size:16px;
  line-height:1.7;

  color:#475569;
  max-width:720px;
  margin:0 auto;
}

/* CARD TITLE */

.vl24-gallery-card-title{
  font-size:28px;
  font-weight:800;

  color:#0f172a;
  letter-spacing:-.01em;
}

/* card text */
.vl24-gallery-card-text{
  color:#475569;
  line-height:1.6;
}

/* =================================
   VL24 GALLERY — DARK CARD BLOCK
   (same as apartment single panels)
================================= */

.vl24-gallery-card-block{
  position:relative;

  padding:40px;
  margin-bottom:80px;

  border-radius:28px;

  /* ⭐ SAMA MIS APARTMENT SINGLE */
  background: var(--apt-dark-bg);
  border:1px solid var(--apt-dark-border);
  box-shadow: var(--apt-dark-shadow);

  color:#fff;

  overflow:hidden;
  isolation:isolate;
}

/* gold glow energy layer */
.vl24-gallery-card-block::before{
  content:"";
  position:absolute;
  inset:-40%;

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(201,161,90,.25),
      transparent 60%
    );

  pointer-events:none;
  z-index:0;
}

/* noise texture layer */
.vl24-gallery-card-block::after{
  content:"";
  position:absolute;
  inset:0;

  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");

  mix-blend-mode:overlay;
  pointer-events:none;
}

/* content above effects */
.vl24-gallery-card-block > *{
  position:relative;
  z-index:2;
}

/* titles inside dark card */

.vl24-gallery-card-title{
  color:#fff;
  font-size:28px;
  font-weight:900;
}

.vl24-gallery-card-text{
  color:rgba(255,255,255,.75);
}

/* =================================
   IMAGES INSIDE DARK BLOCK
================================= */

.vl24-gallery-item{
  border-radius:20px;
  overflow:hidden;

  border:1px solid rgba(255,255,255,.12);

  box-shadow:0 18px 60px rgba(0,0,0,.35);
}

/* hover lift */

.vl24-gallery-item:hover{
  transform:translateY(-6px);
  box-shadow:0 28px 90px rgba(0,0,0,.55);
}

/* =====================================
   MOBILE — FILTER BAR FIX
===================================== */

@media (max-width:768px){

  .vl24-gallery-filters{
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;

    justify-content:flex-start;

    gap:10px;
    padding-bottom:6px;

    -webkit-overflow-scrolling:touch;
    scroll-snap-type:x mandatory;
  }

  .vl24-gallery-filters::-webkit-scrollbar{
    display:none;
  }

  .vl24-gallery-filter{
    flex:0 0 auto;
    scroll-snap-align:start;

    height:42px;
    padding:0 18px;

    font-size:13px;
  }

}

/* =====================================
   MOBILE — CARD BLOCK FIX
===================================== */

@media (max-width:768px){

  .vl24-gallery-card-block{
    padding:22px;
    border-radius:24px;
    margin-bottom:40px;
  }

  .vl24-gallery-card-title{
    font-size:22px;
  }

  .vl24-gallery-card-text{
    font-size:14px;
    margin-bottom:20px;
  }

}

/* =====================================
   MOBILE — GRID SYSTEM
===================================== */

@media (max-width:768px){

  /* disable column masonry */
  .vl24-gallery-grid{
    column-count:unset !important;
  }

  /* use real grid */
  .vl24-gallery-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
  }

  /* image aspect */
  .vl24-gallery-item img{
    aspect-ratio: 4/3;
    object-fit:cover;
  }

}

/* =====================================
   MOBILE — HEADER FIX
===================================== */

@media (max-width:768px){

  .vl24-gallery-title{
    font-size:32px;
  }

  .vl24-gallery-head{
    margin-bottom:30px;
  }

}
