/* =========================================
   APARTMENT LIST — GLASS PREMIUM 2026
========================================= */

:root{
  --apt-bg:
    radial-gradient(
      circle at 50% 0%,
      #0f172a 0%,
      #0b1220 50%,
      #020617 100%
    );

  --apt-glass: rgba(255,255,255,.08);
  --apt-glass-strong: rgba(255,255,255,.14);
  --apt-border: rgba(255,255,255,.18);

  --apt-text: rgba(255,255,255,.92);
  --apt-soft: rgba(255,255,255,.65);

  --apt-gold:#c9a15a;
  --apt-gold-light:#f5e2b3;
}

/* ===============================
   SECTION
=============================== */

.apt-list{
  padding:110px 0 130px;
  background:var(--apt-bg);
}

.apt-list-inner{
  max-width:1240px;
  margin:0 auto;
  padding:0 40px;
}

/* ===============================
   FILTER BAR (GLASS)
=============================== */

.apt-filters{
  display:flex;
  flex-wrap:wrap;
  gap:30px 50px;
  align-items:flex-end;
  justify-content:space-between;

  margin-bottom:60px;

  padding:36px 44px;

  border-radius:34px;

  background:var(--apt-glass);
  backdrop-filter:blur(24px) saturate(160%);
  -webkit-backdrop-filter:blur(24px) saturate(160%);

  border:1px solid var(--apt-border);

  box-shadow:
    0 30px 80px rgba(0,0,0,.45),
    inset 0 1px 0 rgba(255,255,255,.15);
}

.apt-filter{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.apt-filter label{
  font-size:12px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--apt-soft);
}

/* SELECT */

.apt-select{
  min-width:160px;
  height:46px;
  padding:0 18px;

  border-radius:999px;
  border:1px solid rgba(255,255,255,.25);

  background:rgba(255,255,255,.06);
  color:#fff;

  font-weight:700;
  font-size:14px;

  outline:none;
  transition:.25s;
}

.apt-select:focus{
  border-color:var(--apt-gold);
  box-shadow:0 0 0 3px rgba(201,161,90,.3);
}

/* CHECKBOXES */

.apt-checks{
  display:flex;
  gap:40px;
  align-items:center;
  padding-top:22px;
}

.apt-check{
  display:flex;
  align-items:center;
  gap:10px;

  font-weight:800;
  font-size:14px;
  letter-spacing:.08em;
  color:#fff;
}

.apt-check input{
  accent-color:var(--apt-gold);
  width:18px;
  height:18px;
}

/* RESET */

.apt-reset{
  height:46px;
  padding:0 28px;

  border-radius:999px;
  border:1px solid rgba(255,255,255,.25);

  background:rgba(255,255,255,.06);
  color:#fff;

  font-weight:800;
  letter-spacing:.12em;

  cursor:pointer;
  transition:.25s;
}

.apt-reset:hover{
  background:rgba(255,255,255,.12);
}

/* ===============================
   TABLE
=============================== */

.apt-table-wrap{
  overflow-x:auto;
}

.apt-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 22px;
}

.apt-table thead th{
  text-align:left;
  font-size:12px;
  letter-spacing:.24em;
  text-transform:uppercase;
  color:var(--apt-soft);
  padding:0 20px 10px;
}

/* ROW GLASS */

/* =========================================
   APARTMENT ROW — CLEAN 2026 GLASS DEPTH
========================================= */

.apt-table tbody tr{

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.10) 0%,
      rgba(255,255,255,.06) 100%
    );

  border:1px solid rgba(255,255,255,.18);
  border-radius:28px;

  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);

  box-shadow:
    0 25px 70px rgba(0,0,0,.55);

  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

/* subtle internal depth without breaking layout */

.apt-table tbody tr{
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.12),
      rgba(255,255,255,.04)
    ),
    linear-gradient(
      135deg,
      rgba(201,161,90,.08),
      rgba(59,130,246,.06)
    );
}


.apt-table tbody tr:hover{
  transform:translateY(-6px);
  box-shadow:
    0 35px 90px rgba(0,0,0,.65),
    0 0 60px rgba(201,161,90,.25);
}

/* CELLS */

.apt-table td{
  padding:26px 20px;
  font-weight:700;
  font-size:15px;
  color:var(--apt-text);
  vertical-align:middle;
}

.apt-cell-number{
  font-weight:900;
  font-size:20px;
  color:#fff;
}

/* OUTDOOR */

.apt-outdoor-line{
  display:block;
  font-size:13px;
  font-weight:700;
  color:var(--apt-soft);
}

.apt-outdoor-line strong{
  color:#fff;
  font-weight:900;
}

/* PRICE */

.apt-price{
  font-weight:900;
  font-size:18px;
  background:linear-gradient(
    120deg,
    var(--apt-gold),
    var(--apt-gold-light),
    var(--apt-gold)
  );
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

/* STATUS */

.apt-status{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  padding:10px 18px;
  border-radius:999px;

  font-size:12px;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;

  backdrop-filter:blur(10px);
  border:1px solid rgba(255,255,255,.2);
}

.apt-status--reserved{
  background:rgba(201,161,90,.18);
  color:#f5d27a;
}

/* CTA */

.apt-cell-cta{
  text-align:right;
}

.apt-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:44px;
  padding:0 30px;

  border-radius:999px;

  font-size:12px;
  font-weight:900;
  letter-spacing:.18em;
  text-transform:uppercase;

  color:#111;

  background:linear-gradient(
    135deg,
    var(--apt-gold),
    var(--apt-gold-light)
  );

  text-decoration:none;
  transition:.3s;
}



/* ===============================
   MOBILE (JUST WHAT YOU ASKED)
=============================== */

@media (max-width:900px){

  .apt-table,
  .apt-table tbody,
  .apt-table tr,
  .apt-table td{
    display:block;
    width:100%;
  }

}

/* =====================================
   FIX: REAL ROUNDED TABLE ROWS
===================================== */

.apt-table{
  border-collapse:separate;
  border-spacing:0 22px;
}

.apt-table tbody tr{
  position:relative;
  overflow:hidden;
}

.apt-table tbody td:first-child{
  border-top-left-radius:28px;
  border-bottom-left-radius:28px;
}

.apt-table tbody td:last-child{
  border-top-right-radius:28px;
  border-bottom-right-radius:28px;
}

/* =========================================
   APARTMENT LIST CTA — HERO STYLE HOVER
========================================= */

.apt-cta{
  position: relative;
  overflow: hidden;
  isolation: isolate;
  z-index: 2;
}

/* tekst peab jääma peale */
.apt-cta span{
  position: relative;
  z-index: 5;
}

/* hover glow layer */
.apt-cta::before{
  content:"";
  position:absolute;
  inset:0;

  background: linear-gradient(
    135deg,
    rgba(255,255,255,.25),
    rgba(255,255,255,.08)
  );

  transform: scale(0);
  transform-origin: var(--mx,50%) var(--my,50%);

  transition: transform 0.65s cubic-bezier(.2,.7,.1,1);

  border-radius: inherit;
  z-index:1;
}

/* aktiveerub hoveril */
.apt-cta:hover::before{
  transform: scale(2.2);
}

/* ===============================
   STATUS — SOLD CLEAN RED
=============================== */

.apt-status--sold{
  background:
    linear-gradient(
      135deg,
      rgba(185,28,28,.18),
      rgba(127,29,29,.18)
    );

  border:1px solid rgba(248,113,113,.35);

  color:#f87171;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08); /* ainult kerge sisejoon */
}

/* FORCE DARK SELECT */

.apt-select{
  appearance:none !important;
  -webkit-appearance:none !important;
  -moz-appearance:none !important;

  background-color: rgba(15,23,42,.75) !important;
  color:#fff !important;

  border:1px solid rgba(255,255,255,.25) !important;

  height:46px;
  padding:0 44px 0 18px;
  border-radius:999px;

  font-weight:700;
  font-size:14px;

  backdrop-filter: blur(14px);
}

/* OPTION COLOR (works in some browsers) */

.apt-select option{
  background:#0f172a;
  color:#fff;
}

/* ================================
   FILTER — CHECKBOX ROW FIX
================================ */

.apt-checks{
  display:flex;
  gap:20px;
  align-items:end;
  justify-content:flex-start;   /* oluline */
}

/* üks rida (Rõdu / Terrass) */

.apt-check{
  display:flex;
  align-items:center;
  justify-content:space-between; /* tekst vasakul, checkbox paremal */

  gap:16px;

  min-width:120px;  /* hoiab proportsiooni */
  padding:8px 0;

  font-size:13px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;

  cursor:pointer;
}

/* tekst */

.apt-check span{
  flex:1;
  text-align:left;
  opacity:.9;
}

/* custom checkbox */

.apt-check input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;

  width:18px;
  height:18px;

  border-radius:4px;

  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.08);

  display:flex;
  align-items:center;
  justify-content:center;

  position:relative;
  cursor:pointer;

  transition:.2s;
}

.apt-check input[type="checkbox"]:hover{
  border-color:#c9a15a;
}

.apt-check input[type="checkbox"]:checked{
  background:#c9a15a;
  border-color:#c9a15a;
}

.apt-check input[type="checkbox"]:checked::after{
  content:"";
  width:6px;
  height:6px;
  background:#0f172a;
  border-radius:2px;
}

/* FILTER CHECKS COMPACT */

.apt-filter.apt-checks{
  display:flex;
  gap:12px;              /* väiksem vahe */
  align-items:center;
  justify-content:flex-start;
  flex:0 0 auto;         /* EI VENI */
}

.apt-check{
  display:flex;
  align-items:center;
  gap:8px;               /* tekst + checkbox lähemal */
  min-width:auto;        /* eemaldame suure widthi */
  padding:0;
}

.apt-check span{
  font-size:13px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.apt-check input{
  width:16px;
  height:16px;
}

/* =========================
   FILTER GRID — CORRECT ALIGN
========================= */

.apt-filters{
  display:grid;
  grid-template-columns:
    1fr
    1fr
    1fr
    auto
    auto;

  gap:28px;
  align-items:end;
}

/* rõdu + terrass blokk */
.apt-filter.apt-checks{
  display:flex;
  flex-direction:column;
  gap:10px;

  align-items:flex-start;   /* ← VASAKULE */
  justify-content:center;
}

/* reset nupp ei veniks */
.apt-filter.apt-actions{
  justify-self:end;
}

@media(max-width:900px){

  .apt-filters{
    grid-template-columns:1fr;
    gap:18px;
  }

  .apt-filter{
    width:100%;
  }

  .apt-select{
    width:100%;
  }

  .apt-filter.apt-checks{
    flex-direction:row;
    gap:20px;
    align-items:center;
  }

  .apt-filter.apt-actions{
    justify-self:start;
  }

  .apt-reset{
    width:100%;
  }
}

@media(max-width:900px){

  .apt-table thead{
    display:none;
  }

  .apt-table,
  .apt-table tbody,
  .apt-table tr,
  .apt-table td{
    display:block;
    width:100%;
  }

  .apt-row{
    padding:22px;
    border-radius:20px;
    margin-bottom:16px;

    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,.10),
        rgba(255,255,255,.06)
      );

    backdrop-filter: blur(14px);
    border:1px solid rgba(255,255,255,.14);

    box-shadow:
      0 14px 40px rgba(0,0,0,.35);
  }

  .apt-row td{
    padding:6px 0;
    border:none;
  }

  /* TOP ROW */
  .apt-cell-number{
    font-size:20px;
    font-weight:800;
  }

  .apt-cell-status{
    position:absolute;
    top:16px;
    right:16px;
  }

  .apt-row{
    position:relative;
  }

  /* AREA + ROOMS */
  .apt-row td:nth-child(2),
  .apt-row td:nth-child(3){
    display:inline-block;
    width:auto;
    margin-right:12px;
    opacity:.75;
  }

  /* PRICE */
  .apt-cell-price{
    margin-top:8px;
  }

  .apt-price-current{
    font-size:22px;
    font-weight:800;
  }

  /* CTA */
  .apt-col-cta{
    margin-top:12px;
  }

  .apt-cta{
    display:flex;
    justify-content:center;
    width:100%;
  }
}

@media(max-width:900px){

  /* CARD BASE */
  .apt-row{
    position:relative;
    padding:22px 20px 24px;
  }

  /* PEIDA desktop staatus cell */
  .apt-cell-status{
    display:none;
  }

  /* BADGE – absolute paremale üles */
  .apt-row .apt-status{
    position:absolute;
    top:16px;
    right:16px;

    padding:6px 14px;
    border-radius:999px;
    font-size:11px;
    font-weight:700;
    letter-spacing:.08em;
  }

  /* NUMBER */
  .apt-cell-number{
    font-size:20px;
    font-weight:800;
    margin-bottom:6px;
  }

  /* META ROW (korrus + toad + pind) */
  .apt-row td:nth-child(2),
  .apt-row td:nth-child(3),
  .apt-row td:nth-child(4){
    display:inline-block;
    width:auto;
    margin-right:12px;
    font-weight:600;
    opacity:.8;
  }

  /* OUTDOOR */
  .apt-cell-outdoor{
    margin-top:8px;
    font-size:14px;
    opacity:.85;
  }

  /* PRICE */
  .apt-cell-price{
    margin-top:14px;
  }

  .apt-price-current{
    font-size:24px;
    font-weight:800;
  }

  /* CTA */
  .apt-col-cta{
    margin-top:14px;
  }

  .apt-cta{
    width:100%;
    display:flex;
    justify-content:center;
  }

}

@media(max-width:900px){

  /* Eemalda vana inline block */
  .apt-row td:nth-child(2),
  .apt-row td:nth-child(3),
  .apt-row td:nth-child(4){
    display:block;
    margin:0;
  }

  /* Meta group */
  .apt-row td:nth-child(2),
  .apt-row td:nth-child(3),
  .apt-row td:nth-child(4){
    font-size:14px;
    font-weight:600;
    opacity:.85;
  }

  /* Lisa labelid enne väärtust */
  .apt-row td:nth-child(2)::before{
    content:"Korrus: ";
    opacity:.6;
    font-weight:500;
  }

  .apt-row td:nth-child(3)::before{
    content:"Toad: ";
    opacity:.6;
    font-weight:500;
  }

  .apt-row td:nth-child(4)::before{
    content:"Pind: ";
    opacity:.6;
    font-weight:500;
  }

}

@media (max-width:900px){

  .apt-cell-number::before{
    content:"KORTER ";
    font-weight:700;
    letter-spacing:.14em;
    text-transform:uppercase;
    opacity:.75;
  }

}

@media (max-width:900px){

  .apt-cell-number{
    text-transform:uppercase;
  }

}

/* =========================================
   APARTMENT LIST HEADER — PREMIUM 2026
========================================= */

.apt-list-header{
  margin-bottom:70px;
  max-width:880px;
  position:relative;
}

/* subtle gold glow line */

.apt-list-header::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-30px;
  width:120px;
  height:2px;

  background:linear-gradient(
    90deg,
    var(--apt-gold),
    var(--apt-gold-light),
    transparent
  );

  opacity:.6;
}

/* SUBTITLE */

.apt-subtitle{
  font-size:13px;
  font-weight:800;
  letter-spacing:.28em;
  text-transform:uppercase;

  background:linear-gradient(
    120deg,
    var(--apt-gold),
    var(--apt-gold-light)
  );

  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;

  margin-bottom:16px;
}

/* TITLE */

.apt-title{
  font-size:34px;
  line-height:1.08;
  font-weight:900;

  background:linear-gradient(
    120deg,
    #ffffff 0%,
    #dbeafe 40%,
    #ffffff 100%
  );

  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;

  margin-bottom:24px;
}

/* INTRO */

.apt-intro{
  font-size:18px;
  line-height:1.7;
  color:var(--apt-soft);
  max-width:760px;
}

/* DOWNLOAD LINK */

.apt-price-pdf{
  display:inline-flex;
  align-items:center;
  gap:10px;

  margin-top:30px;

  height:44px;
  padding:0 28px;

  border-radius:999px;

  font-size:12px;
  font-weight:900;
  letter-spacing:.18em;
  text-transform:uppercase;

  background:linear-gradient(
    135deg,
    var(--apt-gold),
    var(--apt-gold-light)
  );

  color:#111;
  text-decoration:none;

  transition:.3s;
}

.apt-price-pdf:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 30px rgba(201,161,90,.35);
}

/* ========================================
   VL24 SECTION CHUNK REVEAL (2026 PREMIUM)
======================================== */

/* base reveal state */
.reveal{
  opacity:0;
  transform:translateY(60px) scale(.98);
  filter:blur(8px);
  transition:
    opacity .7s cubic-bezier(.2,.7,.1,1),
    transform .7s cubic-bezier(.2,.7,.1,1),
    filter .7s ease;
  will-change:transform, opacity;
}

/* visible */
.reveal.is-visible{
  opacity:1;
  transform:none;
  filter:blur(0);
}

/* subtle depth differences per block */

.apt-list-header.reveal{
  transform:translateY(40px);
}

.apt-filters.reveal{
  transform:translateY(70px);
}

.apt-table-wrap.reveal{
  transform:translateY(90px);
}
