/* style.css */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Glassmorphism Header */
.glass-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease-in-out;
}

/* Premium Card Hover Effects */
.tech-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(1, 56, 123, 0.15); /* Matches your secondary color */
    border-color: #0081ef; /* Matches your accent color */
}

/* Gradient Text */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* =========================================
   FOOTER BULLETS - Works on ALL pages
   ========================================= */

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Modern Blue Dot Bullets */
footer ul.footer-links li a,
footer .footer-links li a {
    display: flex !important;
    align-items: center;
    transition: all 0.3s ease;
    color: #d1d5db;
    text-decoration: none;
}

footer ul.footer-links li a::before,
footer .footer-links li a::before {
    content: "" !important;
    display: inline-block !important;
    width: 6px;
    height: 6px;
    background-color: #0081ef; /* Megvica Blue */
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Hover Effect */
footer ul.footer-links li a:hover,
footer .footer-links li a:hover {
    color: #ffffff !important;
    transform: translateX(4px);
}

footer ul.footer-links li a:hover::before,
footer .footer-links li a:hover::before {
    background-color: #007fe2;
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(0, 129, 239, 0.7);
}

/* =========================================
   BASE OVERFLOW SAFETY
   ========================================= */

/* `clip` does not create a scroll container, so unlike `hidden` it does not
   break `position: sticky` on descendants. */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

/* Long unbroken strings (emails, URLs) must never push the layout wide. */
h1, h2, h3, h4, h5, h6, p, span, a, li, td, th, label, button {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Media never exceeds its column. */
img,
video,
iframe,
svg {
    max-width: 100%;
}

/* =========================================
   HEADER / MOBILE NAVIGATION
   ========================================= */

#main-header {
    --header-h: 72px;
}

/* The mobile menu is a sibling of the header bar and hangs directly beneath it.
   It is `position: absolute` inside the (fixed) header, so no JS measurement
   is needed to keep it glued under the bar at any height. */
#mobile-menu {
    display: none;
    /* Forced opaque: pages style this panel with translucent utilities
       (`bg-white/98`, `bg-white/90`), which let hero text bleed through. */
    background-color: #ffffff;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    z-index: 60;
}

/* `!important` is required to beat Tailwind's `hidden` / `md:hidden` /
   `lg:hidden` display utilities, which are injected at runtime *after* this
   stylesheet. It is scoped to the narrow breakpoint so the menu can never be
   forced open on a desktop layout. */
@media (max-width: 1023px) {
    #mobile-menu.is-open {
        display: block !important;
        animation: mobileMenuIn 0.22s ease-out;
    }
}

@keyframes mobileMenuIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Lock the page behind the open menu without losing scroll position. */
body.menu-open {
    overflow: hidden !important;
    touch-action: none;
}

/* Dim the page so the open menu reads as a layer above it.
   Must sit BELOW the header's z-50: the header is a stacking context, so a
   menu nested inside it can never paint above a higher-numbered sibling. */
#mobile-menu-scrim {
    position: fixed;
    inset: 0;
    background: rgba(1, 28, 58, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 45;
}

#mobile-menu-scrim.is-open {
    opacity: 1;
    visibility: visible;
}

/* Comfortable tap target for the hamburger. */
/* Comfortable tap target for the hamburger.
   `:where()` contributes zero specificity on purpose: a plain `#id` selector
   outranks Tailwind's responsive `md:hidden` / `lg:hidden` and would leave the
   hamburger visible on desktop. */
:where(#mobile-menu-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* =========================================
   SCROLL ANIMATIONS - MOBILE SAFETY
   ========================================= */

/* AOS horizontal slides (fade-left / fade-right) travel up to 100px, which
   pushes content off a narrow screen. Keep the fade, drop the travel. */
@media (max-width: 1023px) {
    [data-aos="fade-left"],
    [data-aos="fade-right"] {
        transform: none !important;
    }
}

/* Same idea for the hand-rolled `.reveal-*` classes used on the services and
   industries pages. Scoped to `:not(.active)` so a revealed element can still
   reach its resting transform. */
@media (max-width: 767px) {
    .reveal-left:not(.active),
    .reveal-right:not(.active) {
        transform: translateY(40px) !important;
    }
}

/* =========================================
   JS-INJECTED ELEMENTS
   ========================================= */

.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 3rem;
    height: 3rem;
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.75rem;
    background: #0081ef;
    color: #fff;
    font-size: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 129, 239, 0.5);
    z-index: 40;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

.back-to-top.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #01387b;
}

.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: #011c3a;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 9999;
}

.page-transition-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Scroll-reveal is pure decoration - never let it hide real content. */
    [data-aos],
    .reveal {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

/* Failsafe: if the scroll-animation library never initialised, the elements
   would stay at opacity 0 forever. `main.js` adds `no-js-anim` to <html> in
   that case, which forces everything visible. */
.no-js-anim [data-aos],
.no-js-anim .reveal {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* =========================================
   NARROW VIEWPORT ADJUSTMENTS
   ========================================= */

@media (max-width: 640px) {
    /* The default vertical rhythm is too generous on a phone. */
    section.py-24,
    section.py-20 {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    section.py-28 {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    /* Ticker rows are decorative and must not widen the page. */
    .animate-ticker {
        max-width: 100vw;
    }
}




/* =========================================
   HEADER ALIGNMENT FIX (Balanced Spacing)
   ========================================= */

#main-header > .container {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Tablets */
@media (min-width: 768px) {
    #main-header > .container {
        padding-left: 1.5rem !important;   /* 24px */
        padding-right: 1.5rem !important;
    }
}

/* Laptops */
@media (min-width: 1024px) {
    #main-header > .container {
        padding-left: 2rem !important;     /* 32px - gentle inward push */
        padding-right: 2rem !important;
    }
}

/* Large Desktops */
@media (min-width: 1280px) {
    #main-header > .container {
        padding-left: 2.5rem !important;   /* 40px - still tight, not empty */
        padding-right: 2.5rem !important;
    }
}