/* Plik CSS - zaktualizowany o optymalizację renderowania */

: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); white-space: nowrap; }
.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%; }

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2.0rem;
    color: var(--dark-color); 
    -webkit-appearance: none;
    padding: 10px;
    transition: color 0.3s ease;
}
.hamburger-menu:hover { color: var(--accent-color-2); }

/* --- 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);
    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; }
#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; }
.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; }

.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 { 
    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: linear-gradient(135deg, rgb(184 185 189 / 19%), rgba(26, 26, 46, 0.95));
    z-index: 1;
}
.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: 1200px; margin: 60px auto 0; }
.card { 
    background: rgba(255, 255, 255, 0.05); 
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 3px solid rgba(255, 193, 7, 0.9);
    padding: 40px 20px; 
    border-radius: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
    text-align: center; 
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease; 
    cursor: pointer; 
}
.card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 15px 40px rgba(255, 193, 7, 0.15); 
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-color-2); 
}
.card-icon { color: var(--accent-color-2); margin-bottom: 20px; transition: text-shadow 0.3s ease; }
.card-icon i { font-size: 3em; }
.card:hover .card-icon { text-shadow: 0 0 15px rgba(255, 193, 7, 0.6); }
.card h3 { margin-bottom: 15px; font-size: 1.5em; color: var(--white-color); text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.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; 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 Cennik --- */
#cennik { background-color: var(--light-color); padding: 80px 20px; }
.pricing-container { display: flex; flex-direction: column; align-items: center; gap: 40px; max-width: 1000px; width: 100%; margin: 0 auto; }
.pricing-box {
    background: linear-gradient(135deg, var(--dark-color), #2c2c54);
    color: var(--white-color);
    padding: 60px 40px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    text-align: center;
    width: 100%;
    max-width: 1000px;
}
.price-main { font-size: 3.5em; font-weight: 700; color: var(--accent-color-2); margin-bottom: 10px; }
.pricing-tags-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.keyword-tag {
    color: var(--accent-color-2);
    border: 1px solid var(--accent-color-2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}
.keyword-tag:hover { background-color: var(--accent-color-2); color: var(--dark-color); transform: translateY(-3px); }

/* --- 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; }
.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 Opinie --- */
#opinie { background-color: var(--light-color); }
.reviews-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; text-align: left; }
.review-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-left: 5px solid var(--accent-color-2);
    transition: transform 0.3s ease;
}
.review-card:hover { transform: translateY(-5px); }
.review-stars { color: var(--accent-color-2); margin-bottom: 15px; font-size: 0.9em; }
.review-text { font-style: italic; color: #555; margin-bottom: 20px; line-height: 1.6; }
.review-author { font-weight: 700; color: var(--dark-color); font-size: 1em; }
.review-role { font-weight: 400; font-size: 0.9em; color: #595959; }

/* --- 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); border-color: var(--accent-color-2); }
.rodo-note { font-size: 0.75em; color: #bbb; margin-top: 5px; text-align: center; line-height: 1.4; }
.rodo-note a { color: var(--accent-color-2); text-decoration: underline; }

/* --- Modal i pozostałe --- */
.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; 
    cursor: pointer;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close { position: absolute; top: 15px; right: 15px; font-size: 1.5em; color: #000; cursor: pointer; border: none; background: none; font-weight: bold; }
.modal-content h3 { margin-top: 0; color: var(--dark-color); }
.modal-content p, .modal-content div { 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;
}

footer { text-align: center; padding: 30px; background-color: var(--dark-color); color: var(--light-text-color); font-size: 0.9em; }

#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; }

#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; }

@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/webfonts/fa-solid-900.woff2) format('woff2');
  unicode-range: U+0-10FFFF;
}

/* 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) {
    .hamburger-menu { display: block; }
    .main-nav { flex-direction: row; justify-content: space-between; padding: 0 20px; position: relative; }
    .logo { font-size: 1.0em; max-width: 70%; white-space: normal; }
    .main-nav ul { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background-color: rgba(255, 255, 255, 0.98); box-shadow: 0 5px 10px rgba(0,0,0,0.1); padding: 20px 0; gap: 0; text-align: center; }
    .main-nav ul.active { display: flex; }
    .main-nav ul li { width: 100%; }
    .main-nav a { display: block; padding: 15px; border-bottom: 1px solid #eee; }
    .main-nav a:hover::after { width: 0; }
    .hero-content h1 { font-size: 2.2em; }
    .content-section h2 { font-size: 2em; }
    .contact-container { flex-direction: column; }
    .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; }
    .oferta-background-wrapper { padding: 40px 0; }
    .offer-cards-container { margin-top: 30px; padding: 0 10px; }
    .card { padding: 40px 15px; margin: 0; width: 100%; box-sizing: border-box; }
    .pricing-box { padding: 40px 15px; }
    .keyword-tag { font-size: 0.75rem; padding: 5px 10px; }
    .pricing-tags-container { gap: 8px; }
}

@media (max-width: 620px) {
    .offer-cards-container { grid-template-columns: 1fr; }
    .benefits-container { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    #cookie-banner { flex-direction: column; text-align: left; }
    #cookie-banner p { flex-grow: 1; }
}

/* --- ZABEZPIECZENIE ANTYSPAMOWE (Honeypot) --- */
/* To ukrywa pole pułapki przed oczami użytkowników, ale boty je widzą */
.ohnohoney {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
    overflow: hidden;
}