/* assets/css/style.css - VERSIÓN DEFINITIVA CON SUBRAYADO Y MENÚS PERFECTOS */
:root {
    --primary: #005491;
    --accent: #E95309;
    --bg-light: #f8f9fa;
    --text-dark: #333333;
    --text-muted: #555555;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,84,145,0.15);
    --shadow-lg: 0 20px 25px -5px rgba(0,84,145,0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--white);
    padding-top: 80px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* ===== NAVBAR MEJORADA - SIEMPRE VISIBLE ===== */
#mainNav {
    transition: all 0.3s ease;
    padding: 12px 0;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    border-bottom: 2px solid transparent;
}

#mainNav.scrolled {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--accent);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.navbar-brand span {
    color: var(--text-dark);
}

.navbar-brand img {
    border-radius: 4px;
    object-fit: cover;
}

/* ===== SUBRAYADO ELEGANTE PARA TODOS LOS ENLACES - RESTAURADO ===== */
.nav-link, .dropdown-toggle {
    color: var(--text-dark) !important;
    font-weight: 600;
    padding: 8px 12px !important;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover, .dropdown-toggle:hover {
    color: var(--accent) !important;
}

/* Subrayado animado para TODOS los enlaces del navbar */
.nav-link::after, .dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 30px;
    height: 2px;
    background-color: var(--accent);
    transition: transform 0.3s ease;
    transform-origin: center;
    pointer-events: none; /* CRUCIAL: No interfiere con clicks */
    z-index: 1;
}

.nav-link:hover::after, .dropdown-toggle:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Eliminamos SOLO la flecha de Bootstrap, pero MANTENEMOS nuestro subrayado */
.dropdown-toggle::before {
    display: none !important;
}

/* La flecha de Bootstrap la ocultamos pero respetamos nuestro after */
.dropdown-toggle::after {
    border: none !important;
    margin: 0 !important;
    vertical-align: 0 !important;
    /* Mantenemos nuestro contenido personalizado */
    content: '' !important;
}

/* Aseguramos que el subrayado no bloquee interacciones */
.nav-link, .dropdown-toggle {
    z-index: 5;
}

/* ===== MEGAMENÚ ===== */
.mega-item {
    position: static;
    z-index: 10;
}

.megamenu {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 900px;
    max-width: 90vw;
    background: var(--white);
    border-top: 4px solid var(--accent);
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    padding: 2rem;
    border-radius: 0 0 16px 16px;
}

.megamenu.show {
    display: block;
}

.megamenu-content h6 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(0,84,145,0.1);
    padding-bottom: 0.5rem;
}

.megamenu-content a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 0;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.megamenu-content a:hover {
    color: var(--accent);
    padding-left: 8px;
    background-color: rgba(233,83,9,0.05);
    border-radius: 4px;
}

/* ===== DROPDOWN DE INICIO - CON SUBRAYADO INCLUIDO ===== */
.dropdown-menu {
    border: none;
    border-top: 4px solid var(--accent);
    border-radius: 0 0 16px 16px;
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
    margin-top: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    color: var(--text-muted);
    padding: 8px 20px;
    transition: all 0.2s;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: rgba(233,83,9,0.05);
    color: var(--accent);
    padding-left: 25px;
}

/* ===== REDES SOCIALES ===== */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 50%;
    color: var(--primary);
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid rgba(0,84,145,0.2);
}

.social-icon:hover {
    background: var(--accent);
    color: var(--white) !important;
    transform: translateY(-3px);
    border-color: var(--accent);
}

/* ===== BARRA DE PROGRESO ===== */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--accent);
    z-index: 10000;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(233,83,9,0.5);
}

/* ===== HERO CAROUSEL ===== */
.carousel-item {
    height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,84,145,0.7), rgba(0,0,0,0.5));
}

.carousel-caption {
    bottom: 30%;
    z-index: 10;
    text-align: left;
    left: 10%;
    right: 10%;
    max-width: 600px;
    margin: 0 auto;
}

.carousel-caption h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--white);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease;
}

.carousel-caption p {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BOTONES ===== */
.btn-cta {
    background-color: var(--accent);
    color: var(--white);
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(233,83,9,0.3);
    display: inline-block;
    text-decoration: none;
}

.btn-cta:hover {
    background-color: #c74400;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,83,9,0.4);
}

.btn-cta-xs {
    background-color: var(--accent);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 20px;
    font-weight: 300;
    border: none;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(233,83,9,0.3);
    display: inline-block;
    text-decoration: none;
}

.btn-cta-xs:hover {
    background-color: #c74400;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,83,9,0.4);
}




/* ===== CARDS DE BENEFICIOS ===== */
.card-benefit {
    background: var(--white);
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.card-benefit:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-benefit i {
    margin-bottom: 1.5rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.card-benefit:hover i {
    transform: scale(1.1);
}

.card-benefit h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.card-benefit p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ===== SECCIÓN INSTITUCIONAL ===== */
.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ===== NOTICIAS ===== */
.card-person {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: var(--white);
    height: 100%;
}

.card-person:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-person img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-person:hover img {
    transform: scale(1.05);
}

/* ===== NOTICIAS ===== */
.card-news {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: var(--white);
    height: 100%;
}

.card-news:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-news img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-news:hover img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-body h5 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.card-body .small {
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.btn-link:hover {
    color: var(--accent);
    gap: 10px;
}

/* ===== GALERÍA ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

/* ===== FORMULARIO ===== */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.3rem rgba(233,83,9,0.15);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

#formFeedback {
    font-size: 1rem;
    padding: 10px;
    border-radius: 8px;
}

/* ===== BOTÓN VOLVER ARRIBA ===== */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233,83,9,0.3);
    z-index: 1000;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,84,145,0.4);
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary) !important;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--primary), var(--accent));
}

footer a {
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

footer a:hover {
    color: var(--accent) !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    body {
        padding-top: 70px;
    }
    
    .carousel-item {
        height: 400px;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .counter-box {
        font-size: 1.8rem;
        padding: 1.5rem 0.5rem;
    }
    
    .megamenu {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 10px;
        box-shadow: var(--shadow-md);
        border-radius: 12px;
    }
    
    .nav-link::after, .dropdown-toggle::after {
        width: 20px;
        height: 2px;
    }
}

@media (max-width: 767px) {
    .carousel-item {
        height: 350px;
    }
    
    .carousel-caption {
        bottom: 20%;
    }
    
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .gallery-item {
        height: 150px;
    }
    
    #backToTop {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ===== UTILIDADES ===== */
.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: var(--shadow-lg) !important;
}

.text-accent {
    color: var(--accent);
}

.bg-primary-soft {
    background-color: rgba(0,84,145,0.05);
}

/* ===== ANIMACIONES ADICIONALES ===== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-hover:hover {
    animation: pulse 1s ease infinite;
}

/* ===== GARANTÍA DE VISIBILIDAD ===== */
.navbar {
    background-color: var(--white) !important;
    border-bottom: 2px solid var(--primary) !important;
}

.navbar * {
    color: var(--text-dark) !important;
}

/* ===== HERO CAROUSEL (SE MANTIENE IGUAL) ===== */
.carousel-item {
    height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,84,145,0.7), rgba(0,0,0,0.5));
}

.carousel-caption {
    bottom: 30%;
    z-index: 10;
    text-align: left;
    left: 10%;
    right: 10%;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SECCIÓN DE ANUNCIOS QUE SE SUPERPONE ===== */
.announcements-overlap {
    margin-top: -120px; /* Esto hace que la sección se superponga al carrusel */
    position: relative;
    z-index: 20;
    padding-bottom: 60px;
}

.announcement-card {
    background: var(--white);
    border-radius: 24px;
    padding: 35px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0,84,145,0.1);
    position: relative;
    overflow: hidden;
}

.announcement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    z-index: 1;
}

.announcement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 35px 60px -15px rgba(0,84,145,0.4);
}

.announcement-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(233,83,9,0.3);
}

.announcement-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--primary);
}

.announcement-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    font-weight: 400;
}

.announcement-cta {
    padding: 12px 30px;
    font-size: 1rem;
}

.announcement-title-small {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
    line-height: 1.3;
}

.announcement-text {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 25px;
    line-height: 1.6;
}

.announcement-text strong {
    color: var(--primary);
}

.announcement-benefits {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(0,84,145,0.1);
    margin-top: 10px;
}

.announcement-benefits h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.announcement-benefits p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.announcement-benefits p a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.announcement-benefits p a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.announcement-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.announcement-list li {
    display: flex;
    align-items: baseline;
    gap: 0px;
    padding: 0;
    color: var(--text-dark);
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(0,84,145,0.1);
}

.announcement-list li:last-child {
    border-bottom: none;
}

.announcement-list li i {
    color: var(--accent);
    font-size: 1.2rem;
    min-width: 24px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .announcements-overlap {
        margin-top: -40px;
        padding-bottom: 40px;
    }
    
    .announcement-card {
        padding: 25px;
    }
    
    .announcement-title {
        font-size: 2rem;
    }
    
    .announcement-title-small {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .announcements-overlap {
        margin-top: -20px;
        padding-bottom: 30px;
    }
    
    .announcement-card {
        padding: 20px;
    }
    
    .announcement-title {
        font-size: 1.8rem;
    }
    
    .announcement-title-small {
        font-size: 1.3rem;
    }
    
    .announcement-subtitle {
        font-size: 1rem;
    }
    
    .announcement-benefits {
        padding: 20px;
    }
}

/* Ajuste para que el carrusel no se vea afectado */
.carousel {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ===== ANIMACIÓN LETRA POR LETRA - VERSIÓN DINÁMICA ===== */
.letter-animation span {
    display: inline-block;
    opacity: 0;
    transform: translateX(-15px);
    animation: slideLetter 0.5s ease-out forwards;
}

@keyframes slideLetter {
    0% {
        opacity: 0;
        transform: translateX(-15px);
        color: var(--accent); /* Comienzan en naranja */
    }
    30% {
        color: var(--accent);
    }
    70% {
        color: var(--primary); /* Se transforman al azul institucional */
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        color: var(--text-dark); /* Terminan en color texto normal */
    }
}

/* Versión solo con acento naranja */
.letter-animation.accent span {
    animation: slideLetterAccent 0.5s ease-out forwards;
}

@keyframes slideLetterAccent {
    0% {
        opacity: 0;
        transform: translateX(-15px);
        color: var(--accent);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
        color: var(--accent); /* Mantiene el color naranja */
    }
}

/* Versión más rápida */
.letter-animation.fast span {
    animation-duration: 0.3s;
}

/* Versión más lenta */
.letter-animation.slow span {
    animation-duration: 0.8s;
}

/* Efecto de rebote opcional */
@keyframes slideLetterBounce {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    50% {
        transform: translateX(5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.letter-animation.bounce span {
    animation: slideLetterBounce 0.6s ease-out forwards;
}

/* ===== CONTADORES CON DISEÑO MEJORADO Y ANIMACIÓN DINÁMICA ===== */
#counters {
    background: linear-gradient(135deg, var(--primary) 0%, #003d6b 100%);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    transition: all 0.3s ease;
}

/* Efecto de fondo con patrón de ingeniería */
#counters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, rgba(255,255,255,0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.03) 25%, transparent 25%);
    background-size: 30px 30px;
    background-position: 0 0, 0 15px;
    opacity: 0.5;
}

/* Círculos decorativos */
#counters::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.counter-card {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    animation: cardPulse 3s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% {
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 20px 45px rgba(233, 83, 9, 0.2);
    }
}

.counter-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    box-shadow: 0 25px 45px rgba(233, 83, 9, 0.3);
    animation: none; /* Detenemos el pulso al hacer hover */
}

.counter-number-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.counter {
    font-family: 'Montserrat', sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: inline-block;
    transition: all 0.1s ease;
    position: relative;
}

/* Efecto de brillo en los números mientras se animan */
.counter.animating {
    animation: numberGlow 1s ease-in-out infinite;
}

@keyframes numberGlow {
    0%, 100% {
        text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        text-shadow: 0 5px 25px var(--accent), 0 0 10px rgba(233, 83, 9, 0.5);
    }
}

.counter-plus {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-left: 5px;
    line-height: 1;
    text-shadow: 0 5px 15px rgba(233,83,9,0.3);
    transition: all 0.3s ease;
}

.counter-card:hover .counter-plus {
    transform: scale(1.1);
    color: white;
}

.counter-label {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding-top: 15px;
}

.counter-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.counter-card:hover .counter-label::before {
    width: 60px;
    background: white;
}

/* Animación de entrada para la sección */
@keyframes sectionGlow {
    0% {
        box-shadow: inset 0 0 0 rgba(233, 83, 9, 0);
    }
    50% {
        box-shadow: inset 0 0 30px rgba(233, 83, 9, 0.2);
    }
    100% {
        box-shadow: inset 0 0 0 rgba(233, 83, 9, 0);
    }
}

#counters.animating-section {
    animation: sectionGlow 2s ease-in-out;
}

/* Responsive */
@media (max-width: 991px) {
    #counters {
        padding: 60px 0;
    }
    
    .counter {
        font-size: 3.5rem;
    }
    
    .counter-plus {
        font-size: 2.8rem;
    }
    
    .counter-label {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    #counters {
        padding: 40px 0;
    }
    
    .counter-card {
        padding: 20px 15px;
    }
    
    .counter {
        font-size: 2.8rem;
    }
    
    .counter-plus {
        font-size: 2.2rem;
    }
    
    .counter-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 575px) {
    .counter {
        font-size: 2.2rem;
    }
    
    .counter-plus {
        font-size: 1.8rem;
    }
    
    .counter-label {
        font-size: 0.8rem;
    }
}

.hero-section-r {
    background-image: url('../images/section_bg_r.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
}

.hero-section-r::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85); /* Capa blanca semitransparente */
    z-index: 0;
}

.hero-section-r > .container {
    position: relative;
    z-index: 1;
}

.hero-section-l {
    background-image: url('../images/section_bg_l.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: relative;
}

.hero-section-l::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85); /* Capa blanca semitransparente */
    z-index: 0;
}

.hero-section-l > .container {
    position: relative;
    z-index: 1;
}

.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 35px;
    color: white;
    cursor: pointer;
}

.lightbox-close:hover {
    color: #E95309;
}

/* ========================================= */
/* BOTÓN FLOTANTE DE WHATSAPP                */
/* ========================================= */

.btn-whatsapp-floating {
    position: fixed;
    bottom: 100px;  /* Posición arriba del botón volver arriba (que está a 30px del fondo) */
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* background: linear-gradient(135deg, #25D366 0%, #25D366 100%);*/
	background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    z-index: 9998;  /* Un nivel menos que el botón volver arriba (que tiene z-index: 9999) */
    cursor: pointer;
    animation: pulse-whatsapp 2s infinite;
}

.btn-whatsapp-floating:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    color: white;
}

.btn-whatsapp-floating .whatsapp-icon i {
    font-size: 2.2rem;
    transition: all 0.3s ease;
}

.btn-whatsapp-floating:hover .whatsapp-icon i {
    transform: scale(1.05);
}

/* Tooltip que aparece al hacer hover */
.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    /*background: rgba(0, 0, 0, 0.85);*/
	background: var(--primary);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-weight: 500;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.whatsapp-tooltip::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid rgba(0, 0, 0, 0.85);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.btn-whatsapp-floating:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-5px);
}

/* Animación de pulso para llamar la atención */
@keyframes pulse-whatsapp {
    0% {
        /*box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);*/
		
        box-shadow: 0 0 0 0 var(--primary);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        transform: scale(1);
    }
}

/* Versión para móviles */
@media (max-width: 768px) {
    .btn-whatsapp-floating {
        width: 55px;
        height: 55px;
        bottom: 85px;  /* Ajustado para móviles */
        right: 20px;
    }
    
    .btn-whatsapp-floating .whatsapp-icon i {
        font-size: 1.8rem;
    }
    
    .whatsapp-tooltip {
        display: none;  /* Ocultar tooltip en móviles para mejor UX */
    }
    
    @keyframes pulse-whatsapp {
        0% {
            box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
        }
        70% {
            box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
        }
        100% {
            box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        }
    }
}

/* Ajuste cuando el botón volver arriba está visible */
.btn-back-to-top.show {
    bottom: 30px;
}

/* Ajuste responsivo del botón volver arriba para que no choque con WhatsApp */
@media (max-width: 768px) {
    .btn-back-to-top {
        bottom: 20px;
        right: 20px;
    }
}

/* Estilos adicionales para mejorar la integración */
.whatsapp-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ========================================= */
/* CARRUSEL DE NOVEDADES                     */
/* ========================================= */

.news-carousel-container {
	background: linear-gradient(135deg, var(--primary-blue) 0%, #003d66 100%);
	border-radius: 1.5rem;
	padding: 1.5rem;
	box-shadow: var(--shadow-lg);
	height: 100%;
}

.carousel2 {
	border-radius: 1rem;
	overflow: hidden;
}

.carousel2-inner {
	border-radius: 1rem;
}					
							
#novedadesCarousel {
  height: 500px;
}

#novedadesCarousel .carousel-control-next, #novedadesCarousel .carousel-control-prev {
  bottom: -350px;
}

#novedadesCarousel .carousel-indicators {
  bottom: 50px;
}

#novedadesCarousel .carousel-item {
  height: 480px !important;
}

#novedadesCarousel .carousel-indicators li {
  background-color: lightgray;
}

#novedadesCarousel .carousel-item.dark h1 {
  color: #163564;
}

#novedadesCarousel .carousel-item.dark h2 {
  color: #333;
}

/* CSS simple para eliminar subrayado */
#novedadesCarousel .link {
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

#novedadesCarousel .carousel-title {
	color: var(--white);
	font-size: 1.3rem;
	font-weight: 700;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

#novedadesCarousel .carousel-title i {
	color: var(--accent-orange);
	font-size: 1.5rem;
}


/* ========================================= */
/* ESTILOS PARA ENLACES DEL CARRUSEL         */
/* ========================================= */

/* Clase base para enlaces sin subrayado */
.link-carousel {
    color: var(--white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem 0;
    border-bottom: 1px solid transparent;
}

/* Efecto hover */
.link-carousel:hover {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
    transform: translateX(3px);
}

/* Variante con ícono de Instagram */
.link-carousel-instagram {
    color: var(--white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.1);
}

.link-carousel-instagram:hover {
    color: var(--white);
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    transform: translateY(-2px);
}

/* Variante para enlaces generales sin subrayado */
.link-plain {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.link-plain:hover {
    color: var(--accent-orange);
}

/* Variante para enlaces con borde inferior animado */
.link-underline {
    color: var(--white);
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
}

.link-underline:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transition: width 0.3s ease;
}

.link-underline:hover {
    color: var(--accent-orange);
}

.link-underline:hover:after {
    width: 100%;
}

/* Variante para botón de acción */
.link-carousel-btn {
    color: var(--white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    background: var(--accent-orange);
    border: 2px solid transparent;
}

.link-carousel-btn:hover {
    background: transparent;
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    transform: translateY(-2px);
}