/* * CSS - Projekt: Producent Schodów 
 * Architektura: Mobile-First, CSS Grid/Flexbox, Custom Properties
 */

:root {
  --bg-main: #1a1a1a;
  --accent: #c8a96e;
  --text: #f0ece4;
  --card-bg: #252525;
  --hover: #d4b878;
  --overlay: rgba(0, 0, 0, 0.85);
  --font-heading: 'Playfair Display', serif;
  --font-text: 'Inter', sans-serif;
  --transition: all 0.3s ease-in-out;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text);
  font-family: var(--font-text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--hover);
}

img,
picture {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style-position: inside;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.text-center {
  text-align: center;
}

.mb-40 {
  margin-bottom: 40px;
}

/* Header & Nav */
header {
  background-color: var(--bg-main);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.logo:hover {
  opacity: 0.8;
}

.logo img {
  height: 45px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0;
}

nav a {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 4px;
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  color: var(--bg-main);
  background-color: var(--accent);
}

/* Hamburger Menu */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav (domyślnie ukryta) */
#main-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(26, 26, 26, 0.98);
  z-index: 150;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(10px);
}

#main-nav.open {
  display: flex;
}

#main-nav ul {
  flex-direction: column;
  gap: 5px;
  text-align: center;
}

#main-nav a {
  font-size: 18px;
  padding: 14px 30px;
  display: block;
}

/* --- HERO CAROUSEL (Dostosowane do małych ekranów) --- */
.hero {
  position: relative;
  height: 50vh;
  min-height: 350px;
  max-height: 500px;
  overflow: hidden;
  background-color: #000;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.carousel-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.carousel-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
  background: rgba(26, 26, 26, 0.85);
  padding: 30px 15px;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: fadeIn 1s forwards 0.5s;
  width: 95%;
  max-width: 600px;
  border-radius: 4px;
}

.carousel-content h1 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--accent);
  line-height: 1.2;
}

.carousel-content p {
  font-size: 14px;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background-color: var(--accent);
  color: var(--bg-main);
  padding: 12px 24px;
  font-weight: 600;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--hover);
  color: var(--bg-main);
}

.btn-block {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}

.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background-color: var(--accent);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Global Grid System */
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 30px;
  margin-bottom: 40px;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-4 {
  grid-template-columns: 1fr;
}

/* Strona podrzędna - Layout z panelem bocznym */
.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

.main-content {
  width: 100%;
}

/* Panel boczny (Sidebar) */
.sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-widget {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-widget h3 {
  color: var(--accent);
  margin-bottom: 15px;
  font-size: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
}

.sidebar-widget ul li {
  margin-bottom: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.sidebar-widget ul li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-widget a.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.sidebar-widget a.btn-outline:hover {
  background: var(--accent);
  color: var(--bg-main);
}

/* --- KARTY / GALERIA --- */
.card {
  background-color: var(--card-bg);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.card-img-wrapper {
  overflow: hidden;
  aspect-ratio: 4/3;
  display: block;
  width: 100%;
  position: relative;
}

.card-img-wrapper img,
.card-img-wrapper picture img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-wrapper img,
a.card-img-wrapper:hover img {
  transform: scale(1.1);
}

.card-body {
  padding: 20px;
  text-align: center;
  flex-grow: 1;
}

.card-body h3 {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 20px;
}

/* Sekcja "Co nas wyróżnia" (Ikony) */
.benefit-item {
  text-align: center;
  padding: 20px;
  background: var(--card-bg);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.benefit-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 15px;
}

/* Lista cech */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.feature-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 15px;
  align-items: start;
  background: var(--card-bg);
  padding: 20px;
  border-radius: 4px;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--accent);
}

.feature-title {
  font-weight: 600;
  color: var(--text);
  font-size: 18px;
  line-height: 1.4;
}

.feature-desc {
  color: #a1a1aa;
  line-height: 1.6;
  margin-top: 5px;
}

/* --- Skomplikowane siatki obrazów (Index - Pasja do Drewna) --- */
/* ZMIANA: Specjalna siatka dla telefonów komórkowych, by zdjęcia nie były wielkie */
.info-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-images picture {
  display: block;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.info-images picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info-images picture:first-child {
  grid-column: 1 / -1;
  height: 220px;
}

/* Główne szerokie na komórce */
.info-images picture:not(:first-child) {
  height: 140px;
}

/* Dwa mniejsze na dole na komórce */

/* CTA Banner */
.cta-banner {
  background-color: var(--accent);
  color: var(--bg-main);
  padding: 60px 20px;
  text-align: center;
}

.cta-banner h2 {
  color: var(--bg-main);
  margin-bottom: 20px;
  font-size: 28px;
}

.cta-banner p {
  margin-bottom: 30px;
  font-size: 16px;
  font-weight: 600;
}

.cta-banner .btn {
  background-color: var(--bg-main);
  color: var(--accent);
  border: 2px solid transparent;
}

.cta-banner .btn:hover {
  background-color: #000;
  color: var(--accent);
  border-color: #000;
}

/* Page Header (Paski podstron) */
.page-header {
  position: relative;
  padding: 60px 20px 40px;
  text-align: center;
  background-size: cover;
  background-position: center;
  color: #fff;
  z-index: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-clip: padding-box;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: -1;
}

.page-header h1 {
  font-size: 26px;
  color: var(--accent);
  margin-bottom: 10px;
}

.breadcrumbs {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.breadcrumbs a {
  color: var(--text);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs span {
  margin: 0 10px;
  color: var(--accent);
  opacity: 0.5;
}

/* Bloki treści */
.content-block {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 30px;
}

.content-block p {
  margin-bottom: 20px;
  font-size: 16px;
  color: #d4d4d8;
}

.content-block ul {
  margin-bottom: 25px;
  padding-left: 20px;
  color: #d4d4d8;
}

.content-block ul li {
  margin-bottom: 10px;
}

.content-block h2 {
  margin-top: 0px;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 28px;
}

.content-block h3 {
  margin-top: 30px;
  margin-bottom: 15px;
  color: #fff;
  font-size: 22px;
}

/* Kontakt & FAQ */
.contact-block {
  background: var(--card-bg);
  padding: 40px 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.contact-icon {
  width: 40px;
  height: 40px;
  fill: var(--accent);
  margin-bottom: 20px;
}

.contact-block h3 {
  color: var(--text);
  margin-bottom: 15px;
  font-size: 20px;
}

.contact-link {
  font-size: 18px;
  color: var(--accent);
  font-weight: 600;
}

.contact-link:hover {
  color: var(--hover);
}

.bank-details-section {
  background-color: var(--card-bg);
  padding: 60px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bank-card {
  text-align: center;
  background: var(--card-bg);
  padding: 30px 20px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.bank-card svg {
  width: 32px;
  height: 32px;
  fill: var(--accent);
  margin-bottom: 15px;
}

.bank-card h4 {
  color: var(--accent);
  margin-bottom: 10px;
  font-size: 18px;
}

/* FAQ Specific */
.faq-article {
  scroll-margin-top: 100px;
}

.faq-article .read-more {
  display: inline-block;
  margin-top: 15px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
}

/* Fixed Elements */
.instagram-fixed {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent);
  padding: 10px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px 0 0 4px;
}

.instagram-fixed svg {
  width: 24px;
  height: 24px;
  fill: var(--bg-main);
}

.instagram-fixed:hover {
  background: var(--hover);
}

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  z-index: 90;
  font-size: 20px;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:hover {
  background: var(--accent);
  color: var(--bg-main);
}

/* Footer */
footer {
  background-color: #111;
  padding: 40px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer nav ul {
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

footer nav a {
  font-size: 12px;
}

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  font-size: 12px;
  color: #71717a;
}

/* --- LIGHTBOX (Poprawiony pod kątem urządzeń mobilnych) --- */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--overlay);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  width: 95%;
  max-width: 1200px;
  height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: -35px;
  right: 0;
  color: #fff;
  font-size: 35px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.lightbox-close:hover {
  color: var(--accent);
}

/* ZMIANA: Strzałki nawigacyjne przesunięte do wewnątrz na komórkach, dodany cień dla widoczności */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 35px;
  cursor: pointer;
  user-select: none;
  padding: 15px;
  transition: color 0.3s;
  z-index: 10;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.lightbox-nav:hover {
  color: var(--accent);
}

.lightbox-prev {
  left: 0px;
}

.lightbox-next {
  right: 0px;
}

.lightbox-counter {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-family: var(--font-heading);
  letter-spacing: 2px;
}

/* --- MEDIA QUERIES - UKŁAD DLA KOMPUTERÓW I TABLETÓW --- */
@media (min-width: 768px) {

  /* Na tablecie i desktopie: nawigacja inline, hamburger ukryty */
  .hamburger {
    display: none;
  }

  #main-nav {
    display: block;
    position: static;
    width: auto;
    height: auto;
    background: none;
    backdrop-filter: none;
  }

  #main-nav ul {
    flex-direction: row;
  }

  #main-nav a {
    font-size: 13px;
    padding: 8px 12px;
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  nav ul {
    gap: 15px;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-row {
    grid-template-columns: 40px 250px 1fr;
    align-items: center;
  }

  .feature-desc {
    margin-top: 0;
  }

  /* Powiększenia nagłówków na komputerach */
  .hero {
    height: 60vh;
    min-height: 400px;
    max-height: 650px;
  }

  .carousel-content {
    padding: 40px 20px;
    width: 90%;
  }

  .carousel-content h1 {
    font-size: 42px;
    margin-bottom: 15px;
  }

  .carousel-content p {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-header {
    padding: 100px 20px 80px;
  }

  .page-header h1 {
    font-size: 48px;
    margin-bottom: 15px;
  }

  .cta-banner h2 {
    font-size: 36px;
  }

  /* Przywrócenie asymetrycznej siatki na głównej na komputerach */
  .info-images {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }

  .info-images picture:first-child {
    grid-column: 1;
    grid-row: span 2;
    height: 100%;
    min-height: 350px;
  }

  .info-images picture:not(:first-child) {
    height: 220px;
  }

  footer nav a {
    font-size: 13px;
  }
}

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-layout {
    grid-template-columns: 1fr 320px;
  }

  /* Aktywacja sidebara po prawej */

  /* ZMIANA: Na komputerze jest dużo miejsca, więc wypychamy strzałki galerii na boki */
  .lightbox-content {
    width: 90%;
    height: 90vh;
  }

  .lightbox-prev {
    left: -80px;
  }

  .lightbox-next {
    right: -80px;
  }

  .lightbox-nav {
    font-size: 60px;
    padding: 20px;
  }

  .lightbox-close {
    top: -40px;
    font-size: 40px;
  }
}