/* =========================================
   VARIABLES GLOBALES (GRADO INDUSTRIAL)
   ========================================= */
:root {
    --bg-dark: #0a0a0c;
    --bg-light: #ffffff;
    --bg-gray: #f5f5f7;
    --text-main: #111111;
    --text-light: #fdfdfd;
    --text-muted: #888888;
    --accent: #da291c;
    --mov-mecanico: cubic-bezier(0.77, 0, 0.175, 1); 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* =========================================
   BARRA DE UTILIDAD SUPERIOR (ROJA)
   ========================================= */
.utility-bar {
    background-color: #9B1B1B;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 4rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

.utility-bar .divider {
    margin: 0 1rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Geometría y color base para los enlaces de la barra roja */
.utility-bar a {
    color: #ffffff !important; /* El !important blinda el color blanco contra reglas globales */
    text-decoration: none; 
    display: inline-block; /* Condición estricta para que el escalado funcione */
    transform-origin: center; /* Asegura que crezca desde su propio centro */
    transition: transform 0.3s var(--mov-mecanico); /* Curva de aceleración fluida */
}

/* Animación de crecimiento al pasar el cursor */
.utility-bar a:hover {
    color: #ffffff !important; /* Previene explícitamente que se vuelva rojo */
    transform: scale(1.05); /* Crece un 5% de manera proporcional */
}
/* =========================================
   1. NAVEGACIÓN PRINCIPAL (NEGRA)
   ========================================= */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 4rem;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    letter-spacing: -1px;
    cursor: pointer;
    transition: transform 0.3s var(--mov-mecanico), text-shadow 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.24);
}

.nav-menu {
    list-style: none; 
    display: flex;    
    flex-direction: row; 
    gap: 2.5rem;
    align-items: center;
}

.nav-menu > li {
    padding: 1rem 0; 
    display: flex; 
    align-items: center;
}

.nav-menu > li > a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    outline: none;
}

/* =========================================
   SISTEMA DE SUBMENÚS (DESPLEGABLES)
   ========================================= */
.dropdown {
    position: relative;
    padding-bottom: 1rem;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%; 
    transform: translateX(-50%); 
    background: var(--bg-dark);
    min-width: 260px;
    list-style: none;
    border-top: 2px solid var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.5s var(--mov-mecanico);
}

/* Apertura en escritorio */
.dropdown:hover .dropdown-content {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.dropdown-content li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color 0.2s, padding-left 0.2s var(--mov-mecanico);
}

.dropdown-content li a:hover {
    color: var(--text-light);
    padding-left: 2rem;
    background: rgba(255, 255, 255, 0.03);
}

/* =========================================
   DISEÑO DEL BOTÓN HAMBURGUESA (Oculto en PC)
   ========================================= */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle .bar {
    display: block;
    width: 32px;
    height: 3px; 
    margin: 6px auto;
    background-color: #ffffff; 
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* =========================================
   2. HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 4rem;
    background: linear-gradient(
        rgba(10, 10, 12, 0.85), 
        rgba(10, 10, 12, 0.85)
    ), url('transformador-inicio.jpg') center/cover no-repeat;
    background-attachment: fixed; 
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;    
    text-align: center;     
    max-width: 1000px;      
    margin: 0 auto;         
}

.hero h1 {
    font-size: 4rem; 
    font-weight: 800; 
    color: var(--text-light); 
    line-height: 1.1; 
    max-width: 800px; 
    margin: 0 auto; 
    letter-spacing: -1.5px; 
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.75); 
    margin: 1.5rem auto 2.5rem auto; 
    max-width: 650px; 
    line-height: 1.6; 
    font-weight: 300; 
}

.hero-actions {
    display: flex;
    justify-content: center; 
    gap: 1.5rem;
    align-items: center;
    width: 100%;
}

/* Estado de reposo para la animación JS */
.hero h1, 
.hero-subtitle, 
.hero-actions {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Estado activo inyectado por JS */
.hero h1.arranque, 
.hero-subtitle.arranque, 
.hero-actions.arranque {
    opacity: 1;
    transform: translateY(0);
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s var(--mov-mecanico);
}

.btn-primary {
    background-color: var(--accent); 
    color: var(--text-light);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background-color: transparent;
    box-shadow: 0 0 15px rgba(218, 41, 28, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff; 
    border: 1px solid rgba(255, 255, 255, 0.4); 
}

.btn-secondary:hover {
    background-color: transparent;
    border-color: #ffffff; 
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3); 
    transform: translateY(-2px); 
}


/* =========================================
   3. BLOQUE DE PRODUCTOS (Inicio)
   ========================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 6rem 4rem;
    background-color: var(--bg-gray);
    background-image: radial-gradient(#d5d5d9 1.5px, transparent 1.5px);
    background-size: 25px 25px;
}

/* Base de la Tarjeta (Modo Blanco para el Inicio) */
.product-card {
    background: var(--bg-light);
    padding: 3rem;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 300px;
    position: relative;
    border: 1px solid transparent;
    transition: border-color 0.4s var(--mov-mecanico), 
                box-shadow 0.4s var(--mov-mecanico), 
                transform 0.4s var(--mov-mecanico);
}

.card-icon {
    font-family: monospace;
    font-size: 1.1rem; 
    font-weight: 700;
    color: var(--accent); 
    letter-spacing: 2px;
    margin-bottom: auto;
}

.product-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.product-card p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.card-arrow {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-muted);
    transition: transform 0.4s var(--mov-mecanico), color 0.4s;
}

/* Efecto Hover (Inicio) */
.product-card:hover {
    border-color: var(--accent);
    box-shadow: 12px 12px 0px rgba(0,0,0,0.04); 
    transform: translate(-4px, -4px); 
}

.product-card:hover .card-arrow {
    color: var(--accent);
    transform: translateX(15px); 
}
/* =========================================
   4. QUIÉNES SOMOS (MANIFIESTO)
   ========================================= */
.manifesto-section {
    background-color: #030303; /* Negro absoluto para máximo contraste técnico */
    padding: 7rem 4rem;
    color: var(--text-light);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.manifesto-header {
    max-width: 800px;
    margin-bottom: 5rem;
}

.manifesto-tag {
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    display: block;
    margin-bottom: 1.5rem;
}

.manifesto-header h2 {
    font-size: 2.8rem;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.manifesto-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 600px;
}

/* Grid de Metodología */
.manifesto-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.manifesto-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    transition: transform 0.4s var(--mov-mecanico), border-color 0.4s;
}

.manifesto-number {
    font-family: monospace;
    font-size: 3rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.15); /* Efecto de número "hueco" técnico */
    margin-bottom: 1rem;
    line-height: 1;
}

.manifesto-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.manifesto-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.manifesto-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

/* =========================================
   5. PRE-FOOTER (Canalización de Tráfico)
   ========================================= */
.pre-footer-cta {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    width: 100%;
}

.cta-card {
    padding: 5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cta-sales {
    background-color: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cta-sales .cta-tag {
    color: var(--accent); 
}

.cta-support {
    background-color: var(--accent); 
}

.cta-support .cta-tag {
    color: rgba(255, 255, 255, 0.9); 
}

.cta-support h2, .cta-support p {
    color: #ffffff; 
}

.cta-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: block;
}

.cta-card h2 {
    font-size: 2.2rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -1px;
}

.cta-card p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 420px; 
}

.cta-card .btn-primary, 
.cta-card .btn-outline {
    align-self: flex-start; 
}

.btn-outline {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    color: #ffffff;
    border: 2px solid #ffffff;
    transition: all 0.3s var(--mov-mecanico);
}

.btn-outline:hover {
    background-color: #ffffff; 
    color: var(--accent); 
}

/* Animación opcional para el sensor de intersección JS */
.cta-card.glow-active {
    animation: fadeIn 0.8s ease forwards;
}

/* =========================================
   6. PIE DE PÁGINA (FOOTER)
   ========================================= */
.site-footer {
    background-color: #050505; 
    color: var(--text-muted);
    padding: 4rem 4rem 1.5rem 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr; 
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.fiscal-data {
    font-size: 0.8rem !important;
    color: #666;
    margin-top: 1rem;
}

.footer-links h4, .footer-contact h4 {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent); 
}

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
    font-size: 0.8rem;
    color: #555;
}
/* Enlaces de contacto del footer (Inertes visualmente, activos funcionalmente) */
.contacto-estatico {
    color: inherit !important; /* Clona exactamente el color gris/blanco de tu texto actual */
    text-decoration: none; /* Destruye el subrayado nativo del navegador */
    cursor: pointer; /* Mantiene la manita al pasar el ratón para indicar que es clickeable */
}
/* =============
PRODUCTOS
================*/
/* =========================================
   PÁGINAS INTERNAS (Cabeceras)
   ========================================= */
.page-header {
    background: linear-gradient(rgba(10, 10, 12, 0.9), rgba(10, 10, 12, 0.95)), url('transformador-inicio.jpg') center/cover;
    padding: 10rem 4rem 6rem 4rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-header h1 {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.page-header p {
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* =========================================
   CATÁLOGO B2B (Barra Lateral y Cuadrícula)
   ========================================= */
.catalog-container {
    display: grid;
    grid-template-columns: 250px 1fr; 
    gap: 3rem;
    padding: 6rem 4rem;
    align-items: start;
}

.sidebar-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    position: sticky;
    top: 100px; 
}

.sidebar-box h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
}

.category-filter {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    text-align: left;
    padding: 0.5rem 0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s;
    font-family: inherit;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-btn:hover, .filter-btn.active {
    color: var(--accent);
    font-weight: 600;
}

.catalog-grid {
    display: grid;
    /* Esto evita que se estiren; crea columnas automáticas de 280px */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* BLINDAJE: Mutación de la Tarjeta solo en el Catálogo */
.catalog-grid .product-card {
    background: var(--bg-dark); /* La vuelve negra */
    padding: 0; /* Le quita los márgenes del inicio */
    min-height: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px; 
    overflow: hidden; 
}

.catalog-grid .product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3); /* Cambia la sombra rígida por una suave */
}

/* Interior de la Tarjeta del Catálogo */
.card-img-container {
    height: 220px;
    background: #0a0a0c;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
}

.card-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.card-info .product-title {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    text-align: center;
}

.card-info .btn-primary {
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.8rem;
}
/* =========================================
   SISTEMA MODAL (Fichas Técnicas Emergentes)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--mov-mecanico);
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    background: var(--bg-dark);
    border: 1px solid var(--accent);
    width: 90%;
    max-width: 900px;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s var(--mov-mecanico);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.show .modal-box {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
    z-index: 10;
}

.close-modal:hover {
    color: var(--accent);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.modal-image-col {
    background: #111;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-image-col img {
    max-width: 100%;
    max-height: 400px;
}

.modal-text-col {
    padding: 3rem;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-text-col h2 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.modal-specs p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-specs ul {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-specs ul li {
    margin-bottom: 0.5rem;
}

.mt-2 { margin-top: 2rem; display: inline-block; }

/* =========================================
   VENTANA MODAL DE CONTACTO (Animada)
   ========================================= */
#modal-contacto {
    /* Mantenemos el flex activo, pero lo volvemos invisible e intocable */
    display: flex; 
    opacity: 0;
    pointer-events: none; 
    visibility: hidden;
    
    position: fixed;
    z-index: 10000; 
    left: 0; top: 0; width: 100%; height: 100%;
    
    /* Añadimos un desenfoque al fondo oscuro para mayor elegancia */
    background-color: rgba(0, 0, 0, 0.7); 
    backdrop-filter: blur(4px);
    
    justify-content: center;
    align-items: center;
    
    /* Transición suave para el fondo */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Al encenderse, recupera su masa física y visual */
#modal-contacto.activo {
    opacity: 1;
    pointer-events: all;
    visibility: visible;
}

/* Estado de reposo de la caja (ligeramente más pequeña y desplazada hacia abajo) */
.modal-contenido {
    background-color: #111; 
    color: #fff;
    padding: 35px;
    border-radius: 8px;
    border: 1px solid #D32F2F; 
    text-align: center;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0px 15px 40px rgba(0,0,0,0.6);
    
    /* Cinemática inicial: Escala al 90% y caída de 20px */
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    
    /* El motor de la animación: curva de bezier para un asentamiento suave */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15), 
                opacity 0.4s ease;
}

/* Estado activo de la caja (Recupera su tamaño real al instante) */
#modal-contacto.activo .modal-contenido {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.cerrar-modal {
    position: absolute;
    top: 10px; right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.cerrar-modal:hover { color: #fff; }

.opciones-contacto {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.btn-opcion {
    display: block;
    padding: 15px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: background 0.3s, transform 0.1s;
}

.btn-opcion.llamada { background-color: #333; border: 1px solid #555; }
.btn-opcion.whatsapp { background-color: #25D366; color: #000; }
.btn-opcion.correo { background-color: #D32F2F; }
.btn-opcion:active { transform: scale(0.98); }
.btn-opcion:active { transform: scale(0.98); }

/* =========================================
   BOTÓN DE WHATSAPP FLOTANTE (Con Efecto Pulso)
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #128C7E; 
    color: var(--bg-light); 
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 9999; 
    transition: transform 0.3s var(--mov-mecanico), background-color 0.3s ease;
}

/* 1. El clon invisible (La onda) */
.whatsapp-float::after {
    content: '';
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    border-radius: 50%;
    background-color: #128C7E; /* Mismo rojo industrial */
    z-index: -1; /* Lo enviamos detrás del botón principal */
    animation: pulso-radar 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite; /* Motor de animación */
}

/* Efecto magnético al pasar el cursor (frena la onda para dar retroalimentación visual) */
.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.05);
    background-color: #128C7E; 
}
.whatsapp-float:hover::after {
    animation-play-state: paused; 
    opacity: 0;
}

/* 2. Fotogramas clave de la animación (Keyframes) */
@keyframes pulso-radar {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.6); /* Se expande al 160% de su tamaño */
        opacity: 0; /* Se disipa por completo */
    }
}

/* =========================================
   AJUSTE PARA MÓVILES (Dentro de tu @media de 768px)
   ========================================= */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}


/* =========================================
   7. DISEÑO RESPONSIVO (TOLERANCIAS)
   ========================================= */

/* Tabletas (hasta 992px) */
@media (max-width: 992px) {
    .utility-bar {
        padding: 0.8rem 2rem; 
    }
    .hero h1 {
        font-size: 3.5rem; 
    }
    .products-grid {
        padding: 4rem 2rem;
    }
}

/* Celulares (hasta 768px) */
@media (max-width: 768px) {
    
    /* Barra Superior */
    .utility-bar {
        flex-direction: column;
        padding: 0.8rem 1rem;
        text-align: center;
        gap: 0.5rem;
    }
    
    .utility-bar .divider {
        display: none; 
    }
    
    .utility-left {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

/* 1. Centrado absoluto del botón hamburguesa y la barra */
    .navbar {
        flex-direction: column;
        align-items: center; /* Centra el logo y la hamburguesa horizontalmente */
        padding: 1rem 1.5rem;
    }

    .menu-toggle {
        display: block; 
        margin: 0.5rem auto 1rem auto; /* Margen automático para forzar el centrado perfecto */
        align-self: center;
    }

    .nav-menu {
        display: none; 
        width: 100%;
        flex-direction: column;
        align-items: center; /* Centra las opciones de texto */
        gap: 0.5rem;
    }

    .nav-menu.menu-abierto {
        display: flex !important;
        position: relative;
        z-index: 1000; 
        background-color: var(--bg-dark); 
    }

    .nav-menu > li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-menu > li > a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

   /* 2. Reparación Definitiva del Acordeón en Celular */
    .dropdown {
        position: relative !important;
        width: 100% !important;
        padding-bottom: 0 !important;
        display: block !important;
    }

    .dropdown-content {
        display: none !important; /* Apagado por defecto */
        width: 100% !important;
        position: relative !important; /* Fuerza al flujo normal de la página */
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important; 
        background-color: rgba(255, 255, 255, 0.04) !important; 
        clip-path: none !important; /* Destruye el efecto de escritorio */
        box-shadow: none !important;
    }

    /* Cuando JavaScript activa la clase, se muestra en bloque vertical */
    .dropdown.active .dropdown-content {
        display: block !important; 
    }

    .dropdown-content li {
        width: 100% !important;
        text-align: center !important;
        float: none !important;
    }

    .dropdown-content li a {
        display: block !important;
        padding: 0.9rem !important;
        font-size: 0.85rem !important;
        text-align: center !important;
        width: 100% !important;
    }
    /* Hero Section */
    .hero {
        padding: 0 1.5rem;
        text-align: center;
    }
    
    .hero-content {
        margin-top: 6rem;
    }
    
    .hero h1 {
        font-size: 2.5rem; 
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%; 
    }

    /* Productos */
    .products-grid {
        grid-template-columns: 1fr; 
        padding: 3rem 1.5rem;
    }
    
    .product-card {
        min-height: 250px;
    }

    /* Pre-Footer */
    .pre-footer-cta {
        grid-template-columns: 1fr; 
    }
    
    .cta-card {
        padding: 4rem 2rem;
        align-items: center; 
        text-align: center;
    }

    .cta-card p {
        max-width: 100%;
    }

    .cta-card .btn-primary, 
    .cta-card .btn-outline {
        align-self: stretch; 
        text-align: center;
    }

    /* Footer */
    .site-footer {
        padding: 3rem 1.5rem 1rem 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr; 
        gap: 2.5rem;
        text-align: center; 
    }

    /* Ajustes del Manifiesto */
    .manifesto-section {
        padding: 4rem 1.5rem;
    }
    
    .manifesto-header h2 {
        font-size: 2rem;
    }

    .manifesto-grid {
        grid-template-columns: 1fr; /* Colapsa las 3 tarjetas en una columna vertical */
        gap: 1.5rem;
    }
}

/* =========================================
   TOLERANCIA MÓVIL (Punto de quiebre: 768px)
   ========================================= */
@media (max-width: 768px) {
    
    /* 1. Colapsa el catálogo en una sola columna */
    .catalog-container {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem;
        gap: 2rem;
    }

    /* 2. Libera la barra lateral para que no se quede trabada al hacer scroll */
    .sidebar-box {
        position: relative;
        top: 0;
        padding: 1.5rem;
    }

    /* 3. Evita que los botones de categoría sean muy pequeños */
    .filter-btn {
        padding: 0.8rem 0;
        font-size: 1rem;
    }

    /* 4. Colapsa la Ventana Modal en una sola columna */
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-image-col {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        height: 200px;
        padding: 1rem;
    }

    .modal-text-col {
        padding: 2rem 1.5rem;
    }

    .modal-text-col h2 {
        font-size: 1.5rem;
    }
    /* Ajuste de WhatsApp para pantallas pequeñas */
    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}