/* ==========================================================================
   Botones
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(11, 92, 171, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(11, 92, 171, 0.4);
    background-color: var(--color-accent);
}

.btn-secondary {
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.08);
    transform: translateY(-2px) scale(1.05);
}

/* ==========================================================================
   Header y Navegación (Corporate B2B Enterprise)
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: var(--z-header);
    background: var(--color-secondary); /* Azul muy oscuro/sólido por defecto */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    background: rgba(13, 42, 82, 0.85); /* Glassmorphism en scroll */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.header__topbar {
    background: var(--color-dark);
    height: 35px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    max-height: 35px;
    width: 100%;
}

.header.scrolled .header__topbar {
    max-height: 0;
    opacity: 0;
    border-bottom: none;
}

.topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
}

.topbar__left {
    font-weight: 400;
}

.topbar__right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar__right a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.topbar__right a:hover {
    color: #fff;
}

.topbar__right .divider {
    color: rgba(255, 255, 255, 0.2);
}

.header__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: height 0.3s ease;
}

.header.scrolled .header__nav {
    height: 70px;
}

.header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header__menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
    text-decoration: none;
    position: relative;
}

.header__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.header__link:hover, .header__link.active {
    color: #ffffff;
}

.header__link:hover::after, .header__link.active::after {
    width: 100%;
}

/* Botón CTA Destacado en Menú */
.header__cta {
    padding: 0.6rem 1.5rem !important;
}

.header__toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #ffffff;
    transition: transform 0.3s ease;
    z-index: calc(var(--z-header) + 2);
}

.header__toggle:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   Menú Móvil Off-Canvas (Responsive)
   ========================================================================== */
@media (max-width: 992px) {
    .topbar__inner {
        justify-content: center;
    }
    
    .topbar__right {
        display: none;
    }

    .header__toggle {
        display: block;
    }

    .header__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: rgba(13, 42, 82, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: calc(var(--z-header) + 1);
        padding: 2rem;
    }

    .header__menu.is-open {
        right: 0;
    }

    .header__link {
        font-size: 1.5rem;
        width: 100%;
        text-align: center;
    }

    .header__cta {
        width: 100%;
        max-width: 300px;
        margin-top: 1rem;
    }
}

/* ==========================================================================
   Footer (B2B Premium)
   ========================================================================== */
.footer {
    background: var(--color-secondary);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), transparent);
    opacity: 0.9;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer__brand {
    padding-right: 2rem;
}

.footer__tagline {
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer__social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer__social a {
    color: var(--color-text-muted);
    font-size: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

.footer__social a:hover {
    transform: scale(1.1);
    color: white;
}

.footer__title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.footer__links a {
    color: var(--color-text-muted);
    transition: all 0.3s ease-out;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.footer__links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer__links a i {
    color: var(--color-primary);
    font-size: 1.1rem;
}

/* Captación y Newsletter */
.footer__newsletter {
    display: flex;
    margin-bottom: 1.5rem;
    width: 100%;
}

.footer__newsletter input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1rem;
    border-radius: 4px 0 0 4px;
    color: white;
    font-size: 0.9rem;
}

.footer__newsletter input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.footer__newsletter button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer__newsletter button:hover {
    background: var(--color-accent);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer__legal {
    display: flex;
    gap: 1.5rem;
}

.footer__legal a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer__legal a:hover {
    color: white;
}

/* ==========================================================================
   WhatsApp Flotante
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    z-index: var(--z-floating);
    transition: var(--transition-normal);
}

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

/* ==========================================================================
   CTA Contacto Global (Sección final antes del footer)
   ========================================================================== */
.global-cta {
    background-color: var(--color-surface);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.global-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(11, 92, 171, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.global-cta h2 {
    margin-bottom: var(--spacing-md);
}

.global-cta .cta-options {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* ==========================================================================
   Responsive Components
   ========================================================================== */
@media (max-width: 768px) {
    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .footer__brand {
        padding-right: 0;
        text-align: center;
    }
    
    .footer__social {
        justify-content: center;
    }

    .footer__bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .footer__legal {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* ==========================================================================
   Brand Logos (Image - Pill Corporativo)
   ========================================================================== */
.brand-image {
    background: #FFFFFF;
    padding: 4px 12px;
    border-radius: 6px;
    max-height: 35px;
    width: auto;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header__logo:hover .brand-image {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.footer-brand-image {
    max-height: 45px;
    margin-bottom: 0.5rem;
}