body {
    overflow-x: hidden;
}

:root {
    --bg-color: #0b1528;
    --card-bg-glass: rgba(255, 255, 255, 0.06);
    --card-border-glass: rgba(255, 255, 255, 0.12);
    --text-primary: #B99B71;
    --text-secondary: #cbd5e1;
    --accent-gold: #c5a880;
    --accent-active: #c1272d;
    Morocco Red --font-family: 'Cairo', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --slider-gap: 1.6rem;
}

.empty-card {
    visibility: hidden;
}

.participants-showcase-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    background-color: var(--bg-color);
    background-image: url('../images/bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0 4rem;
    margin-bottom: 4rem;
}


.motif-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/images/motif.png');
    background-size: 35%;
    background-position: top left;
    background-repeat: no-repeat;
    opacity: 0.06;
    z-index: 0;
    pointer-events: none;
}


.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 0 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 3rem;
}


.content-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    gap: 4rem;

}


.info-wrapper {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    gap: 16px;
}

.main-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);


    margin-bottom: 1rem;
}

.motif-divider {
    width: 220px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.motif-graphic {
    width: 100%;
}

.description-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 500px;
    font-weight: 400;
}

/* Left Side: Participants Showcase */
.participants-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.participants-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    transition: var(--transition-smooth);
}

.participant-card {
    position: relative;
    width: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.photo-wrapper {
    position: relative;
    width: 240px;
    width: 100%;
    height: 270px;
    height: auto;
    margin-bottom: 0.5rem;
    z-index: 1;
    transition: var(--transition-smooth);
}

.participant-photo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.6));
    transition: var(--transition-smooth);
   
}

.glass-badge {
    width: 100%;
    padding: 1.5rem 1rem;
    background: var(--card-bg-glass);
    border: 1px solid var(--card-border-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: var(--transition-smooth);
}

.participant-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.participant-category {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--accent-gold);
    font-weight: 500;
    text-align: center;
    z-index: 3;
    opacity: 0.9;
}

.participant-card:hover .photo-wrapper {
    transform: translateY(-8px) scale(1.03);
}

.participant-card:hover .glass-badge {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.slider-container {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    z-index: 10;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: calc(100% - 4rem);
    max-width: 1000px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.flags-viewport {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.flags-viewport::-webkit-scrollbar {
    display: none;
}

.flags-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--slider-gap);
    padding: 0.5rem 0;
}

.flag-item {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
    opacity: 0.6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;

}

.flag-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flag-item:hover {
    opacity: 0.9;
}

.flag-item.active {
    width: 80px;
    height: 50px;
    opacity: 1;
    transform: scale(1.15) translateY(-12px);
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.slider-nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.slider-nav-btn:hover {
    color: var(--accent-primary);
}

.slider-nav-btn svg {
    width: 20px;
    height: 20px;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styling */
@media (max-width: 1024px) {
    .main-container {
        padding: 0;
    }

    .content-section {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }

    .info-wrapper {
        flex: 1;
        align-items: center;
        text-align: center;
    }

    .motif-divider {
        margin: 1rem auto;
    }

    .participant-card {
        width: 100%;
        margin-top: -25%;
    }

    .participants-grid {
        justify-content: center;
    }


}

@media (max-width: 640px) {
    :root {
        --slider-gap: 0.8rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .participants-grid {
        flex-direction: column;
        align-items: center;
        gap: -2rem;
    }

    .participant-card {
        width: 100%;
        margin-top: -45%;
    }

    .slider-container {
        padding: 0.5rem 1rem;
    }

    .flag-item {
        width: 45px;
        height: 30px;
    }

    .flag-item.active {
        width: 60px;
        height: 38px;
    }
}

.selected-country-header {
    position: absolute;
    bottom: 55px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
    z-index: 9;
    pointer-events: none;
}

.selected-country-title {
    display:flex;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    display: inline-block;
    transition: var(--transition-smooth);
  
}