/*
Theme Name: Hello Elementor Child
Description: Child theme for Hello Elementor
Author: Kristjan Draksler
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/

/* Single Nepremicnina Page Styles */
/* === FINAL OVERRIDE: brez upscalinga in brez crisp-edges === */

.single-sheet > *:not(.sheet-topbar):not(.sheet-hero) {
  margin-left: 50px;
  margin-right: 50px;
}

.sheet-hero__img{
  width:100%;
  height:auto;           /* izogni se raztegu v višino */
  image-rendering:auto;  /* nikoli crisp-edges za fotografije */
  transform:none;        /* izogni se scale/transform, ker zamegli */
  filter:none;           /* npr. blur( ) ali pretiran brightness/contrast */
}

.single-sheet{
  --pad:28px; /* default padding */
  max-width: 1360px;
  margin: 48px auto;
  padding: 28px 28px 34px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
  overflow:hidden; /* odreže vogale in full-bleed hero */
}

/* Top bar z napisom Prodaja/Najem */
.sheet-topbar{
  height: 20px;
  display:flex; align-items:center; justify-content:center;
  background: var(--accent,#B85B8C);
  border-radius: 8px 8px 0 0;
  margin: -28px -28px 0px -28px;
  color:#fff; font-weight:700; letter-spacing:.2px;
}
.sheet-topbar span{display:inline-block;}
.sheet-topbar__status{color:#fff;font-weight:700;letter-spacing:.3px;text-transform:uppercase;line-height:1;}

/* Hero (full-bleed 3/2) */
.sheet-hero{
  position: relative;
  left: calc(-1 * var(--pad));
  width: calc(100% + (var(--pad) * 2));
  aspect-ratio: 3 / 2;             /* ⬅️ prej 1 / 1 */
  margin: 0 0 22px 0;
  border-radius: 0;
  overflow:hidden;
  background:#fff;
}
.sheet-hero img{
  width:100%;
  height:100%;                      /* polni 3/2 okvir */
  object-fit:contain;                /* pokaži celo sliko brez rezanja */
  object-position:center;
  display:block;
  image-rendering:auto;             /* pravilna interpolacija za foto */
  transform:none;
  filter:none;
}

/* Thumbs */
.sheet-thumbs{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:24px;
}
.sheet-thumbs .thumb{
  width:120px !important;
  height:120px !important;
  object-fit:cover;
  object-position:center;
  border:2px solid #e0e0e0;
  cursor:pointer;
  opacity:.95;
  transition:transform .15s, box-shadow .15s, opacity .15s, border-color .15s;
}
.sheet-thumbs .thumb:hover{opacity:1;transform:translateY(-2px);box-shadow:0 6px 16px rgba(0,0,0,.12);}
.sheet-thumbs .thumb.is-active{opacity:1;border-color:var(--accent,#B85B8C);box-shadow:0 4px 12px rgba(184,91,140,.25);}
.single-sheet.tip-stanovanje .sheet-thumbs .thumb.is-active{border-color:#FECA5A;box-shadow:0 4px 12px rgba(254,202,90,.3);}
.single-sheet.tip-zemljisce .sheet-thumbs .thumb.is-active{border-color:#46818a;box-shadow:0 4px 12px rgba(70,129,138,.3);}

/* Specs */
.sheet-specs{
  display:grid;
  grid-template-columns:1fr 260px;
  gap:32px;
  align-items:start;
  margin-bottom:18px;
}
.sheet-title{margin:0 0 12px;font-size:26px;font-weight:800;color:#333;letter-spacing:.2px;}

.specs-table{
  margin:0;
  display:grid;
  grid-template-columns:140px 1fr;
  row-gap:12px;
  column-gap:100px;
}
.specs-table .row{display:contents;}
.specs-table dt{margin:0;color:#8a8a8a;font-weight:500;}
.specs-table dd{margin:0;color:#3a3a3a;font-weight:600;}
.specs-table .row:nth-child(2) dd{color:var(--accent,#B85B8C);font-weight:800;letter-spacing:.2px;}
.single-sheet.tip-stanovanje .specs-table .row:nth-child(2) dd{color:#FECA5A;}
.single-sheet.tip-zemljisce .specs-table .row:nth-child(2) dd{color:#46818a;}

/* Ikona tipa */
.specs-right{display:flex;flex-direction:column;align-items:center;gap:10px;}
.type-icon{width:auto;height:90px;object-fit:contain;display:block;}
.type-label{font-weight:800;letter-spacing:.6px;color:var(--accent,#B85B8C);}
.single-sheet.tip-stanovanje .type-label{color:#FECA5A;}
.single-sheet.tip-zemljisce .type-label{color:#46818a;}

/* Opis */
.sheet-description{margin-top:50px;color:#555;line-height:1.65;font-size:1.08rem;}
.sheet-description p{margin:0 0 12px;}

/* ====== RESPONSIVE ====== */
@media (min-width:1600px){
  .single-sheet{max-width:1500px;}
}

@media (max-width:900px){
  .sheet-specs{grid-template-columns:1fr 200px;gap:22px;}
  .type-icon{height:80px;}
}

/* ====== TELEFON – FIXI proti "uhajanju" vsebine ====== */
@media (max-width:680px){
  .single-sheet{
    --pad:16px;
    box-sizing:border-box;
    width:min(92vw,640px);
    margin:18px auto;
    padding:16px 16px 18px;
    border-radius:12px;
    overflow:hidden;
  }
	
	.single-sheet > *:not(.sheet-topbar):not(.sheet-hero) {
  margin-left: 10px;
  margin-right: 10px;
}

  .single-sheet,
  .single-sheet *{
    box-sizing:border-box;
  }
  .single-sheet{overflow-wrap:anywhere; word-break:break-word;}
  .single-sheet p,
  .single-sheet dd,
  .single-sheet dt,
  .single-sheet li{
    overflow-wrap:anywhere;
    word-break:break-word;
    hyphens:auto;
  }

  .sheet-topbar{
    height:20px;
    margin:-16px -16px 0;
    border-radius:12px 12px 0 0;
  }

  .sheet-hero{margin-bottom:14px;}

  .sheet-thumbs{
    gap:10px;
    overflow-x:auto;
    flex-wrap:nowrap;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
  }
  .sheet-thumbs .thumb{
    width:92px !important;
    height:92px !important;
    flex:0 0 auto;
    scroll-snap-align:start;
  }
  .sheet-thumbs::-webkit-scrollbar{display:none;}

  .sheet-specs{
    grid-template-columns:1fr;
    gap:14px;
    min-width:0;
  }
  .specs-table{
    grid-template-columns: 121px 1fr;
    column-gap:55px;
    row-gap:10px;
    min-width:0;
  }
  .specs-table .row > *{min-width:0;}
  .sheet-title{font-size:22px;}

  .sheet-description img,
  .sheet-description table,
  .sheet-description iframe{
    max-width:100%;
    height:auto;
  }
  .sheet-description table{
    display:block;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
  }
  .sheet-description ul,
  .sheet-description ol{
    padding-left:1.2em;
    margin:0 0 12px;
  }
}

/* (PREJŠNJE) ostrenje za piksel-art odstranjeno:
   .sheet-hero img { image-rendering: crisp-edges / -webkit-optimize-contrast; }
   -> za fotografije je pravilno: image-rendering:auto (zgoraj).
*/

@media (max-width:480px){
  .single-sheet{
    --pad:14px;
    width:min(90vw,560px);
    margin:14px auto;
    padding:14px 14px 16px;
    border-radius:10px;
  }
  .sheet-topbar{
    margin:-14px -14px 0;
    border-radius:10px 10px 0 0;
  }
  .sheet-hero{margin-bottom:12px;}
}

/* Laptopi */
@media (min-width:1024px) and (max-width:1536px){
  .single-sheet{
    --pad:24px;
    max-width:1160px;
    padding:24px 24px 30px;
    overflow:hidden;
    box-sizing:border-box;
  }
  .sheet-topbar{
/*     margin:-24px -24px 18px; */
    border-radius:12px 12px 0 0;
  }
  .sheet-hero{margin-bottom:18px;}
}

/* ====== Hero + puščice ====== */
.sheet-hero { position: relative; overflow: hidden; }
.sheet-hero__img { width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }

.sheet-hero__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px; border: 0;
  background: rgba(0,0,0,.45); color: #fff; font-size: 22px; line-height: 25px;
  display: grid; place-items: center; cursor: pointer; z-index: 2;
  transition: background .2s ease;
}
.sheet-hero__nav:hover { background: rgba(0,0,0,.6); }
.sheet-hero__nav:focus-visible { outline: 2px solid var(--accent, #333); outline-offset: 2px; }
.sheet-hero__nav--prev { left: 10px; }
.sheet-hero__nav--next { right: 10px; }

/* skrij puščice, če je samo ena slika */
.single-sheet:not(.has-multi) .sheet-hero__nav { display: none; }

/* ====== Thumbs vrstica ====== */
.sheet-thumbs { display: flex; gap: 8px; padding: 10px 0; overflow-x: auto; }
.sheet-thumbs .thumb {
  width: 88px; height: 66px; object-fit: cover; cursor: pointer;
  opacity: .7; border: 2px solid transparent;
}
.sheet-thumbs .thumb.is-active { opacity: 1; border-color: var(--accent,#333); }

/* responsive */
@media (max-width: 640px){
  .sheet-hero__nav { width: 40px; height: 52px; font-size: 18px; line-height: 40px; }
  .sheet-hero__nav--prev { left: 6px; }
  .sheet-hero__nav--next { right: 6px; }
}
