@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --brand-blue: #003366;
    --brand-red: #BD3021;
    --brand-red-dark: #8B2318;

    /* ── Site-wide gutter — matches header px-3 / px-5 / px-12 ── */
    --site-gutter: 12px;      /* mobile  (px-3) */
}

@media (min-width: 640px)  { :root { --site-gutter: 20px; } } /* sm  (px-5)  */
@media (min-width: 1024px) { :root { --site-gutter: 48px; } } /* lg  (px-12) */

html {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    /* Offset for fixed header: ~58px mobile, ~72px tablet, ~88px desktop */
    padding-top: 58px;
}

@media (min-width: 640px) {
    body { padding-top: 70px; }
}

@media (min-width: 1024px) {
    body { padding-top: 0; } 
}

/* Corner radius to both bottom corners of the header container */
.header-curved-bottom {
    border-bottom-left-radius: 40px !important;
    border-bottom-right-radius: 40px !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Nuclear reset on the header placeholder */
#header-placeholder {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    z-index: 9999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

/* Fix for WordPress Admin Bar */
.admin-bar #header-placeholder {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    .admin-bar #header-placeholder {
        top: 46px !important;
    }
}

/* Force header-container to stay within viewport */
#header-container {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Glassy header on scroll */
#header-container.scrolled {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 20, 0.05),
                0 1px 0 rgba(255, 255, 255, 0.8) inset;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    border-bottom-left-radius: 30px !important;
    border-bottom-right-radius: 30px !important;
}

/* Global Navigation Items */
.nav-item {
    padding: 10px 0;
}

.nav-item:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Dropdown styling */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    margin-top: 15px;
    background: white;
    min-width: 240px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-top: 4px solid #BD3021;
    border-radius: 12px;
    padding: 12px 0;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* FIX: Transparent bridge to keep hover active across the gap */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    z-index: -1;
}

.dropdown-item {
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 600;
    color: #003366;
    transition: all 0.2s ease;
    display: block;
}

.dropdown-item:hover {
    background: #fdf2f2;
    color: #BD3021 !important;
    padding-left: 28px;
}

/* Sub-dropdown */
.sub-dropdown-trigger:hover .sub-dropdown-menu {
    display: block;
}

.sub-dropdown-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: -12px;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    border-left: 1px solid #f1f5f9;
    padding: 8px 0;
}

/* Mobile Panel Slide-in */
#mobile-panel {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
}

/* Prevent panel from causing x-axis overflow when hidden */
#mobile-menu {
    overflow: hidden;
}

/* Mobile Submenu Toggles */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease;
    opacity: 0;
}

.mobile-submenu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Rotate Chevron */
.rotate-180 {
    transform: rotate(180deg);
    color: #BD3021 !important;
    opacity: 1 !important;
}

/* Brand Colors & Utilities */
.text-brand { color: #BD3021 !important; }
.bg-brand { background-color: #BD3021 !important; }
.border-brand { border-color: #BD3021 !important; }

/* Selection fix */
::selection {
    background: #BD3021;
    color: white;
}

/* Mobile Navigation Links */
.mobile-nav-link {
    color: #003366;
    font-size: 1.1rem;
    font-weight: 700;
    border: none !important;
    padding: 0.85rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    outline: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

.mobile-nav-link:active, .mobile-nav-link:focus, .mobile-nav-link:hover {
    color: #BD3021;
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.mobile-nav-item {
    border-bottom: 1px solid #f1f5f9 !important;
    background: transparent !important;
}

.mobile-nav-item button {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    -webkit-appearance: none;
}

.mobile-submenu-link {
    color: #475569;
    font-weight: 400;
    font-size: 0.95rem;
    padding: 0.5rem 0 0.5rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    border: none !important;
}

.mobile-submenu-link:active, .mobile-submenu-link:focus {
    color: #BD3021;
    outline: none !important;
}

/* Reset focus borders — but do NOT touch panel/backdrop backgrounds */
#mobile-menu button,
#mobile-menu button:focus,
#mobile-menu button:active,
#mobile-menu a:focus,
#mobile-menu a:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    background: transparent !important;
    box-shadow: none !important;
}

/* Panel must always be solid white */
#mobile-panel {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Hamburger button — no border, no background, no outline */
#menu-toggle {
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    -webkit-appearance: none;
}

/* ============================================================
   Global Section Alignment — matches header horizontal gutter
   ============================================================ */

/* Elementor full-width sections — constrain inner content */
.elementor-section.elementor-section-boxed > .elementor-container,
.elementor-section > .elementor-container {
    padding-left: var(--site-gutter) !important;
    padding-right: var(--site-gutter) !important;
    box-sizing: border-box !important;
}

/* Plugin sections (testimonials, brochures, carousel) */
.testimonials-section,
.brochures-section,
.dexon-carousel-section .dexon-carousel-container {
    box-sizing: border-box !important;
}

/* Ensure Elementor columns don't add extra outer padding */
@media (max-width: 1023px) {
    .elementor-column-gap-default > .elementor-row,
    .elementor-column-gap-default > .e-con-inner {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ============================================
   Brand Dark Theme: Soft Gradient + Red Glows
   ============================================ */
/* Apply dark theme to hero sections manually using .brand-soft-gradient class */
.brand-soft-gradient {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%) !important;
    position: relative !important;
    overflow: hidden !important;
}

.brand-soft-gradient::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(189, 48, 33, 0.15), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.brand-soft-gradient::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 80%;
    background: radial-gradient(circle at center, rgba(189, 48, 33, 0.08), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.brand-soft-gradient > * {
    position: relative !important;
    z-index: 1 !important;
}

/* Dark theme text overrides */
.brand-soft-gradient h1, 
.brand-soft-gradient h2, 
.brand-soft-gradient h3, 
.brand-soft-gradient p,
.brand-soft-gradient .elementor-heading-title {
    color: #ffffff !important;
}

/* Premium Text Gradient (Red to Yellow) */
.brand-soft-gradient .text-gradient,
.brand-soft-gradient h1 span,
.brand-soft-gradient .elementor-heading-title span {
    background: linear-gradient(to right, #BD3021, #fbbf24) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    display: inline-block;
}

.brand-soft-gradient .text-gray-300 { color: #d1d5db !important; }
.brand-soft-gradient .text-gray-400 { color: #94a3b8 !important; }

/* Stat cards in hero */
.brand-soft-gradient .stat-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-soft-gradient .stat-card:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Float animation for decorative circles */
@keyframes dexonFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, -15px); }
}

.brand-soft-gradient .blur-3xl {
    animation: dexonFloat 12s ease-in-out infinite;
}

/* Fix unintended heading colors (replacing orange/yellow with Brand Red) */
.elementor-widget-heading .elementor-heading-title {
    color: #BD3021;
}

/* Responsive Footer Grid */
.dexon-footer-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 40px !important;
}

@media (min-width: 1024px) {
    .dexon-footer-grid {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 50px !important;
    }
    .dexon-footer-grid > div {
        flex: 0 1 auto !important;
        width: auto !important;
    }
    .dexon-footer-grid > div:first-child {
        max-width: 380px !important;
    }
}