/* =========================================================
   --- ESTILO BRAND STORY (PC Y GENERAL) ---
========================================================= */
.brand-story {
    padding: 0;
    background-color: #fff;
    margin-top: 0px;  
    position: relative;
    z-index: 1;
}

.brand-image-wrapper {
    position: relative;
    width: 100%;
    height: 90vh; 
    border-radius: 0; 
    border-bottom-left-radius: 50px; 
    border-bottom-right-radius: 50px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: brightness(0.9) contrast(1.1); 
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 20, 40, 0.6) 0%, transparent 70%);
}

.brand-floating-text {
    position: relative;
    z-index: 5;
    text-align: center;
    color: white;
    max-width: 700px;
    padding: 20px;
    top: -190px;
}

.brand-badge {
    background: var(--color-acento);
    color: var(--azul-marino);
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.brand-title {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 0.9;
    margin: 20px 0;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.text-outline {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--color-acento);
}

.brand-description {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 30px;
    font-weight: 300;
}

.btn-minimal {
    color: white;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 2px;
    border-bottom: 2px solid var(--color-acento);
    padding-bottom: 5px;
    transition: 0.3s;
}

.btn-minimal:hover {
    color: var(--color-acento);
    padding-left: 10px;
}

/* =========================================================
   --- SECCIÓN AGENCY ABOUT ---
========================================================= */
.agency-about {
    padding: 60px 5% 40px; 
}

.agency-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 100px;
    align-items: center;
}

.agency-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px; 
}

.main-frame {
    border: 1px solid #e0e0e0;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 550px; 
    overflow: hidden !important; 
}

/* =========================================================
   IMAGEN UNIVERSAL RESPONSIVE PERFECTA
========================================================= */

.main-frame img{
    width:100% !important;

    aspect-ratio: 16 / 9;   /* 👈 CLAVE PRO */
    height: auto !important;

    display:block;
    object-fit:cover !important;
    object-position:center center !important;

    border-radius:4px;

    transition:transform .4s ease;

    image-rendering:auto;
    backface-visibility:hidden;
    transform:translateZ(0);
}
.main-frame:hover img {
    transform: scale(1.03);
}

.floating-badge {
    position: absolute;
    bottom: -80px;
    right: -30px;
    background: var(--azul-marino);
    color: white;
    padding: 25px 35px;
    text-align: left; 
    box-shadow: 15px 15px 40px rgba(0,0,0,0.2);
    border-radius: 4px; 
    border-left: 5px solid var(--color-acento); 
    z-index: 10;
}

.badge-icon {
    color: var(--color-acento);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: block;
}

.slogan-badge {
    font-family: 'Montserrat', sans-serif; 
    font-size: 0.95rem;
    line-height: 1.4;
    letter-spacing: 0.5px;
    display: block;
    color: rgba(255, 255, 255, 0.9);
}

.slogan-badge strong {
    display: block; 
    font-size: 1.1rem;
    color: var(--color-acento);
    font-weight: 800;
    text-transform: uppercase;
    margin-top: 5px;
}

.pre-title { 
    color: var(--color-acento); 
    font-size:.85rem;
    font-weight: 700; 
    letter-spacing: 3px; 
    margin-bottom: 14px; 
    text-transform: uppercase;
}

.agency-info h2 { 
    font-size: 2.6rem; 
    color: #111; 
    line-height: 1.2; 
    font-weight:700;
    margin-bottom: 24px; 
}

.blue-line { 
    color: var(--color-acento); 
    font-weight: 800; 
}

.main-p { 
    font-size: 1rem; 
    color: #666; 
    line-height: 1.9; 
    font-weight:400;
    margin-bottom: 40px; 
    max-width: 95%;
}

/* MISION Y VISION CENTRADO PERFECTAMENTE */
.values-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 45px;
}

.values-grid {
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.value-box {
    width: 100%;
    max-width: 420px;
    background: #f8f9fb;
    padding: 28px;
    border-radius: 16px;
    text-align: left;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
    border: 1px solid rgba(0,0,0,.04);
}

.value-box h4 { 
    color: var(--azul-marino); 
    margin-bottom: 14px; 
    font-size: 1rem; 
    text-transform: uppercase; 
    font-weight:700;
    letter-spacing:.5px;
}

.value-box p { 
    font-size: .92rem; 
    color: #666; 
    line-height: 1.8;
    font-weight:400;
}

/* =========================================================
   --- SECCIÓN TRUST FEATURES (VALORES) ---
========================================================= */
.trust-features {
    padding: 40px 5%; 
    background-color: #ffffff;
}

.trust-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.trust-header .sub-title {
    color: var(--color-acento);
    font-weight: 800;
    letter-spacing: 3px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.trust-header h2 {
    font-size: 2.8rem;
    color: var(--azul-marino);
    margin: 10px 0 20px;
    font-family: 'Montserrat', sans-serif;
}

.trust-header .highlight {
    color: var(--color-acento);
    border-bottom: 4px solid var(--color-acento);
}

.trust-header p {
    color: #666;
    font-size: 1.1rem;
}

.trust-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.trust-card {
    background: #fdfdfd;
    padding: 40px;
    border-radius: 15px;
    border: 1px solid #eee;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.trust-card:hover {
    transform: translateY(-10px);
    background: #fff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--color-acento);
}

.icon-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.icon-box i {
    font-size: 1.8rem; 
    color: var(--color-acento); 
    background: rgba(0, 110, 255, 0.1); 
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; 
    transition: 0.3s all ease;
}

.trust-card:hover .icon-box i {
    background: var(--color-acento); 
    color: white; 
    transform: rotate(-10deg); 
}

.card-num {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(0,0,0,0.03); 
    position: absolute;
    top: 20px;
    right: 20px;
}

.trust-card h5 {
    font-size: 1.3rem;
    color: var(--azul-marino);
    margin-bottom: 15px;
    font-weight: 700;
}

.trust-card p {
    color: #777;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* =========================================================
   --- SECCIÓN MAPA PREMIUM ---
========================================================= */
.ubicacion-mapa {
    padding: 40px 5% 80px; 
    background-color: #fcfcfc; 
}

.mapa-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr; 
    gap: 40px;
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
    align-items: center;
}

.mapa-info {
    padding: 40px;
}

.tagline-blue {
    color: var(--color-acento);
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 10px;
}

.mapa-info h2 {
    color: var(--azul-marino);
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.mapa-info p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.mapa-info i {
    color: var(--color-acento);
    margin-right: 10px;
}

.btn-mapa {
    display: inline-block;
    padding: 12px 25px;
    background: var(--azul-marino);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.8rem;
    transition: 0.3s;
}

.btn-mapa:hover {
    background: var(--color-acento);
    color: var(--azul-marino);
    transform: translateY(-3px);
}

.mapa-iframe {
    line-height: 0; 
    border-radius: 15px;
    overflow: hidden; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* =========================================================
   --- FIX FOOTER RESPONSIVE ---
========================================================= */
.footer{
    width:100%;
    overflow:hidden;
    background:#0b1220; 
    padding:50px 5% 20px;
    box-sizing:border-box;
}

.footer-container{
    max-width:1200px;
    margin:0 auto;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:40px;
    flex-wrap:wrap;
}

.footer-item{
    flex:1;
    min-width:220px;
}

.footer-logo{
    display:flex;
    justify-content:center;
    align-items:center;
}

.logo-img{
    max-width:180px;
    width:100%;
    height:auto;
    object-fit:contain;
}

.footer h3{
    font-size:1.1rem;
    margin-bottom:15px;
    color:#fff;
}

.footer p,
.footer a{
    font-size:.95rem;
    line-height:1.7;
    color:#d9d9d9;
    text-decoration:none;
}

.footer-copyright{
    text-align:center;
    margin-top:40px;
    color:#aaa;
    font-size:.85rem;
}


/* =========================================================
   =================== MEDIA QUERIES =======================
   ========================================================= */

/* --- TABLET --- */
@media (max-width: 992px) {
    .agency-container {
        grid-template-columns: 1fr 1.1fr !important;
        gap: 50px !important;
    }
    .trust-container {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px;
    }
    .mapa-container {
        grid-template-columns: 0.8fr 1.2fr !important;
        gap: 25px;
    }
    
    /* CORRECCIÓN TABLET: Cambiamos 75vh por un alto fijo óptimo. 
       Así la foto no se sube ni se corta por abajo drásticamente. */
    .brand-image-wrapper {
        height: 380px !important;
        border-bottom-left-radius: 35px;
        border-bottom-right-radius: 35px;
    }

    /* Aplicamos el centrado perfecto y renderizado limpio en tablets */
    .parallax-img {
        position: absolute !important;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important; /* Mantiene el centro de interés */
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        transform: translateZ(0) scale(1.0) !important;
    }

    /* Reposicionamos de forma absoluta el texto flotante para evitar saltos o espacios vacíos */
    .brand-floating-text {
        position: absolute !important;
        left: 50%;
        bottom: 40px;
        transform: translateX(-50%) !important;
        width: 100%;
        max-width: 650px;
        top: auto !important;
        padding: 0 30px;
    }

    .agency-info h2 { font-size: 2.3rem; }
    .trust-header h2 { font-size: 2.2rem; }
    .main-p, .trust-card p, .mapa-info p { font-size: .9rem; }
    .trust-card { padding: 25px; }
    .floating-badge {
        right: -10px;
        bottom: -10px;
        padding: 18px 22px;
    }
    .footer-container {
        justify-content: center;
        text-align: center;
        gap: 30px;
    }
    .footer-item { min-width: 260px; }
    .footer-logo { width: 100%; }
    .logo-img { max-width: 150px; }
}

/* --- DISPOSITIVOS MÓVILES (TELÉFONOS NORMALES Y MEDIANOS) --- */
@media screen and (max-width: 768px) {
    .brand-image-wrapper {
        height: 360px !important; 
        overflow: hidden !important;
        position: relative;
        border-bottom-left-radius: 25px;
        border-bottom-right-radius: 25px;
    }

    .parallax-img {
        position: absolute !important;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; 
        object-position: center 0% !important; 
        
        filter: brightness(.90) contrast(1.00);

        /* TRUCOS DE ALTA DEFINICIÓN ANTI-PIXELADO */
        image-rendering: -webkit-optimize-contrast !important; 
        image-rendering: crisp-edges !important;               
        backface-visibility: hidden !important;                
        transform: translateZ(0) scale(1.0) !important;        
    }

    .brand-overlay {
        background: linear-gradient(to top, rgba(0,20,40,.58) 0%, rgba(0,20,40,.18) 45%, transparent 80%);
    }

    .brand-floating-text {
        position: absolute !important;
        left: 50%;
        bottom: 35px;
        transform: translateX(-50%) !important;
        width: 100%;
        padding: 0 20px;
        z-index: 20;
        top: auto !important;
    }

    .brand-title {
        font-size: 2.1rem !important;
        line-height: .95;
        margin-bottom: 15px;
    }

    .brand-description {
        font-size: .9rem !important;
        line-height: 1.5;
        max-width: 500px;
        margin: auto;
    }

    /* ABOUT MOVIL */
    .agency-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }
    .agency-visual {
        padding: 0 !important;
    }
    .main-frame {
        max-width: 100% !important;
        padding: 6px;
    }
    .main-frame img {
        width: 100% !important;
        height: 300px !important;
        object-fit: cover !important;
        object-position: center center !important;
        transform: none !important;
    }

    /* BADGE EN MOVIL */
    .floating-badge {
        position: absolute !important;
        bottom: 10px !important;
        right: -10px !important;
        transform: none !important;
        width: auto !important;
        max-width: 180px;
        padding: 10px 12px !important;
        border-radius: 10px;
    }
    .badge-icon { font-size: 1rem; margin-bottom: 5px; }
    .slogan-badge { font-size: .65rem !important; }
    .slogan-badge strong { font-size: .75rem !important; }

    /* TEXTOS ABOUT MOVIL */
    .agency-info h2 { font-size: 1.3rem !important; }
    .main-p { font-size: .78rem !important; line-height: 1.7; max-width: 100%; }

    /* MISION Y VISION MOVIL */
    .values-grid {
        flex-direction: row !important;
        justify-content: center;
        align-items: stretch;
        gap: 12px;
    }
    .value-box {
        width: 48%;
        padding: 18px;
    }
    .value-box h4 { font-size: .85rem; }
    .value-box p { font-size: .72rem; line-height: 1.6; }

    /* TRUST MOVIL */
    .trust-header h2 { font-size: 1.5rem; }
    .trust-card { padding: 18px; }
    .trust-card h5 { font-size: .9rem; }
    .trust-card p { font-size: .7rem; }
    .icon-box i { width: 45px; height: 45px; font-size: 1rem; }
    .card-num { font-size: 2rem; }

    /* MAPA MOVIL */
    .mapa-container {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .mapa-info { text-align: center; padding: 10px; }
    .mapa-info h2 { font-size: 1.3rem; }
    .mapa-info p { font-size: .72rem; }
    .btn-mapa { font-size: .7rem; padding: 10px 14px; }
    .mapa-iframe { overflow: visible !important; }
    .mapa-iframe iframe { height: 320px !important; }

    /* FOOTER MOVIL */
    .footer { padding: 40px 20px 20px; }
    .footer-container {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    .footer-item { width: 100%; }
    .logo-img { max-width: 130px; }
    .footer h3 { font-size: 1rem; }
    .footer p, .footer a { font-size: .85rem; }
    .footer-copyright { font-size: .75rem; }
}

/* --- CELULARES MUY PEQUEÑOS --- */
@media screen and (max-width: 480px) {
    .brand-image-wrapper {
        height: 290px !important;
    }

    .parallax-img {
        object-position: center 0% !important;
        image-rendering: -webkit-optimize-contrast !important;
        image-rendering: crisp-edges !important;
        transform: translateZ(0) scale(1.0) !important;
    }

    .brand-title {
        font-size: 1.6rem !important;
    }
    .brand-description {
        font-size: .8rem !important;
        max-width: 280px;
    }
    .brand-floating-text {
        bottom: 20px;
    }

    /* Elementos Internos de Secciones */
    .agency-container { gap: 15px !important; }
    .mapa-container { gap: 10px !important; }
    .trust-container { gap: 10px !important; }
    .agency-info h2, .trust-header h2, .mapa-info h2 { font-size: 1.1rem; }
    .main-p, .trust-card p, .mapa-info p { font-size: .65rem; }
    .trust-card { padding: 14px; }
    .icon-box { margin-bottom: 10px; }
    .icon-box i { width: 38px; height: 38px; font-size: .9rem; }
    .card-num { font-size: 1.5rem; }
    .btn-mapa { font-size: .65rem; padding: 8px 10px; }
}
/* =========================================================
   FIX SOLO PARA PANTALLAS EXTERNAS GRANDES (CORREGIDO)
========================================================= */
@media screen and (min-width: 1600px){

    .agency-container{
        max-width:1400px;
        gap:120px;
    }

    .main-frame{
        max-width:650px !important;
    }

    .main-frame img{
        width:100% !important;
        height:clamp(320px, 22vw, 450px) !important; /* 👈 clave */
        object-fit:cover !important;
        object-position:center center !important;

        transform:none !important;
        image-rendering:auto;
        backface-visibility:hidden;
    }

    .agency-info h2{
        font-size:3rem;
    }

    .main-p{
        font-size:1.08rem;
        line-height:2;
    }
}

/* =========================================================
   FIX SOLO PARA TABLETS Y CELULARES
========================================================= */
@media screen and (max-width: 768px){

    .main-frame{
        width:100% !important;
        max-width:100% !important;
        padding:6px;
    }

    .main-frame img{

        width:100% !important;

        height:240px !important;

        object-fit:cover !important;

        object-position:center center !important;

        border-radius:4px;

        transform:none !important;

        image-rendering:auto;

        backface-visibility:hidden;
    }
.floating-badge{

    /* 👇 ESTO ES LO QUE LO BAJA */
    bottom: -60px !important;
}


}

/* =========================================================
   FIX SOLO PARA CELULARES MUY PEQUEÑOS
========================================================= */
@media screen and (max-width: 480px){

    .main-frame img{

        width:100% !important;

        height:110px !important;

        object-fit:cover !important;

        object-position:center center !important;

        border-radius:4px;

        transform:none !important;
    }

    .floating-badge{
    max-width:120px !important;
    padding:8px 10px !important;

    position: absolute !important;

    /* 👇 ESTO ES LO QUE LO BAJA */
    bottom: -35px !important;
}

    .slogan-badge{
        font-size:.50rem !important;
    }

    .slogan-badge strong{
        font-size:.30rem !important;
    }
}