/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS — TSL Platform (serviciode.uy)
   ═══════════════════════════════════════════════════════════
   
   Fuente canónica de todos los tokens de diseño.
   Se usan en: landing principal, sitios de servicio, blog.
   
   DÓNDE SE CONSUME:
   - themes/default/funnel.css → tokens de sitios de servicio
   - mainLandingTemplate.js → inyectado inline via getDesignTokensCSS()
   - blogTemplate.js → inyectado inline via getDesignTokensCSS()
   
   REGLA: si necesitás cambiar un color, cambialo ACÁ.
   ═══════════════════════════════════════════════════════════ */

:root {
    /* ── Brand ────────────────────────────── */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #8b9cff;
    --primary-bg: #eef2ff;
    --secondary: #764ba2;
    --secondary-dark: #5d3a82;
    --gradient-brand: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* ── CTA / Success ────────────────────── */
    --cta: #10b981;
    --cta-dark: #059669;
    --cta-light: #d1fae5;

    /* ── Estado ────────────────────────────── */
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Layout */
    --max-width: 1200px;
    --container-padding: 20px;
    --section-padding: 80px 20px;
    --section-padding-mobile: 50px 16px;

    /* Shared Components: Nav */
    --nav-height: 64px;
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-border: rgba(0, 0, 0, 0.06);

    /* Shared Components: Footer */
    --footer-bg: #111827;
    --footer-text: #9ca3af;
    --footer-heading: #ffffff;
    --footer-border: rgba(255, 255, 255, 0.1);

    /* WhatsApp Branding */
    --whatsapp: #25d366;
    --whatsapp-dark: #128c7e;

    /* ── Aliases compatibilidad mainLanding ─── */
    --brand: var(--primary);
    --brand-dark: var(--primary-dark);
    --brand-light: var(--primary-bg);
    --shadow-hover: 0 12px 32px rgba(102, 126, 234, 0.18);

    /* ── Texto ─────────────────────────────── */
    --text-dark: #1f2937;
    --text-mid: #4b5563;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;

    /* ── Fondos ────────────────────────────── */
    --bg-light: #f9fafb;
    --bg-mid: #f3f4f6;
    --bg-medium: #f3f4f6; /* alias de --bg-mid para compatibilidad */
    --bg-dark: #e5e7eb;
    --white: #ffffff;
    --text-white: #ffffff; /* alias de --white para compatibilidad con funnelTemplate */

    /* ── Social / Brand ────────────────────── */
    --whatsapp-color: #25d366;

    /* ── Rating ────────────────────────────── */
    --star: #fbbf24;
    --star-color: var(--star);

    /* ── Sombras ───────────────────────────── */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* ── Border Radius ────────────────────── */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 50%;

    /* ── Espaciado ─────────────────────────── */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.25rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;
    --space-4xl: 3rem;
    --space-5xl: 4rem;
    --space-6xl: 5rem;

    /* ── Transiciones ──────────────────────── */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    --transition-slower: 0.4s ease;

    /* ── Tipografía ────────────────────────── */
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ═══════════════════════════════════════════════════════════
   BASE RESETS
   ═══════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* ═══════════════════════════════════════════════════════════
   SHARED COMPONENT STYLES
   ═══════════════════════════════════════════════════════════ */

/* Nav */
.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nav-border);
    padding: 0 var(--container-padding);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-icon {
    font-size: 1.5rem;
}

.nav-logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--gradient-brand);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-mid);
    transition: color 0.2s;
    text-decoration: none;
}

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


.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
    -webkit-text-fill-color: white !important;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: white;
    padding: 60px var(--container-padding) 30px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--footer-heading);
}

.footer-col p {
    color: var(--footer-text);
    font-size: 0.92rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--footer-border);
    text-align: center;
    color: var(--footer-text);
    font-size: 0.88rem;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    /* La barra flotante de WhatsApp (56px, fixed bottom) solo se muestra en este
       breakpoint — sin este padding tapaba el copyright del footer. */
    .footer {
        padding-bottom: 86px;
    }
}

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

/* Mobile Menu & Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 10001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
}

.mobile-menu.active {
    right: 0;
    visibility: visible;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bg-dark);
}

.mobile-menu-header span {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
}

.mobile-menu-header button {
    background: var(--bg-mid);
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mid);
}

.mobile-menu-item {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-light);
}

.mobile-menu-cta {
    margin-top: 10px;
    background: var(--primary);
    color: white !important;
    text-align: center;
    padding: 14px;
    border-radius: 10px;
    border-bottom: none;
}