/* ===== ESTILOS PARA EL SELECTOR DE PAÍSES ===== */

/* Secciones de año */
.year-section {
    grid-column: 1 / -1;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2d3748;
}

.year-title {
    color: #fbbf24;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    font-family: 'CircularStd', sans-serif;
    text-align: center;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.country-selector-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: #0b090a;
    min-height: 80vh;
}

.country-selector-header {
    text-align: center;
    margin-bottom: 4rem;
}

.country-selector-header h2 {
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'CircularStd', sans-serif;
}

.country-selector-header p {
    color: #e2e8f0;
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.country-card {
    background: #1a202c;
    border: 1px solid #2d3748;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.country-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.country-card:hover::before {
    left: 100%;
}

.country-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: #a4161a;
}

.country-card[data-country="egipto"]:hover {
    border-color: #a4161a;
    box-shadow: 0 20px 40px rgba(164, 22, 26, 0.3);
}

.country-card[data-country="italia"]:hover {
    border-color: #009246;
    box-shadow: 0 20px 40px rgba(0, 146, 70, 0.3);
}

.country-card[data-country="dinamarca"]:hover {
    border-color: #C60C30;
    box-shadow: 0 20px 40px rgba(198, 12, 48, 0.3);
}

.country-card[data-country="suecia"]:hover {
    border-color: #006AA7;
    box-shadow: 0 20px 40px rgba(0, 106, 167, 0.3);
}

.country-card[data-country="alemania"]:hover {
    border-color: #DD0000;
    box-shadow: 0 20px 40px rgba(221, 0, 0, 0.3);
}

.country-flag {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f3f4;
}

.flag-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.country-info {
    flex: 1;
    min-width: 0;
}

.country-info h3 {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-family: 'CircularStd', sans-serif;
}

.country-info p {
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.country-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.stat {
    background: #2d3748;
    color: #fbbf24;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid #4a5568;
}

.country-arrow {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a4161a;
    transition: all 0.3s ease;
}

.country-card:hover .country-arrow {
    transform: translateX(4px);
    color: #ffffff;
}

.country-arrow svg {
    width: 20px;
    height: 20px;
}

/* Estados de desarrollo */
.country-card[data-country]:not([data-country="egipto"]) {
    opacity: 0.7;
    cursor: not-allowed;
}

.country-card[data-country]:not([data-country="egipto"]):hover {
    transform: none;
    box-shadow: none;
    border-color: #2d3748;
}

.country-card[data-country]:not([data-country="egipto"]) .country-arrow {
    color: #4a5568;
}

.country-card[data-country]:not([data-country="egipto"]):hover .country-arrow {
    transform: none;
    color: #4a5568;
}

.country-selector-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
}

.country-selector-footer p {
    color: #a0aec0;
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .country-selector-container {
        padding: 2rem 1rem;
    }
    
    .country-selector-header h2 {
        font-size: 2.5rem;
    }
    
    .countries-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .country-card {
        padding: 1.25rem;
        gap: 0.8rem;
    }
    
    .country-flag {
        width: 50px;
        height: 38px;
    }
    
    .country-info h3 {
        font-size: 1.2rem;
    }
    
    .country-info p {
        font-size: 0.85rem;
    }
    
    .stat {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }
    
    .country-arrow {
        width: 28px;
        height: 28px;
    }
    
    .country-arrow svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .country-selector-header h2 {
        font-size: 2rem;
    }
    
    .country-selector-header p {
        font-size: 1rem;
    }
    
    .countries-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .country-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .country-flag {
        width: 60px;
        height: 45px;
    }
    
    .country-stats {
        justify-content: center;
    }
    
    .country-arrow {
        transform: rotate(90deg);
        width: 24px;
        height: 24px;
    }
    
    .country-arrow svg {
        width: 16px;
        height: 16px;
    }
}

/* Animaciones de entrada */
.country-card {
    animation: slideInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.country-card:nth-child(1) { animation-delay: 0.1s; }
.country-card:nth-child(2) { animation-delay: 0.2s; }
.country-card:nth-child(3) { animation-delay: 0.3s; }
.country-card:nth-child(4) { animation-delay: 0.4s; }
.country-card:nth-child(5) { animation-delay: 0.5s; }

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

/* Efecto de carga */
.country-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.country-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #4a5568;
    border-top: 2px solid #a4161a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
