/* Import czcionki pasującej do projektu */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap");

/* --- Zmienne Kolorów --- */
:root {
  --bg-color: #1e1e26; /* Tło strony */
  --nav-color: #2b2b2b; /* Kolor nawigacji */
  --box-color: #4a4a5a; /* Kolor tła dla pudełek z tekstem */
  --cta-color: #e10600; /* Kolor akcentu (czerwony) */
}

/* --- Style Globalne --- */
/* POPRAWKA: Dodajemy padding dla 'fixed-top' navbar */
html {
  scroll-padding-top: 100px; /* Dopasuj do wysokości nawigacji */
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: #edf0f1;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #fff;
}

/* --- Nawigacja (Navbar) --- */
header.navbar {
  background-color: var(--nav-color) !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbar-brand a {
  color: #edf0f1;
  font-weight: 700;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: #edf0f1 !important;
  font-weight: 500;
  margin-left: 1rem;
  text-transform: lowercase;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--cta-color) !important;
}

/* --- Sekcja Główna (Hero) --- */
/* Ta sekcja jest pierwsza, więc centrowanie jest OK */
#main_section {
  position: relative;
  min-height: 100vh;
  background-color: var(--bg-color);
  overflow: hidden;
  display: flex;
  align-items: center; /* Centrowanie w pionie */
}

/* Czerwona poświata w tle (PRAWY GÓRNY RÓG) */
#main_section::after {
  content: "";
  position: absolute;
  top: -10%;
  right: -20%;
  width: 70%;
  height: 120%;
  background: radial-gradient(circle, rgba(225, 6, 0, 0.4), transparent 60%);
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* Obrazek gokarta */
#gokart {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 90%;
  width: auto;
  z-index: 2;
  transition: opacity 0.5s ease;
}

/* Kontener z tekstem */
#main_section .container {
  position: relative;
  z-index: 3;
}

/* Nagłówek H1 */
#main_section h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Pudełko z tekstem ("Tekst o zajęciach") */
#plusy_zajec {
  background-color: var(--box-color);
  padding: 2.5rem;
  border-radius: 20px;
  max-width: 650px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  font-size: 1.1rem;
}

/* Rząd z przyciskami */
.cta-row {
  display: flex;
  gap: 1rem;
}

/* Style przycisków */
.btn-cta,
.btn-ghost {
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  border-width: 2px;
}

/* Czerwony przycisk ("Zapisz się") */
.btn-cta {
  background-color: var(--cta-color);
  border-color: var(--cta-color);
  color: #fff;
}

.btn-cta:hover {
  background-color: #c90500;
  border-color: #c90500;
  color: #fff;
}

/* Przycisk "o mnie" (outline/ghost) */
.btn-ghost.btn-outline-light {
  border-color: #edf0f1;
  color: #edf0f1;
}

.btn-ghost.btn-outline-light:hover {
  background-color: #edf0f1;
  color: var(--bg-color);
}

/* --- Sekcja "Jak wyglądają zajęcia" --- */
#wyglad_zajec_section {
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-color);
  min-height: 100vh;
  /* USUNIĘTO 'display: flex' i 'align-items: center' */
}

/* Czerwona poświata (LEWY DOLNY RÓG) */
#wyglad_zajec_section::before {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -20%;
  width: 70%;
  height: 120%;
  background: radial-gradient(circle, rgba(225, 6, 0, 0.4), transparent 60%);
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

h2 {
  text-align: center;
  font-weight: 700;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #fff;
}

#wyglad_zajec_section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}

#wyglad_zajec_section h2 {
  grid-column: 1 / -1;
}

#gokart2 {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#opis_wyglad_zajec {
  background-color: var(--box-color);
  padding: 2.5rem;
  border-radius: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- Sekcja "Gdzie odbywają się zajęcia" --- */
#gdzie_odbywaja_sie_zajecia {
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  background-color: var(--bg-color);
  min-height: 100vh;
  /* USUNIĘTO 'display: flex' i 'align-items: center' */
}

/* POŚWIATA: Prawy dolny róg */
#gdzie_odbywaja_sie_zajecia::before {
  content: "";
  position: absolute;
  bottom: -15%;
  right: -15%;
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(225, 6, 0, 0.3), transparent 60%);
  z-index: 1;
  pointer-events: none;
}

#gdzie_odbywaja_sie_zajecia .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

#gdzie_odbywaja_sie_zajecia h2 {
  text-align: center;
}

/* Ukrywamy obrazek */
#lewa_strona_gdzie {
  display: none;
}

/* Box z tekstem jest teraz głównym elementem */
#prawa_strona_gdzie {
  background-color: var(--box-color);
  padding: 2.5rem;
  border-radius: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 900px;
  margin: 0 auto;
}

/* Reset H5 */
#prawa_strona_gdzie h5 {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.7;
  color: #edf0f1;
  border: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

/* Lista w 3 kolumnach */
#prawa_strona_gdzie ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 0;
  columns: 3;
  -webkit-columns: 3;
  -moz-columns: 3;
  column-gap: 2rem;
}

#prawa_strona_gdzie li::before {
  content: none;
}

#prawa_strona_gdzie li {
  padding-left: 0;
  margin-bottom: 0.5rem;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* --- SEKCJA "O MNIE" --- */
#o-mnie {
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  background-color: var(--bg-color);
  min-height: 100vh;
  /* USUNIĘTO 'display: flex' i 'align-items: center' */
}

/* NOWA POŚWIATA: Prawa strona */
#o-mnie::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -20%;
  transform: translateY(-50%);
  width: 60%;
  height: 100%;
  background: radial-gradient(circle, rgba(225, 6, 0, 0.3), transparent 60%);
  z-index: 1;
  pointer-events: none;
}

/* Układ Grid dla sekcji "O mnie" */
#o-mnie .container {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
  align-items: stretch; /* Wyrównuje oba boxy do tej samej wysokości */
}

#o-mnie h2 {
  grid-column: 1 / -1;
  text-align: center;
}

/* Box z tekstem po LEWEJ */
#lewastronaomnie {
  grid-column: 1;
  grid-row: 2;
  background-color: var(--box-color);
  padding: 2.5rem;
  border-radius: 20px;
  font-size: 1.1rem;
  line-height: 1.7;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Box z obrazkiem po PRAWEJ */
#prawastronaomnie {
  grid-column: 2;
  grid-row: 2;
  background-color: var(--box-color);
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

#prawastronaomnie img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Responsywność (Mobile) --- */
@media (max-width: 992px) {
  #gokart {
    right: -20%;
    height: 80%;
  }
  #main_section h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  #main_section {
    text-align: center;
  }

  /* Na mobilce wszystkie sekcje po prostu się stackują */
  #main_section,
  #wyglad_zajec_section,
  #gdzie_odbywaja_sie_zajecia,
  #o-mnie {
    align-items: flex-start;
    padding-top: 5rem;
    padding-bottom: 5rem;
    min-height: auto; /* Na mobilce nie chcemy 100vh */
  }

  /* Ukrywamy WSZYSTKIE poświaty na mobilce */
  #gokart,
  #main_section::after,
  #wyglad_zajec_section::before,
  #gdzie_odbywaja_sie_zajecia::before,
  #o-mnie::before {
    opacity: 0;
    visibility: hidden;
  }

  #main_section h1 {
    font-size: 2.5rem;
  }

  #plusy_zajec {
    max-width: 100%;
    padding: 2.5rem 1.5rem;
    font-size: 1.05rem;
  }

  .cta-row {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn-cta,
  .btn-ghost {
    width: 90%;
  }

  /* Responsywność sekcji "Jak wyglądają zajęcia" */
  #wyglad_zajec_section .container {
    grid-template-columns: 1fr; /* Jedna kolumna */
  }

  #gokart2 {
    margin-bottom: 2rem;
  }

  /* Reset kolumn listy */
  #prawa_strona_gdzie ul {
    columns: 1;
    -webkit-columns: 1;
    -moz-columns: 1;
  }

  /* Responsywność sekcji "O mnie" */
  #o-mnie .container {
    grid-template-columns: 1fr; /* Jedna kolumna */
  }

  /* ZMIANA: Obrazek na górze, tekst pod nim */
  #prawastronaomnie {
    grid-column: 1;
    grid-row: 2; /* Teraz obrazek jest w drugim rzędzie (pod h2) */
    margin-top: 0; /* Usuwamy zbędny margines */
    margin-bottom: 2rem; /* Dodajemy margines pod obrazkiem */
  }

  #lewastronaomnie {
    grid-column: 1;
    grid-row: 3; /* Teraz tekst jest w trzecim rzędzie */
  }
}

/* --- STYLE MODALA (Poprawiona wersja bez konfliktów) --- */

.custom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 999999;
  align-items: center;
  justify-content: center;
}
.custom-modal-content {
  background-color: #4a4a5a;
  background-color: var(--box-color, #4a4a5a);
  padding: 40px;
  width: 90%;
  max-width: 550px;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  position: relative;
  /* Animacja wejścia */
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalPop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 32px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  transition: 0.3s;
  background: none;
  border: none;
}
.close-btn:hover {
  color: var(--cta-color);
}

/* Formularz */
.modal-form h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: #fff;
}
.custom-form-group {
  margin-bottom: 1rem;
  text-align: left;
}
.custom-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: #ddd;
}
.custom-form-group input,
.custom-form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #666;
  background-color: #2b2b2b;
  color: #fff;
  font-family: inherit;
}
.custom-form-group input:focus,
.custom-form-group textarea:focus {
  outline: none;
  border-color: var(--cta-color);
  background-color: #1e1e26;
}
.btn-submit {
  width: 100%;
  padding: 14px;
  background-color: var(--cta-color);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.3s;
  margin-top: 10px;
}
.btn-submit:hover {
  background-color: #c90500;
  transform: translateY(-2px);
}
footer {
  background-color: var(--nav-color);
  text-align: center;
  padding: 2rem;
  color: #888;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}
/* --- Style Modala Cookies (inline dla Indexu) --- */
#cookie-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 400px;
  background-color: #4a4a5a; /* var(--box-color) */
  color: #edf0f1;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 9999999;
  display: none; /* Domyślnie ukryty, JS go pokaże */
  animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

#cookie-toast h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

#cookie-toast p {
  font-size: 0.85rem;
  color: #ccc;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-cookie-settings {
  background: transparent;
  border: 1px solid #aaa;
  color: #ddd;
  font-size: 0.8rem;
  padding: 5px 15px;
  border-radius: 50px;
  cursor: pointer;
  transition: 0.3s;
}
.btn-cookie-settings:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
}

.btn-cookie-accept {
  background-color: #e10600; /* var(--cta-color) */
  border: 1px solid #e10600;
  color: #fff;
  font-size: 0.8rem;
  padding: 5px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 700;
  transition: 0.3s;
}
.btn-cookie-accept:hover {
  background-color: #c90500;
}

.cookie-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 1.2rem;
}
.cookie-close:hover {
  color: #fff;
}
