* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul-principal: #0047AB;
    --azul-oscuro: #002366;
    --azul-claro: #4169E1;
    --amarillo-principal: #FFD700;
    --amarillo-oscuro: #FFA500;
    --verde: #28a745;
    --rojo: #DC3545;
    --gris: #495057;
    --gris-claro: #f8f9fa;
    --blanco: #ffffff;
    --negro: #212529;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--negro);
    overflow-x: hidden;
}

/* Navbar */
nav {
    background: var(--blanco);
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--amarillo-principal);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 3rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img, .custom-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.3rem;
    flex: 1;
    justify-content: flex-end;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--azul-oscuro);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem 1.3rem;
    display: block;
    transition: all 0.3s;
    border-radius: 8px;
}

.nav-link:hover {
    background: var(--amarillo-principal);
    color: var(--azul-oscuro);
    transform: translateY(-2px);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--blanco);
    min-width: 280px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
    padding: 1rem 0;
    margin-top: 0.5rem;
    border-top: 3px solid var(--amarillo-principal);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--azul-oscuro);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background: var(--gris-claro);
    border-left-color: var(--amarillo-principal);
    padding-left: 2rem;
}

.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--azul-principal);
    cursor: pointer;
    padding: 0.5rem;
}

/* Carrusel */
.noticias-section {
    margin-top: 90px;
    background: var(--gris-claro);
    padding: 0;
}

.carousel-container {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.carousel {
    display: flex;
    transition: transform 0.6s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 600px;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    background-repeat: no-repeat;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 4rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.slide-categoria {
    display: inline-block;
    background: var(--amarillo-principal);
    color: var(--azul-oscuro);
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.slide-content h3 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 1.3rem;
    max-width: 900px;
    margin-bottom: 1rem;
    line-height: 1.9;
}

.slide-fecha {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

.carousel-controls {
    position: absolute;
    bottom: 3rem;
    right: 4rem;
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.carousel-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: var(--amarillo-principal);
    border-color: var(--amarillo-principal);
    color: var(--azul-oscuro);
    transform: scale(1.1);
}

.carousel-indicators {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.indicator.active {
    background: var(--amarillo-principal);
    transform: scale(1.3);
    border-color: white;
}

/* Contador */
.contador-compacto {
    background: var(--gris-claro);
    padding: 3rem 2rem;
}

.contador-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.contador-item {
    text-align: center;
    padding: 1.5rem;
    border-right: 2px solid var(--gris-claro);
}

.contador-item:last-child {
    border-right: none;
}

.contador-numero {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--azul-principal);
    margin-bottom: 0.5rem;
}

.contador-label {
    font-size: 1.1rem;
    color: var(--gris);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Pilares */
.pilares {
    padding: 6rem 2rem;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--azul-principal);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: var(--amarillo-principal);
    border-radius: 10px;
}

.pilares-container {
    max-width: 1200px;
    margin: 0 auto;
}

.pilar-section {
    margin-bottom: 5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: var(--gris-claro);
    border-radius: 25px;
    padding: 4rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.4s;
}

.pilar-section:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
    transform: translateY(-5px);
}

.pilar-section:nth-child(even) {
    grid-template-columns: 1fr 1fr;
}

.pilar-section:nth-child(even) .pilar-visual {
    order: 2;
}

.pilar-section:nth-child(even) .pilar-text {
    order: 1;
}

.pilar-visual {
    height: 400px;
    background: linear-gradient(135deg, rgba(0,71,171,0.3), rgba(65,105,225,0.3));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,71,171,0.3);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.pilar-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,71,171,0.2), rgba(65,105,225,0.2));
}

.pilar-text h3 {
    font-size: 2.5rem;
    color: var(--azul-principal);
    margin-bottom: 2rem;
    font-weight: 800;
}

.pilar-text p {
    color: var(--gris);
    line-height: 2;
    font-size: 1.15rem;
    text-align: justify;
}

/* Footer */
footer {
    background: var(--negro);
    color: white;
    padding: 3rem 2rem 1.5rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--amarillo-principal);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer-section p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0.8rem;
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 0.6rem;
    transition: all 0.3s;
}

.footer-section a:hover {
    color: var(--amarillo-principal);
    padding-left: 10px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: white;
    text-decoration: none;
}

.social-link.facebook {
    background: #1877f2;
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.social-link svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }
    .mobile-toggle {
        display: block;
    }
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        padding: 1rem 0;
    }
    .pilar-section {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    .pilar-section:nth-child(even) .pilar-visual,
    .pilar-section:nth-child(even) .pilar-text {
        order: 0 !important;
    }
    /* Menú móvil */
.nav-item .dropdown-menu {
    position: relative;
    top: 0;
    left: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0;
    margin: 0;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
}

.nav-item.active .dropdown-menu {
    max-height: 500px; /* suficiente para que se despliegue */
    padding: 0.5rem 1rem;
}

}

@media (max-width: 768px) {
    .carousel-slide {
        height: 500px;
    }
    .slide-content h3 {
        font-size: 2rem;
    }
    .contador-grid {
        grid-template-columns: 1fr;
    }
    .contador-item {
        border-right: none;
        border-bottom: 2px solid var(--gris-claro);
    }
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-container {
        grid-template-columns: 1fr;
    }
}