html {
    scroll-behavior: smooth;
}

section {
    scroll-margin-top: 100px;
    /* Offset para que el header no tape el título */
}

@media (max-width: 991px) {
    section {
        scroll-margin-top: 70px;
        /* Offset menor para móviles */
    }
}

:root {
    /* Variables de color basadas en el logo de MOS Technology */
    --primary-blue: #00aeef;
    --primary-green: #8dc63f;
    --dark-grey: #4a4a4a;
    --light-grey: #f4f4f4;
    --white: #ffffff;
    --black: #1a1a1a;

    /* Variables de transición y layout */
    --transition-slow: 1.5s cubic-bezier(0.2, 1, 0.3, 1);
    /* Transición más refinada y lenta */
    --transition-fast: all 0.3s ease;
    --max-width: 1200px;
}

/* Estilos Globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Asegura que el padding no afecte el ancho total */
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    position: relative;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
}

body.menu-open {
    overflow: hidden;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Contenedor principal para centrar contenido */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Espaciado general de secciones */
.section {
    padding: 80px 0;
    /* Reducido un poco para PC también */
}

.bg-light {
    background-color: var(--light-grey);
}

.text-center {
    text-align: center;
}

.mb-50 {
    margin-bottom: 50px;
}

/* Estilos de Tipografía y Títulos */
.section-subtitle {
    display: block;
    color: var(--primary-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    /* Reducido de 15px */
    font-size: clamp(0.75rem, 2vw, 0.9rem);
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 15px;
    /* Reducido de 25px */
    line-height: 1.2;
}

.section-title span {
    color: var(--primary-green);
}

/* Estilos de Botones */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: #008cc0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 174, 239, 0.3);
}

.btn-secondary {
    background: var(--primary-green);
    color: var(--white);
}

.btn-secondary:hover {
    background: #76a834;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(141, 198, 63, 0.3);
}

/* Navegación y Encabezado Moderno con Glassmorphism */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
}

/* Efecto Frosted Glass al hacer Scroll */
.header.scrolled {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo con escalado fluido y elegante */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 52px;
    width: auto;
    transition: height 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
    object-fit: contain;
}

.header.scrolled .logo img {
    height: 42px;
}

.mobile-menu-header {
    display: none; /* Oculto en escritorio */
}

/* Enlaces de Navegación */
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 32px;
}

/* Estilo moderno y limpio para los links de navegación */
.nav-links .nav-link {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.96rem;
    letter-spacing: 0.2px;
    position: relative;
    padding: 6px 0;
    transition: color 0.25s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Línea animada por debajo al pasar el cursor */
.nav-links .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-blue);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s cubic-bezier(0.2, 1, 0.3, 1);
}

.nav-links .nav-link:hover::after,
.nav-links .nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-links .nav-link:hover {
    color: #ffffff;
}

.nav-links .nav-link.active {
    color: #ffffff;
    font-weight: 600;
}

/* Enlaces cuando el header tiene scroll */
.header.scrolled .nav-links .nav-link {
    color: #374151;
    text-shadow: none;
}

.header.scrolled .nav-links .nav-link:hover {
    color: var(--primary-blue);
}

.header.scrolled .nav-links .nav-link.active {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Botón CTA Destacado */
.nav-cta-item {
    margin-left: 8px;
}

.nav-links a.nav-cta {
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(0, 174, 239, 0.3);
    border: none;
    text-shadow: none;
    display: inline-block;
}

.nav-links a.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 174, 239, 0.45);
}

/* Botón Hamburguesa */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    transition: color 0.2s ease;
}

.header.scrolled .menu-toggle,
body.menu-open .menu-toggle {
    color: var(--black);
}

/* Sección Hero / Carrusel */
.hero {
    height: 100vh;
    min-height: 600px;
    width: 100%;
}

.hero-swiper {
    height: 100%;
    width: 100%;
    position: relative;
}

/* Swiper Custom Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: var(--white) !important;
    background: rgba(0, 0, 0, 0.3) !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50%;
    transition: background 0.15s ease, transform 0.15s ease !important;
    /* Reacción instantánea */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 22px !important;
    font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--primary-blue) !important;
    transform: scale(1.1);
    border-color: var(--primary-blue);
}

@media (max-width: 991px) {

    .swiper-button-next,
    .swiper-button-prev {
        display: none !important;
        /* Mantener oculto en móvil para evitar tapar texto */
    }
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: #0f172a;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    will-change: transform, opacity;
    transform: scale(1);
    transition: transform 9s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Efecto Ken Burns suave y continuo al estar activo */
.swiper-slide-active .slide-bg {
    transform: scale(1.08);
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.25s, transform 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.25s;
}

.swiper-slide-active .slide-content {
    opacity: 1;
    transform: translateY(0);
}

.slide-content h1 {
    font-size: clamp(2.2rem, 8vw, 4rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

/* Sección de Cuadrícula (Nosotros y Marcas) */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Clase para invertir el orden de la cuadrícula */
.section-grid.reverse {
    direction: ltr;
}

@media (min-width: 992px) {
    .section-grid.reverse {
        grid-template-columns: 1fr 2.2fr;
        align-items: center;
    }

    .section-grid.reverse>div:first-child {
        order: 2;
    }

    .section-grid.reverse>div:last-child {
        order: 1;
    }
}

.about-image img,
.brands-image img {
    width: 100%;
    border-radius: 20px;
}

.about-image img {
    box-shadow: clamp(5px, 2vw, 20px) clamp(5px, 2vw, 20px) 0 var(--primary-blue);
}

.brands-image img {
    box-shadow: calc(clamp(5px, 2vw, 20px) * -1) clamp(5px, 2vw, 20px) 0 var(--primary-green);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary-green);
}

/* Sección de Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    border: none;
    cursor: default;
}

.icon-box {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.service-card:hover .icon-box {
    color: var(--primary-green);
}

/* Sección de Información Extra */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.info-grid.three-columns {
    grid-template-columns: repeat(3, 1fr);
}

.info-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    height: 100%;
}

.info-card.featured {
    background: var(--primary-blue);
    color: var(--white);
}

.icon-box-small {
    font-size: 1.8rem;
    color: var(--primary-green);
    margin-bottom: 20px;
}

.info-card.featured .icon-box-small {
    color: var(--white);
}

.check-list {
    list-style: none;
    margin-top: 20px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Nueva Sección de Marcas (Tarjetas Estáticas) */
.brands-section {
    background: var(--light-grey);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

@media (min-width: 992px) {
    .brands-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.brand-card {
    background: var(--white);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 120px;
    cursor: default;
}

.brand-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
}

.brand-logo {
    max-width: 85%;
    max-height: 70px;
    object-fit: contain;
    /* Eliminado grayscale para mostrar colores originales */
    filter: none;
    transition: var(--transition-fast);
}

.brand-card:hover .brand-logo {
    transform: scale(1.05);
}

/* Sección de Contacto */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-top: 50px;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.instagram-link {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    transition: var(--transition-fast);
    padding: 2px 0;
    border-bottom: 1.5px solid transparent;
}

.instagram-link:hover {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #ddd;
    outline: none;
    transition: var(--transition-fast);
}

/* Animaciones de Revelado (Optimizadas para GPU) */
.reveal-left,
.reveal-right,
.reveal-up {
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate3d(0, 0, 0);
    /* Force Layer */
}

.reveal-left {
    transform: translate3d(-30px, 0, 0);
}

.reveal-right {
    transform: translate3d(30px, 0, 0);
}

.reveal-up {
    transform: translate3d(0, 30px, 0);
}

.revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0) !important;
}

/* Elementos de fondo dinámicos (Optimizados con CSS) */
.floating-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(var(--primary-blue), var(--primary-green));
    opacity: 0.04;
    filter: blur(80px);
    animation: floatingCircles 20s infinite alternate ease-in-out;
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: -50px;
    animation-delay: -5s;
}

@keyframes floatingCircles {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(30px, 50px, 0);
    }
}

/* Pantalla de Carga (Preloader) */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 150px;
    margin-bottom: 20px;
    animation: pulseLogo 2s infinite ease-in-out;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: #eee;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    animation: loadingBar 2s infinite ease;
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes loadingBar {
    0% {
        left: -100%;
    }

    50% {
        left: 0%;
    }

    100% {
        left: 100%;
    }
}

body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}

/* Botón de WhatsApp Flotante */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: var(--transition-fast);
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
    background-color: #128c7e;
    color: #fff;
}

/* Mapa de Google */
.map-container {
    margin-top: 50px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

/* Pie de Página */
.footer {
    padding: 40px 0;
    border-top: 1px solid #eee;
    background: #fff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 12px;
}

.footer-links a {
    color: var(--dark-grey);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 50px;
    background: #f8f9fa;
    border: 1px solid #eee;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 174, 239, 0.2);
}

/* Diseño Responsivo para Móviles */
@media (max-width: 991px) {
    .section {
        padding: 20px 0 !important;
        /* Reducción agresiva para layout ultra-compacto */
    }

    .container {
        padding: 0 10px;
        /* Reducción de márgenes laterales para ganar ancho */
    }

    .slide-content {
        max-width: 100%;
        /* El contenido del carrusel ocupa todo el ancho */
        padding: 0 10px;
    }

    .hero {
        height: 60vh;
        /* Reducido para evitar que el carrusel ocupe demasiado espacio inicial */
        min-height: 350px;
    }

    .services-grid {
        gap: 15px;
        /* Menos espacio entre tarjetas en móvil */
    }

    .service-card {
        padding: 25px;
        /* Menos aire interno en móviles */
    }

    .info-card {
        padding: 25px;
    }

    .map-container {
        margin-top: 20px;
        /* Menos espacio sobre el mapa */
    }

    .mb-50 {
        margin-bottom: 20px;
        /* Reducción de margen inferior de cabeceras */
    }

    .section-grid,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .brands-grid {
        gap: 10px;
        margin-top: 15px;
    }

    .info-grid.three-columns {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .map-container iframe {
        height: 300px;
        /* Iframe más bajo en móviles */
    }

    .menu-toggle {
        display: block;
    }

    /* Fondo semitransparente oscuro detrás del menú móvil */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 1000;
    }

    .nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 24px;
        padding-bottom: 16px;
        border-bottom: 1px solid #edf2f7;
    }

    .mobile-logo {
        height: 44px;
        width: auto;
    }

    .menu-close {
        background: #f1f5f9;
        border: none;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #475569;
        font-size: 1.1rem;
        transition: all 0.2s ease;
    }

    .menu-close:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

    /* Cajón lateral Off-Canvas elegante */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 24px 20px;
        box-shadow: -10px 0 35px rgba(0, 0, 0, 0.12);
        transition: right 0.38s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1001;
        overflow-y: auto;
        gap: 8px;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        margin-bottom: 0;
    }

    .nav-links .nav-link {
        color: #1e293b;
        font-size: 1.05rem;
        font-weight: 500;
        display: block;
        padding: 12px 16px;
        background: transparent;
        border: none;
        border-radius: 10px;
        text-align: left;
        text-shadow: none;
        transition: all 0.2s ease;
    }

    .nav-links .nav-link::after {
        display: none;
    }

    .nav-links .nav-link:hover,
    .nav-links .nav-link.active {
        background: rgba(0, 174, 239, 0.08);
        color: var(--primary-blue);
        padding-left: 20px;
    }

    .nav-cta-item {
        margin-left: 0;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid #edf2f7;
    }

    .nav-links a.nav-cta {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    body.menu-open .header {
        background: transparent;
    }

    .footer {
        padding: 30px 0;
    }

    .footer-bottom {
        display: flex;
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
        width: 100%;
    }

    .footer-links a {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .section-subtitle {
        margin-bottom: 5px;
    }

    .section-title {
        margin-bottom: 10px;
    }

    p {
        margin-bottom: 5px;
    }

    .menu-toggle {
        z-index: 1002;
    }

    .about-image,
    .brands-image {
        margin-top: 15px;
        /* Reducido de 30px */
    }

    .reverse>.reveal-left {
        order: 1 !important;
    }

    .reverse>.reveal-right {
        order: 2 !important;
    }

    /* Reducción de desplazamientos de animación en móviles para evitar overflow */
    .reveal-left,
    .reveal-right,
    .reveal-up {
        opacity: 1 !important;
    }

    .reveal-left {
        transform: translateX(-20px);
    }

    .reveal-right {
        transform: translateX(20px);
    }

    .reveal-up {
        transform: translateY(20px);
    }

    /* Forzar que no haya márgenes extraños entre secciones */
    section,
    footer,
    header {
        margin: 0 !important;
        overflow: visible;
        /* Permitir que efectos como paralaje se vean correctamente */
    }
}

/* Ajustes finos para teléfonos pequeños */
@media (max-width: 480px) {
    .container {
        padding: 0 8px;
        /* Aún más ancho en pantallas muy pequeñas */
    }

    /* Mantener visibles pero sin desplazamiento en pantallas muy pequeñas */
    .reveal-left,
    .reveal-right {
        transform: translateX(0);
        opacity: 1;
    }

    .reveal-up {
        transform: translateY(20px);
    }

    .stats-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* Soporte para modo oscuro del sistema si se desea, o al menos asegurar legibilidad en navegadores con "force dark mode" */
@media (prefers-color-scheme: dark) {
    /* Si decides añadir modo oscuro automático aquí iría el código */
}

/* Mejoras para otros navegadores */
@-moz-document url-prefix() {
    /* Ajustes específicos para Firefox si son necesarios */
}

/* Notificaciones Toast Profesionales */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 9999;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-container.show {
    transform: translateX(-50%) translateY(0);
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #eee;
}

.toast.success {
    border-left: 5px solid var(--primary-green);
}

.toast.error {
    border-left: 5px solid #ff4b2b;
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: var(--primary-green);
}

.toast.error i {
    color: #ff4b2b;
}

.toast p {
    margin: 0;
    font-weight: 600;
    color: var(--black);
    font-size: 0.95rem;
}

/* Estilos de Modales (Términos y Privacidad) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--white);
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 25px;
    position: relative;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-grey);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.5rem;
}

.close-modal {
    font-size: 1.8rem;
    color: var(--dark-grey);
    cursor: pointer;
    transition: var(--transition-fast);
    line-height: 1;
}

.close-modal:hover {
    color: var(--primary-green);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark-grey);
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.modal-body h4 {
    color: var(--black);
    margin: 25px 0 10px 0;
    font-size: 1.2rem;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .modal-container {
        max-height: 90vh;
        border-radius: 20px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 20px;
        font-size: 0.95rem;
    }
}