/* ================= GLOBALNE ================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: #050505;
    color: #e0e0e0;
    line-height: 1.6;
    overflow-x: hidden;
    background: #050505;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #e00;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c00;
}

::selection {
    background: #e00;
    color: #fff;
}

/* ================= HEADER ================= */
header {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
    width: 100%;
    height: 70px;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-family: 'Segoe UI Black', sans-serif;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo-akro {
    color: #e00;
    text-shadow: 0 0 15px rgba(220, 0, 0, 0.6);
}

.logo-city {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-left: 8px;
    opacity: 0.9;
}

/* Kontener dla menu desktopowego */
header nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-links {
    display: flex;
    align-items: center;
}

header nav a {
    color: #bbb;
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    white-space: nowrap;
}

header nav a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

header nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #e00;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px #e00;
}

header nav a:hover::after {
    width: 100%;
}

/* Grupa przycisków */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 25px;
    padding-left: 25px;
    border-left: 1px solid #333;
    height: 40px;
}

.register-btn {
    color: #e00 !important;
    border: 1px solid #e00;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.3s;
    margin: 0 !important;
    white-space: nowrap;
    text-transform: uppercase;
}

.register-btn:hover {
    background-color: rgba(220, 0, 0, 0.1);
    box-shadow: 0 0 10px rgba(220, 0, 0, 0.3);
}

.register-btn::after {
    display: none !important;
}

.login-btn,
.logout-btn {
    background: linear-gradient(135deg, #e00 0%, #a00 100%);
    padding: 7px 18px;
    border-radius: 20px;
    color: #fff !important;
    font-weight: 700;
    font-size: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f00;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0 !important;
    white-space: nowrap;
    text-transform: uppercase;
}

.login-btn:hover,
.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(220, 0, 0, 0.6);
}

/* ================= HERO (NOWE USTAWIENIA - LIMIT WYSOKOŚCI) ================= */
.hero {
    position: relative;
    width: 100%;
    /* Ograniczamy wysokość na sztywno, żeby wielkie zdjęcia nie rozsadzały ekranu */
    height: 55vh;
    min-height: 400px;
    max-height: 600px;
    /* Maksymalna wysokość paska */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

body:not(.home-page) .hero {
    height: 45vh;
    min-height: 350px;
    max-height: 500px;
}

.hero img {
    width: 100%;
    height: 100%;
    /* Wypełnij kontener */
    display: block;
    /* Używamy COVER, aby wypełnić pasek bez względu na proporcje zdjęcia */
    object-fit: cover;
    /* Wyświetlaj środek zdjęcia */
    object-position: center center;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, #050505, transparent);
    pointer-events: none;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* Tekst na Hero - PRZESUNIĘTY NA DÓŁ (BOTTOM RIGHT) */
.hero-text {
    position: absolute;
    top: auto;
    /* Wyłączamy centrowanie pionowe */
    bottom: 40px;
    /* Margines od dołu */
    right: 5%;
    /* Prawa strona */
    left: auto;
    transform: none;
    /* Usuwamy przesunięcie transform */

    text-align: right;
    color: #fff;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 6px solid #e00;
    border-bottom: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.hero-logo-line {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: flex-end;
    /* Wyrównanie do prawej */
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.hero-logo-line img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.hero-akro {
    font-family: 'Segoe UI Black', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: #e00;
    text-transform: uppercase;
    text-shadow: 0 0 25px rgba(220, 0, 0, 0.8);
    line-height: 1.2;
}

.hero-city {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.hero-text p {
    font-size: 16px;
    color: #ddd;
    line-height: 1.5;
    margin: 0;
    font-weight: 400;
}

/* ================= SEKCJE (SZEROKIE - FULL WIDTH) ================= */
.section {
    padding: 80px 0;
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

.container {
    width: 96%;
    max-width: none;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section h2 {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 80px;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section h2::after {
    content: '';
    display: block;
    width: 120px;
    height: 5px;
    background: #e00;
    margin: 20px auto 0;
    box-shadow: 0 0 20px #e00;
    border-radius: 3px;
}

.section h2::before {
    content: attr(data-bg-text);
    content: 'AKROFITNESS';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 160px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    z-index: -1;
    white-space: nowrap;
    pointer-events: none;
}

/* ================= GALERIA (ROZCIĄGNIĘTA) ================= */
.galeria-strona {
    padding: 60px 2%;
    min-height: 60vh;
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Zmienione z 400px na 280px */
    gap: 30px;
    width: 100%;
}

.galeria-kafelek {
    background: #111;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
    transition: all 0.4s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    height: 100%;
}

.galeria-kafelek img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.6s ease;
    border-bottom: 1px solid #222;
}

.galeria-kafelek:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(220, 0, 0, 0.2);
    border-color: #e00;
    z-index: 2;
}

.galeria-kafelek:hover img {
    transform: scale(1.1);
}

.galeria-kafelek h3 {
    color: #fff;
    font-size: 24px;
    padding: 25px;
    margin: 0;
    text-align: center;
    background: linear-gradient(to bottom, #161616, #0a0a0a);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galeria-kafelek:hover h3 {
    color: #e00;
    text-shadow: 0 0 20px rgba(220, 0, 0, 0.5);
}

.galeria-kafelek::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #e00;
    box-shadow: 0 0 20px #e00;
    opacity: 0;
    transition: opacity 0.3s;
}

.galeria-kafelek:hover::after {
    opacity: 1;
}


/* ================= AKTUALNOŚCI / OFERTA (WIELKIE ZDJĘCIA) ================= */
.news-grid,
.oferta-grid {
    display: grid;
    /* ZMNIEJSZONA MINIMALNA SZEROKOŚĆ KOLUMNY DLA LEPSZEGO WYGLĄDU NA DUŻYCH EKRANACH */
    grid-template-columns: repeat(auto-fit, minmax(300px, 500px));
    justify-content: center;
    gap: 40px;
    width: 100%;
    align-items: stretch;
    /* Karty rozciągają się do tej samej wysokości */
}

.news-card,
.oferta-card {
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid #333;
    border-left: 6px solid #e00;
    transition: all 0.4s;
    display: flex;
    flex-direction: column;
    /* Zmieniono z 800px na mniejszą wartość */
    min-height: 500px;
    padding: 0;
}

/* Wspólne style dla zdjęcia w karcie */
.news-card img,
.oferta-card img {
    width: 100%;
    /* Zmniejszono z 600px na 300px */
    height: 300px;
    object-fit: cover;
    margin: 0;
    border-bottom: 1px solid #333;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* Kontener treści w karcie */
.news-content-wrapper,
.oferta-content-wrapper {
    padding: 30px;
    background: linear-gradient(to bottom, #161616, #0a0a0a);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.oferta-card h3 {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 20px 25px 10px;
}

.oferta-card p {
    color: #bbb;
    font-size: 16px;
    line-height: 1.7;
    margin: 0 25px 25px;
    flex-grow: 1;
    /* Wypełnia dostępną przestrzeń */
}

/* Efekty hover */
.news-card:hover,
.oferta-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 20px rgba(220, 0, 0, 0.3);
    border-color: #555;
    z-index: 2;
}

.news-date {
    color: #e00;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
    padding: 0 25px;
    margin-top: 20px;
}

.news-title {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.3;
    padding: 0 25px;
}

.news-content {
    color: #bbb;
    font-size: 16px;
    line-height: 1.7;
    padding: 0 25px 25px;
}

/* ================= MODAL ================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #111;
    margin: 5% auto;
    padding: 50px;
    border: 1px solid #333;
    border-left: 8px solid #e00;
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    color: #fff;
    box-shadow: 0 0 80px rgba(220, 0, 0, 0.2);
    position: relative;
    background-image: radial-gradient(circle at top right, #1a1a1a, #0a0a0a);
}

.modal-content h2 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 18px;
    margin: 10px 0 25px;
    border: 1px solid #333;
    border-radius: 10px;
    background-color: #080808;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s;
}

.modal-content input:focus {
    outline: none;
    border-color: #e00;
    box-shadow: 0 0 20px rgba(220, 0, 0, 0.3);
    background-color: #000;
}

.modal-content button {
    background: linear-gradient(135deg, #e00 0%, #a00 100%);
    color: #fff;
    border: none;
    padding: 18px;
    width: 100%;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(220, 0, 0, 0.4);
}

.modal-content button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 40px rgba(220, 0, 0, 0.6);
}

.modal .close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 40px;
    cursor: pointer;
    color: #555;
    transition: color 0.3s;
}

.modal .close:hover {
    color: #e00;
}

.login-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #ff6b6b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid rgba(220, 53, 69, 0.3);
    font-weight: 600;
}

body.aktualnosci-page .hero-text {
    display: none !important;
}

/* ================= KADRA (TRENERZY) - BASE STYLES ================= */
.trainer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.trainer-card {
    background-color: #222;
    border-left: 5px solid #e00;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    min-height: 520px;
    text-align: center;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 10px;
    transition: transform 0.3s;
}

.trainer-card:hover {
    transform: translateY(-5px);
}

.trainer-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
}

.trainer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.trainer-card h3 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 10px;
}

.trainer-card p {
    font-size: 16px;
    color: #ccc;
    margin: 5px 0;
    flex-grow: 1;
}

/* ================= KONTAKT - BASE STYLES ================= */
.kontakt-strona {
    background-color: #111;
    color: #fff;
    padding: 60px 20px;
}

.kontakt-strona h2 {
    font-size: 3em;
    color: #e00;
    text-align: center;
    margin-bottom: 40px;
}

.kontakt-blok {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
}

.kontakt-dane {
    flex: 1 1 40%;
    font-size: 18px;
    line-height: 1.7;
}

.kontakt-formularz {
    flex: 1 1 50%;
}

.kontakt-formularz form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kontakt-formularz input,
.kontakt-formularz textarea {
    padding: 16px;
    font-size: 18px;
    border-radius: 8px;
    border: none;
    background-color: #222;
    color: #fff;
    width: 100%;
}

.kontakt-formularz textarea {
    resize: vertical;
    min-height: 150px;
}

.kontakt-formularz button {
    background-color: #e00;
    color: #fff;
    border: none;
    padding: 14px 30px;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.kontakt-formularz button:hover {
    background-color: #c00;
}

.kontakt-ikony {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.kontakt-ikony img {
    height: 32px;
}

/* ================= GLOBALNA RESPONSYWNOŚĆ - WSZYSTKIE PODSTRONY ================= */
.menu-toggle {
    display: none;
    color: #fff;
    cursor: pointer;
    z-index: 9999;
    width: 50px;
    height: 50px;
    /* Nadpisane przez media query */
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle svg {
    width: 32px;
    height: 32px;
}

@media (max-width: 1250px) {
    header {
        height: 70px;
        padding: 0 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #000 !important;
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 4000;
    }

    .logo {
        max-width: 70%;
        font-size: 18px;
    }

    .logo-city {
        display: none;
        /* Ukrywamy miasto na bardzo małych ekranach, żeby menu się zmieściło */
    }

    .menu-toggle {
        display: flex;
    }

    /* MENU MOBILNE - PEŁNE KRYCIE I UKŁAD PIONOWY */
    header nav {
        display: none !important;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(0, 0, 0, 0.95) !important;
        /* create solid contrast */
        flex-direction: column !important;
        /* Wymuszenie pionu */
        padding: 20px 0;
        border-bottom: 5px solid #e00;
        z-index: 9999;
        overflow-y: auto;
    }

    header nav.open {
        display: flex !important;
    }

    /* Linki w menu - MUSZĄ BYĆ PIONOWO */
    .nav-links {
        flex-direction: column !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        gap: 0 !important;
        /* Zero odstępów */
    }

    header nav a {
        width: 100%;
        text-align: center;
        padding: 8px;
        /* Zmniejszono do 8px */
        font-size: 13px;
        /* Zmniejszono do 13px */
        border-bottom: 1px solid #111;
        color: #fff !important;
        margin: 0 !important;
        line-height: 1.2;
    }

    .auth-buttons {
        margin: 0 !important;
        padding: 10px !important;
        border: none !important;
        flex-direction: row !important;
        /* Obok siebie */
        justify-content: center;
        width: 100% !important;
        gap: 15px !important;
        height: auto !important;
    }

    /* SEKCJA HERO - NAPRAWA WIDOCZNOŚCI ZDJĘCIA */
    .hero {
        margin-top: 70px;
        height: auto !important;
        min-height: auto !important;
        flex-direction: column !important;
        display: flex !important;
    }

    /* Usuwamy ciemne nakładki, żeby zdjęcie było wyraźne */
    .hero::before,
    .hero::after {
        display: none !important;
    }

    .hero img {
        height: auto !important;
        /* Pozwala na zachowanie proporcji */
        width: 100% !important;
        object-fit: contain !important;
        /* Gwarantuje widoczność całego zdjęcia */
        display: block !important;
        max-height: 50vh;
        /* Zabezpieczenie przed zbyt wysokimi pionowymi zdjęciami */
    }

    .hero-text {
        position: relative !important;
        transform: none !important;
        width: 100% !important;
        top: 0 !important;
        right: 0 !important;
        background: #050505 !important;
        padding: 15px !important;
        text-align: center;
        border: none !important;
        border-top: 3px solid #e00 !important;
        margin-top: 0 !important;
        /* Zero nakładania na zdjęcie */
        z-index: 10;
    }

    .hero-logo-line {
        justify-content: center;
        gap: 8px;
        margin-bottom: 5px;
    }

    .hero-logo-line img {
        height: 28px !important;
        width: auto !important;
    }

    .hero-akro {
        font-size: 18px !important;
    }

    .hero-city {
        font-size: 14px !important;
    }

    .hero-text p {
        font-size: 12px !important;
        line-height: 1.2;
    }

    /* Reszta siatek */
    .news-grid,
    .oferta-grid,
    .galeria-grid,
    .trainer-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        display: grid !important;
        gap: 15px !important;
        padding: 10px !important;
    }

    .trainer-card {
        width: 100% !important;
        margin: 0 !important;
    }

    .kontakt-blok {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .section h2 {
        font-size: 24px !important;
        margin-bottom: 30px !important;
    }

    .section h2::before {
        display: none !important;
    }
}

/* Fix dla podstron aktualności */
body.aktualnosci-page .hero-text {
    display: none !important;
}