/* VARIABLES DE COLOR PERSONALIZADAS */
:root {
    --claro-red: rgb(0,196,0);
    --claro-red-darker: rgb(13, 116, 13);
    --claro-text-dark: #333;
    --claro-text-light: #555;
    --claro-bg-light: #f8f9fa;
    --claro-bg-medium: #e9ecef;
    --whatsapp-green: #25D366;
    --whatsapp-green-darker: #1DAE50;
    --navbar-height: 70px;
}
html {
    scroll-behavior: smooth;
}


/* ======================== */
/* --- ESTILOS GENERALES --- */
/* ======================== */
.navbar-hidden {
    transform: translateY(-100%);
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--claro-text-dark);
    line-height: 1.6;
    /* Se eliminó la línea de background-color para que se vea la nieve */
}

main {
    padding-top: var(--navbar-height);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
}
.logo-imagen {
    height: 40px;
    width: auto;
}


/* ======================== */
/* --- NAVBAR --- */
/* ======================== */

.navbar.bg-dark {
    background-color: #212529 !important;
    border-bottom: 4px solid var(--claro-red) !important;
    min-height: var(--navbar-height);
    transition: transform 0.4s ease-in-out;
}
.logo-texto {
    color: #fff !important;
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    letter-spacing: -1px;
}
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}
.navbar .nav-link:hover, .navbar .nav-link.active {
    color: #fff !important;
}
.navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.85);
}
.navbar .btn-outline-light:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}


/* ============================ */
/* --- OFFCANVAS SIDEBAR --- */
/* ============================ */
.offcanvas.text-bg-dark {
    background-color: #212529 !important;
    border-left: 3px solid var(--claro-red);
}
.offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.offcanvas-title {
    color: #fff;
    font-size: 1.4em;
}
.sidebar-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    padding: 0.75rem 1.25rem;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 1.75rem;
}

/* ======================================================= */
/* --- SECCIÓN BIENVENIDA CON SLIDER FUNCIONAL --- */
/* ======================================================= */
section#bienvenida {
    position: relative;
    width: 100%;
    height: 85vh; /* Altura para pantallas de escritorio */
    overflow: hidden;
    color: #ffffff;
    z-index: 1;
    background-color: #333;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 5rem), 50% 100%, 0 calc(100% - 5rem));
}

.slider-container {
    width: 100%;
    height: 100%;
}

.slider-track {
    display: flex;
    width: 400%; /* Ajusta si tienes más/menos de 3 slides */
    height: 100%;
    position: relative;
    transition: transform 0.7s ease-in-out;
}


 .slide {
    width: 25%;
    height: 100%;
    background-size: cover; /* La imagen CUBRE todo el espacio, pero puede recortarse. */
    background-position: center 35%;
    background-repeat: no-repeat;
}

.slide-1 { background-image: url('../img/banner/desktop/home_1.png'); }
.slide-2 { background-image: url('../img/banner/desktop/home_2.png'); }
.slide-3 { background-image: url('../img/banner/desktop/home_3.png'); }
.slide-4 { background-image: url('../img/banner/desktop/home_4.png'); }


.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5em;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
#prevBtn { left: 20px; }
#nextBtn { right: 20px; }
.slider-nav:hover { background-color: rgba(0, 0, 0, 0.8); }

@media (max-width: 767px) {
    section#bienvenida {
        height: 75vh;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 3rem), 50% 100%, 0 calc(100% - 3rem));
    }
    .slide-1 {background-image: url('../img/banner/mobile/home_1.png');background-position: center center;
                background-size: 100%;background-repeat: no-repeat;}

    .slide-2 {background-image: url('../img/banner/mobile/home_2.png');background-position: center center;
                background-size: 100%;background-repeat: no-repeat;}

    .slide-3 {background-image: url('../img/banner/mobile/home_3.png');background-position: center center;
                background-size: 100%;background-repeat: no-repeat;}

    .slide-4 {background-image: url('../img/banner/mobile/home_4.png');background-position: center center;
                background-size: 100%;background-repeat: no-repeat;}
  }

/* TÍTULOS DE SECCIÓN */
main section h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem !important;
    color: var(--claro-text-dark);
}

/* ======================================================= */
/* --- AJUSTES PARA SWIPERJS --- */
/* ======================================================= */
.swiper {
    width: 100%;
    padding-top: 10px;
    padding-bottom: 180px;
}
.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    padding-bottom: 10px;
    perspective: 1500px;
}
.swiper-button-next, .swiper-button-prev {
    color: var(--claro-red) !important;
    background-color: rgba(255, 255, 255, 0.8);
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: background-color 0.2s ease;
}
.swiper-button-next:hover, .swiper-button-prev:hover {
    background-color: #fff;
}
.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 20px !important;
    font-weight: 900;
}
.swiper-pagination-bullet {
    background-color: #ccc !important;
    width: 10px !important;
    height: 10px !important;
    opacity: 1 !important;
}
.swiper-pagination-bullet-active {
    background-color: var(--claro-red) !important;
}



/* ======================================================= */
/* --- TARJETAS DE PLANES CON EFECTO FLIP --- */
/* ======================================================= */
.tarjeta-plan {
    width: 100%;
    min-height: 550px;
    position: relative;
    border: none;
    background-color: #0da34700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
    will-change: transform, box-shadow;
    cursor: pointer;
}
.tarjeta-plan:hover {
    transform: scale(1.04);
}
.tarjeta-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}
.tarjeta-flipper.is-flipped {
    transform: rotateY(180deg);
}
.tarjeta-frente, .tarjeta-dorso {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.07);
}
.tarjeta-frente {
    z-index: 2;
}
.tarjeta-dorso {
    transform: rotateY(180deg);
    z-index: 1;
}
.tarjeta-frente .card-body, .tarjeta-dorso .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.tarjeta-frente .card-body .img-fluid, .tarjeta-dorso .card-body .img-fluid {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 500px; 
    margin-top: auto;
    margin-bottom: auto;
}
.tarjeta-frente .card-title, .tarjeta-dorso .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--claro-red);
    margin-bottom: 1rem;
    min-height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tarjeta-frente .boton-whatsapp.btn, .tarjeta-dorso .boton-whatsapp.btn {
    background-color: var(--claro-red);
    border-color: var(--claro-red);
    color: white !important;
    margin-top: 1rem;
}
.tarjeta-frente .boton-whatsapp.btn:hover, .tarjeta-dorso .boton-whatsapp.btn:hover {
    background-color: var(--claro-red-darker);
    border-color: var(--claro-red-darker);
}

@media (max-width: 767px) {
    main section h2 {
        font-size: 2rem;
        margin-bottom: 2rem !important;
    }
    .swiper {
        padding-bottom: 100px;
    }
    .swiper-button-next, .swiper-button-prev {
        width: 40px !important;
        height: 40px !important;
    }
    .swiper-button-next::after, .swiper-button-prev::after {
        font-size: 16px !important;
    }
    .tarjeta-plan {
        min-height: 500px;
    }
    .tarjeta-frente .card-body .img-fluid, 
    .tarjeta-dorso .card-body .img-fluid {
        max-height: 320px;
    }
    .tarjeta-frente .card-title, .tarjeta-dorso .card-title {
        font-size: 1.3rem;
    }
}


/* ======================================================= */
/* --- SECCIÓN CONTACTO Y REDES --- */
/* ======================================================= */
#contacto-redes {
    background-color: var(--claro-bg-medium);
}
.link-claro-red i {
    color: var(--claro-red);
    transition: transform 0.2s ease, color 0.2s ease;
}
.link-claro-red:hover i {
    transform: scale(1.2);
    color: var(--claro-red-darker);
}
.boton-whatsapp-general.btn {
    background-color: var(--whatsapp-green);
    border-color: var(--whatsapp-green);
    color: white !important;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.boton-whatsapp-general.btn:hover {
    background-color: var(--whatsapp-green-darker);
    border-color: var(--whatsapp-green-darker);
    transform: translateY(-2px) scale(1.02);
}
.boton-whatsapp-general.btn i {
    margin-right: 0.5rem;
}

/* Botón Te Llamamos - Estilo uniforme con WhatsApp */
.boton-llamamos.btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white !important;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.boton-llamamos.btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.boton-llamamos.btn i {
    margin-right: 0.5rem;
}


/* FOOTER MODERNO */
.footer-moderno {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 3rem 0 2rem;
    border-top: 3px solid var(--claro-red);
    position: relative;
    overflow: hidden;
}

.footer-moderno::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(230, 0, 18, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.footer-logo {
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: brightness(1.1);
}

.footer-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.3);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--claro-red);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.footer-link:hover {
    color: white;
    transform: translateY(-2px);
}

.footer-link:hover::after {
    width: 100%;
}

.footer-info {
    margin-top: 1rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.visit-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.eriz-link {
    text-decoration: none;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.eriz-link:hover {
    transform: scale(1.2) rotate(10deg);
}

.intra-link {
    background: linear-gradient(135deg, var(--claro-red) 0%, #ff4757 100%);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.3);
    border: none;
}

.intra-link:hover {
    background: linear-gradient(135deg, #ff4757 0%, var(--claro-red) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 18, 0.4);
}

.intra-link::after {
    display: none;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-moderno {
        padding: 2rem 0 1.5rem;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-logo {
        height: 50px;
    }
}


/* ======================================================= */
/* --- BANNER FLOTANTE CON PREVISUALIZACIÓN --- */
/* ======================================================= */
.oferta-flotante-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}
.oferta-trigger {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--claro-red);
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    font-weight: 500;
}
.oferta-trigger img {
    height: 30px;
}
.oferta-preview {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 15%;
    transform: translateX(-50%);
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 3;
}
.oferta-preview img {
    width: 100%;
    border-radius: 10px;
    border: 3px solid white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.oferta-flotante-container:hover .oferta-preview {
    opacity: 1;
    visibility: visible;
}
.oferta-cerrar {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 4;
    background-color: #333;
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}


/* ======================================================= */
/* --- CARRUSEL DE OFERTAS MENSUALES --- */
/* ======================================================= */
#ofertas {
    background-color: #f0f0f0; 
}
.tarjeta-oferta {
    background: linear-gradient(45deg, #ffc107, #ff9800); 
    padding: 8px;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tarjeta-oferta:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.tarjeta-oferta img {
    width: auto;
    height: 100%;
    display: block;
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2); 
}
.swiper-ofertas .swiper-slide {
    width: 75%;
} 
.titulo-seccion-imagen {
    max-width: 100%;
    height: 200px;
}

@media (max-width: 767px) {
    .titulo-seccion-imagen {
        height: 130px;
    }
    .tarjeta-oferta {
        height: 350px;
    }
}


/* ======================================================= */
/* --- ESTILOS AÑADIDOS PARA LAS VENTANAS MODALES --- */
/* ======================================================= */
.modal-header {
    background-color: var(--claro-red);
    color: white;
}
.modal-header .btn-close {
    filter: brightness(0) invert(1);
}
.modal-footer .btn-primary {
    background-color: var(--whatsapp-green);
    border-color: var(--whatsapp-green);
}
.modal-footer .btn-primary:hover {
    background-color: var(--whatsapp-green-darker);
    border-color: var(--whatsapp-green-darker);
}
#modalOfertaImg {
    max-width: 70%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ======================================================= */
/* --- NUEVOS ESTILOS: PROPAGANDA Y EFECTO NIEVE --- */
/* ======================================================= */

/* --- ESTILOS PARA EFECTO DE NIEVE --- */
#efecto-nieve {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1; 
}

/* --- ESTILOS DE LA PROPAGANDA (POP-UP) --- */
.propaganda-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.propaganda-overlay.visible {
    visibility: visible;
    opacity: 1;
}

.propaganda-ventana {
    position: relative;
    transform: scale(0.7);
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.propaganda-overlay.visible .propaganda-ventana {
    transform: scale(1);
    opacity: 1;
}

/* --- AJUSTES AL POP-UP PARA MOSTRAR IMAGEN --- */
.propaganda-ventana {
    background-color: transparent;
    padding: 0;
    box-shadow: none;
}

.propaganda-ventana img {
    max-width: 85vw;
    max-height: 85vh;
    display: block;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.propaganda-ventana .cerrar-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}