/* --- STYLE DLA LOGO PNG --- */

    /* 1. Stan początkowy: Na górze strony (ciemne tło obrazka) */
    .navbar-transparent.navbar-dark .navbar-brand img {
        filter: brightness(0) invert(1);
        transition: filter 0.4s ease, height 0.3s ease;
    }

    /* 2. Stan po przewinięciu LUB gdy menu jest jasne */
    .navbar-light .navbar-brand img,
    .navbar-scrolled .navbar-brand img {
        filter: none !important;
    }

    /* WYJĄTEK DLA MOBILEX: Jeśli menu jest otwarte, wymuś białe logo na ciemnym tle */
    @media (max-width: 991.98px) {
        .navbar-collapse.show ~ .navbar-brand img, 
        .navbar-transparent .navbar-brand img {
             /* Na mobile w trybie transparentnym logo musi być białe */
             filter: brightness(0) invert(1) !important;
        }
    }

/* --- CUSTOM CSS --- */


/* 1. Header Hero - Obrazek pod menu */

/* --- HERO HEADER SLIDER --- */

/* Kontener */
.hero-header {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

/* 1. Stan bazowy (Nieaktywny / Znikający) */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;

    /* Wygląd: Niewidoczny i bez zooma */
    opacity: 0;
    transform: scale(1.0);

    /* KLUCZ: Jedno transition dla obu właściwości */
    transition: opacity 1.5s ease-in-out, transform 7s linear;
}

/* 2. Stan aktywny (Widoczny) */
.hero-bg.active {
    opacity: 1;
    /* Nie dodajemy tutaj transition, dziedziczy z .hero-bg */
}

/* 3. Stan powiększenia (Uruchamiany przez JS) */
.hero-bg.zoomed {
    transform: scale(1.1);
    /* Nie dodajemy tutaj transition, dziedziczy z .hero-bg */
}

/* Pozostałe warstwy (bez zmian) */
.hero-overlay {
    z-index: 1;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
}
.hero-content {
    z-index: 2;
    position: relative;
    text-align: center;
}

/* Ciemna nakładka na obrazek, żeby tekst był czytelny */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* 2. Navbar - Logika bazowa i Desktop */
.navbar {
    transition: all 0.4s ease;
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 0; /* Brak zaokrągleń paska głównego */
}

.navbar-brand img {
    height: 95px;
    transition: height 0.3s;
}

.navbar-transparent {
    background-color: transparent;
    box-shadow: none;
}

.navbar-transparent .nav-link,
.navbar-transparent .navbar-brand {
    color: white !important;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.navbar-scrolled {
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.navbar-scrolled .nav-link,
.navbar-scrolled .navbar-brand {
    color: #333 !important;
    text-shadow: none;
}

.navbar-scrolled .navbar-brand img {
    height: 65px;
}

/* --- JEDNA, ZUNIFIKOWANA SEKCJA MOBILNA (Breakpoint: 992px) --- */
@media (max-width: 991.98px) {
    /* Stabilizacja paska górnego */
    .navbar > .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        height: 70px;
    }

    /* NOWOŚĆ: Wymuszenie białego tła dla paska głównego, gdy menu jest OTWARTE */
    .navbar:has(.navbar-collapse.show),
    .navbar.navbar-scrolled {
        background-color: #ffffff !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    }

    /* Gdy menu jest OTWARTE, logo musi być kolorowe (nie białe) */
    .navbar:has(.navbar-collapse.show) .navbar-brand img {
        filter: none !important;
    }

    .navbar-brand img {
        height: 45px !important;
    }

    /* Wysuwany panel menu - Biały, bez zaokrągleń, na całą szerokość */
    .navbar-collapse {
        position: absolute;
        top: 100%; /* Zaczyna się idealnie pod paskiem */
        left: 0;
        right: 0;
        background-color: #ffffff !important;
        padding: 0 !important; /* Reset paddingu dla czystych linii */
        margin: 0 !important;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        border-radius: 0 !important; /* BRAK ZAOKRĄGLEŃ */
        z-index: 1000;
    }

    /* Naprawa kolorów i układu linków w panelu */
    .navbar-nav {
        padding: 10px 0 !important;
    }

    .navbar-nav .nav-link {
        color: #222 !important; /* Zawsze ciemny tekst na białym panelu */
        text-shadow: none !important; /* Brak cieni na mobile */
        padding: 15px 25px !important;
        border-bottom: 1px solid #f5f5f5;
        text-align: left;
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    /* Przycisk admina w menu mobilnym */
    .navbar-nav .btn-primary {
        margin: 15px 25px !important;
        width: calc(100% - 50px);
        border-radius: 5px !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
    }

    /* Hamburger i jego ikona */
    .navbar-toggler {
        border: none !important;
        padding: 0;
    }

    /* Ikona: biała na przezroczystym, czarna na białym lub gdy menu otwarte */
    .navbar-transparent .navbar-toggler-icon {
        filter: brightness(0) invert(1);
    }
    
    .navbar-scrolled .navbar-toggler-icon,
    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
        filter: none !important;
    }

    /* Hero Header - Poprawki wysokości i czcionek na mobile */
    .hero-header {
        height: 70vh;
    }
    .hero-header h1 {
        font-size: 2rem !important;
    }
    .hero-header .input-group {
        width: 100% !important;
    }
}

/* 3. Stopka */
footer {
    background-color: #212529;
    color: #ccc;
    padding: 40px 0;
    margin-top: auto; /* Sticky footer trick */
}

/* 4. Główny content */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding: 60px 0; /* Odstęp od góry i dołu */
}

/* --- DODATEK DO PODSTRON (BEZ HERO) --- */

/* Klasa dla sekcji <main> na podstronach, aby treść nie chowała się pod menu */
.main-with-fixed-navbar {
    /* Wysokość Twojego menu (ok. 90-100px) + odstęp estetyczny */
    padding-top: 120px;
    padding-bottom: 60px;
}

/* Wymuszenie stylów dla statycznego paska menu (jeśli potrzebne korekty) */
.navbar-static-page {
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}


/* --- KARTY REPERTUARU --- */

.event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* Żeby obrazek nie wychodził poza zaokrąglenia przy zoomie */
}

/* Efekt uniesienia po najechaniu */
.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Ustawienie stałej proporcji obrazka - kluczowe dla równych kafelków */
.event-poster-container {
    height: 250px; /* Możesz zmienić zależnie od formatu plakatów */
    overflow: hidden;
    position: relative;
}

.event-poster-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Obrazek wypełni obszar nie tracąc proporcji */
    transition: transform 0.5s ease;
}

/* Lekki zoom obrazka po najechaniu na kartę */
.event-card:hover .event-poster-container img {
    transform: scale(1.05);
}

/* Badge z datą na obrazku */
.date-badge {
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    backdrop-filter: blur(2px);
}



/* --- SZCZEGÓŁY WYDARZENIA (V2) --- */

/* 1. Tło i Czytelność */
.event-backdrop {
    position: relative;
    min-height: 500px;
    color: white;
    display: flex;
    align-items: flex-end;
    padding-bottom: 40px;
}

/* POPRAWKA MOBILNA DLA BACKDROP */
@media (max-width: 991.98px) {
    .event-backdrop {
        min-height: 250px; /* Zmniejszamy wysokość o połowę na mobile */
        padding-bottom: 20px;
        align-items: center; /* Centrujemy tekst w pionie na mniejszym obszarze */
    }

    .event-header-content {
        text-align: center;
    }

    .event-header-content h1 {
        font-size: 1.8rem !important; /* Mniejszy tytuł na telefonie */
    }

    /* Dostosowanie plakatu pod spodem */
    .poster-wrapper {
        margin-top: -80px !important; /* Mniejszy "wjazd" plakatu na tło */
        max-width: 200px; /* Nieco mniejszy plakat na telefonie */
        margin-left: auto;
        margin-right: auto;
    }
}

/* To jest właściwy obrazek w tle */
.event-bg-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center top;
    z-index: 0;
}

/* CIEMNA MASKA - To naprawia czytelność! */
.event-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Gradient: od góry lekko ciemny, na dole bardzo ciemny (żeby tekst był czytelny) */
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
    /* Alternatywa: Jednolite przyciemnienie */
    /* background: rgba(0,0,0, 0.7); */
    z-index: 1;
    backdrop-filter: blur(3px); /* Lekkie rozmycie tła dla lepszego efektu */
}

.event-header-content {
    position: relative;
    z-index: 2; /* Musi być wyżej niż maska */
    width: 100%;
}

/* 2. Plakat (Sticky) */
.poster-wrapper {
    position: sticky;
    top: 110px; /* Odstęp od góry ekranu przy scrollowaniu */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 12px;
    overflow: hidden;
    z-index: 10;
    border: 5px solid white; /* Biała ramka jak zdjęcie */
}
.poster-wrapper img { width: 100%; display: block; }

/* 3. Akordeon Terminów (Kalendarz) */
.accordion-month-button {
    font-weight: 700;
    font-size: 1.1rem;
    background-color: #f8f9fa;
    color: #333;
}
.accordion-button:not(.collapsed) {
    background-color: #e7f1ff; /* Jasnoniebieski aktywny */
    color: #0d6efd;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}
.accordion-body {
    padding: 0; /* Usuwamy padding, żeby lista dotykała krawędzi */
    background-color: #fff;
}

/* 4. Lista wewnątrz akordeonu */
.repertoire-list-item {
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.repertoire-list-item:last-child { border-bottom: none; }
.repertoire-list-item:hover { background-color: #fafafa; }

/* Data w pigułce */
.date-pill {
    text-align: center;
    background: #eee;
    border-radius: 8px;
    padding: 5px 12px;
    min-width: 60px;
}
.date-pill .day { font-weight: 800; font-size: 1.2rem; line-height: 1; }
.date-pill .weekday { font-size: 0.7rem; text-transform: uppercase; color: #666; }




/* --- WYBÓR BILETÓW (NIENUMEROWANE) --- */

/* Mniejszy header dla podstrony zakupu */
.event-header-compact {
    position: relative;
    background-color: #222;
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
    overflow: hidden;
}

/* Tło headera (rozmyte zdjęcie) */
.header-bg-blur {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    z-index: 0;
}

/* Karta wyboru biletu */
.ticket-type-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.ticket-type-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.ticket-name { font-size: 1.1rem; font-weight: 700; color: #333; }
.ticket-desc { font-size: 0.85rem; color: #777; }
.ticket-price { font-size: 1.3rem; font-weight: 800; color: #222; }

/* Sticky Sidebar dla Koszyka */
.basket-sidebar-wrapper {
    position: sticky;
    top: 100px; /* Odstęp od góry przy scrollowaniu */
    z-index: 10;
}
@media (max-width: 991.98px) {
    .basket-sidebar-wrapper {
        position: static;
        margin-top: 2rem;
    }
}
.basket-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eee;
}

/* Responsywność */
@media (max-width: 768px) {
    .ticket-type-card { flex-direction: column; align-items: flex-start; gap: 15px; }
    .ticket-actions { width: 100%; display: flex; justify-content: space-between; align-items: center; }
}



/* --- CHECKOUT / PODSUMOWANIE --- */

/* Kafelki wyboru (Płatność/Dostawa) */
.selection-card {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Ukrywamy domyślną kropkę inputa, ale zostawiamy go w DOM dla logiki formularza */
.selection-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Wygląd karty (Label) */
.selection-card-content {
    display: block;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #495057;
    transition: all 0.2s;
}

/* Ikona/Kółeczko zaznaczenia */
.selection-card-content::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #adb5bd;
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

/* Stan ZAZNACZONY (Działa dzięki CSS :checked) */
.selection-card input[type="radio"]:checked + .selection-card-content {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.03);
    color: var(--bs-primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.selection-card input[type="radio"]:checked + .selection-card-content::before {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary);
    box-shadow: inset 0 0 0 3px #fff; /* Efekt kropki w środku */
}

/* Prawa kolumna - Paragon */
.summary-receipt {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e9ecef;
    position: sticky;
    top: 100px; /* Sticky sidebar */
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.receipt-total {
    border-top: 2px dashed #dee2e6;
    margin-top: 20px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.secure-badge {
    text-align: center;
    margin-top: 20px;
    color: #6c757d;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 1. Pola tekstowe (Inputy) - Wyraźne i solidne */
.form-control-checkout {
    background-color: #f8f9fa;      /* Lekko szare tło (nie białe), żeby odróżniało się od kartki */
    border: 2px solid #dee2e6;      /* Solidna, widoczna ramka (zamiast braku ramki) */
    border-radius: 8px;             /* Lekkie zaokrąglenie */
    padding: 15px;                  /* Duży padding - wygodne pisanie */
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
    transition: all 0.2s ease-in-out;
}

/* Stan aktywny (gdy klikniesz w pole) */
.form-control-checkout:focus {
    background-color: #ffffff;      /* Tło zmienia się na białe */
    border-color: var(--bs-primary); /* Ramka świeci na kolor główny */
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.15); /* Lekka poświata */
    outline: none;
}

/* 2. Karty wyboru (Radio buttons) - Powiększone */
.selection-card-content::before {
    width: 28px;        /* Zwiększono z 20px */
    height: 28px;       /* Zwiększono z 20px */
    border: 3px solid #adb5bd; /* Gruby obrys */
    margin-right: 15px;
}

/* Kropka w środku po zaznaczeniu */
.selection-card input[type="radio"]:checked + .selection-card-content::before {
    box-shadow: inset 0 0 0 4px #fff; /* Większy odstęp wewnątrz kropki */
}

/* 3. Zwykłe Checkboxy (np. do zgód regulaminowych) */
/* Jeśli będziesz dodawać zwykłe checkboxy, to też je powiększymy */
.form-check-input {
    width: 1.4em;
    height: 1.4em;
    margin-top: 0.1em;
    border: 2px solid #adb5bd;
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}



/* --- STRONA STATUSU PŁATNOŚCI --- */

.status-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    padding: 60px 40px;
    text-align: center;
    max-width: 600px;
    margin: 50px auto; /* Wyśrodkowanie na stronie */
    transition: all 0.3s ease;
}

.status-icon {
    font-size: 5rem;
    margin-bottom: 30px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efekt sprężynowania przy zmianie */
}

/* Kolory stanów */
.status-pending { color: var(--bs-primary); }
.status-success { color: #198754; } /* Bootstrap Success Green */
.status-error   { color: #dc3545; }

/* Animacja wejścia przycisków po sukcesie */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

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

/* --- STRONA KONTA UŻYTKOWNIKA --- */

.list-group-item-action.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.list-group-item-action {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.list-group-item-action:hover, .list-group-item-action:focus {
    background-color: #f8f9fa;
    color: var(--bs-primary);
}
