/* ============================================
   ESTILOS MÓVIL MEJORADOS - Centrado y Sin Overflow
   ============================================ */

/* Prevenir overflow horizontal en todo el sitio */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
}

/* Aplicar solo en dispositivos móviles y tablets */
@media screen and (max-width: 1024px) {

    /* ============================================
       PREVENCIÓN DE OVERFLOW
       ============================================ */

    * {
        box-sizing: border-box;
    }

    .container {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    img,
    video,
    iframe,
    svg {
        max-width: 100% !important;
        height: auto !important;
    }

    /* ============================================
       CENTRADO GENERAL DE CONTENIDO
       ============================================ */

    .section__header,
    .section__title,
    .section__description {
        text-align: center !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .about__data .section__title,
    .benefits__data .section__title,
    .approach__data .section__title,
    .contact__info .section__title,
    .contact__form-container .section__title {
        text-align: center !important;
    }

    /* Centrar grids y contenedores */
    .stats__container,
    .services__grid,
    .benefits__list,
    .reasons__grid,
    .sectors__grid,
    .process__steps,
    .additional__grid,
    .quick-contact__options {
        justify-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    /* ============================================
       SECCIONES ELEVADAS - SIN OVERFLOW
       ============================================ */

    .section-elevated {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow: hidden !important;
    }

    /* Variación 1: Gradiente Azul Navy con Brillo */
    .section-elevated-1 {
        background: linear-gradient(135deg,
            rgba(21, 51, 98, 0.08) 0%,
            rgba(255, 255, 255, 1) 30%,
            rgba(255, 255, 255, 1) 70%,
            rgba(182, 138, 84, 0.08) 100%) !important;
        border-left: 4px solid var(--navy-dark) !important;
        border-radius: 0 20px 20px 0 !important;
        box-shadow:
            -4px 0 20px rgba(21, 51, 98, 0.25),
            0 10px 40px rgba(21, 51, 98, 0.2) !important;
        padding: 3rem 1.25rem !important;
        margin: 2rem 0 !important;
    }

    .section-elevated-1::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg,
            var(--navy-dark) 0%,
            var(--gold-beige) 50%,
            var(--navy-dark) 100%);
        border-radius: 0 20px 0 0;
        opacity: 0.6;
    }

    /* Variación 2: Gradiente Dorado con Borde */
    .section-elevated-2 {
        background: linear-gradient(135deg,
            rgba(182, 138, 84, 0.1) 0%,
            rgba(255, 255, 255, 1) 25%,
            rgba(255, 255, 255, 1) 75%,
            rgba(21, 51, 98, 0.06) 100%) !important;
        border-right: 4px solid var(--gold-beige) !important;
        border-radius: 20px 0 0 20px !important;
        box-shadow:
            4px 0 20px rgba(182, 138, 84, 0.3),
            0 10px 40px rgba(21, 51, 98, 0.18) !important;
        padding: 3rem 1.25rem !important;
        margin: 2rem 0 !important;
    }

    .section-elevated-2::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg,
            var(--gold-beige) 0%,
            var(--navy-dark) 50%,
            var(--gold-beige) 100%);
        border-radius: 0 0 20px 0;
        opacity: 0.6;
    }

    /* Variación 3: Fondo Blanco Brillante con Marco Dorado */
    .section-elevated-3 {
        background: white !important;
        border: 3px solid transparent !important;
        border-image: linear-gradient(135deg, var(--gold-beige), var(--navy-dark)) 1 !important;
        border-radius: 20px !important;
        box-shadow:
            0 0 30px rgba(182, 138, 84, 0.3),
            0 10px 40px rgba(21, 51, 98, 0.25) !important;
        padding: 3rem 1.25rem !important;
        margin: 2rem 0 !important;
        position: relative;
    }

    /* Variación 4: Gradiente Diagonal Navy-Gold */
    .section-elevated-4 {
        background: linear-gradient(135deg,
            rgba(21, 51, 98, 0.12) 0%,
            rgba(255, 255, 255, 0.95) 20%,
            rgba(255, 255, 255, 0.95) 80%,
            rgba(182, 138, 84, 0.12) 100%) !important;
        border-top: 3px solid var(--navy-dark) !important;
        border-bottom: 3px solid var(--gold-beige) !important;
        border-radius: 20px !important;
        box-shadow:
            0 -5px 25px rgba(21, 51, 98, 0.15),
            0 15px 40px rgba(182, 138, 84, 0.2) !important;
        padding: 3rem 1.25rem !important;
        margin: 2rem 0 !important;
    }

    /* Variación 5: Efecto Neomorfismo Navy */
    .section-elevated-5 {
        background: linear-gradient(145deg,
            rgba(248, 249, 250, 1) 0%,
            rgba(255, 255, 255, 1) 100%) !important;
        border-radius: 20px !important;
        box-shadow:
            -8px -8px 20px rgba(255, 255, 255, 0.8),
            8px 8px 20px rgba(21, 51, 98, 0.25) !important;
        border: 1px solid rgba(21, 51, 98, 0.1) !important;
        padding: 3rem 1.25rem !important;
        margin: 2rem 0 !important;
    }

    .section-elevated-5::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        transform: translateY(-50%);
        width: 5px;
        height: 60%;
        background: linear-gradient(180deg,
            transparent,
            var(--navy-dark) 30%,
            var(--gold-beige) 50%,
            var(--navy-dark) 70%,
            transparent);
        border-radius: 0 10px 10px 0;
        opacity: 0.7;
    }

    /* Variación 6: Patrón con Gradiente */
    .section-elevated-6 {
        background: linear-gradient(135deg,
            rgba(255, 255, 255, 1) 0%,
            rgba(248, 249, 250, 1) 100%) !important;
        border-radius: 20px !important;
        box-shadow:
            0 10px 35px rgba(21, 51, 98, 0.2),
            0 5px 15px rgba(182, 138, 84, 0.15) !important;
        padding: 3rem 1.25rem !important;
        margin: 2rem 0 !important;
        border: 2px solid rgba(182, 138, 84, 0.2) !important;
    }

    /* ============================================
       TÍTULOS LLAMATIVOS EN MÓVIL
       ============================================ */

    .section__title {
        font-size: 1.6rem !important;
        font-weight: 900 !important;
        background: linear-gradient(135deg,
            var(--navy-dark) 0%,
            var(--gold-beige) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 1.5rem !important;
        position: relative;
        padding-bottom: 1rem;
        word-wrap: break-word !important;
        max-width: 100% !important;
    }

    .section__title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 4px;
        background: linear-gradient(90deg,
            var(--gold-beige),
            var(--navy-dark),
            var(--gold-beige));
        border-radius: 2px;
    }

    .section__description {
        font-size: 0.95rem !important;
        color: #666 !important;
        line-height: 1.7 !important;
        margin-bottom: 2rem !important;
        max-width: 100% !important;
        padding: 0 0.5rem !important;
    }

    /* ============================================
       CARDS Y ELEMENTOS LLAMATIVOS
       ============================================ */

    .stats__card,
    .service__card,
    .benefit__item,
    .reason__card,
    .sector__card {
        background: white !important;
        border-radius: 16px !important;
        padding: 1.5rem 1rem !important;
        box-shadow:
            0 8px 25px rgba(21, 51, 98, 0.15),
            0 3px 10px rgba(182, 138, 84, 0.1) !important;
        border: 2px solid rgba(182, 138, 84, 0.2) !important;
        transition: all 0.3s ease !important;
        margin-bottom: 1.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .stats__card:active,
    .service__card:active,
    .benefit__item:active,
    .reason__card:active,
    .sector__card:active {
        transform: translateY(-3px) !important;
        box-shadow:
            0 10px 30px rgba(21, 51, 98, 0.2),
            0 4px 12px rgba(182, 138, 84, 0.15) !important;
    }

    /* Iconos llamativos */
    .stats__icon,
    .service__icon i,
    .benefit__icon,
    .sector__icon i {
        font-size: 2.2rem !important;
        background: linear-gradient(135deg,
            var(--navy-dark),
            var(--gold-beige));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 1rem !important;
        display: block !important;
        text-align: center !important;
    }

    /* ============================================
       BOTONES LLAMATIVOS EN MÓVIL
       ============================================ */

    .button,
    .hero__button,
    .cta__button {
        background: linear-gradient(135deg,
            var(--navy-dark) 0%,
            var(--gold-beige) 100%) !important;
        color: white !important;
        border: none !important;
        padding: 1.1rem 2rem !important;
        border-radius: 50px !important;
        font-weight: 700 !important;
        font-size: 0.95rem !important;
        box-shadow:
            0 8px 20px rgba(21, 51, 98, 0.3),
            0 3px 10px rgba(182, 138, 84, 0.2) !important;
        transition: all 0.3s ease !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        margin: 0 auto !important;
        width: auto !important;
        max-width: calc(100% - 2rem) !important;
        white-space: nowrap !important;
    }

    .button:active,
    .hero__button:active,
    .cta__button:active {
        transform: translateY(-2px) scale(1.02) !important;
        box-shadow:
            0 10px 25px rgba(21, 51, 98, 0.35),
            0 4px 12px rgba(182, 138, 84, 0.25) !important;
    }

    .button i {
        font-size: 1.1rem !important;
    }

    /* ============================================
       SEPARADORES VISUALES
       ============================================ */

    .section-elevated + .section-elevated::before {
        display: none !important;
    }

    /* ============================================
       BADGES Y ETIQUETAS
       ============================================ */

    .reason__number,
    .process__number,
    .step__number {
        background: linear-gradient(135deg,
            var(--gold-beige),
            var(--navy-dark)) !important;
        color: white !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.4rem !important;
        font-weight: 900 !important;
        box-shadow: 0 5px 15px rgba(21, 51, 98, 0.3) !important;
        margin: 0 auto 1rem auto !important;
        flex-shrink: 0 !important;
    }

    /* ============================================
       ANIMACIONES SUAVES
       ============================================ */

    .section-elevated {
        animation: fadeInUp 0.6s ease-out;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* ============================================
       TEXTOS CENTRADOS Y CONTENIDOS
       ============================================ */

    p, li, span, h1, h2, h3, h4, h5, h6 {
        text-align: center !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    .about__text p,
    .approach__description,
    .service__description,
    .benefit__description {
        text-align: center !important;
        margin: 0 auto !important;
        max-width: 100% !important;
        padding: 0 0.5rem !important;
    }

    /* ============================================
       GRIDS RESPONSIVOS CENTRADOS
       ============================================ */

    .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        width: 100% !important;
    }

    .about__content,
    .benefits__container,
    .contact__container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .about__image,
    .benefits__image,
    .hero__images {
        margin: 2rem auto !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .about__image img,
    .benefits__image img,
    .hero__images img {
        max-width: 280px !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }

    /* ============================================
       FORMS Y INPUTS
       ============================================ */

    input,
    textarea,
    select {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .contact__form,
    .form__group {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ============================================
       TABLAS RESPONSIVAS
       ============================================ */

    table {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
    }
}

/* ============================================
   AJUSTES ESPECÍFICOS PARA MÓVILES PEQUEÑOS
   ============================================ */

@media screen and (max-width: 480px) {

    .section-elevated-1,
    .section-elevated-2,
    .section-elevated-3,
    .section-elevated-4,
    .section-elevated-5,
    .section-elevated-6 {
        padding: 2.5rem 1rem !important;
        margin: 1.5rem 0 !important;
        border-radius: 16px !important;
    }

    .section-elevated-1 {
        border-radius: 0 16px 16px 0 !important;
    }

    .section-elevated-2 {
        border-radius: 16px 0 0 16px !important;
    }

    .section__title {
        font-size: 1.4rem !important;
    }

    .section__description {
        font-size: 0.9rem !important;
    }

    .button,
    .hero__button,
    .cta__button {
        padding: 1rem 1.5rem !important;
        font-size: 0.85rem !important;
        max-width: calc(100% - 1rem) !important;
    }

    .stats__card,
    .service__card,
    .benefit__item,
    .reason__card,
    .sector__card {
        padding: 1.25rem 0.75rem !important;
    }

    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}
