/* static/styles/portfolio_detail_temp.css */
/* Projekt detail – layout dle wireframu + BUILDER (sections/blocks) */

/* PAGE */
.pd-page{
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: clamp(26px, 4vw, 56px) 0 clamp(46px, 6vw, 80px);
  color: #2d2621b2;
}

/* =========================================
   HERO – 100vw edge-to-edge (bez inner wrapperu)
========================================= */

.pd-hero-edge{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* HERO 50/50 layout */
.pd-hero{
  display: grid;
  grid-template-columns: 50% 50%;
  width: 100%;
  height: 75vh;
  margin: 0;
  padding: 0;
}

/* LEFT: obrázek nalepený vlevo nahoře bez odsazení */
.pd-hero__img{
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.pd-hero__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* HERO placeholder (když není obrázek) */
.pd-hero__img--placeholder{
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.10);
}

/* RIGHT: text vertikálně vycentrovaný */
.pd-hero__meta{
  display: flex;
  align-items: center;
  padding: 0 clamp(120px, 6vw, 100px);
}

.pd-hero__meta-inner{
  max-width: 520px;
}

.pd-title{
  margin: 100px 0 16px 0;
  font-size: clamp(36px, 4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color:#2d2621b2;
}

.pd-subtitle{
  margin: 0;
  font-size: clamp(18px, 1.8vw, 22px);
  opacity: 0.7;
  font-weight: 600;
}

/* SECTIONS (wireframe – legacy) */
.pd-section{
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(80px, 4.2vw, 80px) 0;
 
}

.pd-h2{
  margin: 0 0 8px 0;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
}

.pd-kicker{
  margin: 0;
  opacity: 0.75;
}

.pd-smallhead{
  margin: 0 0 10px 0;
  font-weight: 750;
  opacity: 0.9;
}

.pd-text p{
  margin: 0 0 12px 0;
  line-height: 1.7;
}

/* SIDEINFO */
.pd-section--with-sideinfo .pd-sideinfo{
  margin-top: 22px;
  max-width: 34ch;
}

.pd-sideinfo__label{
  margin: 0 0 8px 0;
  font-weight: 800;
  opacity: 0.85;
}

.pd-sideinfo__text{
  margin: 0;
  opacity: 0.8;
  line-height: 1.65;
}

/* GALLERIES (wireframe – legacy) */
.pd-gallery3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(0,0,0,0.10);
}

.pd-gallery2{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 18px;
}

.pd-gallery6{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(0,0,0,0.10);
}

.pd-imgbox{
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;

  background: rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;

  border-right: 1px solid rgba(0,0,0,0.12);
  border-bottom: 1px solid rgba(0,0,0,0.12);

  font-weight: 700;
  user-select: none;
}

.pd-gallery3 .pd-imgbox:nth-child(3),
.pd-gallery6 .pd-imgbox:nth-child(3n){
  border-right: none;
}

.pd-gallery2 .pd-imgbox:nth-child(2){
  border-right: none;
}

/* FINAL TEXT */
.pd-final{
  padding: clamp(26px, 4vw, 44px) 0;
  border-top: 1px solid rgba(0,0,0,0.10);
}

.pd-final__text{
  margin: 0;
  line-height: 1.8;
  opacity: 0.85;
}

/* NAV */
.pd-nav{
  padding-top: 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.pd-nav__side{
  display: flex;
}

.pd-nav__side--left{
  justify-content: flex-start;
}

.pd-nav__side--right{
  justify-content: flex-end;
}

.pd-nav__center{
  text-align: center;
}

.pd-nav a{
  color: #ff0068;   
}

.pd-nav__link{
  text-decoration: none;
  font-weight: 600;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.pd-nav__link:hover{
  opacity: 1;
}

.pd-nav__back{
  text-decoration: none;
  font-weight: 800;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.pd-nav__back:hover{
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* =========================================================
   ✅ BUILDER (Studio Sections + Blocks)
   ========================================================= */

/* sekce builderu – dýchá podobně jako pd-section, ale je čistě podle gridu */
.pb-section{
  padding: clamp(40px, 4vw, 70px) 0;
  border-top: 1px solid rgba(0,0,0,0.10);
}

/* první sekce bez horní čáry (vypadá čistěji hned pod hero) */
.pb-section:first-of-type{
  border-top: none;
  padding-top: clamp(26px, 4vw, 44px);
}

.pb-grid{
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
  align-items: start;
}

/* layouty podle section.layout */
.pb-grid--1{ grid-template-columns: 1fr; }
.pb-grid--2{ grid-template-columns: 1fr 1fr; }
.pb-grid--3{ grid-template-columns: repeat(3, 1fr); }
.pb-grid--4{ grid-template-columns: repeat(4, 1fr); }

/* bloky */
.pb-block{
  min-width: 0; /* aby dlouhé texty nerozbily grid */
}

/* TEXT blok */
.pb-block--text{
  color: #2d2621b2;
}

.pb-block--text h1,
.pb-block--text h2,
.pb-block--text h3{
  margin: 0 0 10px 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #2d2621b2;
}

.pb-block--text h1{
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -0.03em;
}

.pb-block--text h2{
  font-size: clamp(22px, 2.3vw, 32px);
}

.pb-block--text h3{
  font-size: clamp(18px, 1.9vw, 24px);
}

.pb-block--text p{
  margin: 0 0 12px 0;
  line-height: 1.7;
}

.pb-block--text p:last-child{
  margin-bottom: 0;
}

.pb-link{
  margin-top: 12px;
}

.pb-link a{
  color: #ff0068;
  text-decoration: none;
  font-weight: 800;
}

.pb-link a:hover{
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* IMAGE blok */
.pb-block--image{
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(0,0,0,0.06);
}

.pb-block--image img{
  width: 100%;
  height: auto;
  display: block;
}

.pb-image--placeholder{
  width: 100%;
  aspect-ratio: 16 / 10;
  background: rgba(0,0,0,0.12);
}

/* menší layouty: 3-4 sloupce na desktopu můžou být hodně těsné,
   tak jim zmenšíme rádius a gap trošku sjednotíme */
.pb-grid--3 .pb-block--image,
.pb-grid--4 .pb-block--image{
  border-radius: 12px;
}

/* RESPONSIVE */
@media (max-width: 920px){
  .pd-hero{
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .pd-hero__img img{
    height: 52vh;
  }

  .pd-hero__meta{
    padding: clamp(22px, 4vw, 36px) clamp(18px, 4vw, 28px);
    justify-content: flex-start;
  }

  .pd-section{
    grid-template-columns: 1fr;
  }

  /* builder: skládání sloupců */
  .pb-grid--2,
  .pb-grid--3,
  .pb-grid--4{
    grid-template-columns: 1fr;
  }
}