/* ==========================================================
   APPA – Projekt detail stránka
   ========================================================== */

.project-detail-page {
  background: #fff;
  color: #111;
}

/* (navbar je rovnaké ako na všetkých stránkach – bez override) */

/* ==========================================================
   WRAPPER – rovnaké okraje ako Bootstrap .container
   ========================================================== */
.pd-wrap {
  width: 100%;
  margin: 0 auto;
  padding: 0 0.75rem;
  box-sizing: border-box;
}
@media (min-width: 576px)  { .pd-wrap { max-width: 540px; } }
@media (min-width: 768px)  { .pd-wrap { max-width: 720px; } }
@media (min-width: 992px)  { .pd-wrap { max-width: 960px; } }
@media (min-width: 1200px) { .pd-wrap { max-width: 1140px; } }
@media (min-width: 1400px) { .pd-wrap { max-width: 1320px; } }

/* ==========================================================
   HERO – full bleed
   ========================================================== */
.pd-hero {
  position: relative;
  width: 100%;
  height: 62vh;
  min-height: 360px;
  max-height: 660px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.pd-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(0,0,0,.72) 100%);
}
.pd-hero-text {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0.75rem 2.5rem;
  box-sizing: border-box;
  color: #fff;
}
@media (min-width: 576px)  { .pd-hero-text { max-width: 540px; } }
@media (min-width: 768px)  { .pd-hero-text { max-width: 720px; } }
@media (min-width: 992px)  { .pd-hero-text { max-width: 960px; } }
@media (min-width: 1200px) { .pd-hero-text { max-width: 1140px; } }
@media (min-width: 1400px) { .pd-hero-text { max-width: 1320px; } }
.pd-hero-text h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: .35rem;
  letter-spacing: -.025em;
}
.pd-hero-desc {
  font-size: .95rem;
  opacity: .8;
}

/* ==========================================================
   INFO – meta + 2 fotky
   ========================================================== */
.pd-info-section {
  padding: 3rem 0 3rem;
  background: #fff;
}
.pd-info-grid {
  display: grid;
  grid-template-columns: 250px 1fr 1fr;
  column-gap: 24px;
  row-gap: 48px;
  align-items: start;
}
.pd-meta {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;  /* vzduch medzi položkami */
  padding-top: .25rem;
  margin-right: 24px; /* zachová veľký gap medzi meta a prvou fotkou */
}
.pd-meta-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}
.pd-meta-icon {
  font-size: 1rem;
  color: #999;
  flex-shrink: 0;
  margin-top: 1px;
}
.pd-meta-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pd-meta-label {
  font-size: .58rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #aaa;
  font-weight: 600;
  line-height: 1.2;
}
.pd-meta-value {
  font-size: .9rem;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
}

/* ==========================================================
   FOTO WRAPPER – hover zoom + klik
   ========================================================== */
.pd-img-wrap {
  overflow: hidden;
  display: block;
  line-height: 0;
}
.pd-img-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.5s ease;
  cursor: zoom-in;
}
.pd-img-wrap:hover img { transform: scale(1.05); }

/* Info fotky */
.pd-info-photo .pd-img-wrap {
  aspect-ratio: 4/3;
}

/* ==========================================================
   KONCEPT – foto blok + text blok
   ========================================================== */
.pd-koncept {
  padding: 0 0 2.5rem;
  background: #fff;
}
.pd-koncept-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}
.pd-koncept-photo {
  min-height: 0;
}
.pd-koncept-photo .pd-img-wrap {
  height: 100%;
  min-height: 300px;
  aspect-ratio: unset;
}
.pd-koncept-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}
.pd-section-label {
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #bbb;
  font-weight: 600;
  margin-bottom: .55rem;
  display: block;
}
.pd-koncept-text h2 {
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 700;
  margin-bottom: .9rem;
  line-height: 1.2;
  letter-spacing: -.025em;
  color: #111;
}
.pd-koncept-text p {
  font-size: .88rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: .7rem;
  max-width: 60ch;
}

/* ==========================================================
   GALÉRIA – organické plochy
   ========================================================== */
.pd-photos-block {
  width: 100%;
  margin: 0 auto;
  padding: 0 0.75rem;
  box-sizing: border-box;
}
@media (min-width: 576px)  { .pd-photos-block { max-width: 540px; } }
@media (min-width: 768px)  { .pd-photos-block { max-width: 720px; } }
@media (min-width: 992px)  { .pd-photos-block { max-width: 960px; } }
@media (min-width: 1200px) { .pd-photos-block { max-width: 1140px; } }
@media (min-width: 1400px) { .pd-photos-block { max-width: 1320px; } }

/* Plná šírka – panoramický výrez */
.pd-photo-full {
  margin-bottom: 16px;
  line-height: 0;
}
.pd-photo-full .pd-img-wrap {
  aspect-ratio: 16/7;
}
.pd-photo-full .pd-img-wrap img {
  height: 100%;
}

/* Riadok s 2 fotkami */
.pd-photo-row {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.pd-photo-row.cols-2 { grid-template-columns: 1fr 1fr; }
.pd-photo-row.cols-2 .pd-img-wrap { aspect-ratio: 3/2; }

/* Riadok s 3 fotkami */
.pd-photo-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.pd-photo-row.cols-3 .pd-img-wrap { aspect-ratio: 4/3; }

/* ==========================================================
   ZAUJÍMAVOSŤ
   ========================================================== */
.pd-zaujimavost {
  margin-top: 2rem;
  padding: 2.5rem 0;
  background: #f5f5f2;
}
.pd-zaujimavost-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.pd-zaujimavost-text .pd-section-label { margin-bottom: .8rem; }
.pd-zaujimavost-text p {
  font-size: .88rem;
  line-height: 1.8;
  color: #444;
}
.pd-placeholder-drawing {
  background: #e5e5e0;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0b0a8;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 600;
  background-image:
    linear-gradient(rgba(0,0,0,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 28px 28px;
}
.pd-video-embed {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 4px;
}
.pd-video-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
}

/* Video thumbnail s custom play buttonom */
.pd-video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  display: block;
  background: #111;
}
.pd-vthumb-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.pd-vthumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.pd-vthumb-meta {
  position: absolute;
  bottom: 1.1rem;
  left: 1.2rem;
  right: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  pointer-events: none;
}
.pd-vthumb-logo {
  height: 36px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.5));
}
.pd-vthumb-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pd-vthumb-title {
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.pd-vthumb-sub {
  color: rgba(255,255,255,0.75);
  font-size: .65rem;
  letter-spacing: .04em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.pd-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.pd-video-play svg {
  width: 72px;
  height: 48px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
  transition: transform 0.2s ease;
}
.pd-video-thumb:hover .pd-vthumb-bg {
  transform: scale(1.03);
  opacity: 0.85;
}
.pd-video-thumb:hover .pd-video-play svg {
  transform: scale(1.12);
}
/* Stav po kliknutí – iframe sa zobrazí, thumbnail sa skryje */
.pd-video-thumb .pd-vlb-frame {
  display: none;
  position: absolute;
  inset: 0;
}
.pd-video-thumb .pd-vlb-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.pd-video-thumb.pd-video-playing .pd-vthumb-bg,
.pd-video-thumb.pd-video-playing .pd-vthumb-overlay,
.pd-video-thumb.pd-video-playing .pd-vthumb-meta,
.pd-video-thumb.pd-video-playing .pd-video-play {
  display: none;
}
.pd-video-thumb.pd-video-playing {
  cursor: default;
}
.pd-video-thumb.pd-video-playing .pd-vlb-frame {
  display: block;
}

/* ==========================================================
   BOTTOM CTA SEKCIA (pod prev/next navigáciou)
   ========================================================== */
.pd-cta-bottom {
  background: #000;
  padding: 5rem 1.5rem;
  text-align: center;
  margin-top: 0;
}
.pd-cta-bottom-inner {
  max-width: 600px;
  margin: 0 auto;
}
.pd-cta-bottom h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.pd-cta-bottom p {
  color: rgba(255,255,255,0.6);
  font-size: 1rem;
  margin-bottom: 2rem;
}
.pd-cta-bottom .btn-cta,
.pd-cta-bottom .btn-cta:focus,
.pd-cta-bottom .btn-cta:active {
  background-color: transparent !important;
  color: #fff !important;
  border: 2px solid rgba(255, 255, 255, 0.65) !important;
  box-shadow: none !important;
  padding: 0.85rem 3rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
}
.pd-cta-bottom .btn-cta:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: #fff !important;
  box-shadow: none !important;
}

/* ==========================================================
   PREV / NEXT NAV
   ========================================================== */
.pd-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 0;
  border-top: 1px solid #e8e8e4;
  margin-top: .5rem;
}
.pd-nav a {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: #111;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: opacity .2s;
}
.pd-nav a:hover { opacity: .4; }
.pd-nav a.next { flex-direction: row-reverse; text-align: right; }
.pd-nav-label {
  display: block;
  font-size: .65rem;
  color: #999;
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: none;
  margin-bottom: 1px;
}

/* ==========================================================
   LOADING
   ========================================================== */
.project-loading {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #aaa;
}

/* ==========================================================
   SKELETON – loading stav fotiek
   ========================================================== */
@keyframes pd-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.pd-img-skeleton {
  background: #e8e8e4;
  background-image: linear-gradient(90deg, #e8e8e4 25%, #d8d8d4 50%, #e8e8e4 75%);
  background-size: 200% 100%;
  animation: pd-shimmer 1.4s ease infinite;
}
.pd-img-skeleton img {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.pd-img-wrap:not(.pd-img-skeleton) img {
  opacity: 1;
}

/* ==========================================================
   LIGHTBOX
   ========================================================== */
.pd-lb {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 9000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.pd-lb.pd-lb-active { display: flex; }

/* Topbar: counter + akcie */
.pd-lb-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  z-index: 9001;
  background: linear-gradient(to bottom, rgba(0,0,0,.6) 0%, transparent 100%);
  pointer-events: none;
}
.pd-lb-topbar > * { pointer-events: auto; }
.pd-lb-counter {
  color: rgba(255,255,255,.5);
  font-size: .78rem;
  letter-spacing: .1em;
}
.pd-lb-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.pd-lb-fullscreen,
.pd-lb-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  transition: color .2s;
  display: flex;
  align-items: center;
}
.pd-lb-fullscreen:hover,
.pd-lb-close:hover { color: #fff; }

/* Fotka */
.pd-lb-imgwrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  padding: 3.5rem 5rem 0;
  box-sizing: border-box;
}
.pd-lb-img {
  max-width: 100%;
  max-height: calc(100vh - 7rem);
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Prev / Next */
.pd-lb-prev, .pd-lb-next {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: rgba(255,255,255,.55); font-size: 2rem;
  cursor: pointer; opacity: 1;
  transition: color .2s; z-index: 9001;
  padding: 1rem .8rem;
  display: flex; align-items: center;
}
.pd-lb-prev { left: 0; }
.pd-lb-next { right: 0; }
.pd-lb-prev:hover, .pd-lb-next:hover { color: #fff; }

/* Skry šípky na dotykových zariadeniach (mobile portrait aj landscape) — používateľ swipuje */
@media (hover: none) and (pointer: coarse) {
  .pd-lb-prev, .pd-lb-next { display: none !important; }
}

/* Thumbnail strip – len desktop */
.pd-lb-strip-wrap {
  width: 100%;
  max-width: 700px;
  overflow: hidden;
  padding: 0.7rem 0 0.9rem;
  flex-shrink: 0;
  /* Fade na okrajoch */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 12%, black 88%, transparent 100%);
}
.pd-lb-strip {
  display: flex;
  gap: 6px;
  padding: 0 40px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.pd-lb-strip::-webkit-scrollbar { display: none; }
.pd-lb-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 40px;
  border: 2px solid transparent;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  padding: 0;
  opacity: 0.45;
  transition: opacity .2s, border-color .2s, transform .2s;
}
.pd-lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pd-lb-thumb:hover { opacity: 0.75; }
.pd-lb-thumb.pd-lb-thumb-active {
  border-color: #fff;
  opacity: 1;
  transform: scale(1.08);
}

/* Na mobile — schovaj strip */
@media (max-width: 767px) {
  .pd-lb-strip-wrap { display: none; }
  .pd-lb-imgwrap { padding: 3.5rem 0.5rem 0; }
  .pd-lb-prev, .pd-lb-next { font-size: 1.6rem; padding: .5rem; }
}

/* ==========================================================
   RESPONZÍVNOSŤ
   ========================================================== */

/* Tablet */
@media (max-width: 768px) {
  .pd-info-grid {
    grid-template-columns: 130px 1fr;
    gap: 14px;
  }
  .pd-meta { grid-row: 1 / 3; }
  .pd-info-photo { grid-column: 2; }
  .pd-hero { height: 50vh; min-height: 280px; }
  .pd-koncept-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .pd-zaujimavost-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .pd-photo-row.cols-3 { grid-template-columns: 1fr 1fr; }
  .pd-nav { padding: 1.4rem 0 5rem; }
}

/* Mobil */
@media (max-width: 480px) {
  .pd-wrap, .pd-photos-block { padding: 0 4%; }
  .pd-hero-text { padding: 0 4% 1.5rem; }
  .pd-info-grid { grid-template-columns: 1fr; gap: 12px; }
  .pd-meta {
    flex-direction: row; flex-wrap: wrap;
    gap: .4rem 1.2rem; grid-row: auto;
  }
  .pd-info-photo { grid-column: 1; }
  .pd-photo-row.cols-2,
  .pd-photo-row.cols-3 { grid-template-columns: 1fr; }
  .pd-nav { padding: 1.4rem 0 4.5rem; }

  /* Hero – nižší, menší text */
  .pd-hero { height: 38vh; min-height: 200px; }
  .pd-hero-text h1 { font-size: 1.35rem; }

  /* Všetky fotky na mobile – panoramatický formát 16:7, orez zdola */
  .pd-img-wrap {
    aspect-ratio: 16/7 !important;
    height: auto !important;
    min-height: unset !important;
  }
  .pd-img-wrap img {
    object-position: center top !important;
  }
}
