/*==========================================================*/
/* CONTROL DE APARIENCIA DE MATERIAL SYMBOLS                */
/*==========================================================*/

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/*==========================================================*/
/* PALETA Y BASE                                            */
/*==========================================================*/
:root {
    --color-principal-oscuro: #030F27;
    --color-acento: #FD5D14;
    --color-secundario-oscuro: #282C35;
    --color-texto-claro: #F4F4F4;
    --color-texto-gris: #A0A0A0;
    --color-fondo-claro: #EFEFEF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Arial', sans-serif;
    color: var(--color-principal-oscuro);
    background-color: var(--color-fondo-claro);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* SEO: Clase para elementos que deben ser leídos por buscadores pero no mostrados */
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/*==========================================================*/
/* HEADER Y NAVEGACIÓN                                      */
/*==========================================================*/
#header {
    background-color: var(--color-principal-oscuro);
    padding: 15px 0;
    color: var(--color-texto-claro);
}
.header-content {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
}

/* LOGO */
.logo { display: flex; align-items: center; flex-grow: 0; gap: 15px; margin-right: 20px; }
.logo img { height: 50px !important; margin-right: 0; }
.company-titles { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.company-name { font-size: 1em; font-weight: bold; }
.manufacturer-tag { font-size: 0.8em; font-weight: bold; color: var(--color-acento); }

/* CONTACTO HEADER */
.contact-info-header {
    display: flex; flex-grow: 1; justify-content: flex-end; gap: 30px;
    margin-left: 40px; padding-left: 20px; border-left: 1px solid rgba(255,255,255,0.1);
    align-items: center;
}
.contact-item { display: flex; align-items: center; color: var(--color-texto-claro); text-decoration: none; font-size: 0.9em; white-space: nowrap; }
.contact-icon { color: var(--color-acento); font-size: 20px; margin-right: 12px; }

/* NAVEGACIÓN */
.main-nav { flex-basis: 100%; order: 3; padding-top: 15px; margin-top: 15px; border-top: 1px solid rgba(255,255,255,0.1); }
.main-nav ul { list-style: none; display: flex; justify-content: center; gap: 40px; width: 100%; }
.main-nav a {
    color: var(--color-texto-claro); text-decoration: none; padding: 10px 5px; display: block;
    text-transform: uppercase; font-weight: bold; font-size: 0.9em; border-bottom: 2px solid transparent;
    transition: color 0.3s;
}
.main-nav a:hover { color: var(--color-acento); border-bottom: 2px solid var(--color-acento); }
.menu-toggle { display: none; background: none; border: none; color: white; font-size: 1.5em; cursor: pointer; }

/*==========================================================*/
/* NUEVA SECCIÓN: TÍTULO PRINCIPAL (H1 VISIBLE)             */
/*==========================================================*/
.main-title-banner {
    background-color: var(--color-principal-oscuro); /* Fondo Azul Oscuro */
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.main-title-banner h1 {
    color: var(--color-texto-claro); /* Texto Blanco Elegante */
    font-size: 1.8em;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    line-height: 1.3;
}
@media (max-width: 768px) {
    .main-title-banner h1 {
        font-size: 1.3em;
    }
}


/*==========================================================*/
/* SECCIÓN HERO (SLIDER PRINCIPAL)                          */
/*==========================================================*/
.hero-carousel {
    height: auto;
    overflow: hidden;
    position: relative;
    background-color: var(--color-principal-oscuro);
}

/* Estilo Base (Móvil First: Columna) */
.hero-slide {
    display: flex;
    flex-direction: column; /* Apila imagen arriba, texto abajo */
    height: auto;
    width: 100%;
    position: relative;
}

.slide-bg-img {
    position: relative; width: 100%; height: auto; display: block; z-index: 1;
}

/* Estilos Escritorio (>992px: Texto Flotante) */
@media (min-width: 993px) {
    .hero-slide { display: block; } /* Regresa a bloque normal */
    
    .slide-content-wrapper {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2;
        padding: 0 5%; display: flex; align-items: center; justify-content: flex-start;
    }
    .swiper-slide:nth-child(even) .slide-content-wrapper { justify-content: flex-end; }
    
    .slide-text-box {
        background-color: rgba(3, 15, 39, 0.85); color: var(--color-texto-claro);
        padding: 40px; max-width: 600px; border-left: 5px solid var(--color-acento);
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    .swiper-slide:nth-child(even) .slide-text-box {
        border-left: none; border-right: 5px solid var(--color-acento); text-align: right;
    }
}

.slide-text-box h2 { font-size: 2.2em; color: var(--color-acento); margin-bottom: 10px; line-height: 1.1; text-transform: uppercase; }
.slide-text-box p { font-size: 1.1em; margin-bottom: 15px; line-height: 1.5; }
.slide-divider { border: 0; border-top: 1px solid rgba(255,255,255,0.3); margin: 15px 0; }
.slide-text-box h3 { font-size: 1.1em; color: #ffd700; margin-bottom: 5px; text-transform: uppercase; font-weight: bold; }
.slide-secondary-text { font-size: 0.95em !important; margin-bottom: 25px !important; opacity: 0.9; }


/*==========================================================*/
/* SECCIÓN SERVICIOS (Centrada y Grande)                    */
/*==========================================================*/
.services-section {
    background-color: var(--color-texto-claro);
    color: var(--color-principal-oscuro);
    padding: 60px 20px;
    text-align: center;
}
.services-grid { display: flex; justify-content: center; gap: 20px; margin-top: 30px; }
.service-card {
    background-color: white; padding: 50px 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); border: 1px solid var(--color-texto-gris);
    flex: 1 1 300px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.service-icon {
    font-size: 8em !important; /* ICONO GIGANTE */
    color: var(--color-acento); margin-bottom: 20px; display: block; line-height: 1;
}
.service-image-card { position: relative; flex: 1 1 300px; }
.service-image-card img { width: 100%; height: 100%; object-fit: cover; }
.overlay-link { position: absolute; bottom: 20px; right: 20px; background: var(--color-acento); color: white; padding: 10px 20px; text-decoration: none; font-weight: bold; }


/*==========================================================*/
/* SECCIÓN ESTADÍSTICAS (Sólido Oscuro)                     */
/*==========================================================*/
.stats-section {
    background-color: #282C35; /* FONDO SÓLIDO OSCURO */
    padding: 60px 0;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card {
    background-color: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px 20px;
    text-align: center;
    color: white;
    transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--color-acento); }
.stat-icon { font-size: 3.5em; color: var(--color-acento); margin-bottom: 15px; display: block; }
.stat-card h3 { font-size: 2.5em; font-weight: bold; margin-bottom: 5px; line-height: 1; }
.stat-card p { font-size: 1em; color: #ccc; }


/*==========================================================*/
/* SECCIÓN: ¿POR QUÉ ELEGIRNOS?                             */
/*==========================================================*/
.why-choose-us { width: 100%; overflow: hidden; }
.why-container-fluid { display: flex; flex-wrap: wrap; width: 100%; }

.why-left-panel {
    background-color: var(--color-acento); color: white; width: 40%;
    padding: 80px 50px; display: flex; align-items: center; justify-content: center;
}
.why-content-box { max-width: 400px; }
.why-left-panel h2 { font-size: 2.5em; line-height: 1.1; text-transform: uppercase; margin-bottom: 20px; font-weight: 800; }
.why-left-panel p { font-size: 1.1em; line-height: 1.5; }

.why-right-panel {
    background-color: var(--color-principal-oscuro); width: 60%;
    padding: 80px 50px; display: flex; align-items: center;
}
.benefits-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; width: 100%; }
.benefit-item { display: flex; align-items: flex-start; gap: 20px; }
.benefit-icon { font-size: 3.5em; color: white; border: 2px solid rgba(255,255,255,0.2); padding: 10px; border-radius: 8px; flex-shrink: 0; }
.benefit-text h3 { color: white; font-size: 1.2em; text-transform: uppercase; margin-bottom: 10px; font-weight: bold; }
.benefit-text p { color: #cbd5e1; font-size: 0.95em; line-height: 1.4; }


/*==========================================================*/
/* SECCIÓN DIFERENCIADORES                                  */
/*==========================================================*/
.diff-section { padding: 60px 0; background-color: white; }
.diff-header { text-align: left; margin-bottom: 30px; }
.diff-subtitle-box {
    display: inline-block; border: 2px solid var(--color-acento); color: var(--color-acento);
    padding: 5px 15px; font-weight: bold; text-transform: uppercase; margin-bottom: 15px; letter-spacing: 1px;
}
.diff-header h2 { color: var(--color-acento); font-size: 2em; text-transform: uppercase; font-weight: 800; }
.diff-content { color: #555; font-size: 1.1em; }
.diff-list { list-style: none; }
.diff-list li { position: relative; padding-left: 25px; margin-bottom: 15px; font-weight: 500; }
.diff-list li::before { content: "—"; color: var(--color-acento); font-weight: bold; position: absolute; left: 0; top: 0; }


/*==========================================================*/
/* BANNER INTRO PROYECTOS                                   */
/*==========================================================*/
.projects-intro-banner { padding: 50px 0; text-align: center; background-color: white; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
.orange-text-title { color: var(--color-acento); font-size: 2.5em; margin: 0; line-height: 1.2; text-transform: uppercase; font-weight: 800; }
.orange-text-subtitle { color: var(--color-acento); font-size: 2.5em; margin: 0 0 20px 0; line-height: 1.2; text-transform: uppercase; font-weight: 800; }
.dark-text-intro { color: var(--color-principal-oscuro); font-weight: bold; font-size: 1.2em; text-transform: uppercase; max-width: 900px; margin: 0 auto; }

/* PROYECTOS (Aplica a las tarjetas en general, incluyendo la del Scroll Snap) */
.projects-section { padding: 40px 0; text-align: center; }
.project-card { text-align: center; padding: 10px; }
.project-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px; }
.project-card h3 { color: var(--color-acento); margin-top: 10px; }


/*==========================================================*/
/* SECCIÓN PROYECTOS: NUEVA CUADRÍCULA DENSIDAD             */
/*==========================================================*/
/* Contenedor de la galería (el que se afecta por filtros) */
.projects-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 4 columnas en PC, ajustable */
    gap: 20px;
    margin-top: 20px;
}

/* Estilo para los ítems de la galería */
.projects-gallery .project-item {
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    border-radius: 4px;
    overflow: hidden;
    padding: 0;
    opacity: 1;
}

/* Imagen para que ocupe todo el ancho y tenga altura fija/definida */
.projects-gallery .project-item img {
    width: 100%;
    height: 200px; /* Altura fija para uniformidad visual (similar a la imagen) */
    object-fit: cover;
    display: block;
}

/* Contenido de texto SEO */
.project-info-seo {
    padding: 15px;
    text-align: left;
}

.project-info-seo h4 {
    color: var(--color-principal-oscuro);
    font-size: 1.1em;
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: 800;
}

.project-info-seo p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.4;
}

.projects-gallery .project-item .boton-cotizar-simple {
    background-color: var(--color-acento);
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    font-size: 0.9em;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.projects-gallery .project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.filter-controls {
    text-align: center;
    margin-bottom: 30px;
}

.filter-btn {
    background-color: var(--color-fondo-claro);
    color: var(--color-principal-oscuro);
    border: 1px solid var(--color-texto-gris);
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--color-acento);
    color: white;
    border-color: var(--color-acento);
}

/*==========================================================*/
/* BANNER ACCIÓN/CONTACTO                                   */
/*==========================================================*/
.action-banner {
    background-color: var(--color-acento); color: white; padding: 60px 0;
    text-align: center; position: relative; overflow: hidden;
}
.action-content { position: relative; z-index: 2; }
.action-title-border {
    display: inline-block; border: 3px solid white; padding: 10px 30px;
    font-size: 2.5em; font-weight: 900; text-transform: uppercase; margin-bottom: 20px;
}
.action-subtitle { font-size: 1.8em; font-weight: 800; text-transform: uppercase; margin-bottom: 10px; }
.action-phone { font-size: 3em; font-weight: 900; margin: 10px 0; text-shadow: 2px 2px 4px rgba(0,0,0,0.1); }
.action-emails p { font-size: 1.1em; font-weight: bold; margin: 5px 0; }


/*==========================================================*/
/* SECCIÓN FAQ                                              */
/*==========================================================*/
.faq-section { padding: 60px 0; background-color: #f9f9f9; }
.faq-header-flex { display: flex; align-items: center; margin-bottom: 40px; }
.truck-icon-container { margin-right: 20px; }
.truck-icon { font-size: 4em; color: var(--color-principal-oscuro); }
.service-banner-orange { background-color: var(--color-acento); color: white; padding: 15px 40px; flex-grow: 1; }
.service-banner-orange h2 { margin: 0; font-size: 1.8em; text-transform: uppercase; font-weight: 800; }

.faq-container { display: flex; flex-direction: column; gap: 15px; }
.faq-item { background-color: white; border: 1px solid #eee; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.faq-question {
    width: 100%; text-align: left; padding: 20px; background: none; border: none;
    font-size: 1.1em; font-weight: 800; color: var(--color-acento);
    display: flex; justify-content: space-between; align-items: center; cursor: pointer; text-transform: uppercase;
}
.faq-arrow { transition: transform 0.3s ease; color: var(--color-principal-oscuro); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; padding: 0 20px; color: #555; }
.faq-answer p { padding-bottom: 20px; margin: 0; }


/*==========================================================*/
/* CTA FORM                                                 */
/*==========================================================*/
.cta-form-section { background-color: var(--color-secundario-oscuro); padding: 40px 0; color: white; }
.cta-content { display: flex; justify-content: space-between; align-items: center; }
.boton-cotizar-cta { background-color: var(--color-acento); color: white; border: none; padding: 15px 30px; font-weight: bold; cursor: pointer; font-size: 1.1em; text-decoration: none; display: inline-block; }


/*==========================================================*/
/* FOOTER (ACTUALIZADO)                                     */
/*==========================================================*/
#footer {
    background-color: var(--color-principal-oscuro);
    padding: 30px 0;
    border-top: 1px solid var(--color-secundario-oscuro);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-texto-gris);
    font-size: 0.9em;
}

.footer-info p { margin-bottom: 5px; }

/* Columna Derecha (Contacto y Créditos) */
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Alinear a la derecha en PC */
    gap: 10px;
}

/* Fila de Iconos */
.footer-icons-row {
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
}

.footer-icons-row i {
    color: var(--color-acento);
    font-size: 1.5em;
    transition: color 0.3s;
}

.footer-icons-row i:hover { color: white; }

/* Texto de Contacto */
.footer-contact-text {
    margin: 0;
    font-weight: bold;
    color: var(--color-texto-claro);
}

/* Grupo de Créditos y Aviso */
.developer-credit-group {
    font-size: 0.85em;
    opacity: 0.9;
    margin-top: 5px;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end; /* Alinear a la derecha en PC */
}

.developer-credit-group a {
    color: var(--color-acento); /* NARANJA para 8 BITS MX */
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.developer-credit-group a:hover {
    color: white;
    text-decoration: underline;
}

.privacy-link {
    /* Clave: Forzar el color NARANJA para Aviso de Privacidad */
    color: var(--color-acento) !important;
}

.separator {
    color: var(--color-texto-gris);
}


/* ANIMACIONES */
.anim-slide-up { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.anim-slide-up.is-visible { opacity: 1; transform: translateY(0); }


/*==========================================================*/
/* SECCIÓN CONTACTO DETALLADO (CONTACTO.HTML)               */
/*==========================================================*/
.contact-details-section {
    padding: 40px 0 60px 0;
    background-color: var(--color-texto-claro);
}

.map-full-width {
    margin-bottom: 40px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.contact-info-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-card {
    background-color: white;
    padding: 30px 15px;
    text-align: center;
    border-top: 4px solid var(--color-acento);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    min-height: 250px;
}

.info-icon {
    font-size: 3.5em;
    color: var(--color-acento);
    margin-bottom: 10px;
}

.info-card h3 {
    color: var(--color-principal-oscuro);
    font-size: 1.2em;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.info-card p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
    overflow-wrap: break-word;
}

.info-card a {
    color: var(--color-principal-oscuro);
    font-weight: bold;
    text-decoration: underline;
    font-size: 0.9em;
    display: block;
    margin-top: 10px;
}

/*==========================================================*/
/* SECCIÓN MÓDULOS DINÁMICOS (OFICINAS-MOVILES.HTML)        */
/*==========================================================*/
.module-selector-section {
    background-color: var(--color-principal-oscuro); /* Fondo azul oscuro */
    padding: 40px 0 40px 0;
    text-align: center;
}

.module-selector-section h2,
.module-selector-section label {
    color: var(--color-texto-claro) !important; /* Texto blanco */
    font-weight: bold;
}
#module-name {
    color: var(--color-acento) !important; /* Título principal naranja */
    font-weight: 800;
}

.module-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

#size-selector {
    min-width: 250px;
    padding: 12px 15px;
    border: 2px solid var(--color-acento);
    border-radius: 6px;
    font-size: 1.05em;
    background-color: var(--color-secundario-oscuro);
    color: var(--color-texto-claro);
    cursor: pointer;
    
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
#size-selector option {
    background-color: var(--color-secundario-oscuro);
    color: var(--color-texto-claro);
}

.module-detail-section {
    padding: 20px 0 60px 0;
}
.module-content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Imagen más ancha que detalles */
    gap: 40px;
    margin-top: 20px;
}

/* NUEVA GALERÍA SIMPLE */
.carousel-container {
    /* min-height eliminado. Ahora el alto lo define el contenido (la imagen). */
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

.main-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#main-module-image {
    width: 100%;
    max-height: 750px; /* Altura máxima para imágenes muy altas */
    object-fit: contain; /* Asegura que la imagen se vea completa sin recortar */
    border-radius: 4px;
    display: block;
    transition: opacity 0.3s ease-in-out; /* Controlado por JS */
}

/* Estilos para los botones de navegación */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(3, 15, 39, 0.5); /* Azul Oscuro Transparente */
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    transition: background 0.3s;
    opacity: 0.8;
}

.nav-btn:hover {
    background: var(--color-acento);
    opacity: 1;
}

.prev-btn {
    left: 10px;
    border-radius: 0 4px 4px 0;
}

.next-btn {
    right: 10px;
    border-radius: 4px 0 0 4px;
}
/* FIN NUEVA GALERÍA SIMPLE */

.details-box h3 {
    color: var(--color-principal-oscuro);
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 800;
}
.details-box p {
    color: #555;
    margin-bottom: 20px;
}
.specs-list {
    list-style: none;
    padding-left: 0;
}
.specs-list li {
    margin-bottom: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    color: #333;
}
.spec-list-icon {
    color: #25d366; /* Verde check */
    margin-right: 8px;
    font-size: 1.2em;
}
.plans-box {
    margin-top: 30px;
    text-align: center;
}
.plans-box h3 {
    color: var(--color-acento);
    font-weight: 800;
}
.cta-module-floating {
    margin-top: 25px;
    padding: 15px;
    border: 1px dashed var(--color-acento);
    border-radius: 4px;
    background-color: var(--color-fondo-claro);
    text-align: center;
}
.cta-module-floating p {
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--color-principal-oscuro);
}
.cta-module-floating .boton-cotizar-cta {
    font-size: 0.9em;
    padding: 10px 20px;
}

/* --- ESTILOS PARA EL CARRUSEL DE PLANOS --- */

/* El Contenedor que hace el scroll horizontal */
#plans-track.plans-carousel-track {
    display: flex; /* Alinea los planos horizontalmente */
    overflow-x: auto; /* ¡CLAVE! Permite el scroll horizontal */
    overflow-y: hidden; /* Oculta el scroll vertical */
    scroll-behavior: smooth; /* Hace que el scroll sea suave */
    
    /* Estilos para el ajuste de desplazamiento (opcional, pero mejora la experiencia móvil) */
    scroll-snap-type: x mandatory;
    
    /* Agregamos un poco de padding para que los planos no toquen los bordes */
    padding: 10px 15px;
    margin: 0 -15px; /* Compensa el padding para usar el ancho completo si es necesario */
}

/* Estilos de cada Plano (la imagen individual) */
.plan-item-image {
    flex-shrink: 0; /* ¡CLAVE! Evita que las imágenes se compriman */
    
    /* Definimos el ancho visible: 85% del viewport en móvil */
    width: 85vw;
    max-width: 400px; /* Ancho máximo absoluto */
    
    scroll-snap-align: center; /* Detiene el scroll en el centro de cada plano */
    
    margin-right: 15px; /* Espacio entre planos */
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    object-fit: contain;
}

/* Ajuste para desktop */
@media (min-width: 768px) {
    .plan-item-image {
        width: 300px; /* Ancho fijo para mostrar más de uno a la vez */
        max-width: 300px;
    }
}


/*==========================================================*/
/* ÍCONO WHATSAPP FLOTANTE                                  */
/*==========================================================*/
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: #25d366; /* Verde WhatsApp */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 2em;
    line-height: 60px;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    /* CORRECCIÓN: Asegura que el botón nunca esté oculto */
    display: block !important;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.05);
}


/*==========================================================*/
/* MODAL FLOTANTE DE WHATSAPP                               */
/*==========================================================*/
.whatsapp-modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    /* Animación de entrada */
    opacity: 0;
    transform: translateY(-50px);
    transition: opacity 0.3s ease-in, transform 0.3s ease-in;
}

/* El modal se muestra con JS, esta clase activa la animación de entrada */
.modal-content.is-visible {
    opacity: 1;
    transform: translateY(0);
}


.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h2 {
    color: var(--color-principal-oscuro);
    margin-bottom: 5px;
}

.modal-content p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 20px;
}

/* Estilo específico para el botón del formulario dentro del modal */
.modal-content .boton-cotizar-whatsapp {
    background-color: #25d366; /* Botón verde WhatsApp */
    color: white;
    border: none;
    padding: 15px 30px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.1em;
    text-decoration: none;
    display: block;
    width: 100%;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.modal-content .boton-cotizar-whatsapp:hover {
    background-color: #128c7e;
}


/*==========================================================*/
/* CARRUSEL PROYECTOS 100% CSS (SCROLL SNAP)                */
/*==========================================================*/

/* Contenedor que maneja el overflow horizontal */
.projects-scroll-container {
    overflow-x: scroll; /* Habilita el desplazamiento horizontal */
    overflow-y: hidden;
    scroll-snap-type: x mandatory; /* Fuerza el snap en cada elemento */
    margin: 20px 0;
    -webkit-overflow-scrolling: touch; /* Suaviza el desplazamiento en iOS */
}

/* El track interno (reemplaza swiper-wrapper) */
.projects-track {
    display: flex; /* Alinea los elementos horizontalmente */
    gap: 20px; /* Espacio entre las tarjetas */
    width: fit-content; /* Permite que el contenido determine el ancho total */
    padding: 10px 0; /* Espacio vertical si es necesario */
}

/* Cada tarjeta (reemplaza swiper-slide) */
.project-snap-item {
    flex-shrink: 0; /* Impide que las tarjetas se achiquen */
    scroll-snap-align: start; /* Alinea la tarjeta al inicio de la vista */
    
    /* Configuración de Ancho en Móvil: Muestra una tarjeta casi completa */
    width: 85vw;
    max-width: 300px; /* Limite máximo si la pantalla es muy grande */
    
    background-color: white; /* Para definir el borde de la tarjeta */
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); 
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

/* Ajustes para tablet/escritorio (se muestran 3 o 4 a la vez) */
@media (min-width: 640px) {
    .project-snap-item {
        width: 30%; /* Muestra 3 tarjetas y algo de la 4ª */
    }
}
@media (min-width: 1024px) {
    .project-snap-item {
        width: 23.5%; /* Muestra 4 tarjetas y algo de la 5ª */
    }
}

/*==========================================================*/
/* RESPONSIVIDAD (MÓVIL Y TABLET)                           */
/*==========================================================*/
@media (max-width: 992px) {
    /* Header */
    .contact-info-header { display: none; }
    .menu-toggle { display: block; order: 2; }
    .main-nav { margin-top: 0; border-top: none; }
    .main-nav ul { flex-direction: column; display: none; background-color: rgba(3, 15, 39, 0.95); padding: 20px; position: absolute; top: 80px; left: 0; z-index: 1000; align-items: center; }
    .main-nav ul.active { display: flex; }

    /* UX Slider Móvil Mejorado (Imagen arriba / Texto abajo) */
    .slide-content-wrapper { position: relative; width: 100%; padding: 0; background-color: var(--color-principal-oscuro); height: auto; }
    .slide-text-box { max-width: 100%; background-color: transparent; box-shadow: none; padding: 30px 20px; text-align: center !important; border: none; border-top: 4px solid var(--color-acento); }
    .swiper-slide:nth-child(even) .slide-text-box { text-align: center; border: none; border-top: 4px solid var(--color-acento); }
    .swiper-button-next, .swiper-button-prev { display: none !important; }

    /* Corrección CORREOS LARGOS en Action Banner */
    .action-emails { width: 100%; padding: 0 10px; }
    .action-emails p {
        font-size: 0.85em;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-all; /* Esto evita que el correo rompa el ancho */
        line-height: 1.4;
        margin-bottom: 10px;
    }

    /* Ajustes Generales */
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .why-container-fluid { flex-direction: column; }
    .why-left-panel, .why-right-panel { width: 100%; padding: 60px 30px; }
    .faq-header-flex { flex-direction: column; text-align: center; }
    .truck-icon-container { margin-right: 0; margin-bottom: 20px; }
    .service-banner-orange { width: 100%; }
    
    .cta-content, .footer-content, .services-grid { flex-direction: column; gap: 20px; text-align: center; }
    
    /* Footer en móvil */
    .footer-contact { align-items: center; }
    .developer-credit-group { justify-content: center; margin-top: 15px; } /* Centra los links de privacidad y créditos */
    
    /* Ajuste Responsivo para Contacto/Modal */
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
        font-size: 1.8em;
        line-height: 55px;
    }
    .modal-content {
        margin: 10% auto;
    }
    
    /* Ajuste Responsivo para la galería de proyectos */
    .projects-gallery {
        grid-template-columns: repeat(auto-fit, minmax(100%, 1fr)); /* Una columna en móvil */
    }

    /* Ajuste Responsivo para módulos dinámicos */
    .module-content-grid {
        grid-template-columns: 1fr;
    }
    .details-and-plans-container {
        margin-top: 20px;
    }
    .module-controls {
        flex-direction: column;
    }
    .carousel-container {
        min-height: 300px; /* Reducir altura en móvil */
    }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; }
    .benefits-grid { grid-template-columns: 1fr; }
    .action-title-border { font-size: 1.8em; padding: 10px; }
    .action-phone { font-size: 2em; }
}

@media (max-width: 500px) { /* Se activa en móviles estrechos */
    #size-selector {
        width: 100% !important; /* Fuerza a que ocupe todo el ancho */
        min-width: 0 !important; /* Elimina la restricción de ancho mínimo */
    }
}

/*==========================================================*/
/* SECCIÓN BLOG Y ARTÍCULOS                                 */
/*==========================================================*/

.articles-grid {
    display: grid;
    /* Por defecto en móvil: una columna */
    grid-template-columns: 1fr; 
    gap: 40px;
}

/* Tablet y Escritorio: 2 y 3 columnas */
@media (min-width: 768px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

.article-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.article-link {
    display: block;
    overflow: hidden;
}

.article-card img {
    width: 100%;
    height: 200px; /* Altura fija para uniformidad */
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover img {
    transform: scale(1.05);
}

.article-info {
    padding: 20px;
    text-align: left;
}

.article-category {
    display: inline-block;
    font-size: 0.75em;
    font-weight: bold;
    color: var(--color-acento);
    border: 1px solid var(--color-acento);
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.article-info h2 {
    font-size: 1.3em;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.3;
}

.article-info h2 a {
    color: var(--color-principal-oscuro);
    text-decoration: none;
    transition: color 0.3s;
}

.article-info h2 a:hover {
    color: var(--color-acento);
}

.article-info p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 20px;
}

.article-meta {
    font-size: 0.8em;
    color: var(--color-texto-gris);
}

.article-meta span {
    margin-right: 15px;
}

/* Estilos para la Paginación */
.pagination a {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    text-decoration: none;
    color: var(--color-principal-oscuro);
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.pagination .current, .pagination a:hover {
    background-color: var(--color-acento);
    color: white;
    border-color: var(--color-acento);
}

.pagination .next-page i {
    margin-left: 8px;
}