/* === ZMIENNE I RESET === */
:root {
    --color-primary: #FFD700; /* Złoty akcent */
    --color-secondary: #0A2342; /* Głęboki granat */
    --color-tertiary: #19524A; /* Elegancka zieleń */
    --color-background: #FFFFFF; /* Tło pozostaje białe */
    --color-text: #2c3e50;
    --color-light-grey: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === NAWIGACJA === */
.navbar {
    background: #fff;
    padding: 1rem 0;
    box-shadow: none;
    border-bottom: 2px solid var(--color-tertiary);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--color-tertiary);
    text-decoration: none;
}

.nav-links {
    display: flex;
}

.nav-links ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-secondary);
    transition: all 0.3s ease;
}

/* === SEKCJE (PODSTRONY) === */
.page {
    display: none;
    padding: 80px 0;
    animation: fadeIn 0.8s ease-in-out;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 30px;
    color: var(--color-tertiary);
    text-transform: uppercase;
}

/* === SEKCJA GŁÓWNA (HERO) === */
.hero {
    background: url('kort.jpeg') no-repeat center center/contain;
    background-color: #fff;
    color: #fff;
    text-align: center;
    padding: 150px 20px;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 
        2px 2px 0 var(--color-secondary),
       -2px -2px 0 var(--color-secondary),
        2px -2px 0 var(--color-secondary),
       -2px 2px 0 var(--color-secondary),
        5px 5px 10px rgba(0,0,0,0.5);
}

.free-courts-badge {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 12px 25px;
    border-radius: 50px;
    display: inline-block;
    margin-top: 25px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: 1.2rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid var(--color-primary);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.free-courts-badge:hover {
    transform: scale(1.05);
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* Animacja na scroll */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === REZERWACJE === */
.reservations-links {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-button {
    padding: 18px 40px;
    text-decoration: none;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    display: inline-block;
}

.google-calendar-btn { background-color: #4285F4; }
.whatsapp-btn { background-color: #25D366; }

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.subsection-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-top: 60px;
    margin-bottom: 25px;
    color: var(--color-secondary);
}

/* Akordeon */
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item { border: 1px solid var(--color-light-grey); border-radius: 10px; margin-bottom: 15px; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.accordion-header { background-color: #fff; padding: 20px 25px; cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.3s ease; color: var(--color-secondary); font-family: 'Montserrat', sans-serif; }
.accordion-header:hover { background-color: #f9f9f9; }
.accordion-header::after { content: '+'; font-size: 1.8rem; transition: transform 0.3s ease; }
.accordion-item.active .accordion-header::after { transform: rotate(45deg); }
.accordion-content { 
    padding: 0 25px; 
    max-height: 0; 
    transition: max-height 0.4s ease-out, padding 0.4s ease-out; 
    overflow: hidden; 
    background-color: #fafafa; 
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.accordion-item.active .accordion-content { max-height: 5000px; padding: 25px; }

/* === LIGA - NOWE STYLE KONTROLEK === */
.league-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.year-selector, .group-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.control-btn {
    border: 2px solid var(--color-light-grey);
    background-color: transparent;
    color: var(--color-text);
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
}

.control-btn:hover {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.control-btn.active {
    background-color: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

.group-selector-wrapper {
    display: flex;
}

/* Styl dla listy Top 3 */
.top-three-list {
    max-width: 500px;
    margin: 20px auto;
    text-align: center;
}
.top-three-list h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--color-tertiary);
    margin-bottom: 20px;
}
.top-three-list p {
    font-size: 1.2rem;
    padding: 10px;
    border-bottom: 1px solid var(--color-light-grey);
}
.top-three-list p:last-child {
    border-bottom: none;
}
.top-three-list span {
    margin-right: 15px;
    font-size: 1.5rem;
}

.table-container {
    overflow-x: auto;
    margin-top: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.league-table { 
    width: 100%; 
    border-collapse: collapse; 
    background-color: #fff; 
    min-width: 600px; 
}
.league-table th, .league-table td { text-align: left; padding: 18px; border-bottom: 1px solid var(--color-light-grey); }
.league-table th { background-color: var(--color-secondary); color: #fff; font-family: 'Montserrat', sans-serif; text-transform: uppercase; }
.league-table tr:last-child td { border-bottom: none; }

/* === KONTAKT === */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--color-light-grey);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* === STOPKA === */
.footer {
    background: var(--color-secondary);
    color: #fff;
    padding: 40px 0;
    text-align: center;
}

.footer p { font-size: 0.9rem; opacity: 0.8; margin: 5px 0; }
.footer a { color: var(--color-primary); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* === DODATKOWE ELEMENTY === */
.alert-info {
    background-color: #fff3cd;
    color: #856404;
    padding: 18px 25px;
    border-radius: 10px;
    border-left: 6px solid #ffeeba;
    max-width: 800px;
    margin: 0 auto 30px auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.alert-info strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.2rem;
    color: #664d03;
}

/* === RESPONSIVE DESIGN (MOBILE-FIRST) === */
@media (max-width: 768px) {
    .page {
        padding: 60px 0;
    }

    .nav-links {
        position: absolute;
        top: 75px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }
    
    .nav-links.active {
        max-height: 300px;
    }

    .nav-links ul {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
        gap: 0;
    }
    
    .nav-links li {
        text-align: center;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 15px 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .hero { 
        padding: 80px 20px;
        min-height: 60vh;
        background-size: cover;
        background-position: center center;
    }
    
    .league-table thead th:first-child {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
        z-index: 2;
    }
    .league-table tbody td:first-child {
        position: -webkit-sticky;
        position: sticky;
        left: 0;
        z-index: 1;
        background-color: #fff; 
        color: var(--color-text);
        font-weight: 700;
    }

    .contact-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}