/* =========================================================
   ZAWODY I WYNIKI - WERSJA PREMIUM (GLASSMORPHISM)
   ========================================================= */


.results-selection-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 60vh;
    padding-top: 50px;
    padding-bottom: 40px;
}


.results-page-header {
    text-align: center;
    max-width: 800px;
    width: 90%;
    margin: 10px auto 40px auto;
    padding: 32px 28px;
    background: rgba(10, 25, 45, 0.75);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 162, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.results-page-header h1 {
    background: linear-gradient(to bottom, #ffffff, #a2d9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(24px, 5vw, 42px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0 0 15px 0;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
}

.results-page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(14px, 2vw, 18px);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

@media (max-width: 768px) {
    .results-page-header {
        margin-bottom: 30px;
    }

    .results-page-header h1 {
        font-size: 24px;
        letter-spacing: 1px;
        line-height: 1.2;
    }

    .results-page-header p {
        font-size: 14px;
    }
}


.timeline-container {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    width: 100%;
}

.timeline-nav {
    display: flex;
    position: relative;

    background-color: rgba(8, 18, 35, 0.94) !important;
    background-image: linear-gradient(
        145deg,
        rgba(18, 42, 75, 0.96),
        rgba(5, 12, 26, 0.96)
    ) !important;

    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;

    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(0, 162, 255, 0.3);

    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.55),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
}


.nav-slider {
    position: absolute;
    height: calc(100% - 16px);
    
    background: rgba(0, 162, 255, 0.2); 
    border: 1px solid #00a2ff;
    border-radius: 8px;
    top: 8px;
    left: 8px; 
    transition: all 0.5s cubic-bezier(0.25, 1, 0.3, 1); 
    box-shadow: 
        0 0 20px rgba(0, 162, 255, 0.5), 
        inset 0 0 10px rgba(0, 162, 255, 0.3);
    z-index: 1;
}

.year-item {
    position: relative;
    z-index: 2;
    width: 90px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Funnel Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4); 
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.year-item.active {
    color: #ffffff;
    text-shadow: 0 0 12px #00a2ff, 0 0 20px white; 
}

.year-item:hover:not(.active) {
    color: #ffffff;
    transform: translateY(-2px);
}


.results-categories {
    display: flex;
    justify-content: center;
    gap: 40px; 
    width: 100%;
    max-width: 1100px;
    padding: 0 20px;
}

.res-card {
    flex: 1;
    height: 340px;
    text-decoration: none;
    position: relative;

    background-color: rgba(8, 18, 35, 0.96) !important;
    background-image: linear-gradient(
        145deg,
        rgba(18, 42, 75, 0.98),
        rgba(5, 12, 26, 0.98)
    ) !important;

    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;

    border: 1px solid rgba(0, 162, 255, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.28);

    border-radius: 16px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;

    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.62),
        0 0 22px rgba(0, 162, 255, 0.12);
}


.res-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    transition: all 0.4s ease;
}

.res-rescue::after { background: #ff4b2b; box-shadow: 0 0 15px #ff4b2b; }
.res-swim::after { background: #00a2ff; box-shadow: 0 0 15px #00a2ff; }


.res-card:hover {
    transform: translateY(-12px);
    border-color: rgba(0, 162, 255, 0.4);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5), 
        0 0 40px rgba(0, 162, 255, 0.2); 
}


.res-card:hover::after {
    height: 6px;
    filter: brightness(1.3);
}

.res-card-content {
    text-align: center;
    z-index: 2;
}

.res-card-content i {
    font-size: 60px;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.4s ease;
}


.res-card:hover .res-card-content i {
    transform: scale(1.15) translateY(-5px);
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.res-card-content h3 {
    font-size: 30px;
    text-transform: uppercase;
    margin: 0;
    color: white;
    letter-spacing: 3px;
    font-family: 'Funnel Sans', sans-serif;
    font-weight: 800;
}

.res-card-content span {
    display: block;
    margin-top: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: 0.3s;
}

.res-card:hover .res-card-content span {
    color: #00a2ff; 
}


.footer-bar {
    margin-top: 80px; 
    position: relative;
    z-index: 10;
}

/* =======================================================
   ZAWODY I WYNIKI - PROPORCJONALNE SKALOWANIE
   ======================================================= */

@media (max-width: 1300px) {
    
    .timeline-container {
        width: 95%;
        margin-bottom: 50px;
        margin-top: -50px;
    }

    .timeline-nav {
        
        width: clamp(300px, 80%, 1000px); 
        padding: 6px;
    }

    .year-item {
        
        flex: 1; 
        min-width: 60px;
        font-size: clamp(14px, 1.5vw, 18px);
        height: 40px;
    }

    
    .results-categories {
        display: flex;
        flex-direction: row !important; 
        justify-content: center;
        gap: 20px; 
        padding: 0 3%;
    }

    .res-card {
        flex: 1; 
        min-width: 250px; 
        height: clamp(240px, 30vw, 340px); 
    }

    
    .res-card-content i {
        font-size: clamp(35px, 5vw, 60px);
        margin-bottom: 15px;
    }

    .res-card-content h3 {
        font-size: clamp(18px, 2.5vw, 28px);
    }
}

@media (max-width: 768px) {
    .results-selection-page {
        padding-top: 60px;
        min-height: auto;
    }

    

    .timeline-container {
        margin-bottom: 50px;
    }

    .timeline-nav {
        width: 95%; 
        padding: 6px; 
        border-radius: 12px; 
    }

    
    .nav-slider {
        top: 6px;
        height: calc(100% - 12px);
    }

    .year-item {
        font-size: 15px; 
        height: 48px; 
        letter-spacing: 0.5px; 
    }

    
    .results-categories {
        flex-direction: column !important; 
        gap: 20px;
        padding: 0 20px; 
        width: 100%;
        max-width: 450px; 
        box-sizing: border-box; 
        margin: 0 auto; 
    }

    .res-card {
        width: 100%;
        height: 220px; 
        border-radius: 12px;
        justify-content: center; 
    }

    .res-card-content {
        padding: 20px 0; 
    }

    .res-card-content i {
        font-size: 50px; 
        margin-bottom: 15px; 
    }

    .res-card-content h3 {
        font-size: 26px; 
        letter-spacing: 2px;
    }

    .res-card-content span {
        font-size: 11px;
        margin-top: 10px;
    }
    
    .res-card:hover,
    .res-card:active,
    .res-card:focus {
        transform: none !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }


    .res-card:hover .res-card-content i {
        transform: none !important;
        color: rgba(255, 255, 255, 0.9) !important;
        text-shadow: none !important;
    }

}

/* =========================
   TABLETY - ZAWODY I WYNIKI
========================= */

@media (min-width: 769px) and (max-width: 1400px) {

    .results-selection-page {
        padding-top: 70px;
        padding-bottom: 35px;
        min-height: auto;
    }

    .timeline-container {
        width: 100%;
        margin-top: 0;
        margin-bottom: 35px;
        padding: 0 25px;
        box-sizing: border-box;
    }

    .timeline-nav {
        width: 100%;
        max-width: 760px;
        padding: 7px;
        border-radius: 12px;
    }

    .nav-slider {
        top: 7px;
        height: calc(100% - 14px);
    }

    .year-item {
        flex: 1;
        width: auto;
        min-width: 70px;
        height: 42px;
        font-size: 15px;
        letter-spacing: 0.5px;
    }

    .results-categories {
        max-width: 900px;
        width: 100%;
        padding: 0 35px;
        gap: 28px;
        box-sizing: border-box;
        flex-direction: row;
    }

    .res-card {
        height: 280px;
        min-width: 0;
        border-radius: 14px;
    }

    .res-card-content i {
        font-size: 48px;
        margin-bottom: 18px;
    }

    .res-card-content h3 {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .res-card-content span {
        font-size: 12px;
        margin-top: 12px;
    }

    .footer-bar {
        margin-top: 55px;
    }
}

@media (min-width: 1201px) and (max-width: 1700px) {

    .results-selection-page {
        padding-top: 30px !important;
    }

    .timeline-container {
        margin-top: 0 !important;
    }

}