/* Base Styles */
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --text-color: #333333;
    --light-text: #f8f9fa;
    --dark-text: #212529;
    --bg-color: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #2b2d42;
    --footer-text: #f8f9fa;
    --border-color: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --success-color: #4bb543;
    --warning-color: #f0ad4e;
    --danger-color: #d9534f;
    --transition: all 0.3s ease;
}

/* Reset & Box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Links */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Lists */
ul {
    list-style: none;
}

/* HEADER STYLES */
.main-header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* Container inside header for layout */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    position: relative; /* For absolute positioning of hamburger */
}

/* Logo section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo-part-1 {
    color: var(--dark-text);
}

.logo-part-2 {
    color: var(--primary-color);
    margin-left: 5px;
}

/* Hamburger Menu Button - Fixed at top-right corner of header container */
.mobile-menu-toggle {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1100;
}

/* Desktop Navigation Styles */
.desktop-nav {
    display: block;
}

.main-menu {
    display: flex;
    gap: 15px;
}

.main-menu > li {
    position: relative;
}

/* Desktop menu links with icons */
.main-menu > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    font-weight: 500;
    border-radius: 5px;
    transition: var(--transition);
}

.main-menu > li > a:hover {
    color: var(--primary-color);
}

/* Icons inside desktop menu */
.main-menu > li > a i {
    font-size: 0.9rem;
}

/* Dropdown Hover: Show mega menu */
.dropdown:hover .mega-menu {
    display: block;
}

/* Mega Menu Styles */
.mega-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: 0 10px 20px var(--shadow-color);
    border-radius: 0 0 10px 10px;
    padding: 20px;
    z-index: 999;
    min-width: 200px;
}

/* Mega Menu Columns */
.mega-menu-columns {
    display: flex;
    gap: 30px;
}

.mega-menu-column {
    flex: 1;
}

.mega-menu-column h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.mega-menu-column ul li {
    margin-bottom: 10px;
}

.mega-menu-column ul li a {
    display: block;
    padding: 5px 0;
    color: var(--text-color);
    transition: var(--transition);
}

/* Hover in mega menu links */
.mega-menu-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* MOBILE NAV STYLES */
.mobile-nav {
   position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background-color: var(--bg-color);
    box-shadow: -2px 0 10px var(--shadow-color);
    z-index: 1101; /* make sure it's above the icon */
    transition: var(--transition);
    overflow-y: auto;
    padding-top: 70px;
}

/* Show mobile nav when active */
.mobile-nav.active {
    right: 0;
}

/* Mobile header inside menu (close button + logo) */
.mobile-nav-header {
    position: absolute;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--header-bg);
    z-index: 1100;
}

/* Mobile logo in menu */
.mobile-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Close button in mobile menu */
.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Mobile menu items list */
.mobile-menu {
    padding: 30px 10px 10px; /* padding-top accounts for header height */
}

/* Mobile menu list items */
.mobile-menu li {
    margin-bottom: 15px;
}

/* Mobile menu links with icon and text (remove extra space) */
.mobile-menu li a {
    display: flex;
    align-items: center;
    gap: 10px; /* spacing between icon and text */
    padding: 10px;
    border-radius: 5px;
    transition: var(--transition);
}

/* Hover effect on mobile menu links */
.mobile-menu li a:hover {
    background-color: #f0f4f8;
    color: var(--primary-color);
}

/* Fix icon and text spacing in mobile menu */
.mobile-menu li a i {
    margin: 0;
    padding: 0;
}

/* Mobile dropdown toggle (for nested menus) */
.mobile-dropdown > a {
    display: flex;
    
    align-items: center;
    width: 100%;
}

.mobile-submenu {
    display: none;
    padding-left: 20px;
    margin-top: 10px;
    border-left: 2px solid var(--border-color);
}

/* Show submenu when active via class toggle in JS */
.mobile-dropdown.active .mobile-submenu {
    display: block;
}

/* FOOTER STYLES */
.main-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 0 0;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 15px;
}

.footer-tagline {
    margin-bottom: 20px;
    opacity: 0.8;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    opacity: 0.8;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    opacity: 1;
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
}

.footer-legal a {
    opacity: 0.7;
    transition: var(--transition);
}

.footer-legal a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.separator {
    opacity: 0.3;
}

/* RESPONSIVE STYLES */

@media (max-width: 1024px) {
    .mega-menu {
        min-width: 600px;
    }
}

@media (max-width: 1200px) {
    /* Show hamburger button, hide desktop nav */
    .mobile-menu-toggle {
        display: block;
    }
    .desktop-nav {
        display: none;
    }
    /* Make header background white for mobile */
    .main-header {
        background-color: #fff;
    }
    /* Header container adjustments */
    .header-container {
        height: 60px;
    }
    /* Logo size */
    .site-logo {
        font-size: 1.5rem;
    }
    /* Footer layout adjustments */
    .footer-top {
        grid-template-columns: 1fr;
    }
    .footer-brand {
        max-width: 100%;
    }
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    /* Mobile menu width */
    .mobile-nav {
        width: 90%;
    }
    /* Footer adjustments */
    .footer-links {
        grid-template-columns: 1fr;
    }
    /* Footer bottom layout */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-legal {
        flex-direction: column;
        gap: 5px;
    }
    /* Hide separator if needed */
    .separator {
        display: none;
    }
}