/**
 * Webstyl Portfolio Realizacje — Single Post CSS
 * Kompletnie przeprojektowany styl klasy premium (Apple / Stripe style)
 * Two-Column Grid + Sticky Sidebar dla parametrów
 */

/* ============================================================
   Główny kontener strony
   ============================================================ */
.wr-single {
  font-family: var(--wr-font);
  color: #1e293b;
  background-color: #f8fafc;
  padding: 2.5rem 0 6rem;
  box-sizing: border-box;
}

/* Wewnętrzny kontener z ograniczeniem szerokości */
.wr-single__container {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

/* ============================================================
   Breadcrumbs (Okruszki)
   ============================================================ */
.wr-breadcrumb {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.wr-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  align-items: center;
}

.wr-breadcrumb__link {
  color: #64748b;
  text-decoration: none;
  transition: color 200ms ease;
  font-weight: 500;
}

.wr-breadcrumb__link:hover {
  color: var(--wr-color-accent);
}

.wr-breadcrumb__sep {
  color: #cbd5e1;
}

.wr-breadcrumb__current {
  color: #1e293b;
  font-weight: 600;
}

/* ============================================================
   Hero Header (Główna sekcja z tytułem)
   ============================================================ */
.wr-single__hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin: 0 auto 3rem;
  max-width: 1200px;
  border-radius: 24px;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.03), 0 10px 10px -5px rgba(0,0,0,0.01);
  /* Domyślny ciemny gradient klasy premium jako fallback gdy brak zdjęcia */
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.wr-single__hero-image-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.wr-single__hero-figure {
  margin: 0;
  width: 100%;
  height: 100%;
}

.wr-single__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Ciemna nakładka gwarantująca czytelność tekstu */
.wr-single__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.5) 60%,
    rgba(15, 23, 42, 0.2) 100%
  );
  z-index: 1;
}

.wr-single__hero-placeholder-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  opacity: 0.95;
  z-index: 1;
}

.wr-single__hero-content {
  position: relative;
  z-index: 2;
  padding: 4rem 3.5rem 3.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* Tytuł realizacji (nadpisuje style motywu) */
.wr-single__title {
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: #ffffff !important;
  margin: 0.5rem 0 1rem !important;
  line-height: 1.15 !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
  text-transform: none !important;
}

.wr-single__excerpt {
  font-size: 1.125rem;
  color: #cbd5e1;
  margin: 0;
  max-width: 650px;
  line-height: 1.6;
}

/* Tagi na Hero */
.wr-single__hero-content .wr-tag {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.35rem 0.9rem;
  font-size: 0.8rem;
  border-radius: 100px;
}

/* ============================================================
   Two-Column Grid Layout
   ============================================================ */
.wr-single__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
}

@media (min-width: 1024px) {
  .wr-single__grid {
    grid-template-columns: 350px 1fr;
    align-items: start;
  }
}

/* ============================================================
   Specyfikacja w Sidebarze (Lewa Kolumna)
   ============================================================ */
.wr-single__sidebar {
  position: relative;
}

@media (min-width: 1024px) {
  .wr-single__sidebar {
    position: sticky;
    top: 2rem;
  }
}

.wr-single__sidebar-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.02), 0 4px 6px -2px rgba(0,0,0,0.01);
  border: 1px solid #e2e8f0;
}

.wr-single__sidebar-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 1.5rem !important;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f1f5f9;
  text-transform: none !important;
}

.wr-single__sidebar-params {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.wr-single__sidebar-param {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wr-single__sidebar-param dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
}

.wr-single__sidebar-param dd {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.wr-single__sidebar-empty {
  color: #64748b;
  font-size: 0.875rem;
  font-style: italic;
  margin: 0;
}

/* ============================================================
   Główna treść (Prawa Kolumna)
   ============================================================ */
.wr-single__main-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Sekcje w prawej kolumnie */
.wr-single__section {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.02), 0 4px 6px -2px rgba(0,0,0,0.01);
  border: 1px solid #e2e8f0;
  box-sizing: border-box;
}

/* Nagłówki sekcji */
.wr-single__section-header {
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 0.75rem;
  position: relative;
}

.wr-single__section-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--wr-color-accent);
}

.wr-single__section-title {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em !important;
  margin: 0 !important;
  text-transform: none !important;
}

.wr-single__section-sub {
  color: #64748b;
  font-size: 0.875rem;
  margin: 0.4rem 0 0;
}

/* Formatowanie opisu */
.wr-single__content,
.wr-single__rich-content {
  line-height: 1.8;
  font-size: 1.0625rem;
  color: #334155;
}

.wr-single__content p,
.wr-single__rich-content p {
  margin: 0 0 1.25rem;
}

.wr-single__content p:last-child,
.wr-single__rich-content p:last-child {
  margin-bottom: 0;
}

.wr-single__content h2,
.wr-single__rich-content h2 {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 1.75rem 0 1rem !important;
}

/* ============================================================
   Galeria Masonry Grid
   ============================================================ */
.wr-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.wr-gallery-grid__item {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #f8fafc;
  aspect-ratio: 4 / 3;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.wr-gallery-grid__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.wr-gallery-grid__link {
  display: block;
  height: 100%;
  position: relative;
}

.wr-gallery-grid__link:hover .wr-gallery-grid__image {
  transform: scale(1.06);
}

.wr-gallery-grid__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  transition: opacity 300ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wr-gallery-grid__link:hover .wr-gallery-grid__overlay {
  opacity: 1;
}

/* Co 7 element większy */
.wr-gallery-grid__item:nth-child(7n + 1) {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

@media (max-width: 768px) {
  .wr-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .wr-gallery-grid__item:nth-child(7n + 1) {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
  }
}

/* ============================================================
   Wideo
   ============================================================ */
.wr-single__video .wr-video-wrapper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

/* ============================================================
   Opinia klienta (Karta Premium)
   ============================================================ */
.wr-review-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 2.5rem;
  margin: 0;
  position: relative;
  border: 1px solid #e2e8f0;
}

.wr-review-card::before {
  content: '\201C';
  position: absolute;
  top: -1rem;
  left: 2rem;
  font-size: 5rem;
  line-height: 1;
  color: var(--wr-color-accent);
  font-family: Georgia, serif;
  opacity: 0.15;
}

.wr-review-card__stars {
  display: flex;
  gap: 0.2rem;
  margin-bottom: 1rem;
}

.wr-review-card__star {
  font-size: 1.25rem;
  color: #cbd5e1;
}

.wr-review-card__star--active {
  color: #f59e0b;
}

.wr-review-card__quote {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #334155;
  margin: 0 0 1.5rem;
  font-style: italic;
  font-weight: 500;
}

.wr-review-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wr-review-card__photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.wr-review-card__author-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.wr-review-card__name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #0f172a;
}

.wr-review-card__city {
  font-size: 0.8125rem;
  color: #64748b;
}

/* ============================================================
   Nawigacja Prev/Next
   ============================================================ */
.wr-single__nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 0;
}

.wr-single__nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border-radius: 16px;
  text-decoration: none;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid #e2e8f0;
}

.wr-single__nav-item:hover {
  background: #ffffff;
  box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  border-color: var(--wr-color-accent);
}

.wr-single__nav-item--next {
  justify-content: flex-end;
  text-align: right;
}

.wr-single__nav-item--empty {
  pointer-events: none;
  border: 1px dashed #e2e8f0;
  background: transparent;
}

.wr-single__nav-arrow {
  font-size: 1.25rem;
  color: #64748b;
  flex-shrink: 0;
  transition: transform 300ms ease;
}

.wr-single__nav-item--prev:hover .wr-single__nav-arrow {
  transform: translateX(-4px);
  color: var(--wr-color-accent);
}

.wr-single__nav-item--next:hover .wr-single__nav-arrow {
  transform: translateX(4px);
  color: var(--wr-color-accent);
}

.wr-single__nav-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.wr-single__nav-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1e293b;
}

/* ============================================================
   Podobne realizacje
   ============================================================ */
.wr-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 992px) {
  .wr-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .wr-related-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CTA Section (Skontaktuj się)
   ============================================================ */
.wr-cta-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 24px;
  padding: 4rem 3rem;
  text-align: center;
  margin: 3rem 0 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05);
}

.wr-cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 350px;
  height: 350px;
  background: var(--wr-color-accent);
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(80px);
}

.wr-cta-section__inner {
  position: relative;
  z-index: 1;
}

.wr-cta-section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem) !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 1rem !important;
}

.wr-cta-section__sub {
  color: #cbd5e1;
  font-size: 1.125rem;
  margin: 0 0 2.5rem;
}

.wr-btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--wr-color-accent);
  color: #ffffff;
  padding: 1rem 2.5rem;
  border-radius: 100px;
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 250ms ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.wr-btn-cta:hover {
  background: var(--wr-color-accent-h);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* ============================================================
   Responsywność i dostosowanie mobilne
   ============================================================ */
@media (max-width: 1024px) {
  .wr-single__hero {
    min-height: 320px;
  }

  .wr-single__hero-content {
    padding: 3rem 2rem 2rem;
  }

  .wr-single__section {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .wr-single__hero {
    min-height: 280px;
  }

  .wr-single__hero-content {
    padding: 2.5rem 1.5rem 1.5rem;
  }

  .wr-single__section {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .wr-cta-section {
    padding: 3rem 1.5rem;
  }
}
