/* ============================================
    QUANTEX - AGENCIA SEO Y MARKETING ASUNCIÓN
   Estilos Principales
   ============================================ */

/* ============================================
   FUENTE — Plus Jakarta Sans variable (SIL OFL)
   Auto-hospedada para eliminar Google Fonts del camino crítico.
   ============================================ */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('assets/fonts/plus-jakarta-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* CSS Variables */
:root {
    --bg-primary: #f8fafc;      /* Light zinc background */
    --bg-secondary: #f1f5f9;    /* Light slate background */
    --bg-surface: #ffffff;
    
    --accent-primary: #fec505;    /* Amarillo del logo CNSA */
    --accent-ink: #8a6d00;        /* Amarillo oscuro: texto legible sobre fondos claros */
    --accent-secondary: #18181b;  /* Pantone Black */
    --accent-tertiary: #2563eb;   /* Pantone Info Blue */
    --accent-success: #16a34a;    /* Regulatory Green */
    --accent-warning: #eab308;    /* Warning Yellow */
    --accent-danger: #dc2626;     /* Stop Red */
    
    --text-primary: #18181b;      /* Dark slate text */
    --text-secondary: #52525b;    /* Muted zinc text */
    --text-tertiary: #dc9200;     /* Yellow highlight link */
    --text-muted: #626a76;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(24, 24, 27, 0.1);
    --glass-hover: rgba(254, 197, 5, 0.07);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 4px 12px rgba(24, 24, 27, 0.03);
    --shadow-md: 0 16px 40px rgba(24, 24, 27, 0.06);
    --shadow-lg: 0 24px 70px rgba(24, 24, 27, 0.1);
    --shadow-glow: 0 0 40px rgba(254, 197, 5, 0.18);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video, iframe, svg, canvas {
    max-width: 100%;
    height: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 12px 22px;
    background: var(--accent-primary);
    color: var(--accent-secondary);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
    left: 0;
    outline: 3px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
}

::selection {
    background: var(--accent-primary);
    color: white;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 800;
    line-height: 1.15;
    color: var(--accent-secondary);
    letter-spacing: -0.03em;
}

.accent {
    color: var(--accent-primary);
}

/* Container */
.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
}

/* ============================================
   PRELOADER
   ============================================ */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
#cursor, #cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    display: none;
    will-change: transform;
}

@media (min-width: 1024px) and (hover: hover) {
    #cursor, #cursor-follower {
        display: block;
    }
    
    #cursor {
        width: 8px;
        height: 8px;
        background: var(--accent-secondary);
        border-radius: 50%;
        transform: translate3d(0, 0, 0) translate(-50%, -50%);
    }
    
    #cursor-follower {
        width: 40px;
        height: 40px;
        border: 1px solid var(--accent-secondary);
        border-radius: 50%;
        transform: translate3d(0, 0, 0) translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
        opacity: 0.5;
    }
    
    #cursor-follower.hovering {
        width: 60px;
        height: 60px;
        opacity: 0.3;
    }
}

/* ============================================
   BACKGROUND EFFECTS
   ============================================ */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.07;
    animation: orbFloat 25s ease-in-out infinite;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-tertiary);
    bottom: -150px;
    left: -150px;
    animation-delay: -8s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -16s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.05; }
    25% { transform: translate3d(50px, -50px, 0) scale(1.1); opacity: 0.08; }
    50% { transform: translate3d(-30px, 30px, 0) scale(0.9); opacity: 0.06; }
    75% { transform: translate3d(30px, 50px, 0) scale(1.05); opacity: 0.07; }
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(18, 115, 251, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 115, 251, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.btn:hover svg {
    transform: translateX(4px);
}

@keyframes heartbeat {
    0% { transform: scale(1); box-shadow: 0 4px 24px rgba(255, 0, 127, 0.3); }
    14% { transform: scale(1.03); box-shadow: 0 6px 30px rgba(255, 0, 127, 0.5); }
    28% { transform: scale(1); box-shadow: 0 4px 24px rgba(255, 0, 127, 0.3); }
    42% { transform: scale(1.03); box-shadow: 0 6px 30px rgba(255, 0, 127, 0.5); }
    70% { transform: scale(1); box-shadow: 0 4px 24px rgba(255, 0, 127, 0.3); }
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--accent-secondary);
    box-shadow: 0 8px 24px rgba(254, 197, 5, 0.3);
    border: none;
}

.btn-primary::before {
    display: none;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    animation: none;
    transform: translateY(-2px) scale(1.03);
    background: var(--accent-secondary);
    color: #ffffff;
    box-shadow: 0 12px 32px rgba(24, 24, 27, 0.25);
}

.btn-ghost {
    background: #ffffff;
    color: var(--accent-secondary);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(14, 42, 91, 0.05);
}

.btn-ghost:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-ink);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-ink);
    border: 1px solid var(--accent-primary);
}

/* Sobre el menú móvil (fondo oscuro) el outline sí va en amarillo brillante */
.mobile-menu .btn-outline {
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(18, 115, 251, 0.05);
    border-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
#header {
    position: fixed;
    top: 24px;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

#header.scrolled {
    top: 12px;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    padding: 12px 28px;
    box-shadow: var(--shadow-lg);
    transition: padding var(--transition-normal);
}

#header.scrolled .navbar {
    padding: 8px 24px;
    background: rgba(24, 24, 27, 0.98);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-normal);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.logo:hover .logo-icon {
    transform: rotate(-10deg) scale(1.05);
}

.logo-text {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    background: none;
    border: none;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-tertiary), #ffffff);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

/* ============================================
   DROPDOWN & MEGA MENU
   ============================================ */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-toggle::after {
    display: none;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(24, 24, 27, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    display: flex;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1100;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(5px);
}

.dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 175px;
    text-align: left;
}

.dropdown-column h4 {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--accent-primary) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
}

.dropdown-column a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none;
    transition: all var(--transition-fast);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: block;
}

.dropdown-column a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

/* Mobile Dropdown */
.mobile-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding-left: 0;
    list-style: none;
    text-align: center;
}

.mobile-dropdown-menu.open {
    max-height: 1000px;
    padding: 16px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-dropdown-menu a {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 8px;
    display: block;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.mobile-dropdown-menu a:hover {
    color: #ffffff !important;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar .nav-cta .btn-primary {
    background: var(--accent-tertiary);
    color: var(--accent-secondary);
    box-shadow: none;
    animation: none;
    padding: 10px 20px;
}

.navbar .nav-cta .btn-primary:hover {
    background: #ffffff;
    color: var(--accent-secondary);
    transform: translateY(-2px);
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.phone-link svg {
    width: 18px;
    height: 18px;
}

.phone-link:hover {
    color: var(--accent-primary);
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(24, 24, 27, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 130px !important;
    padding-bottom: 60px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.mobile-nav-link {
    background: none;
    border: none;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    padding: 10px;
    transition: color var(--transition-fast);
}

.mobile-nav-link:hover {
    color: var(--accent-primary);
}

@media (max-width: 1024px) {
    .nav-menu {
        display: none !important;
    }
    
    .menu-toggle {
        display: flex !important;
    }

    #header {
        top: 12px;
    }

    .navbar {
        padding: 10px 20px;
        gap: 16px;
        border-radius: 50px;
    }
}

@media (max-width: 768px) {
    #header {
        top: 10px;
    }

    .container {
        padding: 0 14px;
    }

    .navbar {
        padding: 8px 16px;
        border-radius: 40px;
    }
}

@media (max-width: 480px) {
    #header {
        top: 8px;
    }

    .container {
        padding: 0 10px;
    }

    .navbar {
        padding: 8px 12px;
        border-radius: 30px;
    }

    .logo {
        gap: 8px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-icon svg {
        width: 18px;
        height: 18px;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.stat-number {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

.chart-bar.active {
    background: linear-gradient(to top, var(--accent-primary), var(--accent-secondary));
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.floating-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.floating-icon.accent {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-secondary);
}

@keyframes scrollDot {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ============================================
   SECTIONS COMMON
   ============================================ */
.section {
    padding: 120px 0;
    position: relative;
    z-index: 1;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-scale {
    transform: scale(0.95);
}

.reveal.active, .reveal-left.active, .reveal-right.active, .reveal-scale.active {
    opacity: 1;
    transform: translate(0) scale(1);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.service-card {
    padding: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.service-card:hover {
    background: var(--glass-hover);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 102, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent-secondary);
    transition: all var(--transition-normal);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    transform: scale(1.1);
}

.service-icon svg {
    width: 28px;
    height: 28px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.service-features svg {
    width: 16px;
    height: 16px;
    color: var(--accent-success);
    flex-shrink: 0;
}

.project-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(14, 42, 91, 0.95) 0%, rgba(14, 42, 91, 0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card:hover::before {
    opacity: 1;
}

.project-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: all var(--transition-normal);
}

.project-card:hover .project-content {
    transform: translateY(0);
    opacity: 1;
}

.project-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 102, 255, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 4px;
    color: #ffffff;
}

.project-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.project-result {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-success);
}

.project-result svg {
    width: 16px;
    height: 16px;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.testimonial-card {
    padding: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    transition: all var(--transition-normal);
}

.testimonial-card:hover {
    background: var(--glass-hover);
    border-color: rgba(0, 212, 255, 0.2);
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.testimonial-stars svg {
    width: 18px;
    height: 18px;
    color: var(--accent-warning);
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.testimonial-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
}

.testimonial-author-info {
    display: flex;
    flex-direction: column;
}

.testimonial-author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.testimonial-author-role {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.page-title {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    margin-bottom: 20px;
}

.team-card {
    text-align: center;
}

.team-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-xl);
    margin-bottom: 16px;
    transition: transform var(--transition-slow);
}

.team-card:hover img {
    transform: scale(1.03);
}

.team-card h3 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.team-card p {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23E5E7EB' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #ffffff;
    border-top: 1px solid var(--glass-border);
    padding: 80px 0 40px;
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 0.9fr 1fr 1.35fr 1.15fr;
    gap: 36px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
.page {
    display: none;
    opacity: 0;
}

.page.active {
    display: block;
    animation: pageIn 0.6s ease forwards;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   WHATSAPP FLOAT BUTTON & PROJECT DETAIL
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    z-index: 999;
    text-decoration: none;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4), 0 0 20px rgba(37, 211, 102, 0.2);
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #25D366;
    border-radius: 50%;
    z-index: -1;
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

.project-detail-card.highlight {
    border-color: rgba(0, 212, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.05);
}

.project-card {
    cursor: pointer;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md), 0 0 20px rgba(0, 102, 255, 0.1);
}

.gallery-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    transition: transform var(--transition-normal), border-color var(--transition-normal);
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--accent-secondary);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(3, 7, 18, 0.95);
    backdrop-filter: blur(15px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 85%;
    max-height: 75%;
    object-fit: contain;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    color: var(--text-primary);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color var(--transition-fast), transform var(--transition-fast);
    user-select: none;
}

.lightbox-close:hover {
    color: var(--accent-secondary);
    transform: scale(1.1);
}

.lightbox-caption {
    margin-top: 20px;
    color: var(--text-secondary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.125rem;
    font-weight: 500;
    text-align: center;
}

/* ============================================
   RESPONSIVE WHATSAPP FLOAT BUTTON
   ============================================ */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.5); opacity: 0; }
}

.recording-studio-section .btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%);
    color: var(--accent-secondary) !important;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(18, 115, 251, 0.4);
    border: none;
    position: relative;
    overflow: hidden;
}

.recording-studio-section .btn-primary span {
    color: var(--accent-secondary);
}

.recording-studio-section .btn-primary svg {
    color: var(--accent-secondary);
}

.recording-studio-section .btn-primary:hover {
    background: #ffffff;
    color: var(--accent-secondary) !important;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    transform: translateY(-2px) scale(1.02);
}

.recording-studio-section .btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: buttonShine 4s infinite linear;
}

@keyframes buttonShine {
    0% { left: -150%; }
    50% { left: -150%; }
    60% { left: 150%; }
    100% { left: 150%; }
}

.recording-studio-section .btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.recording-studio-section .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.2; }
    50% { transform: translateY(-40px) translateX(20px); opacity: 0.6; }
}

/* ============================================
   CNSA CUSTOM STYLES (ROAD SAFETY CATALOG)
   ============================================ */

/* Banner Section */
.hero-banner {
    position: relative;
    height: 75vh;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    z-index: 1;
    padding-top: 140px; /* Gives space from fixed navigation bar */
    overflow: hidden;
    background-color: var(--accent-secondary);
}

.hero-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(24, 24, 27, 0.5) 0%, rgba(24, 24, 27, 0.8) 100%);
    z-index: 1;
}

.hero-banner > .container {
    position: relative;
    z-index: 2;
}

.hero-banner h1 {
    color: #ffffff !important;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.hero-banner p {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Product Catalog */
.catalog-container {
    padding: 80px 0;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-top: 40px;
}

.catalog-sidebar {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-secondary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 10px;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    display: block;
    padding: 4px 0;
}

.filter-item a:hover,
.filter-item.active a {
    color: var(--accent-ink);
    transform: translateX(4px);
    font-weight: 600;
}

.subfilter-list {
    list-style: none;
    padding-left: 15px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.subfilter-item a {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.subfilter-item.active a,
.subfilter-item a:hover {
    color: var(--accent-ink);
}

/* Products grid */
.catalog-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.catalog-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    box-shadow: var(--shadow-sm);
}

.search-bar {
    display: flex;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    max-width: 350px;
    width: 100%;
}

.search-bar input {
    border: none;
    padding: 10px 16px;
    width: 100%;
    outline: none;
    font-size: 0.9rem;
    background: white;
    color: var(--text-primary);
}

.search-bar button {
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 0 16px;
    cursor: pointer;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-primary);
}

.product-card-img {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: #f1f5f9;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-card-img img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent-primary);
    color: var(--accent-secondary);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
}

.product-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-cat {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-card-title {
    font-size: 1.125rem;
    color: var(--accent-secondary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.product-card-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

.product-card-actions {
    display: flex;
    gap: 12px;
}

/* WhatsApp Redirection Button style */
.btn-whatsapp {
    background-color: #25d366;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
    background-color: #20ba5a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

/* Variante compacta: botón "Cotizar" del header */
.btn-whatsapp-header {
    border-radius: 50px;
    padding: 8px 15px;
    font-size: 0.8125rem;
    line-height: 1;
    gap: 6px;
    white-space: nowrap;
}

.btn-whatsapp-header svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Product Detail View */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 80px 0;
}

.product-detail-gallery {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: #f8fafc;
    aspect-ratio: 4/3;
}

.product-detail-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-detail-title {
    font-size: 2.25rem;
    color: var(--accent-secondary);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    border: 1px solid var(--glass-border);
}

.specs-table td {
    padding: 12px 20px;
    font-size: 0.875rem;
}

.specs-table tr:nth-child(even) {
    background-color: var(--bg-secondary);
}

.specs-table td:first-child {
    font-weight: 700;
    color: var(--accent-secondary);
    width: 35%;
    border-right: 1px solid var(--glass-border);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    .catalog-sidebar {
        position: static;
    }
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
}

/* Lightbox Modal */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(24, 24, 27, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    backdrop-filter: blur(8px);
    transition: opacity 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.lightbox-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.lightbox-content-container {
    max-width: 80%;
    max-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content-container img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.lightbox-prev:hover, .lightbox-next:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-prev { left: 40px; }
.lightbox-next { right: 40px; }

@media (max-width: 768px) {
    .lightbox-prev { left: 15px; }
    .lightbox-next { right: 15px; }
    .lightbox-close { top: 15px; right: 15px; }
    .lightbox-content-container { max-width: 90%; }
}

/* Reset header and dropdown link underlines globally while keeping custom hovers */
#header a,
#header a:hover,
#header a:focus,
.nav-link,
.nav-link:hover,
.nav-link:focus,
.dropdown-menu a,
.dropdown-menu a:hover,
.dropdown-menu a:focus {
    text-decoration: none !important;
}

/* ============================================
   RESPONSIVE UTILITY GRIDS (MOBILE-FIRST FIXES)
   ============================================ */
.footer-grid {
    display: grid;
    grid-template-columns: 1.7fr 0.9fr 1fr 1.35fr 1.15fr;
    gap: 36px;
}

@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 28px;
    }

    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 400px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-grid > div:first-child {
        grid-column: auto;
    }
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 50px;
    align-items: start;
}

@media (max-width: 992px) {
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.home-about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: start;
}

@media (max-width: 992px) {
    .home-about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.about-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 992px) {
    .about-hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.services-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .services-grid-home {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* ============================================
   PÁGINAS LEGALES (privacidad, cookies, términos)
   ============================================ */

.legal-hero {
    position: relative;
    background-color: var(--accent-secondary);
    color: #fff;
    padding: 124px 0 56px;
    text-align: center;
    border-bottom: 4px solid var(--accent-primary);
}

.legal-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.legal-crumbs a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.legal-crumbs a:hover { opacity: 0.75; }

.legal-hero h1 {
    font-size: clamp(1.85rem, 4vw, 2.7rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
}

.legal-hero-sub {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.03rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
}

.legal-updated {
    margin-top: 20px;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.5);
}

.legal-updated time { color: rgba(255, 255, 255, 0.72); }

.legal-body {
    background-color: var(--bg-primary);
    padding: 64px 0 96px;
}

.legal-grid {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

/* Índice lateral */
.legal-toc {
    position: sticky;
    top: 104px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px 22px;
    box-shadow: var(--shadow-sm);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.legal-toc-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin-bottom: 14px;
}

.legal-toc ol {
    list-style: none;
    counter-reset: legal-toc;
    margin: 0;
    padding: 0;
}

.legal-toc ol li {
    counter-increment: legal-toc;
    position: relative;
    padding-left: 26px;
    margin-bottom: 9px;
    font-size: 0.83rem;
    line-height: 1.4;
}

.legal-toc ol li::before {
    content: counter(legal-toc);
    position: absolute;
    left: 0;
    top: 1px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.legal-toc ol li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.legal-toc ol li a:hover { color: var(--accent-ink); }

.legal-toc-contact {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
}

.legal-toc-contact p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 10px;
}

.legal-toc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--accent-primary);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.legal-toc-btn:hover {
    background: var(--accent-secondary);
    color: #fff;
}

/* Documento */
.legal-prose {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 48px clamp(24px, 5vw, 56px);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.legal-prose > .legal-section:first-of-type > h2 { margin-top: 0; }

.legal-section {
    padding-top: 34px;
    margin-top: 34px;
    border-top: 1px solid var(--glass-border);
    scroll-margin-top: 100px;
}

.legal-prose > .legal-section:first-of-type {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.legal-prose h2 {
    font-size: 1.32rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin: 0 0 14px;
}

.legal-prose h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 24px 0 10px;
}

.legal-prose p {
    font-size: 0.94rem;
    line-height: 1.78;
    color: var(--text-secondary);
    margin: 0 0 14px;
}

.legal-prose p:last-child { margin-bottom: 0; }

.legal-prose strong { color: var(--text-primary); font-weight: 700; }

.legal-prose a {
    color: var(--accent-ink);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.legal-prose a:hover { color: var(--text-primary); }

.legal-prose ul,
.legal-prose ol {
    margin: 0 0 16px;
    padding-left: 20px;
}

.legal-prose ul { list-style: none; padding-left: 0; }

.legal-prose ul > li {
    position: relative;
    padding-left: 20px;
    font-size: 0.94rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.legal-prose ul > li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.legal-prose ol > li {
    font-size: 0.94rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 4px;
}

.legal-prose li:last-child { margin-bottom: 0; }

/* Tabla de cookies y datos */
.legal-table-wrap {
    overflow-x: auto;
    margin: 8px 0 20px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    -webkit-overflow-scrolling: touch;
}

.legal-table {
    width: 100%;
    min-width: 660px;
    border-collapse: collapse;
    font-size: 0.82rem;
    line-height: 1.55;
}

.legal-table caption {
    text-align: left;
    padding: 14px 16px 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.legal-table thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.legal-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    vertical-align: top;
}

.legal-table tbody tr:last-child td { border-bottom: 0; }
.legal-table tbody tr:nth-child(even) { background: rgba(248, 250, 252, 0.7); }
.legal-table code {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-secondary);
    padding: 1px 5px;
    border-radius: 4px;
    word-break: break-word;
}

/* Caja "En resumen" */
.legal-summary {
    position: relative;
    background: linear-gradient(180deg, rgba(254, 197, 5, 0.10), rgba(254, 197, 5, 0.04));
    border: 1px solid rgba(254, 197, 5, 0.55);
    border-left: 4px solid var(--accent-primary);
    border-radius: var(--radius-md);
    padding: 22px 24px;
    margin-bottom: 34px;
}

.legal-summary-title {
    font-size: 0.7rem !important;
    font-weight: 800 !important;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--accent-ink) !important;
    margin: 0 0 12px !important;
}

.legal-summary ul { margin: 0 !important; }

.legal-summary ul > li {
    font-size: 0.9rem !important;
    color: var(--text-primary) !important;
    margin-bottom: 7px !important;
}

.legal-summary ul > li::before { background: var(--accent-ink); }

/* Aviso destacado dentro del texto */
.legal-note {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 18px;
    margin: 18px 0;
}

.legal-note p { margin: 0; font-size: 0.88rem; }

/* Cierre */
.legal-prose .btn-primary,
.legal-prose .btn-primary span {
    color: var(--accent-secondary);
}

.legal-footer-note {
    margin-top: 44px;
    padding-top: 30px;
    border-top: 2px solid var(--glass-border);
}

.legal-footer-note > p {
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.legal-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.legal-footer-actions .btn {
    font-size: 0.82rem;
    padding: 10px 18px;
}

@media (max-width: 1024px) {
    .legal-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .legal-toc {
        position: static;
        max-height: none;
    }

    .legal-toc ol {
        columns: 2;
        column-gap: 24px;
    }

    .legal-toc ol li { break-inside: avoid; }
}

@media (max-width: 640px) {
    .legal-hero { padding: 104px 0 44px; }

    .legal-body { padding: 40px 0 64px; }

    .legal-prose { padding: 30px 20px; border-radius: var(--radius-lg); }

    .legal-prose h2 { font-size: 1.15rem; }

    .legal-toc ol { columns: 1; }

    .legal-footer-actions .btn { width: 100%; justify-content: center; }
}

/* Mapa de Contacto */
.map-frame {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    background: var(--bg-surface);
}

.map-frame iframe {
    display: block;
    width: 100% !important;
    height: 620px;
    border: 0;
}

.map-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 14px 20px;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.map-meta a {
    color: var(--accent-ink);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.map-meta a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .map-frame iframe { height: 420px; }
    .map-meta { padding: 12px 16px; font-size: 0.8rem; }
}
