/* Plik CSS został uproszczony - usunięto zewnętrzne czcionki na rzecz systemowych */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Montserrat:wght@400;700&family=Roboto+Slab:wght@400;700&display=swap');

:root {
    --primary-color: #0059c1;
    --dark-color: #1a1a2e;
    --light-color: #f4f4f9;
    --white-color: #ffffff;
    --text-color: #333;
    --light-text-color: #e0e0e0;
    --accent-color: #1e8449;
    --accent-color-2: #ffc107; /* Złoty/Bursztynowy */
}

html { scroll-behavior: smooth; }

body { 
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0; 
    padding-top: 70px; 
    line-height: 1.6; 
    color: var(--text-color); 
    background-color: var(--light-color); 
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
}
h1, .hero-content h1 {
    font-family: 'Roboto Slab', serif;
}

/* --- Nagłówek i Nawigacja --- */
.main-header { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    background-color: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(10px); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    z-index: 1000; 
    height: 70px; 
}
.main-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-image: linear-gradient(to right, var(--primary-color), var(--accent-color-2));
}

.main-nav { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; height: 100%; }
.logo { font-family: 'Courier New', Courier, monospace; font-weight: 700; font-size: 1.3em; color: var(--dark-color); }
.logo-math-accent { color: var(--primary-color); }
.main-nav ul { margin: 0; padding: 0; list-style: none; display: flex; gap: 35px; }
.main-nav a { 
    text-decoration: none; 
    color: var(--text-color); 
    font-weight: 500; 
    padding: 20px 15px;
    position: relative; 
    transition: color 0.3s ease; 
}
.main-nav a:hover { color: var(--accent-color-2); }
.main-nav a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 50%; transform: translateX(-50%); background-color: var(--accent-color); transition: width 0.3s ease; }
.main-nav a:hover::after { background-color: var(--accent-color-2); width: 100%; }

/* --- Sekcja Hero --- */
.hero-background-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    color: var(--light-text-color);
    padding: 80px 40px;
    min-height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('hero-video-poster.webp');
    background-size: cover;
    background-position: center center;
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 46, 0.6);
    z-index: 2;
}
.hero-content { z-index: 3; position: relative; }
.hero-content h1 { font-size: 3.2em; margin-bottom: 20px; line-height: 1.2; }
.subtitle { font-size: 1.2em; max-width: 600px; margin: 0 auto 30px; }
.cta-button { 
    display: inline-block; 
    background-color: var(--accent-color-2); 
    color: var(--dark-color); /* Zmiana koloru tekstu na ciemny */
    padding: 15px 30px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: bold; 
    transition: all 0.3s ease; 
    border: none; 
    cursor: pointer; 
}
.cta-button:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4); 
    background-color: #e4af05; 
}

/* --- Sekcje Ogólne --- */
.content-section { padding: 80px 20px; max-width: 1100px; margin: 0 auto; text-align: center; }
/* Zmniejszamy margines dolny, aby sekcje były bliżej siebie */
#start.content-section, #jak-ucze.content-section {
    padding-bottom: 40px;
}
#jak-ucze.content-section, #oferta.content-section {
    padding-top: 40px;
}

.content-section h2 { font-size: 2.5em; margin-bottom: 20px; color: var(--dark-color); position: relative; display: inline-block; }
.section-subtitle { font-size: 1.1em; color: #555; max-width: 700px; margin: 0 auto 60px; }
.content-section h2::after { 
  content: ''; 
  width: 80px; 
  height: 4px; 
  background-image: linear-gradient(to right, var(--primary-color), var(--accent-color-2));
  position: absolute; 
  bottom: -15px; 
  left: 50%; 
  transform: translateX(-50%); 
}

/* --- Sekcja "Jak uczę?" --- */
#jak-ucze {
    background-color: transparent; /* Usunięcie tła, bo sekcja jest teraz "pusta" */
}

.jak-ucze-background-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.jak-ucze-text-content {
    position: relative;
    z-index: 10;
    padding: 60px 40px;
    color: var(--white-color);
}

.jak-ucze-text-content h2,
.jak-ucze-text-content .section-subtitle,
.jak-ucze-text-content h3 {
    color: var(--white-color);
}

.jak-ucze-text-content h2::after {
    background-image: linear-gradient(to right, var(--white-color), var(--accent-color-2));
}

.jak-ucze-container {
    text-align: left;
    margin-top: 60px;
}

.jak-ucze-timeline {
    position: relative;
    padding-bottom: 20px;
}
.jak-ucze-timeline h3 {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 40px;
}

/* --- DESKTOP STYLES for Timeline (domyślne) --- */
.timeline { 
    display: flex; 
    justify-content: space-between; 
    position: relative;
    margin-bottom: 40px; 
}
.timeline::before { 
    content: ''; 
    position: absolute; 
    top: 10px; 
    left: 5%; 
    width: 90%; 
    height: 2px; 
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 5;
}
.timeline-item { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    cursor: pointer; 
    padding: 0 10px; 
}
.timeline-item-content {
    display: contents;
}
.timeline-dot { 
    /* Usunięto styl kropki na rzecz ikony */
    width: auto; 
    height: auto; 
    position: relative; 
    z-index: 10;
    transition: background-color 0.3s ease; 
    display: flex;
    justify-content: center;
    align-items: center;
}
.timeline-dot i {
    color: var(--accent-color-2);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}
.timeline-item:hover .timeline-dot i { 
    color: var(--white-color);
}
.timeline-step { 
    margin-top: 15px; 
    font-weight: bold; 
}
.timeline-item-description {
    display: none;
}
#timeline-description-desktop {
    margin-top: 20px;
    font-size: 1.2em;
    color: var(--light-color);
    min-height: 50px;
    transition: opacity 0.15s ease;
    font-weight: 500;
    text-align: center;
    position: relative;
}

.timeline-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.timeline-bg-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 46, 0.75);
    z-index: 2;
}

.timeline-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 1;
}
.timeline-bg-img.is-visible, .timeline-bg-img.is-visible-default {
    opacity: 1;
}


/* --- Sekcja "Oferta" --- */
.oferta-background-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 60px 40px;
    background-image: url('oferta-korepetycje-tlo.webp');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.oferta-background-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 46, 0.85);
    z-index: 1;
}

/* Ustawienie z-index dla dzieci wrappera, aby były nad overlayem */
.oferta-background-wrapper > * {
    position: relative;
    z-index: 2;
}

.oferta-background-wrapper h2, 
.oferta-background-wrapper .section-subtitle { 
    color: var(--light-color); 
}

.oferta-background-wrapper h2::after {
    background-image: linear-gradient(to right, var(--white-color), var(--accent-color-2));
}

.offer-cards-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 900px; margin: 60px auto 0; }

/* ZMIANA: Style dla przezroczystych kart */
.card { 
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px 30px; 
    border-radius: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1); 
    text-align: center; 
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease; 
    cursor: pointer; 
}
.card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); 
    background: rgba(255, 255, 255, 0.10);
}

/* Nowe style dla ikon w kartach */
.card-icon { 
    color: var(--accent-color-2); 
    margin-bottom: 20px; 
}
.card-icon i {
    font-size: 3em;
}

.card h3 { 
    margin-bottom: 15px; 
    font-size: 1.5em; 
    color: var(--light-color);
}
.card p { 
    font-size: 1em; 
    color: var(--light-text-color); 
    margin-bottom: 25px; 
    min-height: 70px; 
}
.card-button { 
    background: none; 
    border: 2px solid var(--accent-color-2); 
    color: var(--accent-color-2); 
    padding: 10px 20px; 
    border-radius: 50px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: all 0.3s ease; 
    /* Dodajemy stylizację, aby przycisk był widoczny */
    display: inline-block;
    text-decoration: none;
}
.card-button:hover { 
    background: var(--accent-color-2); 
    color: var(--dark-color); 
    border-color: var(--accent-color-2); 
}

/* --- Sekcja "Dlaczego warto?" --- */
#korzysci { background-color: var(--white-color); }
.korzysci-container {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 60px;
}
.korzysci-text {
    flex: 1.5;
    text-align: left;
}
.korzysci-text h2 {
    text-align: center;
}
.korzysci-image-and-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.korzysci-image-and-text img {
    width: 100%;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px; /* Dodany odstęp */
}
.image-description {
    font-size: 0.95em;
    color: #555;
    line-height: 1.6;
    max-width: 400px;
}
.benefits-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; text-align: center; margin-top: 60px; }
.benefit-item i {
    font-size: 2.5em;
    color: var(--accent-color-2); 
    margin-bottom: 15px; 
}
.benefit-item h3 { margin: 0 0 10px 0; font-size: 1.2em; color: var(--dark-color); }
.benefit-item p { font-size: 0.95em; color: #555; }

/* --- Sekcja "Kontakt" --- */
#kontakt { background-color: var(--dark-color); }
#kontakt h2, #kontakt .section-subtitle, #kontakt .contact-details h3, #kontakt .contact-details p { color: var(--light-color); }
.contact-container { display: flex; flex-wrap: wrap; gap: 40px; text-align: left; margin-top: 60px; }
.contact-form { flex: 2; display: flex; flex-direction: column; gap: 15px; min-width: 300px; }
.contact-form input, .contact-form textarea { 
    width: 100%; 
    padding: 15px; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    font-family: inherit; 
    min-height: 50px;
    box-sizing: border-box;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-color); }
.contact-details { flex: 1; min-width: 250px; }
.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}
.contact-detail-item i {
    font-size: 24px;
    color: var(--accent-color-2);
    flex-shrink: 0;
}
.contact-form .cta-button {
    background-color: var(--accent-color-2);
    color: var(--dark-color); /* Zmiana koloru tekstu na ciemny */
    border-color: var(--accent-color-2);
}

/* --- Okno Modal/Pop-up i klasy pomocnicze --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: var(--white-color); padding: 40px; border-radius: 10px; max-width: 600px; width: 90%; position: relative; transform: scale(0.9); transition: transform 0.3s ease; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close { position: absolute; top: 15px; right: 15px; font-size: 1.5em; color: #888; cursor: pointer; border: none; background: none; }
.modal-content h3 { margin-top: 0; color: var(--dark-color); }
.modal-content p { white-space: pre-wrap; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Stopka --- */
footer { 
    text-align: center; 
    padding: 30px; 
    background-color: var(--dark-color); 
    color: var(--light-text-color); 
    font-size: 0.9em; 
}

/* --- Responsywność --- */
@media (max-width: 920px) {
    .offer-cards-container { grid-template-columns: 1fr 1fr; }
    .korzysci-container { flex-direction: column; }
    .korzysci-image-and-text { order: -1; margin-bottom: 40px; }
}

@media (max-width: 768px) {
    .main-nav { flex-direction: column; justify-content: center; padding: 10px; }
    .main-nav ul { gap: 20px; margin-top: 10px; }
    .logo { font-size: 1.1em; }
    .hero-content h1 { font-size: 2.2em; }
    .content-section h2 { font-size: 2em; }
    .contact-container { flex-direction: column; }
    
    /* --- MOBILE STYLES for Timeline --- */
    .jak-ucze-background-wrapper .timeline-bg-container { display: block; }

    .jak-ucze-text-content {
        padding: 40px 20px;
    }

    .timeline { 
        flex-direction: column; 
        gap: 15px; 
        align-items: center; 
    }
    .timeline::before { display: none; }
    #timeline-description-desktop { display: none; }

    .timeline-item {
        position: relative;
        overflow: hidden;
        border-radius: 15px;
        width: 100%;
        max-width: 450px;
        transition: all 0.4s ease-in-out;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        background-color: rgba(0,0,0,0.2);
        cursor: pointer;
        border: 1px solid rgba(255,255,255,0.2);
    }
    .timeline-item.active {
        background-color: rgba(0,0,0,0.4);
    }

    .timeline-item-description {
        display: none;
        margin-top: 15px;
        font-size: 1.1em;
        font-weight: 400;
        text-align: center;
        max-height: 0;
        opacity: 0;
        transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
    }
    .timeline-item.active .timeline-item-description {
        display: block;
        max-height: 200px;
        opacity: 1;
    }
}

@media (max-width: 620px) {
    .offer-cards-container { grid-template-columns: 1fr; }
    .benefits-container { grid-template-columns: 1fr; }
}

#form-status {
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
    width: 100%;
    min-height: 20px;
    color: white;
}

#form-status.success {
    color: #2ecc71;
}

#form-status.error {
    color: #e74c3c;
}

/* Nowe style dla banera z polityką cookies */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 46, 0.95);
    color: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    z-index: 1001;
    transition: transform 0.5s ease-in-out;
    transform: translateY(0);
}

#cookie-banner.hidden {
    transform: translateY(100%);
}

#cookie-banner p {
    margin: 0;
    font-size: 0.9em;
}

#cookie-banner a {
    color: var(--accent-color-2);
    text-decoration: underline;
}

#accept-cookies-btn {
    background-color: var(--accent-color-2);
    color: var(--dark-color);
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#accept-cookies-btn:hover {
    background-color: #e4af05;
}

@media (max-width: 600px) {
    #cookie-banner {
        flex-direction: column;
        text-align: left;
    }

    #cookie-banner p {
        flex-grow: 1;
    }
}