/* ========================================================================== */
/* BENTO BOX - GLASSMORPHISM UKŁAD                                            */
/* ========================================================================== */

/* --- BENTO BOX KONTENER --- */
.bento-container {
    width: 95%;
    max-width: 1200px;
    margin: 15px auto; 
    flex: 1; /* Odpycha stopkę na dół */
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(120px, auto);
    gap: 20px;
}

/* --- BAZA KAFELKA (SZKŁO / GLASSMORPHISM) --- */
.bento-item {
    border-radius: 20px; 
    padding: 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bento-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-dark);
}

.bento-item h2 { 
    margin-top: 0; 
    font-size: 24px; 
    z-index: 2; 
    margin-bottom: 5px; 
}

.bento-item p { 
    font-size: 15px; 
    opacity: 0.9; 
    z-index: 2; 
    margin-bottom: 10px; 
}

/* --- GLOBALNA IKONA W KAFELKACH (Prawy dolny róg) --- */
.bento-icon {
    position: absolute;
    bottom: 0;
    right: 15px;
    font-size: 80px;
    opacity: 0.15;
    z-index: 1;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    pointer-events: none;
}

.bento-item:hover .bento-icon {
    transform: scale(1.15) rotate(-10deg) translateY(-5px);
}

.bento-contact .bento-icon {
    opacity: 0.5;
    font-size: 70px;
}

.bento-latest:hover .bento-icon {
    opacity: 0.3; 
}

/* --- KOLORY I TŁA KAFELKÓW --- */

.bento-live, .bento-latest {
    cursor: pointer;
}

.bento-live {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--base-3) 0%, var(--color-6) 100%); 
    color: var(--color-11);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.bento-live h2, .bento-live p { color: var(--color-11); }
.bento-live:hover { border-color: rgba(255, 255, 255, 0.4); }

.bento-latest {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--base-2) 0%, var(--color-2) 100%);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.bento-latest h2, .bento-latest p { color: var(--white); }
.bento-latest:hover { border-color: rgba(255, 255, 255, 0.4); }

.bento-upcoming {
    grid-column: span 2;
    grid-row: span 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, var(--color-3) 100%); 
    color: var(--color-1);
    border: 1px solid var(--color-4);
}
.bento-upcoming h2, .bento-upcoming p { color: var(--color-1); }
.bento-upcoming:hover { border-color: var(--base-2); }

.bento-contact {
    grid-column: span 2;
    grid-row: span 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, var(--color-3) 100%); 
    color: var(--color-1);
    border: 1px solid var(--color-4);
}
.bento-contact h2, .bento-contact p { color: var(--color-1); }
.bento-contact:hover { border-color: var(--base-2); }

.bento-btn-fake {
    display: inline-block;
    padding: 8px 18px;
    background: var(--base-3);
    color: var(--color-1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    align-self: flex-start; 
    margin-top: auto; 
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, background 0.3s ease;
}
.bento-contact:hover .bento-btn-fake {
    transform: translateX(5px);
    background: var(--color-6-1);
}

/* --- WSPÓLNY NAGŁÓWEK Z LINKIEM --- */
.bento-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline; /* Równa do linii bazowej tekstu */
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.bento-header-row h2 {
    margin-bottom: 0; /* Resetujemy margines, bo wrapper przejmuje kontrolę */
}

.bento-see-all {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: inherit; /* Dziedziczy kolor tekstu z kafelka */
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap; /* Zapobiega łamaniu tekstu na małych ekranach */
    margin-left: 10px;
}

.bento-see-all:hover {
    opacity: 1;
    transform: translateX(2px);
}

/* --- ODZNAKI (BADGES) --- */
.bento-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-light);
}

.bento-live .bento-badge {
    background: var(--color-9);
    color: var(--base-1);
    animation: pulse-border 2s infinite; 
}

.bento-latest .bento-badge {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.bento-upcoming .bento-badge, 
.bento-contact .bento-badge {
    background: var(--color-4);
    border: 1px solid rgba(0,0,0,0.03);
    color: var(--color-1);
}

/* --- LISTY KATEGORII W KAFELKACH CIEMNYCH --- */
.bento-latest-cats {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3;
    max-height: 325px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 16px;
    padding-bottom: 10px;
    padding-left: 2px;
}

.bento-latest-cats.is-scrollable {
    -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(to bottom, black calc(100% - 40px), transparent 100%);
}

.bento-latest-cats::-webkit-scrollbar { 
    width: 5px; 
}
.bento-latest-cats::-webkit-scrollbar-track { 
    background: transparent; 
}
.bento-latest-cats::-webkit-scrollbar-thumb { 
    background: rgba(255,255,255,0.3); 
    border-radius: 10px; 
}

.bento-cat-row, .bento-cat-card {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: inherit;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 3;
}

.bento-cat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
}

.bento-cat-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden; 
}

.bento-live .bento-cat-row.is-live-today {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.bento-cat-row:hover, 
.bento-cat-card:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(6px) scale(1.01);
    box-shadow: -2px 4px 12px rgba(0,0,0,0.1);
}

.bento-cat-row .cat-time,
.bento-cat-header .cat-time {
    margin-left: auto;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pulse-dot {
    position: relative;
    margin-right: 2px;
}

.today-text {
    font-weight: 600;
}

.badge-base {
    padding: 3px 8px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.2); 
    border: none;
    border-radius: 8px;
    color: #fff;
}

.bento-cat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

/* --- Lista TOP 3 --- */
.bento-top3 {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.15); 
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.top3-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 13.5px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.top3-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.top3-medal { font-size: 16px; line-height: 1; }
.top3-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
    font-weight: 600;
    opacity: 0.95;
}
.top3-time { font-family: monospace; font-size: 13px; opacity: 0.8; }

/* --- NADCHODZĄCE WYDARZENIA (LISTA) --- */
.upcoming-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 3;
    position: relative;
}

.upcoming-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--color-3); 
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid var(--color-4); 
    transition: background 0.3s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 3;
    cursor: pointer;
    /* Dodajemy maskę przeźroczystości od lewej (100% widoczności) do prawej (50% widoczności) */
    -webkit-mask-image: linear-gradient(to right, black 0%, rgba(0, 0, 0, 0.5) 100%);
    mask-image: linear-gradient(to right, black 0%, rgba(0, 0, 0, 0.5) 100%);
}

.upcoming-list li:hover {
    background: var(--white);
    border-color: var(--base-2); 
    transform: translateX(6px) scale(1.01);
    box-shadow: var(--header-shadow);
}

.date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--color-2);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    min-width: 50px;
    box-shadow: var(--shadow-light);
}
.date-box span { font-size: 18px; font-weight: bold; line-height: 1; }
.date-box small { font-size: 10px; margin-top: 2px; }

.event-info { display: flex; flex-direction: column; }
.event-info strong { font-size: 15px; color: var(--color-1); }
.event-info span { font-size: 13px; color: var(--color-10); margin-top: 2px;}

.empty-events-text {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.8;
}

/* ========================================================================== */
/* SEKCJA HERO / TYTUŁ                                                        */
/* ========================================================================== */

.hero-logo {
    position: relative; 
    z-index: 2; 
    max-width: 50%; 
    width: auto;
    max-height: 15vh; 
    margin: 0 auto 0.5rem auto;
    display: block;
    padding: 10px 25px;
    background: rgb(255 255 255 / 62%);
    border-radius: 50px;
    filter: drop-shadow(0 10px 20px rgba(26, 54, 93, 0.15));
}

.hero-title-wrapper {
    position: relative;
    width: 100%;
    max-width: 1500px; 
    aspect-ratio: 6 / 1;
    margin: 0 auto 1rem auto; 
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 35px rgba(11, 66, 81, 0.15);
}

.hero-title-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px) brightness(0.7) opacity(0.95); 
    transform: scale(1.1); 
    z-index: 1;
}

.hero-title {
    position: relative;
    z-index: 2;
    font-size: clamp(1.2rem, 3.3vw, 2.6rem); 
    white-space: nowrap; 
    font-weight: 900;
    color: #ffffff; 
    margin: 0; 
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6); 
    text-align: center;
    width: 100%;
}
