:root {
    --brand-color: #035594;
    --brand-accent: #e63946;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f3f4f6;
    --white: #ffffff;
    --shadow-header: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --border-light: #e5e7eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-light); 
    color: var(--text-main);
    line-height: 1.5;

    min-height: 100vh; 
    display: flex;
    flex-direction: column;
}

/* =========================================
   SECCION HEADER
   ========================================= */

a { text-decoration: none; color: inherit; transition: all 0.2s; }
ul { list-style: none; }

#header-placeholder {
    position: sticky;
    top: 0;
    z-index: 2000;
    width: 100%;
}

.top-bar {
    background-color: #111827;
    color: var(--white);
    font-size: 0.75rem;
    padding: 8px 5%;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    letter-spacing: 0.05em;
}
.top-bar span { display: flex; align-items: center; gap: 6px; }

.main-header {
    background-color: #ebebeb;
    height: 80px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-shadow: var(--shadow-header);
    border-bottom: 1px solid var(--border-light);
}

.brand-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-center {
    display: flex;
    gap: 30px;
    height: 100%;
    align-items: center;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    text-transform: uppercase;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.nav-link:hover { color: var(--brand-color); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--brand-color);
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-capsule {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    width: 250px;
    transition: border-color 0.3s;
}

.search-capsule:focus-within {
    border-color: var(--brand-color);
    background-color: var(--white);
}

.search-capsule input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
    color: var(--text-main);
}

/* HAMBURGUESA */
.mobile-toggle {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--brand-color);
    padding: 5px;
    margin-left: 10px;
}

/* MENU */
.mega-dropdown {
    position: absolute;
    top: 80px;
    left: 5%;
    right: 5%;
    margin: 0;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 30px;
    z-index: 1100;
    
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    align-items: start;
}

/* MENU DROPDOWN PEQUEÑO (Para Sectores) */
.mini-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    
    background: var(--white);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 1100;
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Efecto Hover Mini Dropdown */
.nav-item:hover .mini-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mini-dropdown .col-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.mini-dropdown .menu-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mini-dropdown .menu-list li a {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.mini-dropdown .menu-list li a:hover {
    background-color: var(--bg-light);
    transform: translateX(0);
}

/* Iconos dentro del menu de sectores */
.sector-icon {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    color: var(--brand-color);
}

.nav-item { height: 100%; display: flex; align-items: center; }
.nav-item:hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.col-title {
    font-size: 0.85rem;
    color: var(--text-main); 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
    display: block;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 8px;
}

.menu-list li a {
    display: block;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.4;
}
.menu-list li a:hover {
    color: var(--brand-color);
    transform: translateX(5px);
}

@media (max-width: 1024px) {
    .nav-center { display: none; }
    .mobile-toggle { display: block; }
    .main-header { 
        padding: 0 15px;
        gap: 10px;
    }
    .brand-logo img {
        height: 40px;
        width: auto;
    }
    .search-capsule {
        display: flex;
        width: 100%;
        max-width: 200px;
        padding: 6px 12px;
    }
    .search-capsule input {
        width: 100%;
        font-size: 16px;
    }
    .header-actions {
        flex-grow: 1;
        justify-content: flex-end;
        width: auto;
    }
}

@media (max-width: 380px) {
    .search-capsule { max-width: 140px; }
    .brand-logo img { height: 30px; }
}


/* =========================================
   SECCION MENU MOVIL
   ========================================= */

/* Fondo Oscuro*/
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* El Cajon del Menu (Drawer) */
.mobile-menu-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

.mobile-menu-drawer.active {
    left: 0;
}

/* Cabecera del Menu */
.drawer-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e1e1e1;
    height: 60px;
}

.drawer-title {
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    color: #333;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Botones de Cabecera */
.drawer-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0 5px;
}

.drawer-back-btn {
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: #004070;
    cursor: pointer;
    display: flex;
    align-items: center;
    margin-right: 15px;
}

/* Cuerpo del Menu */
.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    background-color: #fff;
}

.drawer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Items de la lista */
.drawer-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.drawer-item:active {
    background-color: #f5f5f5;
}

.drawer-item a {
    color: inherit;
    text-decoration: none;
}

/* Flecha > */
.drawer-item .arrow {
    color: #bbb;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Estilo items producto final */
.product-item {
    font-size: 0.9rem;
    color: #555;
    padding-left: 25px;
}

.highlight-item {
    color: #004070;
}

/* Footer del Menu */
.drawer-footer {
    padding: 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

/* =========================================
   SECCION FOOTER
   ========================================= */
.main-footer {
    background-color: #111827;
    color: #d1d5db;
    padding-top: 60px;
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

/* Columna Marca */
.footer-logo img {
    height: 45px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1); 
    opacity: 0.9;
}

.footer-desc {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #9ca3af;
}

/* Redes Sociales */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--brand-color);
    transform: translateY(-3px);
}

/* Titulos de Columnas */
.footer-col h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
}

/* Linea decorativa bajo titulos */
.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--brand-accent);
}

/* Listas de Enlaces */
.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    display: inline-block;
    transition: all 0.15s ease-in-out;
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(8px);
}

/* Contacto */
.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: #9ca3af;
}

.contact-info i {
    color: var(--brand-color);
    margin-top: 4px;
}

/* Barra Inferior */
.footer-bottom {
    background-color: #0b101b;
    text-align: center;
    padding: 20px 5%;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.8rem;
    color: #6b7280;
}

/* =========================================
   ANIMACIONES DE ENTRADA (SCROLL)
   ========================================= */

/* Estado inicial*/
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}

/* Direcciones */
.fade-in-up { transform: translateY(40px); }
.fade-in-left { transform: translateX(-50px); }
.fade-in-right { transform: translateX(50px); }
.fade-in-scale { transform: scale(0.95); }

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Efecto cascada */
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.30s; }
.delay-3 { transition-delay: 0.45s; }