/* ================= RESET ================= */
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:'Montserrat', sans-serif;
    color:#222;
    overflow-x:hidden;
}

/* ================= CONTAINER ================= */
.container{
    width:90%;
    max-width:1200px;
    margin:auto;
}

/* ================= HEADER ================= */
.header{
    position:fixed;
    width:100%;
    background:#fff;
    z-index:1000;
    border-bottom:1px solid #eee;
    transition: 0.3s;
}

.nav{
    display:flex;
    justify-content:space-between;
    align-items:center;
    height:75px;
}

/* ================= LOGO ================= */
/* El estilo del logo se unificó al final en la SECCIÓN MAESTRA */

/* ================= MENU ================= */
.menu{
    margin-left:auto;
    margin-right:35px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.menu a{
    margin-left:28px;
    text-decoration:none;
    color:#222;
    font-weight:600;
    transition:0.3s;
    font-size:0.95rem;
    white-space: nowrap;
}

.menu a:hover{
    color:#0056ff;
}

/* ================= SEARCH ================= */
.nav-search img{
    width:24px;
    transition: 0.3s;
    cursor: pointer;
}

.nav-search img:hover {
    transform: scale(1.1);
}

/* ================= BANNER ================= */
.banner-nosotros{
    position:relative;
    height:430px;
    overflow:hidden;

    display:flex;
    justify-content:center;
    align-items:center;
}

.banner-bg{
    position:absolute;
    width:100%;
    height:100%;
    object-fit:cover;
}

.banner-overlay{
    position:absolute;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.45);
}

.banner-content{
    position:relative;
    z-index:2;
}

/* CAMBIO SEO: Ahora apunta a h2 en lugar de h1 */
.banner-content h2{
    color:#fff;
    font-size:3rem;
    text-align:center;
    background:rgba(0,0,0,0.45);
    padding:18px 35px;
    border-radius:8px;
}

/* ================= TABS ================= */
.tabs-section{
    padding:50px 0 20px;
    background:#fff;
}

.tabs-buttons{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:20px;
}

.tab-btn{
    position:relative;
    padding:14px 28px;
    border:none;
    background:#f2f2f2;
    cursor:pointer;
    font-weight:600;
    border-radius:6px;
    transition:0.3s;
}

.tab-btn:hover{
    background:#dbe6ff;
}

.tab-btn.active{
    background:#0056ff;
    color:#fff;
}

/* ================= CONTENT ================= */
.content-section{
    padding:40px 0 90px;
}

.tab-content{
    display:none;
}

.tab-content.active{
    display:block;
}

/* ================= TITULOS ================= */
.section-title{
    text-align:center;
    margin-bottom:45px;
}

.section-title h2{
    font-size:2.2rem;
}

/* ================= HISTORIA ================= */
.history-container{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:50px;
    align-items:stretch;
}

/* CONTENEDOR DE IMAGENES */
.history-images{
    display:grid;
    grid-template-rows:repeat(3, 1fr);
    gap:20px;
    height:100%;
}

/* CAJA DE CADA IMAGEN */
.history-image{
    overflow:hidden;
    border-radius:20px;
    box-shadow:0 10px 35px rgba(0,0,0,0.15);
    height:100%;
}

/* IMAGEN */
.history-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transition:0.5s;
}

/* EFECTO */
.history-image:hover img{
    transform:scale(1.05);
}

/* TEXTO */
.history-text{
    background:#fff;
    padding:40px;
    border-radius:20px;
    box-shadow:0 10px 30px rgba(0,0,0,0.08);

    display:flex;
    flex-direction:column;
    justify-content:center;
}

.history-text p{
    margin-bottom:25px;
    line-height:2;
    color:#444;
    text-align:justify;
}

.history-text a{
    color:#0056ff;
    text-decoration:none;
    font-weight:600;
}

/* ================= REDES SOCIALES ================= */
.history-social{
    margin-top:35px;

    display:flex;
    justify-content:center;
    align-items:center;
    gap:18px;
}

.history-social a{
    width:55px;
    height:55px;

    display:flex;
    justify-content:center;
    align-items:center;

    background:#f5f5f5;
    border-radius:14px;

    transition:0.3s;
    box-shadow:0 5px 15px rgba(0,0,0,0.08);
}

.history-social a:hover{
    transform:translateY(-5px);
    background:#0056ff;
}

.history-social img{
    width:28px;
    height:28px;
    object-fit:contain;
}

/* ================= VALORES ================= */
.values-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:40px;
}

.video-box,
.image-box{
    height:420px;
    border-radius:14px;
    overflow:hidden;
}

.video-box iframe,
.image-box img{
    width:100%;
    height:100%;
    object-fit:cover;
    border:none;
}

/* ================= MISION Y VISION ================= */
.mission-vision-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:35px;
}

.mv-box{
    position:relative;
    overflow:hidden;
    border-radius:18px;
    height:500px;
    box-shadow:0 10px 30px rgba(0,0,0,0.15);
}

.mv-box img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:0.5s;
}

.mv-box:hover img{
    transform:scale(1.08);
}

.mv-overlay{
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    padding:35px;
    background:linear-gradient(
        to top,
        rgba(0,0,0,0.85),
        rgba(0,0,0,0.2),
        transparent
    );
    color:#fff;
}

.mv-overlay h3{
    font-size:2rem;
    margin-bottom:15px;
}

.mv-overlay p{
    line-height:1.8;
}

/* ================= CALIDAD ================= */
.quality-image img{
    width:100%;
    border-radius:14px;
}

.quality-button{
    text-align:center;
    margin-top:30px;
}

.quality-button a{
    display:inline-block;
    padding:15px 35px;
    background:#0056ff;
    color:#fff;
    text-decoration:none;
    border-radius:6px;
    font-weight:600;
}

/* ================= GALERIA ================= */
.gallery-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
}

.gallery-item{
    position:relative;
    overflow:hidden;
    border-radius:12px;
}

.gallery-item img{
    width:100%;
    transition:0.5s;
}

.gallery-item:hover img{
    transform:scale(1.1);
}

.gallery-overlay{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.6);

    display:flex;
    justify-content:center;
    align-items:center;

    opacity:0;
    transition:0.4s;
}

.gallery-item:hover .gallery-overlay{
    opacity:1;
}

.gallery-content{
    text-align:center;
}

.gallery-content h4{
    color:#fff;
    margin-bottom:12px;
}

.gallery-content button{
    padding:10px 20px;
    border:none;
    background:#a1bdf6;
    color:#fff;
    border-radius:4px;
}

/* ================= FOOTER ================= */
.footer{
    background:#f2f2f2;
    padding:30px 0;
}

.footer-search{
    padding-bottom:20px;
    margin-bottom:30px;
    border-bottom:1px solid #cfcfcf;
}

.footer-search img{
    width:120px;
}

.footer-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:30px;
}

.footer-grid h4{
    margin-bottom:12px;
}

.footer a{
    display:block;
    margin:6px 0;
    color:#333;
    text-decoration:none;
    transition:0.3s;
}

.footer a:hover{
    color:#0056ff;
}

/* ================= FOOTER SOCIAL ================= */
.footer-social{
    margin-top:20px;

    display:flex;
    align-items:center;
    gap:15px;
}

.footer-social a{
    width:45px;
    height:45px;

    display:flex;
    justify-content:center;
    align-items:center;

    background:#fff;
    border-radius:12px;

    transition:0.3s;
    box-shadow:0 4px 12px rgba(0,0,0,0.10);
}

.footer-social a:hover{
    transform:translateY(-4px);
    background:#0056ff;
}

.footer-social img{
    width:22px;
    height:22px;
    object-fit:contain;
}

/* ================= WHATSAPP ================= */
.whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25D366;
    color: #fff;
    padding: 12px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
}

/* ================= PROVEEDORES LOGOS ================= */
.proveedores-logos{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
}

.proveedores-logos img{
    width:100%;
    height:55px;
    object-fit:contain;
    background:#fff;
    padding:6px;
    border-radius:10px;
}


/* ========================================================================= */
/* --- RESPONSIVE UNIFICADO PARA LOS BLOQUES DE LA PÁGINA NOSOTROS --- */
/* ========================================================================= */

@media (max-width:992px){
    .history-container{ grid-template-columns:1fr; }
    .values-grid{ grid-template-columns:1fr; }
    .mission-vision-grid{ grid-template-columns:1fr; }
    .footer-grid{ grid-template-columns:1fr 1fr; }
}

@media (max-width:768px){
    .container{ width:92%; }
    
    /* BANNER FIX */
    .banner-nosotros{ height:320px; }
    .banner-content{ width:92%; }
    /* CAMBIO SEO: Mantiene estilos responsivos del H2 que reemplazó al H1 */
    .banner-content h2{
        font-size:1.7rem;
        line-height:1.4;
        padding:16px 18px;
    }
    
    /* TABS FIX */
    .tabs-section{ padding:35px 0 10px; }
    .tabs-buttons{ gap:12px; }
    .tab-btn{ width:100%; max-width:320px; text-align:center; }
    
    /* TITLES FIX */
    .section-title{ margin-bottom:30px; }
    .section-title h2{ font-size:1.7rem; line-height:1.4; }
    
    /* HISTORY FIX */
    .history-container{ grid-template-columns:1fr; gap:30px; }
    .history-images{ grid-template-rows:none; gap:15px; }
    .history-image{ height:220px; }
    .history-text{ padding:25px; }
    .history-text p{ font-size:0.95rem; line-height:1.9; text-align:left; }
    .history-social{ flex-wrap:wrap; }
    
    /* VALUES & MISION FIX */
    .values-grid{ grid-template-columns:1fr; gap:25px; }
    .video-box, .image-box{ height:260px; }
    .mission-vision-grid{ grid-template-columns:1fr; gap:25px; }
    .mv-box{ height:380px; }
    .mv-overlay{ padding:25px; }
    .mv-overlay h3{ font-size:1.5rem; }
    .mv-overlay p{ font-size:0.92rem; line-height:1.7; }
    
    /* GALLERY FIX */
    .gallery-grid{ grid-template-columns:1fr; gap:20px; }
    .gallery-content h4{ font-size:1.1rem; }
    
    /* FOOTER FIX */
    .footer{ padding:40px 0; }
    .footer-grid{ grid-template-columns:1fr; gap:25px; }
    .footer-grid div{ text-align:center; }
    .footer-search{ display:flex; justify-content:center; }
    .footer-social{ justify-content:center; }
    .proveedores-logos{ max-width:220px; margin:auto; }
    
    .whatsapp{ bottom:15px; right:15px; padding:11px 16px; font-size:0.9rem; }
}


/* ========================================================================= */
/* --- SECCIÓN MAESTRA UNIFICADA (RESPONSIVE HEADER Y MENÚ MÓVIL) --- */
/* ========================================================================= */

/* ESTILO MAESTRO PARA EL LOGO (Evita que cambie de tamaño o tenga subrayado) */
.header .logo a,
.header .logo strong {
    font-size: 2.0rem !important;
    font-weight: 800 !important;
    color: #111 !important;
    text-decoration: none !important;
}

/* --- COMPONENTES DEL MENÚ MÓVIL --- */
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; gap: 5px; z-index: 1001; border-radius: 8px; transition: background 0.2s; }
.hamburger-btn:hover { background: #f1f5f9; }
.hamburger-btn span { display: block; width: 25px; height: 3px; background: #0f172a; border-radius: 2px; }

.mobile-menu-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.6); z-index: 2000; opacity: 0; transition: 0.3s; backdrop-filter: blur(3px);}
.mobile-menu-overlay.active { display: block; opacity: 1; }

.mobile-menu-drawer { position: fixed; top: 0; right: -300px; width: 280px; height: 100%; background: #fff; z-index: 2001; box-shadow: -5px 0 30px rgba(0,0,0,0.15); transition: right 0.3s; display: flex; flex-direction: column; overflow-y: auto; padding-top: 20px;}
.mobile-menu-drawer.active { right: 0; }
.mobile-menu-drawer .close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 24px; color: #64748b; cursor: pointer; }
.mobile-menu-drawer a { display: block; padding: 15px 25px; font-family: 'Montserrat', sans-serif; font-weight: 700; color: #1e293b; text-decoration: none; border-bottom: 1px solid #f1f5f9; }

/* Para iluminar la pestaña activa */
.menu a.active, .mobile-menu-drawer a.active { color: #0056ff; }


/* --- CORRECCIÓN VISUAL: HEADER TABLETS Y MÓVILES --- */
@media (max-width: 1200px) {
    /* Ocultar menú de texto de PC */
    .menu { display: none !important; }

    /* Forzar diseño en una sola línea horizontal */
    .header .nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 70px !important;
        padding: 0 20px !important;
        flex-wrap: nowrap !important;
    }

    /* Logo a la izquierda */
    .header .logo {
        margin-right: auto !important;
        margin-bottom: 0 !important;
        text-align: left !important;
        width: auto !important;
        order: 1 !important;
    }

    /* Lupa antes de la hamburguesa */
    .header .nav-search {
        margin-left: 0 !important;
        margin-right: 20px !important;
        margin-bottom: 0 !important;
        position: static !important;
        display: flex !important;
        align-items: center !important;
        order: 2 !important;
    }

    /* Botón hamburguesa al extremo derecho */
    .header .hamburger-btn {
        display: flex !important;
        margin: 0 !important;
        order: 3 !important;
    }
}

@media (max-width: 768px) {
    /* Ajustes finos para celulares */
    .header .nav { padding: 0 15px !important; }
    .header .nav-search img { width: 22px !important; height: 22px !important; }
}