/**
 * Webtoz — Header Styles
 * Website: webtoz.com
 * Child theme of: GeneratePress
 *
 * Table of Contents:
 *  1. Header Container & Variables
 *  2. Utility Bar (Top)
 *  3. Main Navigation Bar
 *  4. Logo & Branding (with Bouncy Baseline Tagline)
 *  5. Desktop Navigation
 *  6. Mega Dropdown Menu
 *  7. CTA Button
 *  8. Mobile Toggle & Drawer
 *  9. Sticky Header Behavior
 * 10. Animations & Transitions
 * 11. Responsive Breakpoints
 */

/* ═══════════════════════════════════════════════════════════════ */
/* 1. HEADER CONTAINER & VARIABLES                                */
/* ═══════════════════════════════════════════════════════════════ */

.webtoz-header {
    position: relative;
    z-index: 1000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #FFFFFF;
}

.webtoz-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* 2. UTILITY BAR (TOP)                                           */
/* ═══════════════════════════════════════════════════════════════ */

.webtoz-utility-bar {
    background: #0B1F3A;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.webtoz-utility-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.webtoz-utility-left,
.webtoz-utility-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.webtoz-utility-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.webtoz-utility-item a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.25s ease;
}

.webtoz-utility-item a:hover {
    color: #06B6D4;
}

.webtoz-utility-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.webtoz-utility-divider {
    color: rgba(255, 255, 255, 0.2);
    font-size: 11px;
    margin: 0 2px;
}

/* Social Links in Utility Bar */
.webtoz-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.25s ease;
}

.webtoz-social-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════════════════════════ */
/* 3. MAIN NAVIGATION BAR                                         */
/* ═══════════════════════════════════════════════════════════════ */

.webtoz-navbar {
    position: sticky;
    top: 0;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(11, 31, 58, 0.06);
    padding: 0;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    z-index: 999;
}

/* Shadow when scrolled (added via JS) */
.webtoz-navbar.webtoz-navbar-scrolled {
    box-shadow: 0 4px 24px rgba(11, 31, 58, 0.08);
}

.webtoz-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 20px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* 4. LOGO & BRANDING — Bouncy Baseline Tagline                   */
/* ═══════════════════════════════════════════════════════════════ */

.webtoz-logo {
    flex-shrink: 0;
}

.webtoz-logo-link {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    color: #0B1F3A;
    transition: opacity 0.25s ease;
}

.webtoz-logo-link:hover {
    opacity: 0.85;
}

/* Logo Image */
.webtoz-logo-img {
    display: block;
    height: 42px;
    width: auto;
    max-width: 180px;
    flex-shrink: 0;
}

/* ── Separator: Two Offset Dots ── */
.webtoz-logo-separator {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 12px;
    flex-shrink: 0;
    position: relative;
    top: -1px;
}

.webtoz-logo-dot {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.webtoz-logo-dot-top {
    background: #3D5AFE;
}

.webtoz-logo-dot-bottom {
    background: #06B6D4;
    transform: translateY(-3px);
}

/* ── Tagline: Bouncy Baseline ── */
.webtoz-logo-tagline {
    font-family: 'Quicksand', 'Nunito', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #5A6478;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: 0.8px;
    text-transform: lowercase;
}

/* First letter of each word — colored accents */
.webtoz-tagline-cobalt {
    color: #3D5AFE;
}

.webtoz-tagline-teal {
    color: #06B6D4;
}

/* ═══════════════════════════════════════════════════════════════ */
/* 5. DESKTOP NAVIGATION                                          */
/* ═══════════════════════════════════════════════════════════════ */

.webtoz-nav-desktop {
    display: flex;
    align-items: center;
}

.webtoz-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.webtoz-nav-item {
    position: relative;
}

.webtoz-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #1A1F2B;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s ease;
    white-space: nowrap;
    cursor: pointer;
}

.webtoz-nav-link:hover {
    color: #3D5AFE;
    background: rgba(61, 90, 254, 0.04);
}

/* Active nav link */
.webtoz-nav-active {
    color: #3D5AFE !important;
    background: rgba(61, 90, 254, 0.06);
    font-weight: 600;
}

/* Dropdown arrow */
.webtoz-dropdown-arrow {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.webtoz-nav-has-dropdown:hover .webtoz-dropdown-arrow {
    transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════════ */
/* 6. MEGA DROPDOWN MENU                                          */
/* ═══════════════════════════════════════════════════════════════ */

.webtoz-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #FFFFFF;
    border: 1px solid rgba(11, 31, 58, 0.08);
    border-radius: 16px;
    box-shadow:
        0 20px 48px rgba(11, 31, 58, 0.12),
        0 0 0 1px rgba(11, 31, 58, 0.04);
    padding: 28px 32px;
    min-width: 680px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 998;
}

.webtoz-nav-has-dropdown:hover .webtoz-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.webtoz-dropdown-inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
}

.webtoz-dropdown-column {
    /* intentional — grid handles layout */
}

.webtoz-dropdown-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #06B6D4;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(6, 182, 212, 0.15);
}

.webtoz-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.webtoz-dropdown-list li {
    margin-bottom: 6px;
}

.webtoz-dropdown-list li:last-child {
    margin-bottom: 0;
}

.webtoz-dropdown-list a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: #1A1F2B;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.webtoz-dropdown-list a:hover {
    color: #3D5AFE;
    background: rgba(61, 90, 254, 0.05);
    padding-left: 16px;
}

/* ═══════════════════════════════════════════════════════════════ */
/* 7. CTA BUTTON (in nav)                                         */
/* ═══════════════════════════════════════════════════════════════ */

.webtoz-nav-cta {
    flex-shrink: 0;
}

.webtoz-nav-cta .webtoz-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════ */
/* 8. MOBILE TOGGLE & DRAWER                                      */
/* ═══════════════════════════════════════════════════════════════ */

.webtoz-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.webtoz-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #0B1F3A;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Animated hamburger to X */
.webtoz-mobile-toggle.webtoz-is-open .webtoz-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.webtoz-mobile-toggle.webtoz-is-open .webtoz-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.webtoz-mobile-toggle.webtoz-is-open .webtoz-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.webtoz-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: #FFFFFF;
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
}

.webtoz-mobile-drawer.webtoz-is-open {
    transform: translateX(0);
}

.webtoz-mobile-drawer-inner {
    padding: 88px 28px 40px;
}

/* Mobile Nav Items */
.webtoz-mobile-nav-list {
    list-style: none;
    margin: 0 0 32px 0;
    padding: 0;
}

.webtoz-mobile-nav-item {
    border-bottom: 1px solid rgba(11, 31, 58, 0.06);
}

.webtoz-mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 0;
    font-size: 17px;
    font-weight: 500;
    color: #1A1F2B;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    text-align: left;
}

.webtoz-mobile-nav-link:hover {
    color: #3D5AFE;
}

/* Mobile Submenu */
.webtoz-mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0 0 12px 16px;
    display: none;
}

.webtoz-mobile-submenu.webtoz-is-open {
    display: block;
}

.webtoz-mobile-submenu-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #06B6D4;
    padding: 10px 0 6px 0;
}

.webtoz-mobile-submenu li a {
    display: block;
    padding: 8px 0;
    font-size: 15px;
    color: #5A6478;
    text-decoration: none;
    transition: color 0.2s ease;
}

.webtoz-mobile-submenu li a:hover {
    color: #3D5AFE;
}

.webtoz-mobile-submenu-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.webtoz-mobile-submenu-toggle.webtoz-is-open .webtoz-mobile-submenu-icon {
    transform: rotate(180deg);
}

/* Mobile CTA */
.webtoz-mobile-cta {
    padding-top: 8px;
}

.webtoz-mobile-cta .webtoz-btn-full {
    width: 100%;
    justify-content: center;
}

/* Mobile Overlay */
.webtoz-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 58, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    backdrop-filter: blur(2px);
}

.webtoz-mobile-overlay.webtoz-is-open {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════════════ */
/* 9. STICKY HEADER BEHAVIOR                                      */
/* ═══════════════════════════════════════════════════════════════ */

@supports (position: sticky) {
    .webtoz-navbar {
        position: sticky;
    }
}

/* ═══════════════════════════════════════════════════════════════ */
/* 10. ANIMATIONS & TRANSITIONS                                   */
/* ═══════════════════════════════════════════════════════════════ */

/* Fade-in for dropdown on hover intent */
@media (hover: hover) {
    .webtoz-nav-has-dropdown .webtoz-dropdown {
        transition-delay: 0.1s;
    }

    .webtoz-nav-has-dropdown:hover .webtoz-dropdown {
        transition-delay: 0s;
    }
}

/* Subtle hover bounce on tagline colored letters */
.webtoz-logo-link:hover .webtoz-tagline-cobalt,
.webtoz-logo-link:hover .webtoz-tagline-teal {
    animation: webtoz-letter-pop 0.4s ease;
}

@keyframes webtoz-letter-pop {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
}

/* ═══════════════════════════════════════════════════════════════ */
/* 11. RESPONSIVE BREAKPOINTS                                     */
/* ═══════════════════════════════════════════════════════════════ */

/* Tablet & below — show mobile nav */
@media (max-width: 1024px) {
    .webtoz-nav-desktop,
    .webtoz-nav-cta {
        display: none;
    }

    .webtoz-mobile-toggle {
        display: flex;
    }

    .webtoz-nav-inner {
        height: 68px;
    }

    .webtoz-logo-img {
        height: 36px;
        max-width: 150px;
    }

    /* Hide tagline and separator on tablet */
    .webtoz-logo-tagline,
    .webtoz-logo-separator {
        display: none;
    }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    .webtoz-container {
        padding: 0 20px;
    }

    .webtoz-utility-bar {
        display: none;
    }

    .webtoz-nav-inner {
        height: 64px;
    }

    .webtoz-logo-img {
        height: 32px;
        max-width: 130px;
    }

    .webtoz-logo-link {
        gap: 0;
    }
}

/* Small Mobile (≤ 480px) */
@media (max-width: 480px) {
    .webtoz-container {
        padding: 0 16px;
    }

    .webtoz-mobile-drawer {
        width: 100%;
        max-width: 100%;
    }

    .webtoz-logo-img {
        height: 28px;
        max-width: 110px;
    }
}

/* Large Desktop (≥ 1440px) */
@media (min-width: 1440px) {
    .webtoz-container {
        max-width: 1320px;
    }
}