/* ==========================================
   PROTEXIA - Estilos Mejorados
   Versión con todas las mejoras implementadas
   ========================================== */

/* ==========================================
   RESET Y VARIABLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores principales */
    --primary-color: #2ECC71;
    --primary-dark: #27AE60;
    --primary-light: #E8F8F0;

    /* Color secundario para diversidad */
    --secondary-color: #3498DB;
    --secondary-dark: #2980B9;
    --secondary-light: #EBF5FB;

    /* Gradientes alternativos */
    --gradient-blue: linear-gradient(135deg, #1e3a5f, #3498DB);
    --gradient-teal: linear-gradient(135deg, #1a4d4d, #16A085);

    /* Colores de texto */
    --text-dark: #1A1A1A;
    --text-medium: #555555;
    --text-light: #666666;

    /* Colores de fondo */
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-dark: #2C3E50;
    --bg-darker: #1A1A1A;

    /* Bordes */
    --border-color: #E5E7EB;

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);

    /* Espaciado */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-2xl: 80px;
    --spacing-3xl: 100px;

    /* Tipografía - Font Family */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Tipografía - Escala modular (ratio 1.25) */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 2rem;      /* 32px */
    --text-4xl: 2.625rem;  /* 42px */
    --text-5xl: 3.5rem;    /* 56px */

    /* Tipografía - Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Tipografía - Line Heights */
    --leading-tight: 1.2;
    --leading-snug: 1.4;
    --leading-normal: 1.6;
    --leading-relaxed: 1.8;

    /* Border Radius - Estandarizado */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================
   DARK MODE
   ========================================== */

/* Dark mode variables - aplicables via clase o media query */
[data-theme="dark"],
.dark-mode {
    --text-dark: #F5F5F5;
    --text-medium: #B3B3B3;
    --text-light: #999999;

    --bg-white: #121212;
    --bg-light: #1E1E1E;
    --bg-dark: #0A0A0A;
    --bg-darker: #000000;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.7);

    --primary-light: #1a3d2a;
    --secondary-light: #1a2d3d;

    /* Bordes más visibles en dark mode */
    --border-color: rgba(255, 255, 255, 0.1);
}

/* Auto dark mode basado en preferencia del sistema */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --text-dark: #F5F5F5;
        --text-medium: #B3B3B3;
        --text-light: #999999;

        --bg-white: #121212;
        --bg-light: #1E1E1E;
        --bg-dark: #0A0A0A;
        --bg-darker: #000000;

        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
        --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.7);

        --primary-light: #1a3d2a;
        --secondary-light: #1a2d3d;
        --border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Theme toggle button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-base), transform var(--transition-fast);
    font-size: 20px;
    color: var(--text-dark);
}

.theme-toggle:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Iconos del toggle */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun,
.dark-mode .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon,
.dark-mode .theme-toggle .icon-moon {
    display: inline-block;
}

/* Transición suave para cambio de tema */
body {
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* Dark mode specific improvements */
[data-theme="dark"] .header,
.dark-mode .header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .why-card,
[data-theme="dark"] .service-card,
[data-theme="dark"] .metric-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .post-card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .panel,
.dark-mode .why-card,
.dark-mode .service-card,
.dark-mode .metric-card,
.dark-mode .feature-card,
.dark-mode .post-card,
.dark-mode .team-card,
.dark-mode .contact-card,
.dark-mode .panel {
    border-color: var(--border-color);
    background: var(--bg-light);
}

[data-theme="dark"] .btn-outline,
.dark-mode .btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

[data-theme="dark"] .btn-outline:hover,
.dark-mode .btn-outline:hover {
    background: rgba(46, 204, 113, 0.15);
}

[data-theme="dark"] .footer,
.dark-mode .footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .nav-link.active,
.dark-mode .nav-link.active {
    color: var(--primary-color);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
.dark-mode input,
.dark-mode select,
.dark-mode textarea {
    background: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-dark);
}

[data-theme="dark"] .diagnostic-form,
.dark-mode .diagnostic-form {
    background: var(--bg-light);
}

/* Logo en dark mode */
[data-theme="dark"] .logo-mark,
.dark-mode .logo-mark {
    filter: brightness(1.1);
}

/* Case results in dark mode - ensure text is readable */
[data-theme="dark"] .case-results,
.dark-mode .case-results {
    background: rgba(46, 204, 113, 0.15);
}

[data-theme="dark"] .case-result-item,
.dark-mode .case-result-item {
    color: var(--text-dark);
}

/* Hero Nazca pattern in dark mode - slightly more visible */
[data-theme="dark"] .hero::before,
.dark-mode .hero::before {
    opacity: 1;
}

[data-theme="dark"] .hero,
.dark-mode .hero {
    background: linear-gradient(135deg, #0d0d1a 0%, #0f1628 50%, #0a1a33 100%);
}

[data-theme="dark"] .hero-overlay,
.dark-mode .hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(13, 13, 26, 0.6) 0%,
        rgba(15, 22, 40, 0.5) 50%,
        rgba(10, 26, 51, 0.4) 100%
    );
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.icon {
    width: 1em;
    height: 1em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: middle;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==========================================
   ACCESIBILIDAD Y NAVEGACIÓN POR TECLADO
   ========================================== */

/* Screen reader only - oculto visualmente pero accesible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Remover outline por defecto solo para mouse, mantener para teclado */
*:focus {
    outline: none;
}

/* Estilos de enfoque consistentes para navegación por teclado */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Enfoque específico para enlaces */
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    text-decoration: underline;
}

/* Enfoque para botones primarios */
.btn-primary:focus-visible {
    outline: 3px solid var(--bg-white);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--primary-color);
}

/* Enfoque para botones outline y secondary */
.btn-outline:focus-visible,
.btn-secondary:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enfoque para inputs y textareas */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 0;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

/* Enfoque para navegación */
.nav-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 6px;
    background: rgba(46, 204, 113, 0.05);
}

/* Enfoque para links de skip */
.skip-link:focus {
    outline: 3px solid var(--bg-white);
    outline-offset: 2px;
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-tagline {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
}

.nav {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
    padding: 12px 8px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

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

.header-cta {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.header-phone {
    color: var(--text-medium);
    text-decoration: none;
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    padding: 12px 16px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-md);
    transition: background var(--transition-base);
}

.header-phone:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-block;
    text-decoration: none;
    font-weight: var(--font-semibold);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    font-family: var(--font-family);
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-white);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 204, 113, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-small {
    padding: 12px 24px;
    font-size: 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-full {
    width: 100%;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Nazca Network Pattern Layer - above overlay for visibility */
.hero::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1920 1080'%3E%3Cdefs%3E%3ClinearGradient id='lg' x1='0%25' y1='0%25' x2='100%25' y2='0%25'%3E%3Cstop offset='0%25' stop-color='%232ECC71' stop-opacity='0'/%3E%3Cstop offset='50%25' stop-color='%232ECC71' stop-opacity='0.5'/%3E%3Cstop offset='100%25' stop-color='%232ECC71' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='url(%23lg)' stroke-width='1' fill='none' opacity='0.4'%3E%3Cline x1='150' y1='200' x2='400' y2='150'/%3E%3Cline x1='400' y1='150' x2='700' y2='300'/%3E%3Cline x1='700' y1='300' x2='1000' y2='200'/%3E%3Cline x1='1000' y1='200' x2='1300' y2='350'/%3E%3Cline x1='1300' y1='350' x2='1600' y2='250'/%3E%3Cline x1='1600' y1='250' x2='1850' y2='400'/%3E%3Cline x1='100' y1='500' x2='350' y2='450'/%3E%3Cline x1='350' y1='450' x2='600' y2='550'/%3E%3Cline x1='600' y1='550' x2='900' y2='480'/%3E%3Cline x1='900' y1='480' x2='1200' y2='600'/%3E%3Cline x1='1200' y1='600' x2='1500' y2='500'/%3E%3Cline x1='1500' y1='500' x2='1800' y2='650'/%3E%3Cline x1='200' y1='800' x2='500' y2='750'/%3E%3Cline x1='500' y1='750' x2='800' y2='850'/%3E%3Cline x1='800' y1='850' x2='1100' y2='780'/%3E%3Cline x1='1100' y1='780' x2='1400' y2='900'/%3E%3Cline x1='1400' y1='900' x2='1700' y2='800'/%3E%3Cline x1='400' y1='150' x2='350' y2='450'/%3E%3Cline x1='700' y1='300' x2='600' y2='550'/%3E%3Cline x1='1000' y1='200' x2='900' y2='480'/%3E%3Cline x1='1300' y1='350' x2='1200' y2='600'/%3E%3Cline x1='1600' y1='250' x2='1500' y2='500'/%3E%3Cline x1='350' y1='450' x2='500' y2='750'/%3E%3Cline x1='600' y1='550' x2='800' y2='850'/%3E%3Cline x1='900' y1='480' x2='1100' y2='780'/%3E%3Cline x1='1200' y1='600' x2='1400' y2='900'/%3E%3Cline x1='1500' y1='500' x2='1700' y2='800'/%3E%3C/g%3E%3Cg fill='none' stroke='%232ECC71' stroke-width='1.5' opacity='0.25'%3E%3Cpath transform='translate(120,160)' d='M5,20 L15,15 L25,18 L35,15 L45,20 M25,18 L25,25 L20,30 M25,25 L30,30 M15,15 L10,10 M45,20 L55,18 L60,20'/%3E%3Cpath transform='translate(680,270)' d='M25,15 L25,35 M20,20 L25,25 L30,20 M15,15 L20,20 M30,20 L35,15 M15,25 L20,25 M30,25 L35,25 M18,32 L22,30 M28,30 L32,32 M25,15 L25,10 L22,5 M25,10 L28,5'/%3E%3Cpath transform='translate(1250,320)' d='M5,25 L15,20 L25,22 L35,20 L45,22 L55,20 L65,25 M35,20 L35,30 L30,35 M35,30 L40,35 M35,20 L35,12 L32,8 M35,12 L38,8'/%3E%3Cpath transform='translate(320,420)' d='M25,10 C20,10 18,15 18,20 C18,25 22,28 25,28 C28,28 32,25 32,20 C32,15 30,10 25,10 M20,28 L15,35 L12,45 M30,28 L35,35 L38,45 M25,28 L25,40 L20,50 M25,40 L30,50'/%3E%3Cpath transform='translate(880,450)' d='M20,20 C20,17 23,14 26,14 C32,14 34,20 34,24 C34,32 26,36 18,36 C8,36 4,26 4,18 C4,6 16,2 26,2'/%3E%3Cpath transform='translate(1480,470)' d='M20,45 L20,25 M20,25 L10,15 L8,5 M20,25 L15,12 L14,2 M20,25 L20,8 L20,0 M20,25 L25,12 L26,2 M20,25 L30,15 L32,5'/%3E%3Cpath transform='translate(1580,220)' d='M5,20 L15,15 L25,18 L35,15 L45,20 M25,18 L25,25 L20,30 M25,25 L30,30 M15,15 L10,10 M45,20 L55,18 L60,20'/%3E%3Cpath transform='translate(480,730)' d='M20,20 C20,17 23,14 26,14 C32,14 34,20 34,24 C34,32 26,36 18,36 C8,36 4,26 4,18 C4,6 16,2 26,2'/%3E%3Cpath transform='translate(1080,760)' d='M25,15 L25,35 M20,20 L25,25 L30,20 M15,15 L20,20 M30,20 L35,15'/%3E%3Cpath transform='translate(1680,780)' d='M5,25 L15,20 L25,22 L35,20 L45,22 L55,20 L65,25 M35,20 L35,30 L30,35 M35,30 L40,35'/%3E%3C/g%3E%3Cg fill='%232ECC71' opacity='0.5'%3E%3Ccircle cx='150' cy='200' r='4'/%3E%3Ccircle cx='400' cy='150' r='4'/%3E%3Ccircle cx='700' cy='300' r='4'/%3E%3Ccircle cx='1000' cy='200' r='4'/%3E%3Ccircle cx='1300' cy='350' r='4'/%3E%3Ccircle cx='1600' cy='250' r='4'/%3E%3Ccircle cx='1850' cy='400' r='4'/%3E%3Ccircle cx='100' cy='500' r='4'/%3E%3Ccircle cx='350' cy='450' r='4'/%3E%3Ccircle cx='600' cy='550' r='4'/%3E%3Ccircle cx='900' cy='480' r='4'/%3E%3Ccircle cx='1200' cy='600' r='4'/%3E%3Ccircle cx='1500' cy='500' r='4'/%3E%3Ccircle cx='1800' cy='650' r='4'/%3E%3Ccircle cx='200' cy='800' r='4'/%3E%3Ccircle cx='500' cy='750' r='4'/%3E%3Ccircle cx='800' cy='850' r='4'/%3E%3Ccircle cx='1100' cy='780' r='4'/%3E%3Ccircle cx='1400' cy='900' r='4'/%3E%3Ccircle cx='1700' cy='800' r='4'/%3E%3C/g%3E%3Cg fill='%232ECC71' opacity='0.6'%3E%3Ccircle cx='150' cy='180' r='6'/%3E%3Ccircle cx='705' cy='295' r='6'/%3E%3Ccircle cx='1285' cy='345' r='6'/%3E%3Ccircle cx='345' cy='455' r='6'/%3E%3Ccircle cx='900' cy='475' r='6'/%3E%3Ccircle cx='1500' cy='500' r='6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    opacity: 1;
    z-index: 3;
    pointer-events: none;
    animation: nazcaPulse 4s ease-in-out infinite, subtleMove 30s ease-in-out infinite;
}

/* Nazca pattern pulse animation */
@keyframes nazcaPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Hero image layer (from inline style) */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 0;
}

/* Animated network movement */
@keyframes subtleMove {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-10px) translateY(-5px);
    }
    50% {
        transform: translateX(0) translateY(-10px);
    }
    75% {
        transform: translateX(10px) translateY(-5px);
    }
}

/* Gradient overlay for text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 46, 0.7) 0%,
        rgba(22, 33, 62, 0.6) 50%,
        rgba(15, 52, 96, 0.5) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 4;
    padding: var(--spacing-3xl) 0;
}

.hero-text {
    max-width: 700px;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bg-white);
    margin-bottom: var(--spacing-md);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5),
                 0 4px 16px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.6;
    color: var(--bg-white);
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-cta-group {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.hero-features {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
    color: var(--bg-white);
    font-size: 15px;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ==========================================
   TRUST BAR
   ========================================== */

.trust-bar {
    background: var(--bg-darker);
    padding: var(--spacing-md) 0;
    text-align: center;
}

.trust-label {
    color: #D1D1D1; /* WCAG AA 7:1 contrast on dark bg */
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.trust-badge {
    color: var(--bg-white);
    font-size: 15px;
    font-weight: 600;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.trust-badge:nth-child(2n) {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
}

.trust-badge:nth-child(3n) {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* ==========================================
   SECTIONS
   ========================================== */

.section-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--text-medium);
    margin-bottom: var(--spacing-xl);
}

.section-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

/* ==========================================
   CARD BASE SYSTEM (Unified)
   ========================================== */

.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Card variants */
.card--elevated {
    box-shadow: var(--shadow-md);
}

.card--elevated:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card--interactive {
    cursor: pointer;
}

.card--interactive:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.card--bordered {
    box-shadow: none;
    border: 2px solid #f0f0f0;
}

.card--bordered:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.card--accent-secondary:hover {
    border-color: var(--secondary-color);
}

/* Card content elements */
.card__icon {
    font-size: 40px;
    margin-bottom: var(--spacing-sm);
}

.card__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.card__description {
    font-size: var(--text-base);
    color: var(--text-medium);
    line-height: var(--leading-normal);
}

.card__metric {
    font-size: var(--text-sm);
    color: var(--primary-color);
    font-weight: var(--font-semibold);
    padding-top: var(--spacing-sm);
    border-top: 2px solid var(--primary-light);
    margin-top: var(--spacing-sm);
}

/* ==========================================
   WHY US
   ========================================== */

.why-us {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-white);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.why-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.why-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.why-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.why-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.why-description {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.why-metric {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    padding-top: var(--spacing-sm);
    border-top: 2px solid var(--primary-light);
}

/* Variante de why-card */
.why-card:nth-child(2) {
    background: var(--secondary-light);
}

.why-card:nth-child(2) .why-metric {
    color: var(--secondary-color);
    border-top-color: var(--secondary-color);
}

/* ==========================================
   RESULTS
   ========================================== */

.results {
    background: var(--bg-light);
    padding: var(--spacing-3xl) 0;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.metric-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.metric-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.metric-label {
    font-size: 16px;
    color: var(--text-medium);
    line-height: 1.5;
}

/* ==========================================
   SERVICES
   ========================================== */

.services {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--bg-white);
    border: 2px solid #f0f0f0;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Variante de service-card con acento secundario */
.service-card:nth-child(2n) {
    border-color: var(--secondary-light);
}

.service-card:nth-child(2n):hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.15);
}

.service-icon {
    font-size: 40px;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

.service-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.service-description {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.6;
}

/* ==========================================
   METHODOLOGY
   ========================================== */

.methodology {
    background: var(--bg-light);
    padding: var(--spacing-3xl) 0;
}

.methodology-steps {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: var(--spacing-md);
    align-items: start;
    margin-bottom: var(--spacing-xl);
}

.step-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-white);
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

.step-icon {
    font-size: 32px;
    margin-bottom: var(--spacing-xs);
    color: var(--primary-color);
}

.step-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-duration {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

.step-description {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.step-deliverable {
    background: var(--primary-light);
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-sm);
    border-left: 3px solid var(--primary-color);
    font-size: 14px;
    text-align: left;
}

.step-connector {
    font-size: 32px;
    color: var(--primary-color);
    align-self: center;
    padding-top: 32px;
}

.methodology-cta {
    text-align: center;
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.methodology-cta p {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

/* ==========================================
   CASES
   ========================================== */

.cases {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-white);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.case-card {
    background: var(--bg-white);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.case-card:hover {
    box-shadow: var(--shadow-md);
}

.case-industry {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-sm);
}

.case-icon {
    font-size: 20px;
    color: var(--primary-color);
}

.case-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.case-info {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: var(--spacing-sm);
}

.case-challenge {
    font-size: 15px;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid #f0f0f0;
}

.case-results {
    background: #F0FFF4;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
}

.case-result-item {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.8;
    padding-left: 24px;
    position: relative;
    margin-bottom: 6px;
}

.case-result-item:before {
    content: "✓";
    color: var(--primary-color);
    font-weight: 700;
    position: absolute;
    left: 0;
}

/* ==========================================
   BLOG
   ========================================== */

.blog {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-light);
}

.blog-featured {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-xl);
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
}

.blog-featured-image {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.blog-placeholder-image {
    font-size: 120px;
}

.blog-featured-content {
    padding: var(--spacing-xl);
}

.blog-category {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.blog-featured-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.blog-featured-description {
    font-size: 18px;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.blog-features {
    list-style: none;
    margin-bottom: var(--spacing-lg);
}

.blog-features li {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 2;
    padding-left: 24px;
    position: relative;
}

.blog-features li:before {
    content: "✓";
    color: var(--primary-color);
    font-weight: 700;
    position: absolute;
    left: 0;
}

.blog-cta-group {
    display: flex;
    gap: var(--spacing-sm);
}

.blog-upcoming {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-medium);
    font-style: italic;
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #34495E 100%);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--bg-white);
    margin-top: var(--spacing-lg);
}

.newsletter-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.newsletter-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: var(--spacing-lg);
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 500px;
    margin: 0 auto var(--spacing-sm);
}

.newsletter-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font-family);
}

.newsletter-disclaimer {
    font-size: 13px;
    opacity: 0.7;
}

/* ==========================================
   CTA FINAL
   ========================================== */

.cta-final {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-white);
}

.cta-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.cta-subtitle {
    font-size: 18px;
    text-align: center;
    color: var(--text-medium);
    margin-bottom: var(--spacing-xl);
}

/* Form */
.diagnostic-form {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-light);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: var(--font-family);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Estados de validación */
.form-group {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #E74C3C;
    background-color: #FDEDEC;
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: var(--primary-color);
    background-color: #E8F8F0;
}

.error-message {
    display: none;
    color: #E74C3C;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.error-message.visible {
    display: block;
}

.success-message {
    display: none;
    background: #E8F8F0;
    border-left: 3px solid var(--primary-color);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
}

.success-message.visible {
    display: block;
}

/* Aviso de privacidad */
.privacy-notice {
    background: #F8F9FA;
    border-left: 3px solid var(--primary-color);
    padding: var(--spacing-sm);
    font-size: 13px;
    color: var(--text-medium);
    margin-top: var(--spacing-md);
    border-radius: var(--radius-md);
}

.privacy-notice a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Required indicator */
label .required-indicator {
    color: #E74C3C;
    font-weight: 700;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: var(--bg-darker);
    color: var(--bg-white);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--bg-white);
}

.footer-tagline {
    font-size: 14px;
    color: #CCCCCC; /* WCAG AA 4.6:1 contrast */
    margin-bottom: var(--spacing-xs);
}

.footer-description {
    font-size: 14px;
    color: #CCCCCC; /* WCAG AA 4.6:1 contrast */
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: #CCCCCC; /* WCAG AA 4.6:1 contrast */
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    margin-bottom: var(--spacing-sm);
    font-size: 14px;
}

.footer-contact a {
    color: var(--bg-white);
    text-decoration: none;
}

.footer-contact strong {
    color: #CCCCCC; /* WCAG AA 4.6:1 contrast */
    font-weight: 600;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
}

.footer-copyright {
    font-size: 14px;
    color: #CCCCCC; /* WCAG AA 4.6:1 contrast */
}

.footer-legal {
    display: flex;
    gap: var(--spacing-md);
}

.footer-legal a {
    color: #CCCCCC; /* WCAG AA 4.6:1 contrast */
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

/* ==========================================
   RESPONSIVE
   ========================================== */

/* ==========================================
   LAZY LOADING IMAGES
   ========================================== */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity var(--transition-base);
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
    opacity: 1;
}

/* Placeholder skeleton while loading */
.img-skeleton {
    background: linear-gradient(90deg, var(--bg-light) 25%, #e8e8e8 50%, var(--bg-light) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================
   BREAKPOINT XL (1440px+)
   ========================================== */

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

    .hero-title {
        font-size: 64px;
    }

    .hero-subtitle {
        font-size: 22px;
    }

    .section-title {
        font-size: 48px;
    }

    .why-grid {
        gap: var(--spacing-xl);
    }

    .services-grid {
        gap: var(--spacing-xl);
    }

    .methodology-steps {
        gap: var(--spacing-lg);
    }

    .footer-grid {
        gap: var(--spacing-2xl);
    }
}

/* Breakpoint XXL (1920px+) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    .hero {
        min-height: 700px;
    }

    .hero-title {
        font-size: 72px;
    }

    .why-grid,
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-2xl);
    }

    .results-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* ==========================================
   RESPONSIVE - TABLET & MOBILE
   ========================================== */

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

    .methodology-steps {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .step-connector {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    /* Header */
    .nav {
        display: none;
    }

    .header-phone {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: 500px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 17px;
    }

    .hero-cta-group {
        flex-direction: column;
    }

    .hero-features {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    /* Section titles */
    .section-title {
        font-size: 32px;
    }

    /* Grids */
    .why-grid,
    .results-grid,
    .services-grid,
    .cases-grid {
        grid-template-columns: 1fr;
    }

    .methodology-steps {
        grid-template-columns: 1fr;
    }

    /* Blog */
    .blog-featured {
        grid-template-columns: 1fr;
    }

    .blog-featured-image {
        min-height: 200px;
    }

    /* Form */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation variants */
.animate-on-scroll.fade-left {
    transform: translateX(-30px);
}

.animate-on-scroll.fade-left.is-visible {
    transform: translateX(0);
}

.animate-on-scroll.fade-right {
    transform: translateX(30px);
}

.animate-on-scroll.fade-right.is-visible {
    transform: translateX(0);
}

.animate-on-scroll.scale-in {
    transform: scale(0.9);
}

.animate-on-scroll.scale-in.is-visible {
    transform: scale(1);
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: var(--radius-sm);
}

/* ==========================================
   ARTICLE CONTENT STYLES
   ========================================== */

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid #E5E7EB;
}

.article-meta {
    color: var(--text-light);
    font-size: 14px;
    margin-top: var(--spacing-sm);
}

.article-intro {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.article-intro p {
    margin-bottom: var(--spacing-sm);
}

.article-intro p:last-child {
    margin-bottom: 0;
}

/* Checklist Sections */
.checklist-section {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-md);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid #E5E7EB;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.checklist-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.checklist-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

.checklist-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
}

.checklist-section > p {
    color: var(--text-medium);
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.checklist-items {
    list-style: none;
    padding: 0;
    margin: var(--spacing-sm) 0;
}

.checklist-items li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    color: var(--text-dark);
    line-height: 1.6;
}

.checklist-items li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 16px;
    height: 16px;
    background: var(--primary-light);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-sm);
}

.checklist-items li:hover::before {
    background: var(--primary-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.checklist-compliance {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: #FEF3C7;
    border-radius: var(--radius-md);
    font-size: 14px;
    color: #92400E;
    border-left: 3px solid #F59E0B;
}

.checklist-tip {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--secondary-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--secondary-dark);
    border-left: 3px solid var(--secondary-color);
}

/* Article CTA */
.article-cta {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--bg-dark), #1e3a5f);
    border-radius: var(--radius-xl);
    text-align: center;
    color: white;
}

.article-cta h3 {
    font-size: 24px;
    margin-bottom: var(--spacing-sm);
}

.article-cta p {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.article-cta .page-hero-actions {
    justify-content: center;
}

/* Article Download */
.article-download {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 2px dashed #D1D5DB;
}

.article-download p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-medium);
}

/* Responsive Article Styles */
/* ==========================================
   COOKIE CONSENT STYLES
   ========================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-darker);
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

.cookie-text {
    flex: 1;
}

.cookie-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.cookie-description {
    color: #B3B3B3;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.cookie-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal.visible {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    border-bottom: 1px solid #E5E7EB;
}

.cookie-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.cookie-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.cookie-modal-close:hover {
    background: #E5E7EB;
}

.cookie-modal-body {
    padding: var(--spacing-md);
}

.cookie-option {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid #E5E7EB;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xs);
}

.cookie-option-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 500;
    cursor: pointer;
}

.cookie-option-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.cookie-badge {
    font-size: 12px;
    padding: 4px 8px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.cookie-option-desc {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.cookie-modal-footer {
    padding: var(--spacing-md);
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
}

/* Cookie Mobile Styles */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cookie-actions .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* ==========================================
   CERTIFICATION BADGES WITH TOOLTIPS
   ========================================== */

.cert-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-top: var(--spacing-md);
}

.cert-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    cursor: help;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.cert-badge:hover,
.cert-badge:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.cert-badge-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
}

.cert-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    padding: var(--spacing-sm);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 100;
    text-align: left;
}

.cert-badge:hover .cert-tooltip,
.cert-badge:focus .cert-tooltip {
    opacity: 1;
    visibility: visible;
}

.cert-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: var(--bg-white);
}

.cert-tooltip-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.cert-tooltip-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    .cert-tooltip {
        width: 220px;
        font-size: 12px;
    }

    .cert-badges {
        gap: var(--spacing-xs);
    }

    .cert-badge {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ==========================================
   RESPONSIVE ARTICLE STYLES
   ========================================== */

@media (max-width: 768px) {
    .article-content {
        padding: 0 var(--spacing-sm);
    }

    .article-intro {
        font-size: 16px;
        padding: var(--spacing-sm);
    }

    .checklist-section {
        padding: var(--spacing-sm);
    }

    .checklist-title {
        font-size: 18px;
        flex-wrap: wrap;
    }

    .checklist-number {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 12px;
    }

    .article-cta {
        padding: var(--spacing-md);
    }

    .article-cta h3 {
        font-size: 20px;
    }

    .article-cta .page-hero-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .article-cta .btn {
        width: 100%;
    }
}

/* ==========================================
   WHATSAPP FLOATING BUTTON
   ========================================== */

.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.whatsapp-btn svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

.whatsapp-tooltip {
    background: var(--bg-white);
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity var(--transition-base), transform var(--transition-base);
    pointer-events: none;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Pulse animation */
.whatsapp-btn::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    animation: whatsapp-pulse 2s infinite;
    z-index: -1;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-btn {
        width: 56px;
        height: 56px;
    }

    .whatsapp-btn::before {
        width: 56px;
        height: 56px;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

/* ==========================================
   BUTTON LOADING STATES
   ========================================== */

.btn {
    position: relative;
    overflow: hidden;
}

.btn.is-loading {
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spinner 0.8s linear infinite;
}

.btn-primary.is-loading::after {
    border-top-color: #ffffff;
}

.btn-outline.is-loading::after,
.btn-secondary.is-loading::after {
    border-top-color: var(--primary-color);
}

@keyframes btn-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Success state */
.btn.is-success {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn.is-success::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #ffffff;
    animation: none;
}

/* Error state */
.btn.is-error {
    background: #E74C3C !important;
    border-color: #E74C3C !important;
    animation: btn-shake 0.5s ease;
}

@keyframes btn-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Form input loading */
.form-group.is-validating input,
.form-group.is-validating select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 50 50'%3E%3Cpath fill='%232ECC71' d='M25 5A20 20 0 1 0 25 45A20 20 0 1 0 25 5Z' fill-opacity='0'/%3E%3Cpath fill='%232ECC71' d='M25 5A20 20 0 0 1 45 25'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

/* ==========================================
   LEGAL PAGES (Privacy, Terms, Cookies)
   ========================================== */

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-color);
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.legal-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.legal-section p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: var(--spacing-sm);
}

.legal-section ul {
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.legal-section li {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-medium);
    margin-bottom: var(--spacing-xs);
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

/* Cookie Table */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    font-size: 14px;
}

.cookie-table th,
.cookie-table td {
    padding: var(--spacing-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cookie-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.cookie-table td {
    color: var(--text-medium);
}

.cookie-table tr:hover td {
    background: var(--bg-light);
}

/* Cookie CTA */
.cookie-cta {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
}

.cookie-cta p {
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

/* Dark mode adjustments for legal pages */
[data-theme="dark"] .legal-section h2,
[data-theme="dark"] .legal-section h3 {
    color: var(--text-dark);
}

[data-theme="dark"] .cookie-table th {
    background: var(--bg-dark);
}

[data-theme="dark"] .cookie-table tr:hover td {
    background: var(--bg-dark);
}

[data-theme="dark"] .cookie-cta {
    background: var(--bg-dark);
}
