:root {
    --font-heading: 'Automata', 'Exo 2', 'Roboto', sans-serif;
    --font-nav: 'Exo 2', 'Roboto', sans-serif;
    --font-body: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --accent: #ff6f3c;
    --orange: #FF5500;
    --gold: #f7ba21;
    --dark: #0f172a;
    --light: #fafafa;
    --primary-dark: #363C4F;
    --primary-gold: #AA7218;
    --secondary-gold: #D3A31C;
    --light-gold: #FCEC9D;
    --accent-blue: #6D81AA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main header / nav - FIXED FOR ALL DEVICES */
header {
    position: fixed;
    top: 0;
    z-index: 9999;
    width: 100%;
    background: #000;
    border-bottom: 1px solid #000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    color: #222;
    height: 110px;
}

/* Add padding to body to prevent content from hiding behind fixed header */
body {
    padding-top: 110px;
}

.header-inner {
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Fix for logo clickable area */
.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 0px;
    padding-left: 40px;
}

.site-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-brand-link:hover {
    opacity: 0.8;
}

.site-logo {
    width: auto;
    height: 80px;
    max-height: 120px;
    background: none;
    border: none;
    display: block;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.site-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    gap: 5px;
    cursor: pointer;
}

.brand-line-1,
.brand-line-2 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #D3A31C;
    margin: 0;
    padding: 0;
    text-align: left;
    transition: color 0.2s ease;
}

.site-brand-link:hover .brand-line-1,
.site-brand-link:hover .brand-line-2 {
    color: #f0c060;
}

.brand-line-1 {
    font-size: 2rem;
    margin-bottom: 4px;
}

.brand-line-2 {
    font-size: 1.05rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #1A101E;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

span {
    color: #1A101E;
    font-weight: 700;
}

.menu li {
    position: relative;
    display: flex;
    align-items: center;
}

.site-nav {
    background: white;
    padding: 20px 40px 20px;
    border-radius: 20px 0 0 20px;
}

/* Nav link style - UPDATED: Same hover effect for ALL main nav items */
.site-nav .menu > li > a,
.site-nav .menu > li.dropdown > a {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.6px;
    color: rgb(5, 5, 106);
    padding: 12px 15px;
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
    display: inline-block;
    transform-origin: center center;
    white-space: nowrap;
    position: relative;
    font-size: 0.85rem;
    border-radius: 20px;
    cursor: pointer !important; /* Force pointer cursor for ALL */
}

/* Hover effect for ALL main navigation links - UPDATED */
.site-nav .menu > li > a:hover,
.site-nav .menu > li.dropdown > a:hover {
    background: #f1f1f1 !important;
    cursor: pointer !important;
}

/* ACTIVE PAGE INDICATOR for main navigation */
.site-nav .menu li.active > a {
    background: #f1f1f1;
    color: #000;
}

/* Dropdown parent links - UPDATED: Always show pointer cursor */
.site-nav .menu li.dropdown > a {
    cursor: pointer !important;
}

.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

/* Dropdown button styling - UPDATED */
.dropbtn {
    background: none;
    border: none;
    font: inherit;
    padding: 12px 15px;
    color: rgb(5, 5, 106);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: inherit;
    position: relative;
    white-space: nowrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.6px;
    border-radius: 20px;
    cursor: pointer !important; /* Force pointer cursor */
    transition: background-color 160ms ease;
}

/* Hover effect for dropdown button - UPDATED: Same as other nav items */
.dropbtn:hover {
    background: #f1f1f1 !important;
    cursor: pointer !important;
}

/* Enhanced Dropdown Content - UPDATED: Full width with proper positioning */
.dropdown-content {
    display: none; /* HIDDEN BY DEFAULT */
    position: absolute;
    top: 180%;
    left: 0;
    width: 100vw;
    min-width: 100%;
    background: #fff;
    color: #1A101E;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0;
    border: none;
    /* border-radius: 0 0 10px 10px; */
    overflow: hidden;
    grid-template-columns: 1fr 2fr;
    gap: 0;
    transform: translateX(-50%);
    left: 50%;
}

/* Services dropdown specific styling */
.services-dropdown {
    background: linear-gradient(135deg, #363C4F 0%, #2a3040 100%);
    color: white;
}

/* Industries dropdown specific styling */
.industries-dropdown {
    background: linear-gradient(135deg, #AA7218 0%, #8a5a14 100%);
    color: white;
    /* transform: translateX(-60%); */
    left: -35%;
}

/* Two-column layout for dropdown */
.dropdown-content-description {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
}

.services-dropdown .dropdown-content-description {
    background: linear-gradient(135deg, rgba(170, 114, 24, 0.1) 0%, rgba(211, 163, 28, 0.05) 100%);
}

.industries-dropdown .dropdown-content-description {
    background: linear-gradient(135deg, rgba(54, 60, 79, 0.1) 0%, rgba(109, 129, 170, 0.05) 100%);
}

.dropdown-description-title {
    font-family: var(--font-nav);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.services-dropdown .dropdown-description-title {
    color: #FCEC9D;
}

.industries-dropdown .dropdown-description-title {
    color: #FCEC9D;
}

.dropdown-description-subtitle {
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    opacity: 0.9;
}

/* Grid layout for services dropdown */
.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 30px 30px;
}

.dropdown-category {
    padding: 0 10px;
}

.dropdown-category-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-category-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #D3A31C;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-category-description {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.dropdown-category-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Standard dropdown links layout */
.dropdown-links {
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.dropdown-content.industries-dropdown a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 5px;
    font-family: var(--font-body);
    font-weight: 400;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #363C4F;
}

.dropdown-content.services-dropdown a {
    display: block;
    padding: 5px 12px;
    text-decoration: none;
    font-size: 0.8rem;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
    /* border-radius: 5px; */
    font-family: var(--font-body);
    font-weight: 400;
    color: white;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #AA7218;
}

.services-dropdown a:hover {
    color: #FCEC9D;
    /* background: rgba(255, 255, 255, 0.1); */
    /* border-left-color: #FCEC9D; */
    /* text-decoration: overline; */
    /* transform: translateX(5px); */
}

.industries-dropdown a:hover {
    color: #FCEC9D;
    background: rgba(255, 255, 255, 0.1);
    /* border-left-color: #FCEC9D; */
    text-decoration: underline;
    text-decoration-color: #363C4F;
    text-underline-offset: 5px;
    text-decoration-style: dotted;
    /* transform: translateX(5px); */
}

/* Only show dropdown when JavaScript adds 'open' class */
.dropdown.open .dropdown-content {
    display: grid;
}

/* Add this new rule to hide dropdowns when not on dropdown or its content */
.dropdown:not(.open) .dropdown-content {
    display: none !important;
}

/* Mobile Menu Toggle - HIDDEN ON DESKTOP */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #ddd;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    background: #fff;
    color: #1A101E;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    visibility: visible !important;
}

.menu-toggle:hover {
    background: #f5f5f5;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #AA7218;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    width: 22px;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    width: 22px;
}

/* Mobile Menu - HIDDEN ON DESKTOP */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: auto;
    max-height: calc(100vh - 80px);
    background: #363C4F;
    z-index: 9999;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    transition: right 0.3s ease;
    padding: 0;
    margin-top: 80px;
    padding: 20px 0;
}

.mobile-menu.active {
    display: block;
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.mobile-menu li {
    border-bottom: 1px solid #eeeeee24;
    width: 100%;
}

.mobile-menu li:last-child {
    border-bottom: none;
}

/* LEFT ALIGNED TEXT WITH REDUCED PADDING */
.mobile-menu a,
.mobile-dropdown-toggle {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 2px;
}

/* Active page indicator for mobile */
.mobile-menu > ul > li.active > a {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Hover effect for mobile menu - main items only */
.mobile-menu > ul > li > a:hover {
    color: var(--accent);
}

/* Mobile dropdown styles */
.mobile-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.mobile-dropdown-content {
    display: none;
    background: #363C4F;
    margin: 0;
    padding: 15px 0;
    width: 100%;
}

.mobile-dropdown-content.active {
    display: block;
}

.mobile-category {
    padding: 0 20px 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.mobile-category h5 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #AA7218;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.mobile-category p {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    line-height: 1.4;
}

.mobile-dropdown-content a {
    padding: 15px 40px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    text-align: left;
    width: 100%;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.2s ease;
}

.mobile-dropdown-content a:last-child {
    border-bottom: none;
}

.mobile-dropdown-content a:hover {
    background: rgba(170, 114, 24, 0.2);
    color: #FCEC9D;
    text-decoration: none;
    padding-left: 45px;
}

.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    padding: 12px 20px;
    text-align: left;
    font-family: var(--font-nav);
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    margin: 0;
    border-bottom: 1px solid #eeeeee24;
}

.mobile-dropdown-toggle:hover {
    color: #fff;
}

.mobile-dropdown-toggle .arrow {
    transition: transform 0.8s ease;
    font-size: 12px;
    margin-left: 10px;
    padding: 5px;
    background: #fff;
    color: #AA7218;
}

.mobile-dropdown-toggle.active {
    color: white;
}

.mobile-dropdown-toggle.active .arrow {
    transform: rotate(180deg);
    color: #fff;
    background: #AA7218;
}

/* Overlay for mobile menu */
.mobile-menu-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-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* ==================== RESPONSIVE STYLES ==================== */

/* Large Tablets and Small Desktops (1024px and below) */
@media (max-width: 1024px) {
    /* Header container adjustments */
    header {
        padding: 8px 10px;
        height: 100px;
    }
    
    /* Body padding to account for fixed header */
    body {
        padding-top: 100px;
    }
    
    /* Logo sizing */
    .site-logo {
        height: 55px;
        width: auto;
    }
    
    /* Brand container */
    .site-brand {
        margin-right: 50px;
        gap: 15px;
        flex-shrink: 0;
    }
    
    /* Brand text adjustments */
    .brand-line-1,
    .brand-line-2 {
        font-size: 0.9rem;
        line-height: 1.1;
    }
    
    .brand-line-1 {
        font-size: 1.7rem;
    }
    
    /* Adjust dropdown width for tablets */
    .dropdown-content {
        width: 100vw;
        left: 0;
        transform: none;
        border-radius: 0;
    }
    
    .dropdown-content.services-dropdown,
    .dropdown-content.industries-dropdown {
        width: 100vw;
        left: 0;
        right: 0;
        max-width: none;
    }
    
    /* Dropdown grid adjustments */
    .dropdown-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Main navigation visibility */
    .site-nav {
        display: none;
    }
    
    /* Mobile menu toggle button visibility */
    .menu-toggle {
        display: flex;
    }
    
    /* Header inner layout */
    .header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
}

/* Tablets (900px and below) - Mobile menu activation */
@media (max-width: 900px) {
    header {
        padding: 8px 20px;
        height: 90px;
        justify-content: space-between;
    }
    
    body {
        padding-top: 90px;
    }
    
    .header-inner {
        width: 100%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }
    
    .site-brand {
        padding-left: 0;
        margin-right: 0;
        gap: 10px;
    }
    
    .site-logo {
        height: 50px;
        margin: 0;
    }
    
    .site-brand-text {
        display: none; /* Hide text on mobile for better spacing */
    }
    
    /* Menu toggle with margin on the right - SHOW ON MOBILE */
    .menu-toggle {
        display: flex;
        right: 20px;
        left: auto;
        visibility: visible !important;
    }
    
    /* Hide desktop menu on mobile */
    .site-nav {
        display: none;
    }
    
    /* Hide dropdown content on mobile */
    .dropdown-content {
        display: none !important;
    }
    
    /* Show mobile menu on mobile */
    .mobile-menu {
        display: block;
        width: 100%;
        margin-top: 90px;
        max-height: calc(100vh - 90px);
    }
}

/* Small Tablets (768px and below) */
@media (max-width: 768px) {
    header {
        padding: 8px 15px;
        height: 85px;
    }
    
    body {
        padding-top: 85px;
    }
    
    .site-logo {
        height: 45px;
    }
    
    .menu-toggle {
        width: 36px;
        height: 36px;
        right: 15px;
        left: auto;
        visibility: visible !important;
    }
    
    .mobile-menu {
        margin-top: 85px;
        max-height: calc(100vh - 85px);
    }
    
    .mobile-menu a,
    .mobile-dropdown-toggle {
        padding: 10px 20px;
    }
    
    .mobile-dropdown-content a {
        padding: 8px 30px;
    }
}

/* Mobile Phones (480px and below) */
@media (max-width: 480px) {
    header {
        height: 80px;
        padding: 6px 12px;
    }
    
    body {
        padding-top: 80px;
    }
    
    .site-logo {
        height: 40px;
    }
    
    .menu-toggle {
        width: 34px;
        height: 34px;
        padding: 6px;
        right: 12px;
        left: auto;
        visibility: visible !important;
    }
    
    .mobile-menu {
        width: 100%;
        margin-top: 80px;
        max-height: calc(100vh - 80px);
    }
    
    .mobile-menu a,
    .mobile-dropdown-toggle {
        padding: 8px 20px;
        font-size: 15px;
    }
    
    .mobile-dropdown-content a {
        padding: 6px 30px;
        font-size: 14px;
    }
}

/* Extra Small Phones (360px and below) */
@media (max-width: 360px) {
    header {
        height: 75px;
        padding: 5px 10px;
    }
    
    body {
        padding-top: 75px;
    }
    
    .site-logo {
        height: 35px;
    }
    
    .menu-toggle {
        width: 32px;
        height: 32px;
        right: 10px;
        left: auto;
        visibility: visible !important;
    }
    
    .mobile-menu {
        margin-top: 75px;
        max-height: calc(100vh - 75px);
    }
    
    .mobile-menu a,
    .mobile-dropdown-toggle {
        padding: 7px 18px;
        font-size: 14px;
    }
    
    .mobile-dropdown-content a {
        padding: 5px 28px;
        font-size: 13px;
    }
}

/* Large Desktops (1440px and above) */
@media (min-width: 1440px) {
    .header-inner {
        max-width: 1400px;
    }
    
    header {
        padding: 8px 60px;
        height: 110px;
    }
    
    body {
        padding-top: 110px;
    }
    
    .site-logo {
        height: 110px;
    }
    
    .brand-line-1 {
        font-size: 1.4rem;
    }
    
    .brand-line-2 {
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .menu-toggle {
        display: none;
    }
    
    header {
        position: static;
        height: auto;
        box-shadow: none;
        border-bottom: 1px solid #ccc;
    }
    
    body {
        padding-top: 0;
    }
    
    .site-logo {
        height: 50px;
        filter: grayscale(100%);
    }
    
    .dropdown-content {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    header {
        border-bottom: 2px solid black;
    }
    
    .menu-toggle {
        border: 2px solid black;
    }
    
    .menu-toggle span {
        background: black;
    }
    
    .mobile-menu {
        border: 2px solid black;
    }
    
    .mobile-menu li {
        border-bottom: 2px solid #ccc;
    }
    
    .dropdown-content {
        border: 2px solid black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .site-nav .menu a,
    .dropdown-content a,
    .menu-toggle span,
    .mobile-menu,
    .mobile-dropdown-toggle .arrow,
    .site-brand-link,
    .brand-line-1,
    .brand-line-2 {
        transition: none;
    }
    
    .site-nav .menu a:hover {
        transform: none;
    }
    
    .menu-toggle.active span {
        transform: none;
    }
    
    .mobile-dropdown-toggle.active .arrow {
        transform: none;
    }
}