*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Główne zmienne kolorystyczne bazy */
  --forest:       #2A3D1E;
  --forest-mid:   #3D5C2A;
  --forest-light: #5A7A3A;
  --amber:        #A07820;
  --amber-light:  #C8A040;
  --earth:        #7A4A2A;
  --cream:        #F5F0E3;
  --cream-dark:   #E8E0CC;
  --mist:         #8FA89A;
  --text:         #1E2A1A;
  --text-mid:     #3A4A36;
  --white:        #FEFCF7;

  /* Zmienne dla stron błędów (404, 500, itp.) */
  --bg-navy:      #0D1A0A;
  --text-slate:   #8FA89A;
  --accent-blue:  #C8A040;
  --accent-error: #C8A040;
  --text-light:   #e2e8f0;
  
  --font-main:    'Lato', sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  font-family: var(--font-main);
  background: var(--cream);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── NAVIGATION ─────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(26, 37, 20, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0 3.5rem 0 8.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  border-bottom: 1px solid rgba(200,160,64,0.25);
  transition: background 0.3s;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--amber-light);
  letter-spacing: 0.06em;
  text-decoration: none;
  font-style: italic;
}
.nav-links { display: flex; gap: 2.5rem; list-style: none; margin: 0 auto; padding-right: 80px; }
.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.25s;
  font-weight: 400;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.nav-links a:hover { color: var(--amber-light); }

.nav-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; border: none; background: transparent; padding: 5px; }
.nav-toggle span { display: block; width: 28px; height: 2px; background: var(--amber-light); transition: all 0.3s ease-in-out; border-radius: 2px; }

/* Animacja ikony hamburgera w X */
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── HERO ────────────────────────────────────── */
#hero {
  position: relative;
  height: 100vh;
  min-height: 580px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding-bottom: 12vh;
  overflow: hidden;
}

#hero.hero-subpage {
  height: 70vh;
  min-height: 480px;
  padding-bottom: 0;
}

.hero-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    #0D1A28 0%,
    #1E3A4A 25%,
    #2E5A6A 55%,
    #4A8090 78%,
    #7AAABB 92%,
    #8BBCA8 100%);
}

.hero-subpage .hero-sky {
  background: linear-gradient(180deg,
    #0D1A28 0%,
    #1E3A4A 35%,
    #2E5A6A 65%,
    #4A8090 100%);
}

.hero-stars { position: absolute; top: 0; left: 0; right: 0; height: 60%; pointer-events: none; }
.hero-subpage .hero-stars { height: 100%; }

.hero-mountains { position: absolute; bottom: 0; left: 0; right: 0; }

.hero-content {
  position: relative; z-index: 5;
  text-align: center;
  padding: 0 1.5rem;
}
.hero-tagline {
  font-family: 'Lato', sans-serif;
  font-weight: 300;
  font-size: 0.78rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: 0.9rem;
  opacity: 0;
  animation: fadeUp 1s 0.3s ease forwards;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  color: #FEFCF7;
  margin-bottom: 0.55rem;
  opacity: 0;
  animation: fadeUp 1s 0.65s ease forwards;
  text-shadow: 0 4px 40px rgba(0,0,0,0.45);
}
.hero-subpage .hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 0.8rem;
}

.hero-title .heart {
  display: inline-block;
  animation: pulseHeart 1.8s infinite ease-in-out;
}

.hero-subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(245,240,227,0.72);
  margin-bottom: 2.8rem;
  opacity: 0;
  animation: fadeUp 1s 1s ease forwards;
}

.scroll-hint {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  color: rgba(245,240,227,0.38);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: pulseOpacity 3s infinite;
}
.scroll-hint::after {
  content: '';
  width: 1px; height: 44px;
  background: linear-gradient(to bottom, rgba(200,160,64,0.55), transparent);
  animation: lineGrow 2.5s infinite;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseOpacity { 0%,100%{opacity:.38} 50%{opacity:.65} }
@keyframes lineGrow {
  0%   { transform: scaleY(0); transform-origin: top; }
  48%  { transform: scaleY(1); transform-origin: top; }
  52%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@keyframes pulseHeart {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ── SHARED SECTION STYLES ───────────────────── */
section { padding: 5.5rem 2rem; }

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 600;
  color: var(--forest);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}
.section-title em { font-style: italic; color: var(--forest-mid); }

.divider {
  width: 42px; height: 2px;
  background: var(--amber);
  margin: 0 0 1.5rem;
}
.divider-light { background: var(--amber-light); }

.inner { max-width: 960px; margin: 0 auto; }

/* ── O NAS & INNE SEKCJE (GŁÓWNA STRONA) ──────── */
#o-nas { background: var(--white); }

.o-nas-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4.5rem; align-items: center;
}
.o-nas-text p { color: var(--text-mid); margin-bottom: 1rem; }
.o-nas-text ul { padding-left: 1.5rem; margin-bottom: 1rem; color: var(--text-mid); }

.o-nas-image {
  border-radius: 2px; overflow: hidden; height: 360px; box-shadow: 12px 16px 40px rgba(20,40,10,0.18);
}

.stat-row {
  display: flex; gap: 2.5rem; margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid var(--cream-dark);
}
.stat-num { font-family: 'Playfair Display', serif; font-size: 2.1rem; font-weight: 700; color: var(--forest); line-height: 1; }
.stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--mist); margin-top: 0.25rem; }

.route-list { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
.route-item { background: var(--white); padding: 1.5rem; border-left: 3px solid var(--amber); box-shadow: 0 4px 15px rgba(20,40,10,0.05); }
.route-item strong { font-family: 'Playfair Display', serif; color: var(--forest); font-size: 1.15rem; display: block; margin-bottom: 0.3rem; }

#dojscie { background: var(--cream); }
#wedrowki { background: var(--cream-dark); }

/* ── ATRAKCJE ────────────────────────────────── */
#atrakcje { background: var(--forest); color: var(--cream); }
#atrakcje .section-title { color: var(--cream); }
#atrakcje .section-label { color: var(--amber-light); }

.atrakcje-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 2.5rem;
  border: 1px solid rgba(245,240,227,0.1); background: rgba(245,240,227,0.08);
}
.atrakcja { background: rgba(26,37,20,0.55); padding: 1.85rem; display: flex; align-items: flex-start; gap: 1.15rem; transition: background 0.25s; }
.atrakcja:hover { background: rgba(26,37,20,0.75); }
.atrakcja-icon { width: 44px; height: 44px; flex-shrink: 0; border: 1px solid rgba(200,160,64,0.38); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.atrakcja h3 { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 600; color: var(--cream); margin-bottom: 0.35rem; }
.atrakcja p { font-size: 0.86rem; color: rgba(245,240,227,0.6); line-height: 1.65; }

/* ── KONTAKT ─────────────────────────────────── */
.kontakt-item { display: flex; gap: 0.9rem; align-items: flex-start; margin-bottom: 0.85rem; font-size: 0.92rem; color: var(--text-mid); }
.kontakt-item strong { color: var(--forest); font-weight: 700; min-width: 100px; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; padding-top: 3px; flex-shrink: 0; }
.kontakt-item a { color: var(--forest-mid); text-decoration: none; font-weight: 700; }
.kontakt-item a:hover { text-decoration: underline; }
.info-box { margin-top: 2.5rem; padding: 1.25rem 1.5rem; border-left: 3px solid var(--amber); background: var(--cream); font-size: 0.84rem; color: var(--text-mid); line-height: 1.7; }

/* ── ARTICLES & TABLES (PODSTRONY) ───────────── */
.article-content { max-width: 800px; margin: 0 auto; color: var(--text-mid); }
.article-content p { margin-bottom: 1.5rem; font-size: 1.05rem; line-height: 1.85; }
.article-content h3 { font-family: 'Playfair Display', serif; color: var(--forest); font-size: 1.6rem; margin: 3rem 0 1.2rem; }
.article-content ul { padding-left: 1.5rem; margin-bottom: 1.5rem; font-size: 1.05rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content strong { color: var(--forest); }
.data-table { width: 100%; border-collapse: collapse; margin: 2.5rem 0; font-size: 0.95rem; background: var(--white); box-shadow: 0 4px 15px rgba(20,40,10,0.05); border-radius: 4px; overflow: hidden; }
.data-table th, .data-table td { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--cream-dark); text-align: left; }
.data-table th { background: var(--forest); color: var(--cream); font-weight: 600; font-family: 'Playfair Display', serif; letter-spacing: 0.05em; font-size: 1.05rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) { background: rgba(245,240,227,0.3); }

/* ── LAMIA SPECIFIC (PODSTRONA) ──────────────── */
#opowiesc { background: var(--white); text-align: center; }
.lamia-text { max-width: 800px; margin: 0 auto; }
.lamia-text p { font-size: 1.15rem; line-height: 1.85; color: var(--text-mid); margin-bottom: 1.5rem; }

#zdjecia { background: var(--cream); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.photo-item { border-radius: 4px; overflow: hidden; box-shadow: 0 8px 24px rgba(20,40,10,0.12); aspect-ratio: 4/3; background: var(--cream-dark); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.photo-item:hover img { transform: scale(1.04); }

/* ── FOOTER ──────────────────────────────────── */
footer { background: #0D1A0A; color: rgba(245,240,227,0.4); padding: 2.5rem 2rem; text-align: center; font-size: 0.8rem; letter-spacing: 0.06em; }
footer .footer-logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--amber); font-style: italic; display: block; margin-bottom: 0.75rem; }
footer .footer-tagline { font-size: 0.72rem; color: rgba(245,240,227,0.28); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1.25rem; }
footer .footer-links { display: flex; gap: 2rem; justify-content: center; list-style: none; margin-bottom: 1.5rem; }
footer .footer-links a { color: rgba(245,240,227,0.38); text-decoration: none; font-size: 0.75rem; letter-spacing: 0.1em; transition: color 0.2s; }
footer .footer-links a:hover { color: var(--amber-light); }
footer .footer-copy { color: rgba(245,240,227,0.22); font-size: 0.72rem; }

/* ── LIGHTBOX (GALERIA) ──────────────────────── */
#lightbox { position: fixed; z-index: 1000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(13, 26, 10, 0.92); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; backdrop-filter: blur(5px); }
#lightbox.active { opacity: 1; pointer-events: auto; cursor: zoom-out; }
#lightbox img { max-width: 90vw; max-height: 90vh; border: 2px solid var(--amber-light); border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.8); }

/* ── ERROR PAGES (401, 403, 404, 500) ────────── */
body.error-page {
  background-color: var(--bg-navy); color: var(--text-slate);
  height: 100vh; overflow: hidden; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
}
body.error-page #binaryCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.15; }
.error-container {
  padding: 40px; background: rgba(13, 26, 10, 0.9); border: 1px solid rgba(200, 160, 64, 0.2);
  border-radius: 8px; backdrop-filter: blur(5px); box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  max-width: 500px; width: 90%; z-index: 10;
}
.error-container h1 { font-size: 6rem; line-height: 1; color: var(--accent-blue); margin-bottom: 10px; text-shadow: 0 0 20px rgba(200, 160, 64, 0.4); font-family: 'Playfair Display', serif; }
.error-container h1.glitch { font-size: 8rem; position: relative; animation: glitch 1s linear infinite; color: var(--accent-error); }
.error-container h2 { font-size: 1.5rem; color: #e2e8f0; margin-bottom: 20px; letter-spacing: 1px; text-transform: uppercase; }
.error-container p { margin-bottom: 30px; font-size: 1rem; color: #94a3b8; max-width: 400px; margin-left: auto; margin-right: auto; }
.error-container .btn-home {
  display: inline-block; padding: 12px 30px; border: 1px solid var(--accent-blue);
  color: var(--accent-blue); text-decoration: none; font-weight: 600; transition: 0.3s;
  text-transform: uppercase; letter-spacing: 1px; border-radius: 4px;
}
.error-container .btn-home:hover { background: rgba(200, 160, 64, 0.1); box-shadow: 0 0 15px rgba(200, 160, 64, 0.3); }

@keyframes glitch {
  2%, 64% { transform: translate(2px,0) skew(0deg); }
  4%, 60% { transform: translate(-2px,0) skew(0deg); }
  62% { transform: translate(0,0) skew(5deg); }
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 0 1.25rem; }
  .nav-links {
    display: flex; flex-direction: column; align-items: center;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(20, 29, 15, 0.98);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 2rem 1.5rem 2.5rem; gap: 1.8rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.6);
    border-bottom: 1px solid rgba(200,160,64,0.15);
    opacity: 0; visibility: hidden; transform: translateY(-15px);
    transition: all 0.35s ease;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-links a { font-size: 1.1rem; padding: 10px 0; width: 100%; text-align: center; }
  .nav-toggle { display: flex; }
  section { padding: 3.5rem 1.25rem; }
  .o-nas-grid { grid-template-columns: 1fr; gap: 2rem; }
  .o-nas-image { height: 260px; order: -1; }
  .atrakcje-grid { grid-template-columns: 1fr; }
  footer .footer-links { gap: 1.25rem; flex-wrap: wrap; }
}