:root {
    --color-primary: #C00000;
    --color-secondary: #FFD700;
    --color-dark: #2A2A2A;
    --gradient-primary: linear-gradient(135deg, #C00000 0%, #8B0000 100%);
    --gradient-footer-primary: linear-gradient(135deg, #690505 0%, #8B0000 100%);
    --gradient-secondary: linear-gradient(45deg, #FFD700 0%, #FFA500 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.2);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Base Styles */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8f9fa;
}

/* Header */
.bg-principal {
    background: var(--gradient-primary);
    box-shadow: var(--shadow-sm);
}

.footer-color-principal {
    background: var(--gradient-footer-primary);
    box-shadow: var(--shadow-sm);
}

.navbar1 {
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
    
    &::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--color-secondary);
        transition: all 0.3s ease;
    }
    
    &:hover::after {
        width: 70%;
        left: 15%;
    }
}

/* Main Content Sections */
.section-title {
    position: relative;
    padding-left: 2rem;
    
    &::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 80%;
        width: 5px;
        background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
        border-radius: 10px;
    }
}

/* News Section */
.news-content {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 1rem;
    
    &::-webkit-scrollbar {
        width: 6px;
    }
    
    &::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    &::-webkit-scrollbar-thumb {
        background: var(--color-primary);
        border-radius: 4px;
    }
}

.truncate-3-lines {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    
    &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 5px;
        background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
        transform: scaleX(0);
        transition: transform 0.4s ease;
    }
    
    &:hover {
        box-shadow: var(--shadow-md);
        
        &::after {
            transform: scaleX(1);
        }
    }
}

.card-image {
    height: 300px;
    width: 100%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    
    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top center;
        transition: transform 0.3s ease;
    }
}

/* Buttons */
.btn-principal {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: var(--transition);
    
    &:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(192,0,0,0.3);
    }
}

.btn-outline-principal {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    transition: var(--transition);
    
    &:hover {
        background: var(--gradient-primary);
        color: white;
    }
}

/* Carousel */
#newsCarousel {
    box-shadow: var(--shadow-lg);
    border-radius: 15px;
    overflow: hidden;
}

.carousel-item {
    .position-relative {
        height: 500px;
        overflow: hidden;
    }
    
    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
        
        &:hover {
            transform: scale(1.03);
        }
    }
}

.carousel-indicators [data-bs-target] {
    width: 9px;
    height: 9px;
    border: 2px solid var(--color-primary);
    background-color: var(--color-primary);
    border-radius: 50%;
    margin: 0 8px;
    opacity: 0.5;
    transition: var(--transition);
    
    &.active {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* Líderes */
.leader-card .card-image {
    height: 500px; /* Altura fija para todas las imágenes */
    overflow: hidden;
    position: relative;
}

.leader-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.leader-card:hover img {
    transform: scale(1.05);
}

.gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(192,0,0,0.7) 0%, transparent 100%);
}

/* Asegurar altura uniforme de las tarjetas */
.leader-card {
    min-height: 500px; /* Altura mínima para desktop */
}




/* Footer */
footer {
    background: linear-gradient(135deg, var(--color-dark) 0%, #1A1A1A 100%);
    position: relative;
    overflow: hidden;
    
    &::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent 40%, rgba(255,215,0,0.05) 100%);
        transform: rotate(30deg);
    }
    
    a { /* Modificar a este selector general */
        position: relative;
        transition: var(--transition);
    }

}

.redes-sociales a {
    transition: var(--transition);
    
    &::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--color-secondary);
        transition: all 0.3s ease;
    }
    
    &:hover::after {
        width: 100%;
        left: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-item {
        .row {
            flex-direction: column;
            height: 500px;
        }
        
        img {
            aspect-ratio: 16/9;
        }
    }
    
    .news-content {
        height: 500px;
    }
    
    .card-image {
        height: 220px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .text-principal {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .card-image {
        height: 200px;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
}

/* Utilities */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
}

.badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.modal-content {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: translateY(50px);
    transition: var(--transition);
}