:root {
    /* --- PALETA MARCA (Navy & Orange) --- */
    --color-primary: #005174;
    /* Deep Navy Blue */
    --color-primary-light: #162a4d;
    --color-primary-dark: #005174;
    --color-dark: #000000;
    --color-action: #ff6000;
    /* Vibrant Orange (Safe for AA large text) */
    --color-action-hover: #ff6f19;
    --color-action-fade: rgba(255, 110, 25, 0.15);
    --color-bg: #FFFFFF;
    --color-surface-alt: #F4F7FA;
    /* Light Blue/Gray */
    --color-surface: #FFFFFF;
    --color-text: #1c1f24;
    --color-text-dark: #1c1f24;
    --color-anthracite: #131519;
    --color-anthracite-light: #f2f4f5;
    /* Primary mostly */
    --color-text-muted: #475569;
    --color-text-light: #ffffff;
    --border-color: #e2e8f0;

    /* --- RADIO DE BORDE --- */
    --border-radius-sm: 12px;
    --border-radius-md: 24px;
    --border-radius-lg: 32px;
    --border-radius-btn: 100px;

    /* --- TOKENS DE ESPACIADO --- */
    --space-xs: 0.5rem;   /* 8px */
    --space-sm: 1rem;     /* 16px */
    --space-md: 1.5rem;   /* 24px */
    --space-lg: 2.5rem;   /* 40px */
    --space-xl: 4rem;     /* 64px */

    /* --- TOKENS DE SOMBRAS & ELEVACIONES --- */
    --shadow-flat: none;
    --shadow-sm: 0 4px 16px rgba(28, 31, 36, 0.04);
    --shadow-md: -4px 0px 10px 0px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 15px rgba(0, 81, 116, 0.08);

    /* --- TOKENS DE TRANSICION --- */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s ease;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    -webkit-tap-highlight-color: transparent;
}

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

body {
    padding-top: 60px; /* Compensa la navbar fija */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-dark);
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* --- NAVBAR --- */
.navbar-brand {
    padding-top: 0 !important;
}

.navbar-brand img {
    height: 32px;
    width: auto;
    transition: transform 0.2s ease;
}

.navbar-brand img:hover {
    transform: scale(1.08);
}

.navbar-light {
    background-color: rgba(255, 255, 255, 0.75) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-dark) !important;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-action) !important;
}

/* --- HERO COMPONENTE BASE --- */
.webz-hero {
    position: relative;
    background-color: var(--color-anthracite);
    color: var(--color-text-light);
    padding: 100px 24px;
    text-align: center;
    margin-top: 2rem;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.webz-hero__corner-top {
    position: absolute;
    width: 20%;
    height: 60%;
    background-color: var(--color-primary);
    top: 0;
    right: 0;
    clip-path: polygon(100% 100%, 0 0, 100% 0);
    z-index: 0;
}

.webz-hero__corner-bottom {
    position: absolute;
    width: 40%;
    height: 80%;
    background-color: var(--color-primary);
    bottom: 0;
    right: 0;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
    z-index: 0;
}

.webz-hero__container {
    position: relative;
    background-color: var(--color-anthracite);
    border-radius: var(--border-radius-lg);
    padding: 100px 24px;
    box-shadow: -12px 0px 10px 0px rgba(0, 0, 0, 0.8);
    z-index: 1;
    max-width: 1200px;
}

.webz-hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--color-text-light);
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease forwards 0.2s;
    opacity: 0;
}

.webz-hero__subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--color-text-light);
    margin-bottom: 32px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease forwards 0.4s;
    opacity: 0;
}

.webz-hero__description {
    color: #94a3b8;
}

.webz-hero--compact {
    padding: 40px 24px !important;
}

.webz-hero--compact .webz-hero__container {
    padding: 40px 24px !important;
}

.webz-hero--compact .webz-hero__title {
    font-size: 2.5rem !important;
    margin-bottom: 12px !important;
}

.webz-hero--compact .webz-hero__subtitle {
    font-size: 1.15rem !important;
    margin-bottom: 0 !important;
    font-weight: 400 !important;
}

/* --- BOTONES --- */
.btn:focus, .btn:active:focus, .btn.active:focus {
    outline: none !important;
    box-shadow: none !important;
}

.btn-webz {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-action) 0%, var(--color-action-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius-btn);
    padding: 14px 28px;
    font-weight: 700;
    box-shadow: -3px 4px 10px 0px rgba(0, 0, 0, 0.07);
    transition: all 0.35s cubic-bezier(0.25,0.8,0.25,1);
    text-decoration: none;
    position: relative;
}

.btn-webz:active {
    transform: scale(0.96);
}

.btn-webz:hover {
    background: linear-gradient(135deg, var(--color-action-hover) 0%, var(--color-action) 100%);
    box-shadow: -5px 8px 16px 0px rgba(0, 0, 0, 0.12);
    transform: scale(1.1);
    color: #ffffff;
}

.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--border-radius-btn);
    padding: 14px 28px;
    font-weight: 700;
    box-shadow: -3px 4px 10px 0px rgba(0, 0, 0, 0.07);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    position: relative;
}

.btn-outline-primary:active {
    transform: scale(0.96);
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: -5px 8px 16px 0px rgba(0, 0, 0, 0.12);
}

/* --- SECCIONES --- */
section[id] {
    scroll-margin-top: 80px;
}

/* --- REVEAL ANIMATION --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.py-6 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.bg-anthracite-light {
    background-color: var(--color-anthracite-light) !important;
    position: relative;
    overflow: hidden;
    padding-left: 2.5rem !important;
    padding-right: 2.5rem !important;
}

@media (max-width: 768px) {
    .bg-anthracite-light {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

.bg-anthracite-light::before {
    content: "";
    position: absolute;
    width: 10%;
    height: 30%;
    background-color: var(--color-primary);
    top: 0;
    right: 0;
    clip-path: polygon(100% 100%, 0 0, 100% 0);
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

.bg-anthracite-light::after {
    content: "";
    position: absolute;
    width: 20%;
    height: 40%;
    background-color: var(--color-primary);
    bottom: 0;
    right: 0;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
    opacity: 0.06;
    pointer-events: none;
    z-index: 0;
}

.bg-anthracite-light .container {
    position: relative;
    z-index: 1;
}

/* --- UNIVERSAL CARD STYLE --- */
.webz-card {
    background-color: var(--color-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: -4px 0px 10px 0px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.webz-card--hover {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.webz-card--hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06), 0 0 15px rgba(0, 81, 116, 0.08) !important;
}

.border-radius-20 {
    border-radius: var(--border-radius-lg);
}

/* --- FOOTER --- */
.footer-section {
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--color-anthracite);
    color: var(--color-text-light);
    padding: 5rem 0 2rem;
    margin-top: 0;
}

.footer-section::before {
    content: "";
    position: absolute;
    width: 10%;
    height: 30%;
    background-color: var(--color-primary);
    top: 0;
    right: 0;
    clip-path: polygon(100% 100%, 0 0, 100% 0);
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.footer-section::after {
    content: "";
    position: absolute;
    width: 20%;
    height: 40%;
    background-color: var(--color-primary);
    bottom: 0;
    right: 0;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

.footer-section .container {
    position: relative;
    z-index: 1;
}

.logo-container-hero {
    position: relative;
    background-color: var(--color-anthracite);
    border-radius: var(--border-radius-lg);
    padding: 24px 32px;
    box-shadow: -4px 0px 10px 0px rgba(0, 0, 0, 0.8);
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.footer-quote {
    font-size: 1.1rem !important;
    font-style: normal !important;
    color: #f1f5f9;
    font-weight: 400;
    line-height: 1.6;
}

.footer-links li {
    margin-bottom: 0.75rem;
    padding-left: 0rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

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

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--color-action);
    color: white;
    box-shadow: -2px 4px 8px rgba(0, 0, 0, 0.2);
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- FORMULARIO --- */
.form-control:focus {
    border-color: var(--color-action);
    box-shadow: 0 0 0 4px var(--color-action-fade);
}

/* --- BOTÓN WHATSAPP FLOTANTE & CONTACTO --- */
.btn-whatsapp {
    background-color: #25d366 !important;
    box-shadow: -3px 4px 10px 0px rgba(0, 0, 0, 0.07);
    color: white !important;
    border-radius: var(--border-radius-btn);
    padding: 0.5rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-whatsapp:active {
    transform: scale(0.96);
}

.btn-whatsapp:hover {
    box-shadow: -5px 8px 16px 0px rgba(0, 0, 0, 0.12);
    transform: scale(1.1);
}

.btn-whatsapp-float {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #25d366;
    color: white;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: -3px 6px 14px 0px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.btn-whatsapp-float:hover {
    background: #20b858;
    color: white;
    transform: scale(1.1);
    box-shadow: -5px 10px 20px 0px rgba(0, 0, 0, 0.16);
}

.btn-whatsapp-float:active {
    transform: scale(0.96);
}

.btn-whatsapp-float.hide-on-contact {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.btn-whatsapp-float.footer-hide {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5) translateY(20px);
}

.qr-whatsapp-container {
    margin-top: 2rem;
}

.qr-whatsapp {
    max-width: 160px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-sm);
}

/* --- UTILIDADES --- */
.emphasis-color {
    color: var(--color-primary) !important;
}

.no-scroll {
    overflow: hidden;
}

.texto-blanco {
    color: #ffffff !important;
}

/* --- SMART QR BRIDGE --- */
.qr-bridge-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.qr-bridge-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.qr-bridge-card {
    background: white;
    width: 100%;
    max-width: 450px;
    border-radius: var(--border-radius-lg);
    padding: 30px;
    text-align: center;
    position: relative;
    box-shadow: -16px 16px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    opacity: 0;
}

.qr-bridge-overlay.show .qr-bridge-card {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin-left: 12px;
    flex-shrink: 0;
    margin-top: -4px;
}

.qr-close:hover {
    color: var(--color-text);
}

.qr-tech-frame {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 20px auto;
    padding: 15px;
    background: linear-gradient(135deg, #25d366 0%, #20b858 100%);
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
}

/* Corner Accents */
.qr-tech-frame::before,
.qr-tech-frame::after {
    content: "";
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid white;
}

.qr-tech-frame::before {
    top: -5px;
    left: -5px;
    border-right: 0;
    border-bottom: 0;
    border-radius: 12px 0 0 0;
}

.qr-tech-frame::after {
    bottom: -5px;
    right: -5px;
    border-left: 0;
    border-top: 0;
    border-radius: 0 0 12px 0;
}

.qr-container {
    background: white;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.qr-img {
    width: 100%;
    height: 100%;
    padding: 10px;
}

.qr-center-logo {
    position: absolute;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.qr-center-logo i {
    color: #25D366;
    font-size: 24px;
}

.bridge-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.btn-web-whatsapp {
    background: #25d366;
    color: white !important;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: var(--border-radius-btn);
    transition: all 0.3s;
    border: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-web-whatsapp:hover {
    background: #20b858;
    transform: scale(1.1);
    box-shadow: -4px 8px 16px rgba(0, 0, 0, 0.12);
}

.btn-web-whatsapp:active {
    transform: scale(0.96);
}

.btn-stay {
    margin-top: 8px;
    font-weight: 500;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

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

/* --- DRAG HANDLE --- */
.drag-handle {
    display: none;
    width: 36px;
    height: 4px;
    background: rgba(0,0,0,0.12);
    border-radius: 100px;
    margin: 12px auto 20px auto;
}

@media (max-width: 768px) {
    .btn-whatsapp-float {
        bottom: calc(24px + env(safe-area-inset-bottom));
        right: 20px;
        width: 58px;
        height: 58px;
    }
    .drag-handle { display: block; }

    /* Bottom Sheet Transformation */
    .qr-bridge-overlay { align-items: flex-end; padding: 0; }
    
    .qr-bridge-card {
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
        margin: 0;
        max-width: 100%;
        transform: translateY(100%) scale(1);
        padding: 0 24px max(24px, env(safe-area-inset-bottom)) 24px;
        box-shadow: 0 -8px 32px rgba(0,0,0,0.1);
        opacity: 1;
    }

    .qr-bridge-overlay.show .qr-bridge-card {
        transform: translateY(0) scale(1);
        animation: none;
    }
}

/* --- ANIMACIONES DE DESTAQUE --- */
@keyframes pulse-subtle {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.06);
    }
    100% {
        transform: scale(1);
    }
}

.animate-pulse-subtle {
    animation: pulse-subtle 1.8s infinite ease-in-out;
    display: inline-block;
}
