@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;600&display=swap');

/* ===== VARIABLES & RESET (Nowa paleta i typografia) ===== */
:root {
  /* Paleta kolorów: stonowana, elegancka, inspirowana naturą */
  --primary: #4A90E2; /* Subtelny, inteligentny błękit */
  --primary-dark: #3A7BC8; /* Ciemniejszy odcień do hoverów */
  --text: #E0E0E0; /* Lekko złamana biel dla lepszej czytelności */
  --text-dark: #212121; /* Ciemny szary zamiast czystej czerni */
  --bg-light: #F8F9FA; /* Bardzo jasne tło dla kontrastu (formularze) */
  
  /* Gradient w tle nadający głębi, zamiast jednolitego koloru */
  --bg-dark: linear-gradient(rgba(10, 25, 30, 0.8), rgba(10, 25, 30, 0.6));
  --bg-offcanvas: rgba(15, 25, 35, 0.9); /* Tło dla menu bocznego */

  /* Typografia */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', sans-serif;
  
  /* Inne */
  --transition: cubic-bezier(0.65, 0, 0.35, 1);
  --radius: 8px; /* Ostrzejsze krawędzie */
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* ===== BASE STYLES ===== */
html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

body {
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  color: var(--text);
  background-color: #4681ee; /* Ciemne tło bazowe */
  height: 100%;
  overflow-x: hidden;
  line-height: 1.7; /* Większy odstęp między liniami */
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: #FFFFFF;
  margin: 0 0 1rem 0;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin: 0 0 1rem 0; font-size: 1rem; }

/* ===== BACKGROUND SLIDESHOW ===== */
#bg-container, .bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
}

.bg-layer {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s var(--transition);
  will-change: opacity;
  transform: translate3d(0,0,0);
  backface-visibility: hidden;
}

.bg-layer.active {
  opacity: 1;
}

/* ===== LAYOUT & CONTENT SECTIONS ===== */
header, footer {
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

main {
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
  animation: fadeUp 1.2s var(--transition) both;
}

section.content-section {
  max-width: min(800px, 90%);
  margin: 3rem auto;
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--bg-dark);
  border-radius: var(--radius);
  border: 1px solid rgb(117, 204, 255); /* Subtelna ramka dla efektu "szkła" */
  animation: fadeUp 1.3s var(--transition) both;
}

/* ===== HERO SECTION (Bardziej minimalistyczny) ===== */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: -webkit-fill-available;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 1rem;
  overflow: hidden;
  z-index: 0;
}

.hero-section .hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent 50%); /* Cień od dołu */
  z-index: 1;
}

.hero-section .hero-content {
  position: relative;
  z-index: 2;
  max-width: min(900px, 90%);
  animation: fadeUp 0.8s var(--transition) both;
  will-change: transform, opacity;
}

.hero-content h1 {
  color: #fff;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero-content h1 span {
  color: var(--primary);
  display: inline-block;
}

.hero-content p {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  max-width: 600px;
  margin: 1rem auto 2rem auto;
}

/* ===== BUTTONS (Bardziej eleganckie) ===== */
.button-link,
.cta-button {
  display: inline-block;
  padding: 0.8rem 2rem;
  background-color: var(--primary);
  color: white;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  will-change: transform;
}

.button-link:hover, .cta-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.button-link.back {
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
}

.button-link.back:hover {
  background: var(--text);
  color: var(--text-dark);
}

/* ===== FORM STYLES (Czyste i jasne) ===== */
.modern-form {
  background: var(--bg-light);
  padding: clamp(2rem, 5vw, 3rem);
  border-radius: var(--radius);
  max-width: min(600px, 90%);
  margin: 3rem auto;
  color: var(--text-dark);
}

.form-group {
  margin-bottom: 1.5rem;
}

.modern-form label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.modern-form input,
.modern-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid #D1D5DB;
  border-radius: var(--radius);
  font: inherit;
  background: #FFF;
  color: var(--text-dark);
  transition: all 0.2s var(--transition);
}

.modern-form input:focus,
.modern-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.25);
  outline: 2px solid transparent;
}

.submit-button { width: 100%; padding: 0.9rem; }
.form-status { margin-top: 1rem; font-weight: 600; text-align: center;}
.form-status.success { color: #27AE60; }
.form-status.error { color: #C0392B; }

/* ===== STYL NAWIGACJI I HAMBURGERA (POPRAWIONY I WZMOCNIONY) ===== */
.sg-navbar {
  /* Upewniamy się, że kontener jest poprawnie spozycjonowany */
  position: fixed;
  top: 1.5rem;
  right: clamp(1.5rem, 3vw, 2.5rem);
  z-index: 1050; /* Podnosimy z-index na wszelki wypadek */
}

.sg-offcanvas {
  background: var(--bg-offcanvas);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 280px;
}

.sg-navlist .nav-link {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  padding: 0.8rem 0;
  color: var(--text);
  transition: color 0.2s var(--transition);
  text-align: center;
}

.sg-navlist .nav-link:hover {
  color: var(--primary);
}

.sg-offcanvas .offcanvas-title {
  display: none;
}

/* --- NOWY, WIDOCZNY HAMBURGER --- */
.sg-toggler {
  /* Resetowanie domyślnych stylów przycisku */
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 40, 50, 0.5); /* Widoczne tło */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px); /* Efekt "Frosted Glass" */

  /* Nadanie kształtu i rozmiaru */
  width: 50px;
  height: 50px;
  border-radius: 50%; /* Okrągły kształt */
  
  /* Pozycjonowanie kresek (span) w środku */
  display: flex;
  align-items: center;
  justify-content: center;
  
  cursor: pointer;
  transition: background 0.3s var(--transition);
}

.sg-toggler:hover {
  background: rgba(50, 60, 70, 0.7);
}

/* Wewnętrzny kontener na kreski - kluczowy do animacji */
.sg-toggler .icon-container {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.sg-toggler span {
  /* Styl pojedynczej kreski */
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--text); /* Używamy background-color dla pewności */
  border-radius: 3px;
  transform-origin: center;
  transition: 
    transform 0.4s var(--transition),
    opacity 0.3s var(--transition),
    background-color 0.3s var(--transition);
}

/* Animacja do "X" */
.sg-toggler[aria-expanded="true"] .icon-container {
    justify-content: center;
}

.sg-toggler[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(1.5px) rotate(45deg);
}

.sg-toggler[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.sg-toggler[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-1.5px) rotate(-45deg);
}
/* ===== UTILITY & ANIMATIONS ===== */
.highlighted-points {
  list-style-type: "✓  ";
  padding-left: 1.5rem;
  line-height: 1.8;
}

.call-to-action {
  text-align: center;
  margin-top: 2.5rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ===== MEDIA QUERIES & FIXES ===== */
@supports (-webkit-touch-callout: none) {
  .hero-section { min-height: -webkit-fill-available; }
}

@media (-ms-high-contrast: active) {
  .button-link, .cta-button { border: 2px solid currentColor !important; }
}

@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }
}

@media (min-width: 1200px) {
  .sg-offcanvas { width: 320px; }
  .sg-navlist .nav-link { font-size: 2rem; }
}
#bg-container, .bg-layer {
  display: none;
}

body {
  /* Nowe, statyczne tło z subtelnym gradientem */
  background-color: rgb(0, 0, 0);
  background-image: radial-gradient(ellipse at center, rgba(117, 204, 255, 0) 0%, rgba(117, 204, 255, 0.5) 70%);
}

/* ===== OSTATECZNY LAYOUT NAPRZEMIENNY (WERSJA Z DOPRACOWANYMI KARTAMI) ===== */

/* Kontener dla pełnej szerokości sekcji (nagłówki, CTA) */
.content-section.is-full-width {
  max-width: 800px;
  margin: 6rem auto;
  text-align: center;
}

/* Kontener dla pojedynczego wiersza naprzemiennego */
.feature-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr); 
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 8rem auto;
  padding: 0 1rem;
  
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-row.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Domyślny układ: Treść po lewej (5 kolumn), Media po prawej (7 kolumn) */
.feature-row .feature-content {
  grid-column: 1 / 6;
  grid-row: 1;
}
.feature-row .feature-media {
  grid-column: 6 / 13;
  grid-row: 1;
}

/* Układ odwrócony: Media po lewej, Treść po prawej */
.feature-row.is-reversed .feature-content {
  grid-column: 8 / 13;
}
.feature-row.is-reversed .feature-media {
  grid-column: 1 / 8;
}

/* NOWY, LEPSZY WYGLĄD KARTY Z TEKSTEM */
.feature-row .feature-content {
  position: relative;
  background: var(--bg-dark);
  padding: 3rem; /* Zwiększony padding */
  border-radius: var(--radius, 8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Dodajemy akcent kolorystyczny na górze karty */
  border-top: 4px solid var(--primary); 
}

/* Lepsza hierarchia typograficzna wewnątrz karty */
.feature-content h3 {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    margin-bottom: 1.5rem;
    color: #fff;
}
.feature-content p {
    color: var(--text);
    line-height: 1.8;
}

/* ===== STYL DLA ZDJĘĆ - OPCJA 2: RAMKA PODWÓJNA ===== */
.feature-media {
  border-radius: var(--radius);
  overflow: hidden; /* Ważne dla poprawnego działania cienia */
  aspect-ratio: 4 / 3.5;
  
  /* Trik z wielokrotnym cieniem do stworzenia ramek bez dodatkowych elementów */
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.2),  /* 1. Cienka wewnętrzna linia */
    0 0 0 10px #fff,               /* 2. Biała zewnętrzna ramka o grubości 10px */
    0 20px 40px -10px rgba(0,0,0,0.3); /* 3. Cień pod całością */
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Tutaj nie potrzebujemy border-radius, bo kontener go zapewnia */
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Zdjęcie wewnątrz ramki też może mieć lekko zaokrąglone rogi */
  border-radius: 4px; 
}

.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* USUNIĘTO style dla .media-duo, ponieważ nie są już potrzebne */


/* Responsywność (bez zmian) */
@media (max-width: 992px) {
  .feature-row,
  .feature-row.is-reversed {
    /* Zmieniamy display na flex dla lepszej kontroli na mobilce */
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 4rem auto;
  }
  
  /* Resetowanie ustawień z wersji desktopowej */
  .feature-row .feature-content,
  .feature-row .feature-media,
  .feature-row.is-reversed .feature-content,
  .feature-row.is-reversed .feature-media {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%; /* Upewniamy się, że elementy zajmują pełną dostępną szerokość */
  }

  /* Ustawienie poprawnej kolejności: ZDJĘCIE -> TEKST */
  .feature-row .feature-media {
      order: 1; 
  }
  .feature-row .feature-content {
      order: 2; 
      /* KLUCZOWA ZMIANA: Zmniejszamy padding w kartach na mobilce */
      padding: 2.5rem 1.5rem; 
  }

  .feature-media {
    /* KLUCZOWA ZMIANA: Gwarantuje, że zdjęcie nie będzie szersze niż kontener */
    max-width: 100%;
    aspect-ratio: 16 / 10;
  }
}
/* ===== STYL DLA PROSTYCH PODSTRON TEKSTOWYCH (np. O mnie, Kontakt) ===== */

/* Ta reguła dotyczy tylko sekcji, które NIE SĄ częścią naprzemiennego layoutu */
main > .content-section {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2.5rem;
  background: rgba(0, 0, 0, 0.755); /* Ciemne tło karty */
  color: var(--text-light); /* Jasny tekst wewnątrz */
  border-radius: var(--radius);
  border-top: 4px solid var(--primary); /* Kolorowy akcent */
  box-shadow: 0 15px 30px rgba(117, 204, 255, 0.503);
}

main > .content-section h1,
main > .content-section h2,
main > .content-section h3 {
    color: #fff; /* Jaśniejszy kolor dla nagłówków wewnątrz ciemnych kart */
}