/*
 Theme Name: Astra Child
 Theme URI: https://example.com/astra-child
 Description: Child theme for Astra
 Author: Your Name
 Author URI: https://example.com
 Template: astra
 Version: 1.0.0
 Text Domain: astra-child
*/


/* =====================================================
   SAFE CUSTOM HEADER – ASTRA CHILD THEME
   Fully isolated, mobile-safe, no global overrides
   ===================================================== */

/* ---------- HEADER HEIGHT CONTROL ---------- */
:root {
    --sr-header-height: 72px;
}

/* ---------- HEADER WRAPPER ---------- */
.sr-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--sr-header-height);
    z-index: 9999;
    background: #000;
}

/* Offset page content for fixed header */
body {
    padding-top: var(--sr-header-height);
}

/* ---------- HEADER CONTAINER (ISOLATED) ---------- */
.sr-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---------- LOGO ---------- */
.sr-logo img {
    height: 40px;
    display: block;
}

/* ---------- MAIN NAV (DESKTOP) ---------- */
.sr-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0 !important;
}

.sr-nav > li {
    list-style: none;
    position: relative;
}

.sr-nav > li > a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sr-nav > li:hover > a {
    color: #3b82f6;
}

/* ---------- MEGA DROPDOWN ---------- */
.sr-dropdown {
    position: absolute;
    top: 100%;
    width: min(1200px, calc(100vw - 64px));
    background: #020617;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sr-nav > li:hover .sr-dropdown,
.sr-dropdown:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Hover bridge */
.sr-dropdown::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
}

/* ---------- MEGA GRID ---------- */
.sr-mega-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.sr-mega-column h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 12px;
    opacity: 0.7;
}

.sr-mega-column a {
    display: block;
    color: #e5e7eb;
    text-decoration: none;
    padding: 6px 0;
    font-size: 14px;
}

.sr-mega-column a:hover {
    color: #3b82f6;
}

/* ---------- SIMPLE DROPDOWN ---------- */
.sr-simple-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #020617;
    border-radius: 12px;
    padding: 16px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sr-nav > li:hover .sr-simple-dropdown,
.sr-simple-dropdown:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sr-simple-dropdown a {
    display: block;
    padding: 10px;
    color: #e5e7eb;
    text-decoration: none;
    border-radius: 6px;
}

.sr-simple-dropdown a:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* ---------- CTA BUTTON ---------- */
.sr-nav .sr-cta > a {
    background: #2563eb;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.sr-nav .sr-cta > a:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.sr-nav .sr-cta .arrow {
    font-size: 18px;
    transition: transform 0.25s ease;
}

.sr-nav .sr-cta > a:hover .arrow {
    transform: translateX(4px);
}

/* ---------- HAMBURGER (HIDDEN BY DEFAULT) ---------- */
.sr-hamburger {
    display: none;
}

/* =====================================================
   MOBILE STYLES
   ===================================================== */
@media (max-width: 992px) {

    /* Hamburger */
    .sr-hamburger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10002;
    }

    .sr-hamburger span {
        width: 26px;
        height: 2px;
        background: #fff;
        transition: all 0.3s ease;
    }

    /* Drawer Nav */
    .sr-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background: #000;

        flex-direction: column;
        align-items: flex-start;
        padding: 80px 24px 24px;
        gap: 0;

        transform: translateX(100%);
        transition: transform 0.35s ease;
        z-index: 10001;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sr-nav.active {
        transform: translateX(0);
    }

    .sr-nav > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .sr-nav > li > a {
        padding: 16px 0;
        font-size: 16px;
    }

    /* Disable hover dropdowns */
    .sr-dropdown,
    .sr-simple-dropdown {
        position: static;
        width: 100%;
        background: transparent;
        box-shadow: none;
        padding: 8px 0;
        display: none;
    }

    .sr-nav > li.open .sr-dropdown,
    .sr-nav > li.open .sr-simple-dropdown {
        display: block;
    }

    .sr-mega-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sr-nav .sr-cta > a {
        width: 100%;
        justify-content: center;
        margin-top: 16px;
    }

    /* Overlay */
    .sr-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }

    body.menu-open .sr-overlay {
        opacity: 1;
        visibility: visible;
    }
    button.sr-hamburger:focus,
    button.sr-hamburger:focus-visible,
    button.sr-hamburger:active {
        background: transparent !important;
        box-shadow: none !important;
        outline: none !important;
    }
}

/* ---------- HAMBURGER ANIMATION ---------- */
.sr-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.sr-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.sr-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}
.sr-hamburger.foc

/* ---------- BODY SCROLL LOCK (SAFE) ---------- */
body.menu-open {
    overflow: hidden;
}

@supports (-webkit-touch-callout: none) {
    body.menu-open {
        position: fixed;
        width: 100%;
    }
}
