/* --- 0. FUENTES LOCALES (Local Fonts) --- */

/* --- 0. FUENTES LOCALES (NIVEL DIOS - FINAL) --- */

/* Familia: Inter (Texto General) */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Familia: Poppins (Títulos) */
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Poppins';
    src: url('../fonts/Poppins-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
    /* ... */
/* --- 1. VARIABLES --- */
:root {
    --primary: #059669;       /* Verde Agro */
    --primary-dark: #064e3b;
    --secondary: #2563eb;     /* Azul Tech */
    --accent: #7c3aed;        /* Púrpura IA */
    --danger: #ef4444;        /* Rojo */
    --surface: #ffffff;       /* Blanco/Fondo de tarjeta */
    --background: #f8fafc;    /* Fondo general de sección */
    --text-main: #1e293b;     /* Texto principal */
    --text-muted: #64748b;    /* Texto secundario/gris */
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --nav-height: 80px;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 4px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: #94a3b8; }

/* CONFIGURACIÓN GLOBAL */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) - 10px); }
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--background); 
    color: var(--text-main); 
    overflow-x: hidden; 
    padding-top: var(--nav-height); 
}
h1, h2, h3, h4, button { font-family: 'Poppins', sans-serif; }

@media (max-width: 768px) { body { padding-top: var(--nav-height); } }

/* --- 2. NAV & LOGOS --- */
nav {
    position: fixed; top: 0; width: 100%; height: var(--nav-height);
    background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5%; z-index: 1000; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: height 0.3s ease;
}
nav.scrolled { 
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15); 
    background: rgba(255, 255, 255, 0.98); 
    height: 70px; 
}
.logo-container { display: flex; align-items: center; gap: 20px; }
.hispatec-logo { height: 60px; width: auto; object-fit: contain; transition: height 0.3s ease; }
nav.scrolled .hispatec-logo { height: 50px; } 

.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.95rem; transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }

.nav-item-featured {
    color: var(--primary) !important; background-color: #ecfdf5; padding: 8px 18px; border-radius: 20px;
    transition: all 0.3s ease; display: flex; align-items: center; gap: 8px; border: 1px solid transparent;
}
.nav-item-featured:hover { background-color: #d1fae5; transform: translateY(-1px); border-color: #a7f3d0; box-shadow: 0 4px 6px -2px rgba(5, 150, 105, 0.1); }

.nav-cta { background: var(--primary); color: white !important; padding: 8px 18px; border-radius: 50px; transition: all 0.3s; }
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* MENU MÓVIL */
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--text-main); cursor: pointer; padding: 10px; transition: color 0.3s; }
.menu-toggle:hover { color: var(--primary); }
.mobile-menu {
    display: none; position: fixed; top: var(--nav-height); left: 0; width: 100%; height: auto;
    background: var(--surface); box-shadow: 0 8px 10px -6px rgba(0,0,0,0.1);
    flex-direction: column; padding: 15px 5%; z-index: 999;
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease-in-out;
}
.mobile-menu.open { display: flex; max-height: 500px; top: 70px; }
.mobile-menu a { text-decoration: none; color: var(--text-main); font-weight: 600; padding: 12px 0; border-bottom: 1px solid #f1f5f9; transition: background-color 0.2s; }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { background-color: var(--background); }
.mobile-menu .nav-cta { margin-top: 10px; text-align: center; padding: 12px; color: white !important; }

/* --- 3. HERO --- */
#hero {
    min-height: calc(100vh - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 20px; background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    color: white; position: relative; z-index: 1; 
}
.hero-logo { height: 50px; margin-bottom: 25px; object-fit: contain; }
.hero-title { font-size: 3.5rem; margin-bottom: 1.5rem; line-height: 1.1; max-width: 900px; }
.hero-subtitle { font-size: 1.2rem; color: #cbd5e1; max-width: 700px; margin-bottom: 3rem; }
.btn-primary {
    background: var(--primary); color: white; border: none; padding: 1rem 2.5rem; border-radius: 50px;
    font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: 0.3s; box-shadow: 0 0 20px rgba(5, 150, 105, 0.4);
    text-decoration: none; display: inline-block;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* --- 4. SECCIONES WEB --- */
.web-section { padding: 20px 5% 80px 5%; max-width: 1400px; margin: 0 auto; }
.solutions-intro { text-align: center; max-width: 900px; margin: 0 auto 50px; }
.solutions-intro h2 {
    font-size: 2.2rem; font-weight: 800; color: var(--text-main); margin-bottom: 15px;
    background: -webkit-linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* Info Grid */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; padding-bottom: 20px; }
.info-card {
    background: white; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    cursor: pointer; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; border: 1px solid rgba(0,0,0,0.05);
}
.info-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.15); border-color: var(--primary); }
.info-img-wrapper { width: 100%; height: 220px; overflow: hidden; position: relative; }
.info-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.info-card:hover .info-img-wrapper img { transform: scale(1.1); }
.info-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); opacity: 0.6; transition: 0.3s; }
.info-card:hover .info-overlay { opacity: 0.3; }
.info-content { padding: 20px; text-align: center; position: relative; background: white; z-index: 2; }
.info-content h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-main); margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.info-content i { color: var(--primary); opacity: 0; transform: translateX(-10px); transition: 0.3s; }
.info-card:hover .info-content i { opacity: 1; transform: translateX(0); }

/* --- 5. CATALOGO --- */
.controls { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 3rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e2e8f0; }
.controls h2 {
    font-size: 2.2rem; font-weight: 800; margin-bottom: 5px;
    background: -webkit-linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; line-height: 1.2;
}
.controls p { font-size: 1rem; color: var(--text-muted); max-width: 600px; }

.view-switch { background: #e2e8f0; padding: 4px; border-radius: 12px; display: flex; gap: 4px; flex-wrap: wrap; }
.switch-btn { 
    padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; 
    font-weight: 600; color: var(--text-muted); background: transparent; 
    transition: 0.2s; display: flex; align-items: center; gap: 6px; 
}
.switch-btn:hover { color: var(--primary); background: rgba(255,255,255,0.5); }
.switch-btn.active { background: white; color: var(--text-main); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.filter-controls { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; align-items: center; background: #fff; padding: 15px; border-radius: 12px; border: 1px solid #f1f5f9; }
.filter-group { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); }
.filter-group select { padding: 8px 12px; border-radius: 8px; border: 1px solid #cbd5e1; background: white; color: var(--text-main); cursor: pointer; }

/* Vistas */
.grid-view { display: none; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.mindmap-view, .strategic-view, .product-view { display: none; width: 100%; overflow-x: auto; padding-bottom: 50px; }

/* --- TARJETAS (GRID) --- */
.card {
    background: var(--surface); 
    border-radius: 16px; 
    border: 1px solid #f1f5f9; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transition: all 0.3s; 
    cursor: pointer; 
    position: relative; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    /* Espacio suficiente abajo para el CTA */
    padding: 24px 24px 65px 24px; 
    min-height: 240px;
}
.card:hover { 
    transform: translateY(-8px); 
    box-shadow: var(--shadow-lg); 
    border-color: var(--primary); 
}

/* HEADER: Distribuye Ícono (Izq) y Badges (Der) */
.card-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-start; 
    margin-bottom: 1rem; 
}

/* ÍCONO */
.card-icon { 
    width: 48px; height: 48px; 
    border-radius: 12px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1.25rem; 
    background: #f1f5f9; color: var(--text-main); 
    flex-shrink: 0; 
}
.card-icon img { width: 28px; height: 28px; object-fit: contain; }

/* CONTENEDOR DE BADGES (Arriba Derecha) */
.card .node-item-badges {
    display: flex;
    flex-direction: column; /* Apila TOP y TIPO verticalmente */
    align-items: flex-end; /* Alinea a la derecha */
    gap: 6px;
    margin: 0;
}

/* BADGE TIPO (Gris) */
.card .badge {
    position: static !important; /* Ya no flota abajo */
    background: white; 
    border: 1px solid #e2e8f0; 
    color: #64748b; 
    font-size: 0.6rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    padding: 3px 8px; 
    border-radius: 6px;
    margin: 0 !important;
    white-space: nowrap;
}

/* BADGE TOP (Naranja) */
/* Selector específico para forzar la posición en Grid */
.card .badge-destacado {
    position: static !important; /* Ya no flota */
    background: #f97316 !important;
    color: white !important;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.2);
    margin: 0 !important;
    order: -1; /* Asegura que el TOP salga arriba del Tipo */
}

/* CTA VER DETALLE (Abajo Derecha) */
.card .card-cta { 
    position: absolute !important; 
    bottom: 24px !important; 
    right: 24px !important;
    width: auto !important; 
    margin-top: 0; padding-top: 0; border-top: none;
    font-size: 0.85rem; font-weight: 700; 
    display: flex; align-items: center; gap: 5px; 
}

/* Bordes Superiores */
.type-precosecha { border-top: 4px solid var(--primary); }
.type-postcosecha { border-top: 4px solid var(--secondary); }
.type-gestion { border-top: 4px solid var(--accent); }

/* Textos */
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text-main); line-height: 1.3; }
.card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 15px; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Tree/Strategic Views */
.tree-container { display: flex; flex-direction: column; align-items: center; min-width: 100%; }
.tree-root { 
    background: #1e293b; color: white; padding: 12px 30px; border-radius: 30px; 
    font-weight: 700; margin-bottom: 30px; position: relative; box-shadow: 0 4px 10px rgba(30, 41, 59, 0.2);
    z-index: 5;
}
.tree-branches { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; align-items: flex-start; width: 100%; }
.branch-col { position: relative; display: flex; flex-direction: column; gap: 12px; }
#view-strategic .branch-col { width: 23%; min-width: 200px; border-left: 2px dashed #cbd5e1; padding-left: 20px; }
#view-tree .branch-col { width: 32%; min-width: 350px; border-left: 2px dashed #cbd5e1; padding-left: 20px; }
#view-product .branch-col { width: 45%; min-width: 350px; border-left: none; padding-left: 0; align-items: center; }

.branch-header { padding: 10px 15px; border-radius: 12px; color: white; font-weight: 700; width: 100%; text-align: center; margin-bottom: 10px; font-size: 0.95rem; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.bh-1, .ph-1 { background: var(--primary); }
.bh-2, .ph-2 { background: var(--secondary); }
.bh-3, .ph-3 { background: var(--accent); }
.ph-4 { background: var(--danger); }
.product-header { margin-bottom: 15px; width: 100%; text-align: center; display: flex; flex-direction: column; align-items: center; }
.product-header img { height: 60px; object-fit: contain; margin-bottom: 5px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }

.node-list { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.node-item {
    background: white; padding: 18px 15px 12px 15px; 
    border-radius: 10px; border: 1px solid #e2e8f0; 
    font-size: 0.95rem; cursor: pointer; transition: all 0.2s ease; 
    display: flex; flex-direction: column !important; align-items: flex-start !important; justify-content: flex-start !important;
    padding-bottom: 40px !important; position: relative !important; z-index: 2; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.03); overflow: hidden; min-height: 90px; 
}
.node-item:hover { border-color: var(--primary); transform: translateX(5px); background-color: #f0fdf4; box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15); }
.badge-destacado { 
    position: absolute; top: 0; left: 0; margin: 0; background-color: #f97316 !important; 
    color: #ffffff !important; font-size: 0.65rem; padding: 3px 10px; border-radius: 0 0 8px 0; 
    font-weight: 800; z-index: 10; display: inline-flex; align-items: center; gap: 4px; letter-spacing: 0.5px;
}
.badge-destacado i { color: #ffffff !important; font-size: 0.7rem; }
.node-item::before { content: ''; position: absolute; left: -22px; top: 50%; width: 22px; height: 2px; background: #cbd5e1; transition: 0.3s; z-index: 1; }
#view-product .node-item::before { display: none; } 
.node-item:hover::before { background: var(--primary); }
.node-item::after { 
    content: '\f054'; font-family: "Font Awesome 6 Free"; font-weight: 900; 
    position: absolute; top: 20px !important; right: 15px !important;
    opacity: 0; color: var(--primary); transition: 0.3s; font-size: 0.8rem; transform: none !important;
}
.node-item:hover::after { opacity: 0.5; right: 8px; }
.node-item-content { 
    display: flex; align-items: center; gap: 15px; text-align: left; 
    font-weight: 700; color: var(--text-main); line-height: 1.3; width: 100%; margin-bottom: 5px !important;
}
.node-item-content .icon-svg, .node-item-content img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.05)); }
.node-item-content i { width: 42px; text-align: center; font-size: 1.5rem; }
.node-item-badges { position: absolute !important; bottom: 12px !important; left: 15px !important; width: auto !important; margin: 0 !important; display: flex; align-items: center; }
.badge { 
    font-size: 0.65rem; padding: 4px 8px; border-radius: 6px; 
    background: #f1f5f9; color: var(--text-muted); font-weight: 700; 
    text-transform: uppercase; letter-spacing: 0.5px; border: 1px solid #e2e8f0; 
    display: inline-block; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 992px) {
    .tree-branches { flex-direction: column; align-items: center; }
    #view-strategic .branch-col, #view-tree .branch-col, #view-product .branch-col { width: 100%; max-width: 450px; border-left: none; padding-left: 0; margin-bottom: 20px; }
    .node-item::before { display: none; }
    .node-item-content .icon-svg, .node-item-content img { width: 32px; height: 32px; }
    .controls { flex-direction: column; align-items: flex-start; gap: 15px; }
    .view-switch { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 8px; }
    .switch-btn { white-space: nowrap; flex-shrink: 0; }
}

/* ==========================================================================
   6. MODAL (ESTILO IMAGEN 2 + FIX)
   ========================================================================== */

.modal-backdrop { 
    position: fixed; inset: 0; 
    background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); 
    z-index: 3000; display: none; 
    align-items: center; justify-content: center; 
}

.modal-card {
    background: white; 
    width: 1000px; max-width: 95vw; 
    border-radius: 20px; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative; overflow: hidden; 
    transform: scale(0.95); transition: 0.3s; 
    animation: slideUp 0.3s forwards;
    display: flex; flex-direction: row; 
    height: 85dvh; max-height: 85dvh; 
}
@keyframes slideUp { to { transform: scale(1); } }

.modal-image-sidebar { 
    width: 40%; background-color: #f1f5f9; 
    display: flex; align-items: center; justify-content: center; 
    overflow: hidden; position: relative; height: 100%; 
}
.modal-image-sidebar img { width: 100%; height: 100%; object-fit: cover; }

.modal-content-wrapper { 
    width: 60%; display: flex; flex-direction: column; 
    height: 100%; position: relative; overflow: hidden; 
}

/* Header */
.modal-header { 
    background: linear-gradient(to right, #f8fafc, #fff); 
    padding: 30px 40px; 
    border-bottom: 1px solid #e2e8f0; 
    display: flex; 
    align-items: flex-start; 
    gap: 20px; 
    flex-shrink: 0; 
}

.modal-icon-box { 
    width: 60px; height: 60px; 
    background: white; 
    border-radius: 15px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 30px; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    flex-shrink: 0; 
}
.modal-icon-box .icon-svg { width: 35px; height: 35px; object-fit: contain; }

/* FIX TEXTO: Esto hace que ocupe espacio y no desaparezca */
.modal-header > div:not(.modal-icon-box) {
    flex: 1; 
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    min-width: 0; 
}

#m-cat {
    font-size: 0.8rem; font-weight: 700; color: #94a3b8; letter-spacing: 1px; 
    text-transform: uppercase; text-align: left; display: block;
}
#m-title {
    font-size: 1.5rem; color: var(--text-main); line-height: 1.2; 
    margin: 5px 0 10px 0; text-align: left; display: block;
}

.btn-close { 
    position: absolute; top: 15px; right: 15px; 
    width: 35px; height: 35px; border-radius: 50%; 
    border: none; background: #e2e8f0; 
    color: #64748b; font-size: 18px; cursor: pointer; 
    transition: 0.2s; display: flex; align-items: center; justify-content: center; 
    z-index: 3001; 
}
.btn-close:hover { background: #ef4444; color: white; transform: rotate(90deg); }

.modal-body { 
    padding: 30px 40px; 
    overflow-y: auto; flex-grow: 1; scroll-behavior: smooth; 
}

/* Sales Pitch */
.sales-pitch { 
    font-size: 1.1rem; font-weight: 500; 
    color: var(--text-main); margin-bottom: 20px; 
    border-left: 4px solid var(--primary); 
    padding-left: 15px; text-align: left;
}

.modal-desc { color: var(--text-muted); line-height: 1.6; margin-bottom: 25px; text-align: left; }

.target-box { 
    background-color: #f0fdf4; 
    color: #166534; 
    padding: 15px; 
    border-radius: 12px; margin-bottom: 25px; 
    font-size: 0.9rem; font-weight: 600; 
    display: flex; align-items: center; gap: 10px; 
    border: 1px solid #bbf7d0; text-align: left;
}

.benefits-list { 
    display: grid; grid-template-columns: 1fr; 
    gap: 12px; list-style: none; 
    background: #f8fafc; padding: 20px; 
    border-radius: 12px; margin-bottom: 30px; 
}
.benefits-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--text-main); font-weight: 500; text-align: left; }
.benefits-list i { color: var(--primary); margin-top: 3px; flex-shrink: 0; }

.expand-section, .faq-section { margin-top: 20px; }
.accordion-item { margin-bottom: 10px; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: white; }
.accordion-header { background: #f8fafc; padding: 15px; cursor: pointer; font-weight: 600; font-size: 0.95rem; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; color: var(--text-main); user-select: none; }
.accordion-header:hover { background: #e2e8f0; }
.accordion-body { padding: 20px; background: white; font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; display: none; border-top: 1px solid #e2e8f0; text-align: left; }
.accordion-body table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.accordion-body td { padding: 8px; border-bottom: 1px solid #eee; }
.accordion-body tr:last-child td { border-bottom: none; }
.accordion-item.active .accordion-body { display: block; animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

/* Footer */
.modal-footer { 
    padding: 15px 40px; 
    background: #f8fafc; 
    border-top: 1px solid #e2e8f0; 
    display: flex; justify-content: space-between; align-items: center; 
    flex-shrink: 0; 
}

.btn-modal-cta { 
    background-color: #25D366; 
    color: white; text-decoration: none; 
    padding: 10px 20px; border-radius: 8px; 
    font-weight: 600; font-size: 0.9rem; 
    transition: 0.3s; display: flex; align-items: center; gap: 8px; 
    border: 1px solid #20bd5a; 
    box-shadow: 0 4px 6px rgba(37, 211, 102, 0.2); 
}
.btn-modal-cta:hover { background-color: #128c7e; transform: translateY(-2px); }

.btn-share-social { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: white; transition: transform 0.2s; }
.btn-share-social:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
.linkedin { background-color: #0a66c2; }
.twitter { background-color: #000000; }
.email { background-color: var(--text-muted); }

/* BOTÓN AUDIO ARCOÍRIS */
.btn-audio { 
    position: relative; 
    background: white; 
    color: var(--text-main); 
    padding: 8px 20px; 
    border-radius: 50px; 
    font-size: 0.85rem; 
    font-weight: 700; 
    cursor: pointer; 
    display: inline-flex; 
    align-items: center; 
    gap: 10px; 
    transition: 0.3s; 
    margin-top: 10px; 
    border: none; 
    z-index: 1; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    align-self: flex-start; /* Alineación Izquierda */
}
.btn-audio::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: conic-gradient(#4285F4, #DB4437, #F4B400, #0F9D58, #4285F4); animation: spin-border 4s linear infinite; z-index: -2; }
.btn-audio::after { content: ""; position: absolute; inset: 2px; background: white; border-radius: 48px; z-index: -1; }
@keyframes spin-border { 100% { transform: rotate(360deg); } }
.btn-audio:hover { transform: scale(1.03); box-shadow: 0 6px 20px rgba(66, 133, 244, 0.3); }
.btn-audio.playing { color: #0F9D58; }
.btn-audio.playing i { animation: pulse-icon 1s infinite; }
@keyframes pulse-icon { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* Lightbox */
.lightbox-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.95); z-index: 4000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(8px); animation: fadeIn 0.3s ease; }
.lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; border-radius: 8px; box-shadow: 0 0 50px rgba(0,0,0,0.5); animation: zoomIn 0.3s ease; }
.lightbox-content img { max-width: 100%; max-height: 90vh; border-radius: 8px; display: block; }
.lightbox-close { position: fixed; top: 25px; right: 25px; color: white; font-size: 35px; cursor: pointer; transition: 0.3s; z-index: 5000; background: rgba(0, 0, 0, 0.4); width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); transform: rotate(90deg); color: #ef4444; }
.lightbox-audio { position: fixed; top: 25px; left: 25px; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5000; overflow: hidden; box-shadow: 0 0 25px rgba(255, 255, 255, 0.2); transition: transform 0.3s; animation: entrancePop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.lightbox-audio::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: conic-gradient(#4285F4, #DB4437, #F4B400, #0F9D58, #4285F4); animation: spin-border 4s linear infinite; z-index: -2; }
.lightbox-audio::after { content: ""; position: absolute; inset: 4px; background: rgba(15, 23, 42, 0.95); border-radius: 50%; z-index: -1; }
.lightbox-audio i { color: white; font-size: 24px; z-index: 10; transition: 0.3s; }
.lightbox-audio:hover { transform: scale(1.15); box-shadow: 0 0 40px rgba(66, 133, 244, 0.5); }
.lightbox-audio:hover i { color: #4285F4; }
.lightbox-audio.playing i { color: #25D366; animation: pulse-icon 1s infinite; }
@keyframes entrancePop { 0% { transform: scale(0) rotate(-180deg); opacity: 0; } 100% { transform: scale(1) rotate(0deg); opacity: 1; } }
@keyframes spin-border { 100% { transform: rotate(360deg); } }
@keyframes pulse-icon { 0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Comparativa */
.comparison-wrapper { overflow-x: auto; padding-bottom: 10px; max-width: 1000px; margin: 0 auto; scroll-behavior: smooth; }
.comparison-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; font-size: 0.85rem; min-width: 700px; }
.comparison-table th, .comparison-table td { padding: 10px 15px; text-align: left; border-bottom: 1px solid #e2e8f0; vertical-align: middle; line-height: 1.4; }
.comparison-table td:first-child { position: sticky; left: 0; background-color: white; z-index: 10; box-shadow: 2px 0 5px -2px rgba(0,0,0,0.1); }
.comparison-table th:first-child { position: sticky; left: 0; background-color: #f8fafc; z-index: 20; box-shadow: 2px 0 5px -2px rgba(0,0,0,0.1); }
.comparison-table thead th { background: #f8fafc; color: var(--text-main); font-weight: 800; font-size: 0.9rem; text-transform: uppercase; border-top: 4px solid transparent; }
.comparison-table .winner-col { background-color: #f0fdf4; border-left: 2px solid var(--primary); border-right: 2px solid var(--primary); color: var(--text-main); font-weight: 600; }
.comparison-table thead th.winner-col { background-color: var(--primary); color: white; border-top: none; border-bottom: none; font-size: 1rem; padding: 15px; box-shadow: 0 -5px 15px rgba(0,0,0,0.1); }
.comparison-table tr:last-child .winner-col { border-bottom: 2px solid var(--primary); }
.comparison-table tbody tr:hover { background-color: #fffbeb; }
.comp-check { color: var(--primary); margin-right: 5px; } .comp-cross { color: #ef4444; margin-right: 5px; }
.trigger-row { cursor: pointer; background-color: white; transition: all 0.2s; }
.trigger-row:hover { background-color: #f1f5f9; color: var(--primary); }
.trigger-cell { font-weight: 700; color: var(--text-main); padding: 15px 20px; text-align: left; display: flex; justify-content: space-between; align-items: center; }
.trigger-icon { color: var(--text-muted); transition: transform 0.3s; font-size: 0.9rem; }
.detail-row { display: none; animation: fadeInRow 0.4s ease; }
.trigger-row.active { background-color: #ecfdf5; border-bottom: none; }
.trigger-row.active .trigger-icon { transform: rotate(180deg); color: var(--primary); }
@keyframes fadeInRow { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.btn-mini-audio { background: #f1f5f9; color: var(--primary); border: 1px solid #e2e8f0; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; cursor: pointer; transition: all 0.2s; margin-left: 10px; flex-shrink: 0; }
.btn-mini-audio:hover { background: var(--primary); color: white; transform: scale(1.1); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.btn-mini-audio.playing { background: var(--primary); color: white; animation: pulse-mini 1.5s infinite; }
@keyframes pulse-mini { 0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); } 70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); } 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); } }

/* --- 9. CLIENTES Y SEO --- */
.clients-nav { display: flex; justify-content: center; gap: 15px; margin-bottom: 30px; flex-wrap: wrap; }
.client-tab-btn { padding: 10px 25px; border: 2px solid #e2e8f0; background: white; color: var(--text-muted); border-radius: 50px; font-weight: 600; cursor: pointer; transition: all 0.3s; font-size: 0.95rem; }
.client-tab-btn:hover { border-color: var(--primary); color: var(--primary); }
.client-tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3); }
.client-tab-content { display: none; animation: fadeIn 0.5s ease; text-align: center; }
.client-tab-content.active { display: block; }
.client-collage-wrapper { background: white; padding: 20px; border-radius: 16px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); border: 1px solid #f1f5f9; max-width: 1000px; margin: 0 auto; }
.client-collage-wrapper img { width: 100%; height: auto; border-radius: 8px; }
.seo-section { background-color: #f8fafc; border-top: 1px solid #e2e8f0; padding: 80px 20px; }
.seo-container { max-width: 1200px; margin: 0 auto; }
.seo-header { text-align: center; margin-bottom: 50px; }
.seo-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    
    /* Degradado Verde a Azul */
    background: linear-gradient(45deg, #059669, #2563eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    display: inline-block;
    line-height: 1.2;
}
.seo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.seo-card { background: white; padding: 35px; border-radius: 16px; border: 1px solid #f1f5f9; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: all 0.3s ease; }
.seo-card:hover { transform: translateY(-8px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); border-color: transparent; }
.seo-card.green { border-top: 4px solid var(--primary); } .seo-card.green h3 { color: var(--primary); }
.seo-card.blue  { border-top: 4px solid var(--secondary); } .seo-card.blue h3 { color: var(--secondary); }
.seo-card.purple{ border-top: 4px solid var(--accent); } .seo-card.purple h3 { color: var(--accent); }
.seo-tags { margin-top: 50px; padding-top: 30px; border-top: 1px dashed #cbd5e1; font-size: 0.9rem; color: #94a3b8; text-align: center; }

/* --- 10. VIDEOS Y MEDIA --- */
.video-hero-container { display: grid; grid-template-columns: 1fr; gap: 30px; margin-bottom: 40px; }
@media (min-width: 992px) { .video-hero-container { grid-template-columns: 1.5fr 1fr; align-items: center; } }
.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; background-color: #000; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.2); cursor: pointer; }
.video-thumb { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: 0.3s; }
.video-wrapper:hover .video-thumb { opacity: 0.6; transform: scale(1.05); }
.play-btn-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 70px; height: 70px; background: rgba(255,0,0,0.8); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 30px; transition: 0.3s; z-index: 2; }
.video-wrapper:hover .play-btn-overlay { transform: translate(-50%, -50%) scale(1.1); background: #ff0000; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.video-card-small { background: white; border-radius: 12px; overflow: hidden; border: 1px solid #f1f5f9; transition: 0.3s; }
.video-card-small:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.small-video-thumb { position: relative; padding-bottom: 56.25%; height: 0; background: black; cursor: pointer; overflow: hidden; }
.small-video-thumb .play-mini { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; background: rgba(0,0,0,0.6); border-radius: 50%; color: white; display: flex; align-items: center; justify-content: center; border: 2px solid white; transition: 0.3s; }
.small-video-thumb:hover .play-mini { background: #ff0000; border-color: #ff0000; }
.video-meta { padding: 15px; }
.video-meta h4 { font-size: 1rem; color: var(--text-main); margin-bottom: 5px; line-height: 1.4; }
.video-meta span { font-size: 0.8rem; color: var(--primary); font-weight: 700; text-transform: uppercase; }

/* --- 11. RESPONSIVIDAD --- */
@media (max-width: 992px) {
    .nav-links, .nav-cta { display: none; }
    .menu-toggle { display: block; }
    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .controls { flex-direction: column; align-items: flex-start; gap: 20px; }
    .view-switch { width: 100%; justify-content: space-around; padding: 4px; }
    .branch-col { width: 95%; max-width: none; border-left: none; padding-left: 0; margin-left: 0; }
    .node-item::before { display: none; }
    .node-item::after { display: none; }
    .tree-branches { flex-direction: column; align-items: center; }

    /* Modal Responsive */
    .modal-card { flex-direction: column; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .modal-image-sidebar { width: 100%; height: 180px; flex-shrink: 0; }
    .modal-content-wrapper { width: 100%; height: auto; flex-grow: 1; }
    .modal-header, .modal-body, .modal-footer { padding: 20px 5%; }
    .modal-header { align-items: center; }
    .modal-footer { flex-direction: column-reverse; gap: 15px; align-items: center; }
    .modal-footer > div:first-child { display: none !important; }
    .btn-modal-cta { width: 100%; justify-content: center; }
    .btn-close { top: 10px; right: 10px; }
    .benefits-list { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
    .hero-title { font-size: 2.5rem; }
    .btn-primary { padding: 0.8rem 2rem; font-size: 1rem; }
    .clients-nav { gap: 10px; }
    .client-tab-btn { padding: 8px 15px; font-size: 0.9rem; }
}

/* --- FIX VISTAS DE ÁRBOL --- */
.node-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding-bottom: 40px !important;
    position: relative !important;
    min-height: 90px;
}
.node-item-content { width: 100%; margin-bottom: 5px !important; }
.node-item-badges { position: absolute !important; bottom: 12px !important; left: 15px !important; width: auto !important; margin: 0 !important; }
.node-item .badge { display: inline-block; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.6rem !important; }
.node-item::after { top: 20px !important; right: 15px !important; transform: none !important; }

/* ==========================================================================
   FIX LAYOUT: SOBRE HISPATEC (Texto Grande + Mapa al lado)
   ========================================================================== */

/* Imagen de arriba */
.featured-image-container {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto 50px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1); /* Sombra suave */
}
.featured-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Contenedor Flex Principal */
.split-container {
    display: flex;
    flex-wrap: wrap; /* Permite que se adapte si falta espacio */
    align-items: center; /* Centrado vertical perfecto */
    justify-content: space-between;
    max-width: 1300px;
    margin: 0 auto 40px;
    gap: 40px; /* Espacio entre columnas */
}

/* COLUMNAS: Usamos calc() para que la suma sea perfecta */
.split-col-text {
    /* 50% del ancho menos la mitad del hueco (20px) */
    width: calc(50% - 20px); 
    display: flex;
    flex-direction: column;
}

.split-col-image {
    width: calc(50% - 20px);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ESTILOS DE TEXTO (MEJORADOS) */
.about-text-block {
    padding-right: 10px;
}

.about-text-block h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem; 
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    text-align: left;

    /* --- EFECTO DEGRADADO --- */
    /* 1. Definimos el degradado de Verde a Azul */
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    
    /* 2. Recortamos el fondo para que tenga la forma del texto */
    -webkit-background-clip: text;
    background-clip: text;
    
    /* 3. Hacemos el texto transparente para ver el fondo */
    -webkit-text-fill-color: transparent;
    color: transparent;
    
    /* 4. Asegura que el degradado se pinte correctamente en el bloque */
    display: inline-block; 
}

.about-text-block p {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem; /* Letra más grande que el estándar */
    line-height: 1.7;
    color: #334155; /* Gris oscuro, muy legible */
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Párrafo destacado (Objetivo) */
.highlight-text {
    font-weight: 600;
    color: var(--primary-dark) !important; /* Verde oscuro corporativo */
    border-left: 4px solid var(--primary); /* Línea verde lateral */
    padding-left: 15px;
    background: #f0fdf4; /* Fondo verde muy sutil */
    padding: 15px;
    border-radius: 0 8px 8px 0;
}

/* ESTILO MAPA */
.map-image-fit {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    /* Sombra para que destaque sobre el fondo blanco */
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); 
    border: 1px solid #f1f5f9;
}

/* RESPONSIVIDAD (Móvil y Tablets) */
@media (max-width: 992px) {
    .split-container {
        flex-direction: column; /* Apilar en vertical */
        gap: 30px;
    }

    .split-col-text, 
    .split-col-image {
        width: 100%; /* Ocupar todo el ancho */
    }

    .about-text-block h3 {
        text-align: center;
        font-size: 1.8rem;
    }
    
    .featured-image-container {
        margin: 20px auto 30px;
    }
}

/* ==========================================================================
   INTERACTIVIDAD DEL MAPA (ZOOM/LIGHTBOX)
   ========================================================================== */

/* Contenedor interactivo */
.map-interactive-wrapper {
    position: relative; /* Necesario para posicionar el overlay encima */
    cursor: pointer;    /* Cambia el cursor a manita */
    border-radius: 12px;
    overflow: hidden;   /* Asegura que el overlay respete los bordes redondeados */
    box-shadow: var(--shadow-lg); /* Movemos la sombra aquí */
}

/* Ajustamos la imagen para que reaccione al hover del contenedor padre */
.map-image-fit {
    /* Quitamos la sombra y el borde de aquí, ya que ahora están en el wrapper */
    box-shadow: none; 
    border: none;
    display: block; /* Elimina espacios extraños debajo de la imagen */
    transition: transform 0.5s ease, filter 0.3s ease; /* Añadimos transición de filtro */
}

/* Efecto Hover en la imagen cuando pasamos sobre el wrapper */
.map-interactive-wrapper:hover .map-image-fit {
    transform: scale(1.03); /* Pequeño zoom */
    filter: brightness(0.7); /* Oscurecemos la imagen para que resalte el icono */
}

/* Capa de superposición con la lupa */
.map-zoom-overlay {
    position: absolute;
    inset: 0; /* Ocupa todo el espacio del contenedor (top, right, bottom, left: 0) */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 150, 105, 0.3); /* Verde corporativo semitransparente */
    opacity: 0; /* Oculto por defecto */
    transition: opacity 0.3s ease;
    color: white;
    font-size: 4rem; /* Tamaño grande para el icono */
    pointer-events: none; /* Permite que el clic pase a través del overlay hacia el wrapper */
    z-index: 2;
}

/* Mostrar el overlay al hacer hover en el wrapper */
.map-interactive-wrapper:hover .map-zoom-overlay {
    opacity: 1;
}

/* Icono de la lupa */
.map-zoom-overlay i {
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3)); /* Sombra para que el icono destaque más */
}

/* ==========================================================================
   CORRECCIÓN DE ESPACIADO: REDUCIR HUECO ENTRE SECCIONES
   ========================================================================== */

/* 1. Reducimos el relleno inferior de la sección "Sobre Hispatec" */
#sobre-hispatec {
    padding-bottom: 0 !important; /* Estaba en 80px, lo bajamos a 0 */
}

/* 2. Eliminamos el margen inferior del contenedor del mapa */
#sobre-hispatec .split-container {
    margin-bottom: 20px !important; /* Estaba en 40px, dejamos 20px para que respire un poco */
}

/* 3. (Opcional) Ajustamos el inicio de la siguiente sección "Comparativa" */
#comparativa {
    padding-top: 40px !important; /* Ajusta este valor si quieres subir o bajar más el título azul */
}
/* ==========================================================================
   RESPONSIVIDAD PARA LA NUEVA SECCIÓN
   ========================================================================== */
@media (max-width: 768px) {
    .featured-image-container {
        margin: 20px auto 40px;
        border-radius: 12px; /* Radio de borde más pequeño en móviles */
    }

    .about-text-block h3 {
        font-size: 1.5rem;
        text-align: left;
    }

    .about-text-block p {
        font-size: 1rem;
        text-align: left; /* Texto alineado a la izquierda en móviles para facilitar lectura */
    }

    .stats-grid {
        grid-template-columns: 1fr; /* Una sola columna en móviles */
        gap: 15px;
    }

    .stat-card {
        flex-direction: row; /* Ícono a la izquierda, texto a la derecha */
        text-align: left;
        align-items: center;
        padding: 20px;
    }

    .stat-icon {
        margin-bottom: 0;
        margin-right: 20px;
        width: 60px;
        height: 60px;
        font-size: 2rem;
        flex-shrink: 0; /* Evita que el ícono se aplaste */
    }

    .stat-text strong {
        font-size: 1.05rem;
        display: inline; /* Vuelve a ser inline para que fluya con el texto */
    }
}

/* BOTÓN DE REGISTRO (AZUL) PARA EL MENÚ */
.btn-nav-demo {
    background-color: var(--secondary); /* Usa tu azul #2563eb */
    color: white !important;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Espacio entre ícono y texto */
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-nav-demo:hover {
    background-color: #1d4ed8; /* Un azul un poco más oscuro */
    transform: translateY(-2px); /* Se eleva un poco */
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3); /* Sombra azulada */
}

/* style.css - Añadir */

.details-box {
    background-color: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.details-box h5 {
    margin-bottom: 10px;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
    font-size: 1.1rem;
    /* El color se inyecta vía JS style, o usa variables CSS */
}

.details-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.details-table tr {
    border-bottom: 1px solid #e2e8f0;
}

.details-table td {
    padding: 6px 0;
}

.details-table .label {
    font-weight: 600;
    width: 30%;
    color: var(--text-main);
    text-transform: capitalize;
}

.details-table .value {
    color: var(--text-muted);
}
/* =========================================
   ESTILOS DEL FORMULARIO (MODERNO)
   ========================================= */

.form-page-wrapper {
    background-color: #f1f5f9;
    padding: 40px 20px;
    min-height: 80vh;
    display: flex;
    justify-content: center;
}

.form-card {
    background: white;
    width: 100%;
    max-width: 900px;
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.form-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 20px;
}

.form-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    background: -webkit-linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    line-height: 1.2;
    /* Fallback por si el degradado falla */
    color: var(--primary-dark); 
}

.form-intro {
    background-color: #ecfdf5;
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    color: var(--primary-dark);
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.form-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
}

/* SISTEMA DE GRILLA (GRID) */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* LABELS Y CAMPOS */
.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-label.required::after {
    content: " *";
    color: var(--danger);
}

.form-input, .form-select, .form-textarea {
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: white;
    width: 100%;
    color: var(--text-main);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* CHECKBOXES PERSONALIZADOS */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    background: #fff;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: 0.2s;
}

.checkbox-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* BOTÓN DE ENVÍO */
.submit-container {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .form-card { padding: 30px 20px; }
    .form-title { font-size: 1.8rem; }
    .form-header-row { flex-direction: column; align-items: flex-start; gap: 15px; }
    /* En móvil, el botón de audio se va arriba */
    #btn-audio-form { width: 100%; justify-content: center; }
}
/* --- ESTILOS VISUALES: SCREENSHOTS --- */
.interface-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: end; /* Alinea los elementos a la base para que se vean parejos */
    max-width: 1200px;
    margin: 0 auto;
}

.interface-item {
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.interface-item p {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-main);
    margin-top: 15px;
    font-size: 1rem;
}

/* MARCO TIPO NAVEGADOR (PC) */
.screen-frame {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.3s ease;
}

.screen-header {
    background: #f1f5f9;
    padding: 8px 12px;
    display: flex;
    gap: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #22c55e; }

/* MARCO TIPO MÓVIL (APP) */
.mobile-frame {
    max-width: 220px; /* Ancho restringido para que parezca celular */
    margin: 0 auto;
    border-radius: 24px;
    border: 6px solid #1e293b; /* Borde oscuro grueso */
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.mobile-header {
    background: #1e293b;
    padding: 5px;
    border: none;
    justify-content: center;
}
.dot.camera {
    background: #334155;
    width: 40px;
    height: 6px;
    border-radius: 10px;
}

.screen-frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* HOVER Y OVERLAY */
.interface-item:hover .screen-frame {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.2);
    border-color: var(--primary);
}

.screen-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 150, 105, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.screen-overlay i {
    color: white;
    font-size: 2.5rem;
    transform: scale(0.8);
    transition: transform 0.3s;
}

.interface-item:hover .screen-overlay { opacity: 1; }
.interface-item:hover .screen-overlay i { transform: scale(1); }

/* --- ESTILO BOTÓN SHOWROOM (MENU) --- */
.btn-showroom-nav {
    background-color: #0f172a; /* Negro Azulado */
    color: #fbbf24 !important; /* Dorado */
    padding: 8px 14px;         /* Padding ajustado para ahorrar espacio */
    border-radius: 50px;       /* Redondeado igual a los otros */
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #fbbf24;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-showroom-nav:hover {
    background-color: #fbbf24;
    color: #0f172a !important;
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

/* Ajuste de espacio entre elementos del menú para que quepan */
.nav-links { 
    gap: 15px; /* Reducimos el gap (antes era 20px) */
}

/* --- ESTILO SHOWROOM EN MÓVIL --- */
.mobile-vip-btn {
    background-color: #0f172a !important; /* Fondo Negro Azulado */
    color: #fbbf24 !important; /* Texto Dorado */
    font-weight: 800 !important;
    border: 1px solid #fbbf24 !important; /* Borde fino dorado */
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* =========================================
   14. ESTILOS SHOWROOM PRIVADO (VIP) - UPDATE FINAL
   ========================================= */

/* Header */
.showroom-header { background: white; padding: 15px 5%; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; }
.section-wrapper { max-width: 900px; margin: 0 auto 60px; scroll-margin-top: 100px; padding: 0 20px; }
.section-title { font-family: 'Poppins', sans-serif; font-size: 1.8rem; font-weight: 800; color: #1e293b; margin-bottom: 30px; border-left: 5px solid var(--primary); padding-left: 15px; }

/* ÍNDICE DE PRODUCTOS (GRID) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.product-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 25px 15px;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    height: 100%;
}

.grid-logo { max-width: 140px; height: auto; object-fit: contain; transition: transform 0.3s; }
.grid-icon { font-size: 2.5rem; color: #0f172a; margin-bottom: 5px; }
.grid-sub { color: var(--text-main); font-weight: 600; font-size: 0.95rem; line-height: 1.4; }

.product-btn:hover { transform: translateY(-7px); border-color: var(--primary); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.product-btn:hover .grid-logo { transform: scale(1.05); }
.methodology-btn:hover { border-color: #0f172a; background: #f1f5f9; }

/* ACORDEONES SHOWROOM */
.showroom-accordion { display: flex; flex-direction: column; gap: 20px; }

.acc-item {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.acc-item.active { border-color: var(--primary); box-shadow: 0 10px 20px -10px rgba(5, 150, 105, 0.2); }

.acc-header {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    transition: background 0.3s;
}
.acc-header h3 { margin: 0; font-size: 1.15rem; font-weight: 700; color: #1e293b; display: flex; align-items: center; }
.acc-header:hover { background: #f8fafc; }
.acc-icon { color: #94a3b8; transition: transform 0.3s ease; }

.acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}
.acc-content-pad { padding: 30px; }

.desc-text { font-size: 1.05rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 25px; max-width: 800px; }
.media-stack { display: flex; flex-direction: column; gap: 25px; }
.content-media-img { width: 100%; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; }

.video-wrapper-full {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.video-wrapper-full iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* BOTÓN VOLVER ARRIBA */
.btn-up { 
    position: fixed; bottom: 30px; right: 30px; 
    background: #1e293b; color: white; 
    width: 50px; height: 50px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 999; 
    transition: 0.3s; opacity: 0.8; 
}
.btn-up:hover { transform: scale(1.1); background: var(--primary); opacity: 1; }
/* --- MEJORAS SHOWROOM (2 COLUMNAS) --- */

/* 1. Ampliar el ancho máximo del contenedor de secciones */
.section-wrapper {
    max-width: 1100px; /* Antes era 900px, ahora es más ancho */
}

/* 2. Grid de 2 Columnas para el Acordeón */
.acc-grid-layout {
    display: grid;
    grid-template-columns: 1fr 300px; /* Izquierda flexible, Derecha fija (ancho de celular + margen) */
    gap: 40px;
    align-items: start;
}

/* Columna de Texto */
.acc-text-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Columna Multimedia (Centrada) */
.acc-media-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* RESPONSIVE: En celular se pone uno debajo del otro */
@media (max-width: 768px) {
    .acc-grid-layout {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 30px;
    }
    .acc-media-col {
        order: -1; /* Poner el celular primero (opcional) o quitar para dejarlo abajo */
    }
}
/* AJUSTE RESPONSIVE PARA EL HEADER DEL MODAL */
@media (max-width: 480px) {
    /* Título un poco más pequeño para que no ocupe tanto */
    #m-title {
        font-size: 1.4rem !important; 
    }
    
    /* Botones más compactos en celular */
    #m-title + div button, 
    #m-title + div a {
        font-size: 0.7rem !important;
        padding: 5px 10px !important;
        flex-grow: 1; /* Esto hace que se estiren para llenar el espacio uniformemente */
        justify-content: center;
    }
}

/* =========================================
   ESTILOS DE MARGARET Y LOGIN (MIGRADO)
   ========================================= */

/* --- 1. UX: BLOQUEO DE SCROLL --- */
body.modal-open {
    overflow: hidden !important;
    height: 100vh;
    width: 100%;
    position: fixed;
}

/* --- 2. BOTÓN FLOTANTE Y MENÚ --- */
.margaret-wrapper {
    position: fixed; 
    bottom: 30px; 
    right: 30px;
    z-index: 2147483647; 
    display: flex; 
    flex-direction: column; 
    align-items: flex-end;
}

@keyframes google-spin { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }

.margaret-fab { 
    width: 68px; height: 68px; border-radius: 50%; cursor: pointer; position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #4285F4, #DB4437, #F4B400, #0F9D58, #4285F4, #DB4437, #F4B400, #0F9D58);
    background-size: 300%; animation: google-spin 4s linear infinite;
    display: flex; justify-content: center; align-items: center; transition: transform 0.3s;
}
.margaret-fab::before { content: ''; position: absolute; inset: 3px; background: #ffffff; border-radius: 50%; z-index: 1; transition: background 0.3s; }

/* IMAGEN: Grande y Centrada Absolutamente */
.margaret-logo { 
    width: 44px; height: 44px; object-fit: contain; position: absolute; z-index: 10;
    top: 50%; left: 50%; transform: translate(-50%, -50%); transition: all 0.3s;
}
/* X DE CIERRE: Blanca y Centrada */
.margaret-close { 
    font-size: 28px; color: #ffffff; position: absolute; z-index: 11;
    top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-90deg) scale(0.5); opacity: 0; transition: all 0.3s;
}

.margaret-fab.active { transform: scale(1.05); }
.margaret-fab.active::before { background: #222; } 
.margaret-fab.active .margaret-logo { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }
.margaret-fab.active .margaret-close { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) scale(1); }

.margaret-options {
    margin-bottom: 15px; display: flex; flex-direction: column; align-items: flex-end; gap: 15px;
    opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s;
}
.margaret-options.show { opacity: 1; visibility: visible; transform: translateY(0); }

.opt-item { display: flex; align-items: center; gap: 15px; cursor: pointer; }
.opt-bubble {
    width: 50px; height: 50px; border-radius: 50%; background: white;
    display: flex; justify-content: center; align-items: center; box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    font-size: 22px; color: #333; position: relative; overflow: hidden;
}
.opt-bubble::after { 
    content: ''; position: absolute; inset: 0; border-radius: 50%; padding: 3px;
    background: linear-gradient(45deg, #4285F4, #DB4437, #F4B400, #0F9D58);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.opt-label { background: white; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 700; color: #444; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* --- AQUÍ ESTÁ LA CORRECCIÓN DE LA BURBUJA GOOGLE STYLE --- */
.margaret-tooltip {
    /* Posición (relativa al wrapper fixed) */
    position: absolute; 
    bottom: 1px; 
    right: 80px; 
    
    /* Estilo Google */
    background: linear-gradient(-45deg, #4285F4, #DB4437, #F4B400, #0F9D58);
    background-size: 400% 400%;
    animation: google-spin 5s ease infinite; /* Reusamos la animación spin que ya definimos arriba */

    /* Texto */
    color: white; font-weight: 500; font-size: 15px; line-height: 1.4; text-align: left;
    
    /* Dimensiones fijas para evitar el chorizo */
    width: 400px;       
    white-space: normal; 
    
    /* Forma */
    border-radius: 25px; padding: 15px 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 99999; cursor: pointer; transition: transform 0.2s;
}
.margaret-tooltip:hover { transform: scale(1.02); }
.margaret-tooltip strong { color: white; font-weight: 800; }

.hide { display: none !important; }

/* --- 3. MODAL DE LOGIN (VERSIÓN COMPACTA) --- */
.modal-overlay-login { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.8); z-index: 2147483650;
    display: flex; justify-content: center; align-items: center; 
    backdrop-filter: blur(5px); cursor: pointer;
    opacity: 0; visibility: hidden; transition: all 0.3s;
}
.modal-overlay-login.open { opacity: 1; visibility: visible; }

.modal-card-login { 
    background: white; 
    /* 1. Redujimos el padding general de la tarjeta */
    padding: 20px 25px; 
    border-radius: 20px; 
    width: 90%; max-width: 360px; /* Un poco más angosto también */
    box-shadow: 0 25px 50px rgba(0,0,0,0.5); 
    text-align: center; font-family: 'Segoe UI', sans-serif; position: relative; 
    display: flex; flex-direction: column; overflow: visible; 
    cursor: default; transform: scale(0.9); transition: transform 0.3s;
    max-height: 90vh; /* Seguridad para pantallas muy chicas */
    overflow-y: auto;
}
.modal-overlay-login.open .modal-card-login { transform: scale(1); }

.close-modal-btn { position: absolute; top: 10px; right: 15px; font-size: 24px; color: #aaa; cursor: pointer; line-height: 1; background:none; border:none;}
.close-modal-btn:hover { color: #333; }

/* Logo: Margen reducido */
.modal-logo-top {
    width: 130px; 
    height: auto; 
    object-fit: contain;
    margin-bottom: 0px; /* Quitamos espacio debajo del logo */
}

/* Títulos y textos más pegaditos */
.modal-card-login h3 { 
    margin-top: 5px; 
    color: #202124; 
    font-size: 1.4rem; /* Letra un pelín más chica */
    font-weight: 700; 
    width: 100%; 
    margin-bottom: 5px; /* Menos separación */
}
.modal-card-login p { 
    color: #5f6368; 
    font-size: 0.9rem; 
    margin-bottom: 15px; /* Menos separación con el formulario */
    width: 100%; 
    line-height: 1.3; 
}

/* Inputs Compactos */
.input-label { 
    text-align: left; 
    margin-bottom: 3px; 
    font-size: 0.8rem; 
    font-weight: 700; 
    color: #444; 
    display: block; 
    width: 100%; 
    margin-top: 8px; /* Menos separación entre campos */
}
.modal-input { 
    width: 100%; 
    padding: 8px 12px; /* Input más delgado */
    border: 1px solid #ddd; 
    border-radius: 8px; 
    font-size: 14px; 
    margin-bottom: 0; 
    outline: none; 
    box-sizing: border-box; 
    height: 38px; /* Altura fija controlada */
}
.modal-input:focus { border-color: #4285F4; box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2); }

/* --- AJUSTES EXTRA PARA FORMULARIOS Y PLUGINS --- */

/* Ajuste visual para el plugin de banderas telefónicas */
.iti { 
    width: 100%; 
    display: block; 
    margin-bottom: 15px; /* Separación con el siguiente input */
}

/* Asegurar que el dropdown de banderas se vea encima de todo */
.iti__country-list {
    z-index: 100 !important;
}

/* Ocultar elementos de Audio por defecto (se activan solo donde existen) */
/* Esto permite que si borras el botón del HTML, no pase nada malo */
.btn-audio {
    display: inline-flex;
}

/* Botón Compacto */
.modal-btn { 
    width: 100%; 
    padding: 10px; /* Botón menos alto */
    margin-top: 15px; /* Menos separación arriba */
    background: linear-gradient(45deg, #4285F4, #DB4437, #F4B400, #0F9D58); background-size: 300%;
    color: white; border: none; border-radius: 50px; font-size: 15px; font-weight: bold; cursor: pointer;
    animation: google-spin 8s ease infinite; transition: transform 0.2s;
}
.modal-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

.error-text { color: #D32F2F; font-size: 0.75em; display: none; text-align: left; margin-top: 2px; font-weight: 600; }
/* --- ESTILO BOTONES DE DESCARGA (GRID 4x4) --- */
.footer-download-btn {
    display: flex;
    align-items: center;
    justify-content: center; /* Centrados para que se vean uniformes */
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #475569;
    color: #e2e8f0;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px; /* Un poco más cuadrados para que encajen en el grid */
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-download-btn:hover {
    background-color: #059669; /* Verde Hispatec */
    color: white;
    border-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Si quieres que los íconos sean rojos como antes, descomenta esto: */
/* .footer-download-btn i { color: #ef4444; } */ 
/* Pero te recomiendo dejarlos blancos para que se vea más limpio el grid */

/* --- NUEVOS ESTILOS FOOTER (ÍCONOS CIRCULARES) --- */

.social-circle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;          /* Más grandes y visibles */
    height: 45px;
    background-color: #ffffff; /* Círculo blanco para resaltar en fondo oscuro */
    color: #1e293b;       /* Ícono oscuro por defecto */
    border-radius: 50%;   /* Perfectamente redondos */
    text-decoration: none;
    font-size: 1.2rem;    /* Ícono de buen tamaño */
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Efecto Hover Genérico (Crece y sube) */
.social-circle-btn:hover {
    transform: translateY(-5px) scale(1.1);
    color: white !important; /* El ícono se vuelve blanco al hover */
    box-shadow: 0 10px 15px rgba(0,0,0,0.3);
}

/* Colores de Marca al Hover (El fondo cambia) */
.social-circle-btn.linkedin:hover { background-color: #0077b5; }
.social-circle-btn.youtube:hover  { background-color: #FF0000; }
.social-circle-btn.whatsapp:hover { background-color: #25D366; }
.social-circle-btn.messenger:hover{ background-color: #00B2FF; }
.social-circle-btn.facebook:hover { background-color: #1877F2; }
.social-circle-btn.twitter:hover  { background-color: #000000; }

/* Ajuste para los enlaces legales */
a[href*="aviso"]:hover, a[href*="terminos"]:hover {
    color: #cbd5e1 !important; /* Se aclaran al pasar el mouse */
}

/* --- CORRECCIONES FINALES: LOGIN COMPACTO SIN SCROLL + AUDIO ARCOÍRIS --- */

/* 1. LOGIN: Caja Compacta */
.modal-card-login {
    max-width: 600px !important; /* Ancho ideal */
    width: 95% !important;
    /* Padding reducido estratégicamente: Arriba, Lados, Abajo */
    padding: 25px 35px 30px 35px !important; 
    height: auto !important;
    max-height: 98vh !important;
    overflow-y: auto !important; /* Scroll solo si el celular es diminuto */
    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px !important;
}

/* 2. LOGO MARGARET: TAMAÑO EQUILIBRADO */
.modal-logo-top {
    width: 160px !important; /* Antes 200px -> Ahora 160px (Ahorra espacio) */
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto 5px auto !important; /* Margen mínimo abajo */
    display: block !important;
}

/* 3. TÍTULOS Y TEXTOS (Más pegaditos) */
.modal-card-login h3 { 
    margin: 0 0 8px 0 !important; 
    font-size: 1.4rem !important; 
    line-height: 1.1 !important;
}

/* El botón de audio con menos margen abajo */
#auth-modal #btn-audio-login {
    margin: 0 auto 12px auto !important; 
}

/* Texto explicativo y gris */
#modal-desc { 
    margin-bottom: 10px !important; 
    font-size: 0.85rem !important; 
    line-height: 1.3 !important;
}
#modal-desc span {
    padding: 6px 10px !important;
    margin-top: 5px !important;
    font-size: 0.8rem !important;
}

/* 4. INPUTS Y FORMULARIO (Compactación Vertical) */
.input-label { 
    margin-top: 8px !important; /* Menos aire entre campos */
    margin-bottom: 2px !important; 
    font-size: 0.8rem !important;
}
.modal-input { 
    height: 36px !important; /* Input más delgado (estándar es 40-45) */
    font-size: 0.9rem !important;
    margin-bottom: 0 !important; 
}
/* El contenedor del teléfono también compacto */
.iti { margin-bottom: 0 !important; height: 36px !important; }

/* Botón de Enviar (Comenzar) */
.modal-btn { 
    margin-top: 15px !important; 
    padding: 10px !important; 
    font-size: 1rem !important;
}

/* Texto del candado al final */
.modal-card-login > p:last-child {
    margin-top: 10px !important;
    font-size: 0.7rem !important;
}


/* =========================================================
   ESTILO BOTÓN AUDIO (MANTENIENDO EL ARCOÍRIS QUE YA JALA)
   ========================================================= */
#auth-modal #btn-audio-login {
    position: relative !important;
    background: white !important;
    color: #1e293b !important;
    padding: 8px 20px !important; /* Un poco más chico */
    border-radius: 50px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    z-index: 1 !important;
    overflow: hidden !important; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1) !important;
    width: auto !important;
}

/* CAPA ARCOÍRIS */
#auth-modal #btn-audio-login::before {
    content: "" !important;
    position: absolute !important;
    top: -50% !important; left: -50% !important; 
    width: 200% !important; height: 200% !important;
    background: conic-gradient(#4285F4, #DB4437, #F4B400, #0F9D58, #4285F4) !important;
    animation: spin-border 4s linear infinite !important;
    z-index: -2 !important;
    display: block !important;
}

/* CAPA BLANCA */
#auth-modal #btn-audio-login::after {
    content: "" !important;
    position: absolute !important;
    inset: 2px !important; 
    background: white !important;
    border-radius: 50px !important;
    z-index: -1 !important;
    display: block !important;
}

@keyframes spin-border { 100% { transform: rotate(360deg); } }

#auth-modal #btn-audio-login:hover { transform: scale(1.02) !important; }


/* 5. BURBUJA Y X (Sin cambios) */
.margaret-fab.active::before { background: #ffffff !important; }
.margaret-fab.active .margaret-logo { opacity: 0 !important; pointer-events: none; }
.margaret-close {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 26px; color: #334155 !important; opacity: 0; 
    transition: all 0.3s; z-index: 100 !important; pointer-events: none;
}
.margaret-fab.active .margaret-close { opacity: 1 !important; }

/* Ajuste móvil */
@media (max-width: 480px) {
    .modal-card-login {
        padding: 20px !important;
        width: 95% !important;
    }
}

/* =========================================
   SECCIÓN BLOG / ACADEMIA (ESTILOS FINALES)
   ========================================= */

/* CONTENEDOR GENERAL */
.blog-section {
    padding: 80px 5%;
    background-color: #f8fafc;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ENCABEZADO DE SECCIÓN (TÍTULOS CON GRADIENTE) */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header .subtitle {
    color: #059669; /* Verde Hispatec */
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 10px;
}

.section-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    
    /* GRADIENTE DE TEXTO (CORREGIDO) */
    background: linear-gradient(90deg, #059669 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.section-header p {
    color: #64748b;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 15px auto 0;
    line-height: 1.6;
}

/* GRID DE ARTÍCULOS (ANTI-DESBORDE) */
.blog-grid {
    display: grid;
    /* auto-fit ajusta mejor que auto-fill en pantallas chicas */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    width: 100%;
    box-sizing: border-box; /* Evita que el padding rompa el ancho */
}

/* TARJETA DE ARTÍCULO */
.blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: #059669; /* Verde al hover */
}

.blog-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* IMAGEN THUMBNAIL */
.blog-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f1f5f9;
    position: relative;
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-thumb img {
    transform: scale(1.05);
}

/* INFO DEL ARTÍCULO */
.blog-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.blog-info .category {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #059669;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    display: block;
}

.blog-info h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

/* RESPONSIVE MÓVIL */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .blog-grid {
        gap: 20px;
    }
    
    .blog-thumb {
        height: 160px;
    }
}

/* ESTILOS ARTÍCULOS RELACIONADOS - VERSIÓN COMPACTA */
.related-section { 
    margin-top: 40px;          /* Antes 80px */
    padding-top: 30px;         /* Antes 50px */
    border-top: 1px solid #e2e8f0;
    position: relative;
}

.related-title-sec { 
    font-size: 1.4rem; 
    color: #0f172a; 
    font-weight: 800; 
    margin-bottom: 20px;       /* Antes 35px */
    position: relative;
    padding-left: 12px;
}
.related-title-sec::before {
    content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
    width: 4px; background: linear-gradient(to bottom, #059669, #3b82f6);
    border-radius: 4px;
}

.related-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 15px;                 /* Antes 25px */
}

.related-card { 
    display: flex; flex-direction: column; justify-content: space-between;
    background: #ffffff; 
    border: 1px solid #f1f5f9; 
    border-radius: 12px; 
    padding: 18px;             /* Antes 25px */
    text-decoration: none; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    position: relative; overflow: hidden;
}

.related-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}
.related-card::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, #059669, #3b82f6);
    transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.related-card:hover::after { transform: scaleX(1); }

.related-cat { 
    font-size: 0.65rem; 
    color: #059669; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    margin-bottom: 8px;        /* Antes 12px */
    background: #ecfdf5;
    display: inline-block;
    padding: 3px 6px;
    border-radius: 4px;
    align-self: flex-start;
}

.related-txt { 
    font-size: 1rem;           /* Letra un poco más chica para que quepa mejor */
    font-weight: 700; 
    color: #1e293b; 
    line-height: 1.35; 
    margin-bottom: 10px;       /* Antes 15px */
}

.related-arrow { 
    font-size: 0.85rem; 
    color: #3b82f6; 
    font-weight: 600; 
    display: flex; align-items: center; gap: 5px;
    margin-top: auto; 
}
.related-arrow i { transition: transform 0.2s; }
.related-card:hover .related-arrow i { transform: translateX(5px); }

/* AJUSTE DE SCROLL PARA ANCLAS (Evita que el menú tape el título) */
#tecnologia, 
#casosdeexito, 
#sobre-hispatec, 
#blog, 
#app-container,
.section-wrapper {
    scroll-margin-top: 100px;
}


/* =========================================
   BOTÓN DE IDIOMA (LANGUAGE SWITCHER) - FINAL
   ========================================= */

/* Estilo del botón (contenedor) */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px; /* Espacio entre la bandera y el texto */
    padding: 6px 14px 6px 10px; /* Ajuste para que la bandera no quede pegada al borde */
    font-weight: 700;
    color: #334155; 
    background-color: white;
    border: 1px solid #cbd5e1;
    border-radius: 50px; 
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap; 
}

/* Efecto Hover */
.lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: #f0fdf4; 
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Estilo de la Banderita (Imagen) */
.flag-icon {
    width: 20px;       /* Tamaño fijo */
    height: 20px;
    object-fit: cover; /* Para que no se deforme */
    border-radius: 50%; /* La hace redonda */
    border: 1px solid #e2e8f0; /* Borde sutil */
    display: block;
}

/* Ajuste para móviles */
@media (max-width: 992px) {
    .lang-btn {
        width: auto;
        display: inline-flex;
        margin: 10px auto;
        padding: 8px 20px; /* Un poco más grande para el dedo */
        justify-content: center;
    }
}
/* ESTILOS PARA SELECTOR DE IDIOMA DESPLEGABLE (DROPDOWN) */
.lang-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

/* Botón principal (Idioma actual) */
.lang-dropbtn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text-main); /* Asegura que se vea bien en tu tema */
    transition: opacity 0.3s;
}

.lang-dropbtn:hover {
    opacity: 0.7;
}

/* Contenedor de las opciones (oculto por defecto) */
.lang-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%; /* Justo debajo del botón */
    background-color: white;
    min-width: 140px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.15);
    z-index: 1000;
    border-radius: 8px;
    padding: 5px 0;
    border: 1px solid #e2e8f0;
}

/* Enlaces dentro del desplegable */
.lang-content a {
    color: #334155;
    padding: 10px 15px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.lang-content a:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

/* Mostrar el menú al pasar el mouse */
.lang-dropdown:hover .lang-content {
    display: block;
}

/* Ajuste de la bandera */
.flag-icon {
    width: 30px;           /* Ancho fijo */
    height: 30px;          /* Alto IGUAL al ancho para que sea cuadrado */
    object-fit: cover;     /* Recorta la imagen para llenar el círculo sin deformarse */
    border-radius: 50%;    /* Esto hace el círculo perfecto */
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* Sombra suave para que resalte */
    display: block;        /* Evita espacios extra en algunos navegadores */
    border: 1px solid #e2e8f0; /* Borde fino para banderas con mucho blanco */
}
/* =========================================
   CORRECCIONES FINALES MENU MÓVIL (PATCH)
   ========================================= */

@media (max-width: 992px) {
    /* 1. Forzar que el botón de WhatsApp (Get Info) sea visible en el menú móvil */
    .mobile-menu .nav-cta {
        display: flex !important;
        justify-content: center;
        align-items: center;
        background-color: #25D366 !important; /* Verde WhatsApp */
        color: white !important;
        width: 90%; /* Que no toque los bordes */
        margin: 10px auto !important;
    }

    /* 2. Arreglar el HOVER del botón WhatsApp para que no se ponga blanco */
    .mobile-menu .nav-cta:hover {
        background-color: #128c7e !important; /* Verde más oscuro */
        color: white !important;
        transform: translateY(-2px);
    }

    /* 3. Arreglar el botón DEMO en móvil */
    .mobile-menu .btn-nav-demo {
        display: flex !important;
        justify-content: center;
        width: 90%;
        margin: 15px auto 5px auto !important;
        background-color: var(--secondary) !important; /* Azul */
        color: white !important;
    }

    /* 4. Arreglar el HOVER del botón DEMO (evitar blanco sobre blanco) */
    .mobile-menu .btn-nav-demo:hover {
        background-color: #1d4ed8 !important; /* Azul oscuro */
        color: white !important;
        transform: translateY(-2px);
    }
}

/* =======================================================
   OCULTAR MARGARET (BOTÓN PERSONALIZADO) - PARCHE FINAL
   ======================================================= */
.margaret-wrapper, 
.margaret-fab,      /* Cambiado de # a . */
.margaret-tooltip,  /* Cambiado de # a . */
.margaret-options { /* Cambiado de # a . */
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* =======================================================
   PARCHE TEMPORAL: OCULTAR SHOWROOM HASTA TENER VIDEOS
   (Borrar este bloque cuando TI entregue el material)
   ======================================================= */

.btn-showroom-nav,           /* Botón del menú escritorio */
.mobile-vip-btn,             /* Botón del menú móvil */
a[href*="showroom"] {        /* CUALQUIER enlace que contenga la palabra "showroom" */
    display: none !important;
}
/* =======================================================
   15. ESTILOS NUEVOS: BUSCADOR DE CLIENTES (MATRIZ)
   ======================================================= */

/* CONTENEDOR PRINCIPAL */
#buscador-clientes {
    background-color: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding-top: 60px;
    padding-bottom: 60px;
}

/* BARRA DE FILTROS */
.filter-bar {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    margin-bottom: 30px;
}

/* CAJA DE BÚSQUEDA */
.search-box {
    flex: 2;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 40px; /* Espacio para el icono */
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.3s ease;
    outline: none;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* DROPDOWNS */
.dropdowns {
    flex: 3;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dropdowns select {
    flex: 1;
    min-width: 160px;
    padding: 11px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.dropdowns select:focus {
    border-color: var(--primary);
}

/* BOTÓN LIMPIAR */
.btn-reset {
    background-color: white;
    color: var(--text-muted);
    border: 1px solid #cbd5e1;
    padding: 11px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-reset:hover {
    background-color: #f1f5f9;
    color: var(--danger); /* Rojo al pasar el mouse para indicar "borrar" */
    border-color: #fca5a5;
}

/* GRID DE CLIENTES */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* TARJETA DE CLIENTE INDIVIDUAL */
.client-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
    height: 100%;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.1);
    border-color: var(--primary); /* Borde verde Hispatec al hover */
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.client-name {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.client-flag {
    font-size: 1.4rem;
    line-height: 1;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.client-activity {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    font-weight: 500;
    display: block;
}

/* ETIQUETAS (TAGS) DE CULTIVOS */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto; /* Empuja los tags al fondo si la tarjeta crece */
}

.crop-tag {
    background-color: #ecfdf5; /* Fondo verde muy suave */
    color: var(--primary-dark); /* Texto verde oscuro */
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #a7f3d0;
    white-space: nowrap;
}

/* RESPONSIVE PARA EL BUSCADOR */
@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box, .dropdowns, .btn-reset {
        width: 100%;
    }
    
    .dropdowns {
        flex-direction: column;
    }
}