/* ============================================================
   CelestInfo - Common Styles
   Premium navbar, full-screen purple gradient overlay, animations
   Brand palette: #5967b5 → #908eed, #0dcfff → #545c9e
   ============================================================ */

/* ── Skip Navigation (hidden until focused) ── */
.skip-nav {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ── Navbar Pill ── */
.navbar {
    align-items: center !important;
    padding: 0.1rem 0.5rem !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(89, 103, 181, 0.1) !important;
    border-radius: 50px !important;
    box-shadow:
        0 8px 32px rgba(89, 103, 181, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    width: 90% !important;
    max-width: 480px !important;
    height: 80px !important;
    position: sticky !important;
    top: 10px !important;
    margin: 30px auto 0 auto !important;
    z-index: 999 !important;
    flex-wrap: wrap !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.navbar.scrolled {
    box-shadow:
        0 4px 24px rgba(89, 103, 181, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

/* ── Hamburger Menu Trigger ── */
.menu-dots, .menu-hamburger {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    padding: 8px 18px !important;
    border-radius: 25px !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none !important;
    position: relative !important;
}

.menu-dots:hover, .menu-hamburger:hover {
    background: linear-gradient(135deg, rgba(89, 103, 181, 0.08), rgba(13, 207, 255, 0.05)) !important;
}

/* Hide old dot styles */
.menu-dots .dot, .menu-hamburger .dot { display: none !important; }

/* Hamburger bars — gradient colored, staggered widths */
.menu-hamburger-bars {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    width: 22px !important;
}

.menu-hamburger-bars span {
    display: block !important;
    height: 2px !important;
    background: linear-gradient(90deg, #5967b5, #0dcfff) !important;
    border-radius: 4px !important;
    transition: all 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    transform-origin: center !important;
}

.menu-hamburger-bars span:nth-child(1) { width: 22px !important; }
.menu-hamburger-bars span:nth-child(2) { width: 15px !important; }
.menu-hamburger-bars span:nth-child(3) { width: 22px !important; }

/* Animate to X when active — keep gradient visible on white navbar */
.menu-hamburger.active .menu-hamburger-bars span {
    background: linear-gradient(90deg, #5967b5, #908eed) !important;
}

.menu-hamburger.active .menu-hamburger-bars span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
    width: 22px !important;
}

.menu-hamburger.active .menu-hamburger-bars span:nth-child(2) {
    opacity: 0 !important;
    width: 0 !important;
}

.menu-hamburger.active .menu-hamburger-bars span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px) !important;
    width: 22px !important;
}

/* Menu label — gradient text */
.menu-hamburger-label {
    font-family: 'Manrope', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #1a1a2e, #5967b5) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

/* When menu is open, label keeps gradient — visible on white navbar */
.menu-hamburger.active .menu-hamburger-label {
    background: linear-gradient(135deg, #5967b5, #908eed) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ── Animation Classes ── */
.slide-in-right {
    transform: translateY(50%);
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.8s ease-out;
}

.slide-in-right.active {
    transform: translateY(0);
    opacity: 1;
}

.slide-in-bottom {
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.slide-in-bottom.active {
    transform: translateY(0);
    opacity: 1;
}

/* Navbar specifically: use transform:none so it doesn't create a
   containing block for the position:fixed dropdown overlay */
.navbar.slide-in-bottom.active {
    transform: none !important;
}

/* Delay animations for form elements */
.form-group:nth-child(1) { transition-delay: 0.1s; }
.form-group:nth-child(2) { transition-delay: 0.2s; }
.form-group:nth-child(3) { transition-delay: 0.3s; }
.form-group:nth-child(4) { transition-delay: 0.4s; }
.form-group:nth-child(5) { transition-delay: 0.5s; }
.form-group:nth-child(6) { transition-delay: 0.6s; }

/* ==============================================================
   COMPACT FROSTED GLASS DROPDOWN TILE
   Drops below navbar as a floating card — not full-screen
   ============================================================== */
.nav-dropdown {
    position: fixed !important;
    top: 125px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) translateY(-10px) !important;
    width: 540px !important;
    max-width: 92vw !important;
    height: auto !important;
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(40px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(40px) saturate(1.4) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(89, 103, 181, 0.12) !important;
    box-shadow:
        0 20px 60px rgba(89, 103, 181, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    padding: 36px 42px 30px !important;
    margin-top: 0 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 50px !important;
    flex-wrap: wrap !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.35s,
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 998 !important;
    overflow: visible !important;
}

/* No pseudo-elements needed for this compact card */
.nav-dropdown::before,
.nav-dropdown::after {
    display: none !important;
    content: none !important;
}

.nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) !important;
}

/* ── Menu Columns — Compact two-column layout ── */
.menu-left, .menu-right {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    position: relative;
    z-index: 2;
    padding-top: 0;
}

/* Category header labels via ::before */
.nav-dropdown .menu-left::before {
    content: 'Solutions' !important;
    display: block !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    letter-spacing: 2.5px !important;
    text-transform: uppercase !important;
    color: #908eed !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 1.5px solid rgba(144, 142, 237, 0.18) !important;
}

.nav-dropdown .menu-right::before {
    content: 'Company' !important;
    display: block !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    letter-spacing: 2.5px !important;
    text-transform: uppercase !important;
    color: #908eed !important;
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    border-bottom: 1.5px solid rgba(144, 142, 237, 0.18) !important;
}

.menu-left { padding-right: 0; }
.menu-right { align-items: flex-start; text-align: left; }

/* ── Menu Links — Compact, clean ── */
.nav-dropdown .menu-link {
    color: #2d2b55 !important;
    text-decoration: none !important;
    font-family: 'Manrope', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.2px !important;
    margin-bottom: 0.9rem !important;
    display: inline-block !important;
    position: relative !important;
    padding-bottom: 3px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Brand gradient underline — animates width on hover */
.nav-dropdown .menu-link::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, #5967b5, #0dcfff, #908eed) !important;
    border-radius: 2px !important;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.nav-dropdown .menu-link:hover {
    color: #5967b5 !important;
    transform: translateX(4px) !important;
}

.nav-dropdown .menu-link:hover::after {
    width: 100% !important;
}

/* ── Industry Sub-links — Hidden from menu (belong on Industries page) ── */
.nav-dropdown .menu-left > div[style] {
    display: none !important;
}

/* ── Social Icons — Bottom of card, centered ── */
.nav-dropdown .social-links {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    align-self: center !important;
    gap: 0.8rem !important;
    width: 100% !important;
    margin-top: 6px !important;
    margin-right: 0 !important;
    padding-top: 16px !important;
    border-top: 1px solid rgba(89, 103, 181, 0.1) !important;
    z-index: 2 !important;
}

.nav-dropdown .social-icon {
    color: rgba(89, 103, 181, 0.45) !important;
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(89, 103, 181, 0.05) !important;
    border: 1px solid rgba(89, 103, 181, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
}

.nav-dropdown .social-icon:hover {
    color: #5967b5 !important;
    background: rgba(89, 103, 181, 0.1) !important;
    border-color: rgba(89, 103, 181, 0.25) !important;
    box-shadow: 0 4px 16px rgba(89, 103, 181, 0.12) !important;
    transform: translateY(-2px) !important;
}

/* ── Drop-in Animation ── */
@keyframes menuDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger menu items in */
.nav-dropdown.active .menu-left > *,
.nav-dropdown.active .menu-right > *:not(.social-links) {
    animation: menuDropIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both !important;
}

/* Left column stagger */
.nav-dropdown.active .menu-left > a:nth-of-type(1) { animation-delay: 0.04s !important; }
.nav-dropdown.active .menu-left > a:nth-of-type(2) { animation-delay: 0.08s !important; }
.nav-dropdown.active .menu-left > a:nth-of-type(3) { animation-delay: 0.12s !important; }
.nav-dropdown.active .menu-left > a:nth-of-type(4) { animation-delay: 0.16s !important; }

/* Right column stagger */
.nav-dropdown.active .menu-right > a:nth-of-type(1) { animation-delay: 0.06s !important; }
.nav-dropdown.active .menu-right > a:nth-of-type(2) { animation-delay: 0.10s !important; }
.nav-dropdown.active .menu-right > a:nth-of-type(3) { animation-delay: 0.14s !important; }
.nav-dropdown.active .menu-right > a:nth-of-type(4) { animation-delay: 0.18s !important; }

/* Social icons fade in last */
.nav-dropdown.active .social-links {
    animation: menuDropIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both !important;
    animation-delay: 0.20s !important;
}

/* ==============================================================
   RESPONSIVE — Navbar & Dropdown Tile
   ============================================================== */

@media (max-width: 768px) {
    .navbar {
        max-width: 400px !important;
    }

    .nav-dropdown {
        width: 92vw !important;
        max-width: 420px !important;
        top: 95px !important;
        padding: 28px 30px 24px !important;
        gap: 30px !important;
        flex-direction: column !important;
    }

    .menu-left, .menu-right {
        width: 100%;
    }

    .nav-dropdown .menu-left::before,
    .nav-dropdown .menu-right::before {
        margin-bottom: 14px !important;
    }

    .nav-dropdown .menu-link {
        font-size: 1rem !important;
        margin-bottom: 0.8rem !important;
    }

    .logo {
        font-size: 1.6rem;
        position: relative;
        bottom: 7px;
    }

    .navbar .cta-button {
        font-size: 0.9rem;
        padding: 0.7rem 1.4rem;
        position: relative;
        bottom: 7px;
    }
}

@media (max-width: 600px) {
    .navbar {
        width: 92% !important;
        max-width: 360px !important;
        padding: 0.3rem 0.5rem !important;
    }

    .menu-hamburger-label {
        font-size: 0.75rem !important;
    }

    .nav-dropdown {
        top: 90px !important;
        padding: 24px 26px 20px !important;
        gap: 22px !important;
    }

    .nav-dropdown .menu-link {
        font-size: 0.95rem !important;
        margin-bottom: 0.7rem !important;
    }

    .logo {
        font-size: 1.6rem;
        position: relative;
        bottom: 7px;
    }

    .navbar .cta-button {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        width: auto;
        min-width: 80px;
        height: 34px;
        position: relative;
        bottom: 7px;
        right: 5px;
    }
}

@media (max-width: 400px) {
    .navbar {
        width: 90% !important;
        max-width: 310px !important;
        padding: 0.2rem 0.4rem !important;
    }

    .menu-hamburger-label {
        display: none !important;
    }

    .nav-dropdown {
        top: 85px !important;
        padding: 22px 22px 18px !important;
        gap: 18px !important;
        border-radius: 20px !important;
    }

    .nav-dropdown .menu-link {
        font-size: 0.9rem !important;
        margin-bottom: 0.6rem !important;
    }

    .nav-dropdown .menu-left::before,
    .nav-dropdown .menu-right::before {
        font-size: 0.58rem !important;
        margin-bottom: 12px !important;
    }

    .navbar .cta-button {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
        min-width: 70px;
        height: 32px;
        right: 3px;
    }
}
