﻿/*====================================================
  1. BASE & DESKTOP ULTRA / HD (>= 1200px)
====================================================*/

.hero-section {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 600px;
    background-color: #030B12;
    overflow: visible;
    display: flex;
    align-items: center;
    margin-bottom: 70px;
}

/* Fondo Azul Izquierdo */
.hero-bg-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, #0A1E2F 0%, #030B12 100%);
    z-index: 1;
}

/* Borde Decorativo Dorado */
.hero-shape-gold {
    position: absolute;
    top: 0;
    right: 0;
    width: 65%;
    height: 100%;
    background: linear-gradient(135deg, #BA8734, #CFA028);
    clip-path: ellipse(82% 115% at 90% 50%);
    z-index: 2;
    opacity: 0;
    animation: slideGold 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.2s;
}

/* Contenedor de Imagen Derecha */
.hero-image-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 65%;
    height: 100%;
    z-index: 3;
    clip-path: ellipse(78% 104% at 88% 40%);
    overflow: hidden;
    opacity: 0;
    animation: slideImage 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.4s;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 6s ease-out;
}

.hero-section:hover .hero-bg-image {
    transform: scale(1.05);
}

/* Contenido / Textos */
.relative-content {
    position: relative;
    z-index: 4;
    width: 100%;
}

.hero-content {
    max-width: 520px;
    color: #FFFFFF;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards 0.5s;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

    .hero-title .text-gold {
        color: #D4AF37;
        background: linear-gradient(135deg, #BA8734 0%, #D09935 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.5;
    color: #E2E8F0;
    margin-bottom: 25px;
    font-weight: 400;
}

.hero-features {
    list-style: none;
    padding: 0;
    margin: 0 0 35px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .hero-features li {
        display: flex;
        align-items: center;
        gap: 12px;
        font-size: 1rem;
        font-weight: 600;
        color: #FFFFFF;
    }

        .hero-features li i {
            color: #CFA028;
            font-size: 1.1rem;
        }

/* Botones */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-gold {
    background: linear-gradient(135deg, #BA8734, #D09935);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 14px 26px;
    border-radius: 6px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(207, 160, 40, 0.3);
}

    .btn-gold:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(207, 160, 40, 0.5);
        color: #FFFFFF;
    }

.btn-outline-light {
    background: transparent;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 13px 24px;
    border-radius: 6px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

    .btn-outline-light:hover {
        border-color: #FFFFFF;
        background: rgba(255, 255, 255, 0.1);
        color: #FFFFFF;
        transform: translateY(-2px);
    }

/* Tarjeta Flotante (Counters) */
.hero-counters-wrapper {
    position: absolute;
    bottom: -65px;
    left: 0;
    width: 100%;
    z-index: 10;
}

.hero-counters-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px 25px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.counter-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.counter-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #CFA028;
    font-size: 1.5rem;
}

.counter-number {
    font-size: 1.3rem;
    font-weight: 800;
    color: #030B12;
    margin: 0;
    line-height: 1.2;
}

.counter-label {
    font-size: 0.82rem;
    color: #55606E;
    margin: 2px 0 0 0;
    line-height: 1.2;
    font-weight: 500;
}

/* Keyframes */
@keyframes slideGold {
    0% {
        opacity: 0;
        transform: translateX(-50px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideImage {
    0% {
        opacity: 0;
        transform: translateX(60px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*====================================================
  PASO 2.4 y ADELANTE: MODO MÓVIL (COMPLETO)
====================================================*/

@media (max-width: 767px) {

    /* 1. CORRECCIÓN DE FONDO GENERAL */
    .hero-section {
        position: relative;
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding-top: 70px;
        padding-bottom: 5px; /* Espacio para los counters */
        background-color: #ffffff !important; /* El fondo hasta abajo será blanco */
        overflow: hidden;

        background-color: #ffffff !important;
    }

    .hero-bg-left {
        display: block !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;       
        background-color: #030B12;
        z-index: 1;
        height: 550px !important; /* El azul se detiene antes de los contadores */
    }

    /* 2. TEXTO Y BOTONES */
    .relative-content {
        order: 1;
        position: relative;
        z-index: 5;
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        margin-bottom: 15px;
    }

    .hero-content {
        max-width: 100%;
        text-align: left;
        padding: 0;
    }

    .hero-title {
        font-size: 1.85rem;
        line-height: 1.12;
        font-weight: 900;
        letter-spacing: 0.5px;
        margin-bottom: 10px;
        color: #ffffff;
    }

        .hero-title .text-gold {
            color: #d4af37;
            background: linear-gradient(135deg, #ba8734 0%, #d09935 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

    .hero-subtitle {
        font-size: 0.85rem;
        line-height: 1.4;
        color: #cbd5e1;
        margin-bottom: 16px;
        font-weight: 400;
    }

    .hero-features {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 18px;
        padding-left: 0;
        list-style: none;
    }

        .hero-features li {
            font-size: 0.82rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #ffffff;
        }

            .hero-features li i {
                color: #cfa028;
                font-size: 0.95rem;
            }

    .hero-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .btn-gold, .btn-outline-light {
        width: auto;
        min-width: 180px;
        max-width: 190px;
        padding: 8px 12px;
        font-size: 0.72rem;
        font-weight: 800;
        justify-content: center;
        text-align: center;
        border-radius: 5px;
    }

    .btn-outline-light {
        border: 1.5px solid rgba(255, 255, 255, 0.7);
    }

    /* 2. SUBIMOS LA S PEGADA AL BOTÓN (IZQUIERDA) Y HACEMOS HUECO (DERECHA) */
    .hero-shape-gold {
        order: 2;
        display: block !important;
        position: relative;
        width: 100%;
        height: 420px;
        background: linear-gradient(135deg, #BA8734, #CFA028);
        /* Fondo dorado */
        clip-path: path('M 400,25 C 300,25 235,200 0,110 L 0,420 L 400,420 Z');
        margin-top: -120px;
        z-index: 2;
        animation: none;
        opacity: 1;
    }

    /* 3. CONTENEDOR DE LA FOTO (Mismos valores pero 8px abajo para el borde) */
    .hero-image-wrapper {
        order: 3;
        position: relative;
        width: 100%;
        height: 420px;
        margin-top: -420px;
        z-index: 3;
        /* Imagen */
        clip-path: path('M 400,35 C 300,35 235,210 0,120 L 0,420 L 400,420 Z');
        animation: none;
        opacity: 1;
    }

    /* 4. BAJAMOS A LA FAMILIA POR DENTRO DE LA S */
    .hero-bg-image {
        width: 100%;
        height: 160%;
        object-fit: cover;
        object-position: center top;
        transform: translateY(70px); /* baja la foto */
    }

    /* 5. TARJETA DE CONTADORES CENTRADA */
    .hero-counters-wrapper {
        order: 4;
        position: relative;
        z-index: 10;
        margin-top: -40px; /* Se monta ligeramente sobre la foto */
        padding: 0;
        width: 100%;
        display: flex;
        justify-content: center;
        margin-bottom: 40px;
        bottom: auto;
    }

        .hero-counters-wrapper .container-xl {
            display: flex;
            justify-content: center;
            width: 100%;
        }

    .hero-counters-card {
        width: 100%;
        max-width: 360px; /* Evita que sea gigante y la centra */
        margin: 0 auto;
        background: #ffffff;
        border-radius: 12px;
        padding: 20px 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 20px 10px;
        border: none; /* Quitamos el borde del desktop para que sea más limpia */
    }

    .counter-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
    }

    .counter-icon {
        width: auto; /* Anulamos ancho fijo del desktop */
        height: auto;
    }

        .counter-icon i {
            font-size: 1.6rem;
            color: #CFA028;
        }

    .counter-info {
        display: flex;
        flex-direction: column;
        text-align: left;
    }

    .counter-number {
        font-size: 0.85rem;
        font-weight: 800;
        color: #030b12;
        margin: 0 0 2px 0;
        line-height: 1.1;
    }

    .counter-label {
        font-size: 0.65rem;
        color: #64748b;
        margin: 0;
        line-height: 1.3;
        font-weight: 500;
    }
}
/* <--- ¡ESTA LLAVE CIERRA EL MODO MÓVIL! */

/*====================================================
  MODO TABLET (768px a 1024px) - CORREGIDO
====================================================*/
@media (min-width: 768px) and (max-width: 1024px) {

    /* 1. SECCIÓN PRINCIPAL HORIZONTAL FIJA */
    .hero-section {
        position: relative !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        height: 520px !important;
        min-height: 520px !important;
        background-color: #030B12 !important;
        overflow: visible !important; /* Permite que la tarjeta de contadores flote abajo */
        margin-bottom: 70px !important; /* Espacio para no empalmar la siguiente sección */
        padding: 0 !important;
    }

    /* Fondo azul base */
    .hero-bg-left {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 55% !important;
        height: 100% !important;
        background-color: #030B12 !important;
        z-index: 1 !important;
    }

    /* 2. CONTENIDO TEXTO E IZQUIERDA */
    .relative-content {
        position: relative !important;
        z-index: 5 !important;
        width: 50% !important;
        padding-left: 35px !important;
        padding-right: 15px !important;
        margin: 0 !important;
    }

    .hero-content {
        max-width: 100% !important;
        text-align: left !important;
    }

    .hero-title {
        font-size: 2.1rem !important;
        line-height: 1.15 !important;
        font-weight: 900 !important;
        margin-bottom: 12px !important;
        color: #ffffff !important;
    }

    .hero-subtitle {
        font-size: 0.88rem !important;
        line-height: 1.4 !important;
        color: #cbd5e1 !important;
        margin-bottom: 16px !important;
    }

    .hero-features {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 20px !important;
        padding-left: 0 !important;
        list-style: none !important;
    }

        .hero-features li {
            font-size: 0.82rem !important;
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
            color: #ffffff !important;
        }

    .hero-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .btn-gold, .btn-outline-light {
        width: auto !important;
        padding: 10px 16px !important;
        font-size: 0.75rem !important;
        font-weight: 800 !important;
        border-radius: 5px !important;
        white-space: nowrap !important;
    }

    /* 3. MARCO DORADO Y FOTO (ESCALADO CON ELLIPSE FLUIDO) */
    .hero-shape-gold {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        width: 58% !important;
        height: 100% !important;
        background: linear-gradient(135deg, #BA8734, #CFA028) !important;
        clip-path: ellipse(85% 120% at 92% 50%) !important;
        z-index: 2 !important;
        animation: none !important;
        opacity: 1 !important;
        margin: 0 !important;
    }

    .hero-image-wrapper {
        display: block !important;
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        width: 58% !important;
        height: 100% !important;
        clip-path: ellipse(82% 112% at 90% 45%) !important;
        z-index: 3 !important;
        animation: none !important;
        opacity: 1 !important;
        margin: 0 !important;
    }

    .hero-bg-image {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important;
        transform: none !important;
    }

    /* 4. TARJETA FLOTANTE DE CONTADORES CENTRADA ABAJO */
    .hero-counters-wrapper {
        position: absolute !important;
        bottom: -40px !important;
        top: auto !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 10 !important;
        margin: 0 !important;
        padding: 0 25px !important;
        display: flex !important;
        justify-content: center !important;
    }

    .hero-counters-card {
        width: 100% !important;
        max-width: 750px !important;
        margin: 0 auto !important;
        background: #ffffff !important;
        border-radius: 12px !important;
        padding: 16px 20px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
        border: none !important;
    }

    .counter-item {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .counter-icon i {
        font-size: 1.4rem !important;
        color: #CFA028 !important;
    }

    .counter-info {
        display: flex !important;
        flex-direction: column !important;
        text-align: left !important;
    }

    .counter-number {
        font-size: 0.88rem !important;
        font-weight: 800 !important;
        color: #030b12 !important;
        margin: 0 0 2px 0 !important;
        line-height: 1.1 !important;
    }

    .counter-label {
        font-size: 0.65rem !important;
        color: #64748b !important;
        margin: 0 !important;
        line-height: 1.2 !important;
    }
}

html, body {
    max-width: 100% !important;
    overflow-x: hidden !important; /* Evita que la pantalla se desplace horizontalmente */
    margin: 0;
    padding: 0;
}