/* ==========================================================================
   GLOBAL CSS SYSTEM - TEPSA PSV
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(rgba(10, 10, 10, 0.93), rgba(10, 10, 10, 0.93)), url('../assets/img/bus_in_motion.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    overflow-x: hidden;
}

/* Common Layout Components */
section {
    padding: 100px 10%;
}

section h2 {
    font-size: 42px;
    margin-bottom: 30px;
    text-align: center;
}

/* Button UI Components */
.btn {
    padding: 15px 35px;
    background: #ff2d2d;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: .3s;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-4px);
}

.btn2 {
    padding: 15px 35px;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: .3s;
    display: inline-block;
}

.btn2:hover {
    background: white;
    color: black;
}

/* ===== NAVIGATION NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 8%;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 1000;
    transition: padding 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        background 0.4s ease,
        backdrop-filter 0.4s ease,
        box-shadow 0.4s ease;
}

.navbar.scrolled {
    padding: 15px 8%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-size: 26px;
    font-weight: 800;
    color: #ff2d2d;
    letter-spacing: 0.5px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    text-decoration: none;
}

.logo:hover {
    transform: scale(1.03);
}

.menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.menu a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 14.5px;
    transition: color 0.3s ease;
    position: relative;
    padding: 6px 0;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ff2d2d;
    transition: width 0.3s ease, left 0.3s ease;
}

.menu a:hover {
    color: #ffffff;
}

.menu a:hover::after {
    width: 100%;
    left: 0;
}

.hamburger {
    display: none;
}

/* ===== FOOTER LAYOUT ===== */
footer {
    background: #060608;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 8% 0;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    align-items: start;
}

.footer-brand h3 {
    color: #ff2d2d;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.footer-brand p {
    color: #888;
    font-size: 13px;
    line-height: 1.5;
    max-width: 320px;
}

.footer-links h4,
.footer-social h4 {
    color: #eee;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    font-size: 13px;
    transition: color .25s ease;
}

.footer-links a:hover {
    color: #ff2d2d;
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.discord-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all .25s ease;
    width: fit-content;
}

.discord-link:hover {
    color: #ffffff;
    border-color: #5865F2;
    background: rgba(88, 101, 242, 0.2);
}

.discord-icon {
    display: block;
    transition: transform .3s ease;
}

.discord-link:hover .discord-icon {
    animation: discordSpin .6s ease;
}

@keyframes discordSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(-15deg) scale(1.15);
    }

    50% {
        transform: rotate(10deg) scale(1.15);
    }

    75% {
        transform: rotate(-5deg) scale(1.05);
    }

    100% {
        transform: rotate(0deg) scale(1);
    }
}

.footer-bottom {
    text-align: center;
    padding: 12px 0;
}

.footer-bottom p {
    color: #555;
    font-size: 12px;
}

/* ===== RESPONSIVE MEDIA QUERIES (GLOBAL) ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 5%;
    }

    .menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, .95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
        border-bottom: 1px solid #1a1a1a;
    }

    .menu.show {
        display: flex;
    }

    .menu a {
        display: block;
        padding: 14px 5%;
        border-bottom: 1px solid rgba(255, 255, 255, .05);
    }

    .menu a::after {
        display: none;
    }

    .menu li:last-child a {
        border-bottom: none;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        background: none;
        border: none;
        padding: 5px;
    }

    .hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: .3s;
    }

    section {
        padding: 60px 5%;
    }

    section h2 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    footer {
        padding: 30px 5% 0;
        margin-top: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-bottom: 20px;
        text-align: center;
    }

    .footer-brand h3 {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .footer-brand p {
        max-width: 100%;
        font-size: 13px;
    }

    .footer-links h4,
    .footer-social h4 {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .footer-links {
        gap: 4px;
    }

    .footer-links a {
        justify-content: center;
        font-size: 13px;
    }

    .footer-social {
        align-items: center;
        gap: 8px;
    }

    .discord-link {
        justify-content: center;
        padding: 8px 14px;
        font-size: 13px;
    }

    .footer-bottom {
        padding: 12px 0;
    }

    .footer-bottom p {
        font-size: 11px;
    }
}

/* ===== SKELETON ANIMATION AND STYLES ===== */
@keyframes skeleton-pulse {
    0% {
        opacity: 0.55;
        background-color: #121212;
    }

    50% {
        opacity: 1;
        background-color: #1b1b1b;
    }

    100% {
        opacity: 0.55;
        background-color: #121212;
    }
}

.skeleton {
    animation: skeleton-pulse 1.8s infinite ease-in-out;
    border-color: rgba(255, 255, 255, 0.04) !important;
    pointer-events: none;
    user-select: none;
}

/* Smooth transitions for content updates */
.ranking-podium,
.jobs-grid,
.conductores-stats,
#drivers-grid {
    transition: opacity 0.25s ease-in-out;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 45, 45, 0.4);
    background: radial-gradient(circle, #ff2d2d 0%, #b80000 100%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 10px 25px rgba(255, 45, 45, 0.35);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
    background: radial-gradient(circle, #ff4d4d 0%, #d60000 100%);
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 14px 30px rgba(255, 45, 45, 0.5);
}