/* ============================================
   FLAWLESS NAVIGATION SYSTEM - DESKTOP & MOBILE
   Professional, Clean, Bug-Free
   ============================================ */

/* ===========================
   RESET & BASE STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    overflow-x: hidden;
}

body {
    background: #ffffff;
    padding-top: 95px; /* Space for fixed header */
}

/* ===========================
   HEADER - FULL WIDTH SEAMLESS
   =========================== */
.header,
header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: 95px !important;
    background: #ffffff !important;
    border-bottom: 2px solid #dc2626 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    z-index: 10000 !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.header > .container,
header > .container {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 95px !important;
    margin: 0 !important;
    padding: 0 3rem !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

/* ===========================
   NAVIGATION - DESKTOP
   =========================== */
.nav {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 95px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 2rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Logo */
.logo {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
    transition: opacity 0.3s ease !important;
}

.logo img {
    height: 90px !important;
    width: auto !important;
    max-width: 360px !important;
    object-fit: contain !important;
}

/* Hide logo when mobile menu is active */
body.mobile-menu-active .logo {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Desktop Navigation Menu */
.nav-menu {
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nav-menu > li {
    position: relative !important;
}

/* Hide Shop link */
.nav-menu > li > a[href="/shop.php"],
.nav-menu > li > a[href*="shop"] {
    display: none !important;
}

.nav-menu > li > a {
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    padding: 0.5rem 0.25rem !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    position: relative !important;
}

.nav-menu > li > a::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 0 !important;
    height: 2px !important;
    background: #dc2626 !important;
    transition: width 0.3s ease !important;
}

.nav-menu > li > a:hover {
    color: #dc2626 !important;
}

.nav-menu > li > a:hover::after {
    width: 100% !important;
}

/* Dropdown Arrow */
.dropdown-arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute !important;
    top: calc(100% + 0.5rem) !important;
    left: -1rem !important;
    min-width: 260px !important;
    background: #ffffff !important;
    border: 1px solid rgba(220, 38, 38, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.02) !important;
    padding: 0.75rem 0 !important;
    list-style: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-15px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 100 !important;
}

.dropdown-menu::before {
    content: '' !important;
    position: absolute !important;
    top: -6px !important;
    left: 2rem !important;
    width: 12px !important;
    height: 12px !important;
    background: #ffffff !important;
    border-left: 1px solid rgba(220, 38, 38, 0.1) !important;
    border-top: 1px solid rgba(220, 38, 38, 0.1) !important;
    transform: rotate(45deg) !important;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.dropdown-menu li {
    margin: 0 !important;
}

.dropdown-menu li a {
    display: block !important;
    padding: 0.875rem 1.5rem !important;
    color: #4b5563 !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    border-left: 3px solid transparent !important;
}

.dropdown-menu li a::before {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 0 !important;
    height: 100% !important;
    background: rgba(220, 38, 38, 0.05) !important;
    transition: width 0.3s ease !important;
}

.dropdown-menu li a:hover {
    background: rgba(220, 38, 38, 0.05) !important;
    color: #dc2626 !important;
    border-left-color: #dc2626 !important;
    padding-left: 1.75rem !important;
}

.dropdown-menu li a:hover::before {
    width: 100% !important;
}

/* CTA Button - ELITE STYLING */
.nav-cta,
button.nav-cta,
.schedule-demo-btn,
#scheduleDemoNav,
#scheduleDemoMobile {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    color: white !important;
    padding: 0.85rem 2rem !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3), 0 0 0 1px rgba(220, 38, 38, 0.1) inset !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    flex-shrink: 0 !important;
    min-height: 44px !important;
    position: relative !important;
    overflow: hidden !important;
}

.nav-cta::before,
button.nav-cta::before,
.schedule-demo-btn::before,
#scheduleDemoNav::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent) !important;
    transition: left 0.5s ease !important;
}

.nav-cta:hover::before,
button.nav-cta:hover::before,
.schedule-demo-btn:hover::before,
#scheduleDemoNav:hover::before {
    left: 100% !important;
}

.nav-cta:hover,
button.nav-cta:hover,
.schedule-demo-btn:hover,
#scheduleDemoNav:hover,
#scheduleDemoMobile:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4), 0 0 0 1px rgba(220, 38, 38, 0.2) inset !important;
    transform: translateY(-2px) !important;
}

.nav-cta:active,
button.nav-cta:active,
.schedule-demo-btn:active,
#scheduleDemoNav:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3) !important;
}

/* ===========================
   MOBILE MENU TOGGLE
   =========================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: #1f2937;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
}

.hamburger-line:nth-child(1) {
    top: 10px;
}

.hamburger-line:nth-child(2) {
    top: 19px;
}

.hamburger-line:nth-child(3) {
    top: 28px;
}

/* Active state */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg);
    top: 19px;
    background: #dc2626;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
    top: 19px;
    background: #dc2626;
}

/* ===========================
   MOBILE NAVIGATION
   =========================== */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-nav-menu.active {
    right: 0;
}

/* Mobile Header */
.mobile-nav-header {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
}

.mobile-nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.mobile-nav-tagline {
    font-size: 0.85rem;
    opacity: 0.95;
}

/* Mobile Navigation Items */
.mobile-nav-items {
    flex: 1;
    padding: 1rem 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #f3f4f6;
}

/* Hide Shop link in mobile menu */
.mobile-nav-item:has(a[href="/shop.php"]),
.mobile-nav-item:has(a[href*="shop.php"]) {
    display: none !important;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    color: #1f2937;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 48px;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: #f9fafb;
    color: #dc2626;
}

/* iPad-specific touch improvements */
@supports (-webkit-touch-callout: none) {
    .mobile-nav-link {
        -webkit-user-select: none;
        user-select: none;
    }
}

.mobile-nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.6;
}

/* Mobile Dropdown */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.mobile-dropdown.active .mobile-dropdown-toggle::after {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    background: #f9fafb;
    transition: max-height 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 500px;
}

.mobile-dropdown-link {
    padding-left: 2.5rem !important;
    font-size: 0.9rem;
    font-weight: 400;
}

/* Mobile CTA Section */
.mobile-nav-cta {
    padding: 1.5rem;
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
}

.mobile-cta-button,
.mobile-cta-button.schedule-demo-btn,
#scheduleDemoMobile {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    color: white !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation !important;
    min-height: 48px !important;
    font-size: 1rem !important;
    border: none !important;
    cursor: pointer !important;
    margin-bottom: 1rem !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25) !important;
    text-decoration: none !important;
}

.mobile-contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
}

.mobile-contact-item:hover {
    color: #dc2626;
}

/* ===========================
   RESPONSIVE - MOBILE
   =========================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-menu > li > a {
        font-size: 0.9rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }
}

/* iPad landscape - keep desktop menu */
@media (min-width: 1024px) and (max-width: 1366px) {
    .nav-menu > li > a {
        font-size: 0.85rem;
    }

    .nav-menu {
        gap: 1.2rem;
    }

    .nav-cta {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* iPad portrait - use mobile menu for better UX */
@media (min-width: 768px) and (max-width: 834px) and (orientation: portrait) {
    .nav-menu {
        display: none !important;
    }

    .nav-cta,
    button.nav-cta,
    #scheduleDemoNav {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        z-index: 10002 !important;
        position: relative !important;
    }

    .mobile-nav-overlay {
        display: block;
    }
}

@media (max-width: 768px) {
    /* Hide desktop menu, show mobile toggle */
    .nav-menu {
        display: none !important;
    }

    .nav-cta,
    button.nav-cta,
    #scheduleDemoNav {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        z-index: 10002 !important;
        position: relative !important;
    }

    .mobile-nav-overlay {
        display: block;
    }

    /* Adjust header for mobile */
    body {
        padding-top: 70px !important;
    }

    .header,
    header {
        height: 70px !important;
    }

    .nav {
        height: 70px !important;
    }

    .header > .container,
    header > .container {
        padding: 0 1.5rem !important;
    }

    .logo {
        z-index: 10002 !important;
    }

    .logo img {
        height: 75px !important;
    }
}

@media (max-width: 480px) {
    .header > .container,
    header > .container {
        padding: 0 1rem;
    }

    .logo img {
        height: 55px;
        max-width: 220px;
    }

    .mobile-nav-menu {
        width: 90%;
    }
}

/* ===========================
   SECTIONS BACKGROUND
   =========================== */
section {
    background: #ffffff;
}

/* ===========================
   HERO SECTION - CENTER TEXT ON DESKTOP
   =========================== */
@media (min-width: 1024px) {
    .hero-text {
        text-align: center !important;
    }

    .hero-subheading {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .hero-actions {
        justify-content: center !important;
    }

    .trust-band {
        justify-content: center !important;
    }
}
