/* ==========================================================================
   AETHER-STYLE NAVBAR — servicesmart
   Archivo externo cargado por navar.php
   ========================================================================== */

/* ── FLOATING CONTACT BUTTONS ─────────────────────────────────────────── */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1040;
}

.main-floating-btn {
    width: 54px;
    height: 54px;
    border-radius: 0;
    background: var(--c-accent, #7c7fff);
    border: none;
    color: var(--c-white, #fff);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(13, 15, 26, 0.12);
    transition: background 0.3s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-floating-btn:hover {
    background: var(--c-accent-dark, #5a5ecc);
    transform: scale(1.08) rotate(8deg);
    box-shadow: 0 16px 48px rgba(13, 15, 26, 0.16);
}

.floating-menu {
    position: absolute;
    bottom: 64px;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
}

.floating-menu.active {
    display: flex;
    animation: animate__fadeInUp;
    animation-duration: 0.35s;
    animation-fill-mode: both;
}

.sub-floating-btn {
    width: 46px;
    height: 46px;
    border-radius: 0;
    border: none;
    color: var(--c-white, #fff);
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(13, 15, 26, 0.1);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transform: translateY(12px);
    position: relative;
}

.floating-menu.active .sub-floating-btn {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s;
}

.floating-menu.active .sub-floating-btn:nth-child(1) { transition-delay: 0.04s; background: #4267b2; }
.floating-menu.active .sub-floating-btn:nth-child(2) { transition-delay: 0.08s; background: #e1306c; }
.floating-menu.active .sub-floating-btn:nth-child(3) { transition-delay: 0.12s; background: #25d366; }
.floating-menu.active .sub-floating-btn:nth-child(4) { transition-delay: 0.16s; background: #1da1f2; }
.floating-menu.active .sub-floating-btn:nth-child(5) { transition-delay: 0.2s; background: #0077b5; }
.floating-menu.active .sub-floating-btn:nth-child(6) { transition-delay: 0.24s; background: #ff0000; }

.sub-floating-btn.phone { background: #28a745; }
.sub-floating-btn.whatsapp { background: #25d366; }

.sub-floating-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 24px rgba(13, 15, 26, 0.12);
}

.floating-tooltip {
    position: absolute;
    right: 56px;
    background: var(--c-ink, #0d0f1a);
    color: var(--c-white, #fff);
    padding: 4px 10px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-floating-btn:hover .floating-tooltip {
    opacity: 1;
}

/* ── NAVBAR — VARIABLES ───────────────────────────────────────────────── */
.sm-nav {
    --sm-accent: #38bdf8;
    --sm-accent-deep: #0284c7;
    --sm-bg: rgba(5, 7, 12, 0.9);
    --sm-bg-solid: #05070c;
    --sm-bg-soft: #0b0f19;
    --sm-panel: rgba(5, 7, 12, 0.98);
    --sm-border: rgba(255, 255, 255, 0.08);
    --sm-border-strong: rgba(255, 255, 255, 0.14);
    --sm-text: #cbd5e1;
    --sm-muted: #94a3b8;
    --sm-white: #ffffff;
    --sm-mono: ui-monospace, SFMono-Regular, "Segoe UI Mono", Menlo, Consolas, monospace;

    position: sticky;
    top: 0;
    z-index: 1050;
    background: var(--sm-bg);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--sm-border);
    transition: background 0.3s ease, box-shadow 0.3s ease;
    will-change: transform, opacity;
}

.sm-nav.scrolled {
    background: var(--sm-bg-solid);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.sm-nav a { text-decoration: none; }
.sm-nav * { box-sizing: border-box; }
.sm-nav ul { list-style: none; margin: 0; padding: 0; }
.sm-nav button { background: none; border: 0; }

.sm-hidden { display: none !important; }

.sm-container {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 640px) {
    .sm-container { padding-left: 32px; padding-right: 32px; }
}

/* ── ANIMACIONES ─────────────────────────────────────────────────────── */
@keyframes sm-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@keyframes sm-fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── ENTERPRISE TOP BAR ──────────────────────────────────────────────── */
.sm-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 32px;
    font-family: var(--sm-mono);
    color: var(--sm-muted);
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid var(--sm-border);
}

@media (min-width: 768px) {
    .sm-topbar { display: flex; }
}

.sm-top-left,
.sm-top-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sm-top-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sm-muted);
}

.sm-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: sm-pulse 1.6s ease-in-out infinite;
}

.sm-top-link {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sm-muted);
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sm-top-link:hover { color: var(--sm-white); }
.sm-top-link strong { color: var(--sm-white); font-weight: 600; }
.sm-top-link i { font-size: 11px; }

/* ── MAIN NAV ROW ────────────────────────────────────────────────────── */
.sm-navrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.sm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sm-brand img {
    max-height: 46px;
    width: auto;
    display: block;
}

/* ── DESKTOP MENU ────────────────────────────────────────────────────── */
.sm-menu {
    display: none;
    height: 100%;
    align-items: center;
    gap: 6px;
}

.sm-actions {
    display: none;
    align-items: center;
    gap: 14px;
}

.sm-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--sm-text);
    cursor: pointer;
    transition: color 0.2s ease;
}

.sm-hamburger:hover { color: var(--sm-white); }
.sm-hamburger svg { width: 24px; height: 24px; }

@media (min-width: 992px) {
    .sm-menu { display: flex; }
    .sm-actions { display: flex; }
    .sm-hamburger { display: none; }
}

.sm-item {
    position: static;
    height: 100%;
    display: flex;
    align-items: center;
}

.sm-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    font-family: var(--sm-mono);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sm-text);
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.sm-link:hover,
.sm-link.active { color: var(--sm-white); }

.sm-chevron {
    width: 14px;
    height: 14px;
    color: var(--sm-muted);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.sm-item:hover .sm-chevron,
.sm-item:focus-within .sm-chevron {
    transform: rotate(180deg);
    color: var(--sm-accent);
}

/* ── CTA DESKTOP ─────────────────────────────────────────────────────── */
.sm-api {
    font-family: var(--sm-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sm-text);
    padding: 8px 12px;
    transition: color 0.2s ease;
}

.sm-api:hover { color: var(--sm-white); }

.sm-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-family: var(--sm-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sm-white);
    background: var(--sm-bg-soft);
    border: 1px solid var(--sm-border-strong);
    transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
}

.sm-cta:hover {
    border-color: var(--sm-accent);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
    color: var(--sm-white);
}

/* ── MEGA MENU FULL-WIDTH ────────────────────────────────────────────── */
.sm-mega {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sm-item:hover .sm-mega,
.sm-item:focus-within .sm-mega {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.sm-item:hover .sm-mega-panel,
.sm-item:focus-within .sm-mega-panel {
    animation: sm-fadeIn 0.18s ease both;
}

.sm-mega-panel {
    padding: 36px 0;
    background: var(--sm-panel);
    border-bottom: 1px solid var(--sm-border);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    will-change: transform, opacity;

    /* Si el contenido supera la altura de la pantalla → scroll interno.
       --sm-panel-maxh lo calcula aether-navbar.js según la altura real del header */
    max-height: var(--sm-panel-maxh, calc(100vh - 140px));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.sm-mega-panel::-webkit-scrollbar { width: 8px; }
.sm-mega-panel::-webkit-scrollbar-track { background: transparent; }
.sm-mega-panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); }
.sm-mega-panel::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }
.sm-mega-panel { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }

.sm-mega-grid {
    display: flex;
    gap: 36px;
}

.sm-mega-col {
    flex: 1 1 0;
    min-width: 0;
    padding-right: 36px;
    border-right: 1px solid var(--sm-border);
}

.sm-mega-col:last-child { border-right: 0; }

.sm-mega-label {
    display: block;
    margin-bottom: 20px;
    font-family: var(--sm-mono);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sm-accent);
}

.sm-mega-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 6px 0;
    color: var(--sm-white);
    font-size: 13.5px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.sm-mega-link i {
    color: var(--sm-muted);
    font-size: 12px;
    width: 16px;
    text-align: center;
    transition: color 0.2s ease;
}

.sm-mega-link:hover { color: var(--sm-accent); }
.sm-mega-link:hover i { color: var(--sm-accent); }

.sm-mega-arrow {
    margin-left: auto;
    width: 14px;
    height: 14px;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sm-mega-link:hover .sm-mega-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ── BANNER MEGA ─────────────────────────────────────────────────────── */
.sm-mega-banner {
    flex: 0 0 280px;
    padding: 24px;
    background: var(--sm-bg-soft);
    border: 1px solid var(--sm-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.sm-banner-label {
    font-family: var(--sm-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sm-muted);
    margin-bottom: 8px;
}

.sm-banner-name {
    font-family: var(--sm-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--sm-white);
    letter-spacing: 0.02em;
    line-height: 1.2;
    margin: 0;
}

.sm-banner-desc {
    font-size: 12px;
    color: var(--sm-muted);
    line-height: 1.5;
    margin: 10px 0 0;
}

.sm-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--sm-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sm-accent);
    transition: color 0.2s ease;
}

.sm-banner-cta:hover { color: var(--sm-white); }
.sm-banner-cta svg { width: 14px; height: 14px; }

/* ── MOBILE MENU ─────────────────────────────────────────────────────── */
.sm-mobile {
    display: none;
    border-top: 1px solid var(--sm-border);
    background: var(--sm-bg-solid);
    padding: 20px 16px 28px;
    animation: sm-fadeIn 0.18s ease both;
}

.sm-mobile.open { display: block; }

/* Seguridad: el menú móvil jamás se muestra en pantallas grandes */
@media (min-width: 992px) {
    .sm-mobile { display: none !important; }
}

.sm-mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 4px;
    font-family: var(--sm-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--sm-text);
    border-bottom: 1px solid var(--sm-border);
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease;
}

.sm-mobile-link:hover { color: var(--sm-white); }

.sm-mobile-link.open .sm-chevron {
    transform: rotate(180deg);
    color: var(--sm-accent);
}

.sm-mobile-sub {
    display: none;
    padding: 6px 0 12px 12px;
}

.sm-mobile-sub.open { display: block; }

.sm-mobile-sub a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    font-size: 12px;
    color: var(--sm-muted);
    transition: color 0.2s ease;
}

.sm-mobile-sub a:hover { color: var(--sm-white); }
.sm-mobile-sub a i { font-size: 11px; width: 16px; }

.sm-mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 18px;
    padding: 13px;
    font-family: var(--sm-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sm-white);
    background: var(--sm-bg-soft);
    border: 1px solid var(--sm-border-strong);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.sm-mobile-cta:hover {
    border-color: var(--sm-accent);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}