/* Header Styles */
/* Add CSS variable for grid columns at the top of your file */
:root {
    --compress-grid-columns: 4; /* You can change this number to adjust columns */
    --compress-grid-gap: 10px; /* Grid gap - adjust this value to change spacing */
    --compress-item-padding: 10px; /* Item padding */
    --compress-menu-padding: 15px; /* Menu padding */
    --compress-text-align: left; /* Add this new variable - can be 'left', 'center', or 'right' */
    --compress-content-justify: flex-start; /* Add this for flex alignment - can be 'flex-start', 'center', or 'flex-end' */
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    padding-top: 80px; /* Adjust based on your header height */
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}
/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}



/* Navigation menu */
.nav-menu {
    display: flex;
    align-items: center;
}

.menu-items {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.menu-items a {
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
    font-weight: 500;
}

.menu-items a:hover {
    color: #2196f3;
}

.menu-items a.active {
    color: #2196f3;
}

/* Dropdown styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    z-index: 100;
}

/* Add dropdown arrow/triangle */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -2px -2px 5px rgba(0,0,0,0.05);
    border-radius: 2px;
}

/* Adjust right-aligned dropdowns arrow position */
.menu-items > li:last-child .dropdown-menu::before,
.menu-items > li:nth-last-child(2) .dropdown-menu::before {
    left: auto;
    right: 20px;
}

/* Update the dropdown styles */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Add scrolling for all dropdowns except Compress */
    .dropdown-menu {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }

    /* Remove scrolling specifically for Compress dropdown */
    .menu-items li:nth-child(3) .dropdown-menu {
        max-height: none;
        overflow-y: visible;
    }

    /* Target the Compress dropdown grid view using class instead of nth-child */
    .compress-dropdown .dropdown-menu {
        display: grid !important;
        grid-template-columns: repeat(var(--compress-grid-columns), 1fr) !important;
        gap: var(--compress-grid-gap) !important;
        padding: var(--compress-menu-padding);
        min-width: calc(200px * var(--compress-grid-columns));
        max-width: calc(225px * var(--compress-grid-columns));
        left: 50%;
        top: calc(100% + 15px);
        transform: translateX(-50%) translateY(10px);
        max-height: none !important;
        overflow: visible !important;
    }

    /* Center the arrow for Compress dropdown */
    .compress-dropdown .dropdown-menu::before {
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }

    /* Override hover transform for this specific dropdown */
    .compress-dropdown:hover .dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }

    /* Initial state with both transforms */
    .compress-dropdown .dropdown-menu {
        transform: translateX(-50%) translateY(10px);
    }

    .compress-dropdown .dropdown-menu li {
        margin: 0;
    }

    .compress-dropdown .dropdown-menu li a {
        padding: var(--compress-item-padding);
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: var(--compress-content-justify);
        text-align: var(--compress-text-align);
        background: #f8f9fa;
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    .compress-dropdown .dropdown-menu li a i {
        margin: 0 10px;
    }

    .compress-dropdown .dropdown-menu li a:hover {
        background: #e9ecef;
        transform: translateY(-2px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        color: #2196f3;
    }
}

/* Right-aligned dropdowns for last items */
.menu-items > li:last-child .dropdown-menu,
.menu-items > li:nth-last-child(2) .dropdown-menu {
    left: auto;
    right: 0;
}

/* Adjust position if menu would overflow right edge */
@media (max-width: 1200px) {
    .menu-items > li:nth-last-child(3) .dropdown-menu {
        left: auto;
        right: 0;
    }
}

.dropdown-menu li a {
    display: block;
    padding: 0.8rem 1rem;
    color: #333;
    transition: background-color 0.3s ease;
    font-weight: normal;
}

.dropdown-menu li a:hover {
    background-color: #f5f5f5;
}

/* Mobile specific styles */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static; /* Change from fixed to static */
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: block;
        width: 100%;
        padding-left: 1.5rem;
        border-left: none;
        margin-left: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    /* Show dropdown when active */
    .dropdown.active .dropdown-menu {
        max-height: 1000px; /* Large enough to show all content */
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    /* Improve nested menu appearance */
    .dropdown-menu li a {
        padding: 0.5rem 0;
        font-size: 1rem;
    }

    /* Remove fixed positioning styles */
    .dropdown-menu {
        height: auto;
        background: transparent;
        z-index: auto;
    }

    /* Ensure compress dropdown works in mobile */
    .compress-dropdown .dropdown-menu {
        display: block;
        grid-template-columns: none;
        min-width: auto;
        transform: none;
        position: static;
        padding-left: 1.5rem;
    }

    .menu-items li a {
        color: #333;
    }

    .dropdown.active > a {
        color: #2196f3;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -5px);
    }

    .dropdown.active a i {
        transform: rotate(180deg);
    }

    .nav-menu::-webkit-scrollbar,
    .dropdown-menu::-webkit-scrollbar {
        width: 5px;
    }

    .nav-menu::-webkit-scrollbar-track,
    .dropdown-menu::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .nav-menu::-webkit-scrollbar-thumb,
    .dropdown-menu::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 5px;
    }

    .nav-menu::-webkit-scrollbar-thumb:hover,
    .dropdown-menu::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

    .dropdown-menu li {
        padding: 8px 0;
    }

    .dropdown-menu li:last-child {
        padding-bottom: 16px;
    }

    .nav-menu, .dropdown-menu {
        -ms-overflow-style: none;
        scrollbar-width: thin;
    }
}

/* Keep original list view for mobile */
@media (max-width: 768px) {
    .menu-items > li:nth-child(5) .dropdown-menu {
        display: block;
    }
}

/* Add new styles for compress dropdown */
@media (min-width: 769px) {
    /* Base dropdown hover effect */
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Specific styles for compress dropdown */
    .compress-dropdown .dropdown-menu {
        display: grid !important;
        grid-template-columns: repeat(var(--compress-grid-columns), 1fr) !important;
        gap: var(--compress-grid-gap) !important;
        padding: var(--compress-menu-padding);
        min-width: calc(200px * var(--compress-grid-columns));
        max-width: calc(225px * var(--compress-grid-columns));
        left: 50%;
        top: calc(100% + 15px);
        transform: translateX(-50%) translateY(10px);
        max-height: none !important;
        overflow: visible !important;
    }

    .compress-dropdown:hover .dropdown-menu {
        transform: translateX(-50%) translateY(0);
    }

    /* Grid item styles */
    .compress-dropdown .dropdown-menu li {
        margin: 0;
    }

    .compress-dropdown .dropdown-menu li a {
        padding: var(--compress-item-padding);
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: var(--compress-content-justify);
        text-align: var(--compress-text-align);
        background: #f8f9fa;
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    .compress-dropdown .dropdown-menu li a i {
        margin: 0 10px;
    }

    .compress-dropdown .dropdown-menu li a:hover {
        background: #e9ecef;
        transform: translateY(-2px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        color: #2196f3;
    }

    /* Center arrow for compress dropdown */
    .compress-dropdown .dropdown-menu::before {
        left: 50%;
        transform: translateX(-50%) rotate(45deg);
    }
}

/* Mobile styles for compress dropdown */
@media (max-width: 768px) {
    .compress-dropdown .dropdown-menu {
        display: block;
        grid-template-columns: none;
        min-width: auto;
        transform: none;
    }
}

/* Mobile menu button styles */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        padding: 1.5rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        display: none;
        height: calc(60vh - 90px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    .nav-menu.active {
        display: block;
    }

    .menu-items {
        flex-direction: column;
        gap: 0.8rem;
        padding-bottom: 20px;
        align-items: flex-start;
    }

    .menu-items li {
        width: 100%;
    }

    .menu-items li a {
        padding: 0.8rem 0;
        display: block;
        font-size: 1.1rem;
    }

    /* Dropdown styles for mobile */
    .dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
}

/* Arrow icon styles */
.dropdown a i {
    display: inline-block;
    margin-left: 4px;
    transition: transform 0.3s ease;
    position: relative;
    font-size: 0.8em;
    transform: rotate(0deg);
    will-change: transform;
}

/* Arrow hover effect for desktop */
@media (min-width: 769px) {
    .dropdown a i {
        transform: rotate(0deg);
        transition: all 0.3s ease;
    }

    .dropdown:hover a i {
        transform: rotate(180deg);
        color: #2196f3;
    }
}

/* Mobile arrow styles */
@media (max-width: 768px) {
    .dropdown a i {
        margin-right: 0.5rem;
        transform: rotate(0deg);
        transition: transform 0.3s ease;
    }

    .dropdown.active a i {
        transform: rotate(180deg);
        color: #2196f3;
    }
} 