/* ========================================
   MODERN HEADER STYLES
   ======================================== */

/* Modern Header Container */
.modern-header {
    background: #f8f9fb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e5e7ef;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    background: #ffffff;
    border: 1px solid #e8ebf3;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Header Logo Section */
.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.header-logo .logo-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(102, 126, 234, 0.25);
    color: #fff;
}

.header-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2c3e50;
    margin: 0;
    letter-spacing: 0.2px;
}

/* Header Navigation */
.header-navigation {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    border: 2px solid #e7e9f1;
    border-radius: 10px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.nav-button:first-child {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(118, 75, 162, 0.25);
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    border-color: #d6daf0;
}

.nav-button:first-child:hover {
    box-shadow: 0 12px 24px rgba(118, 75, 162, 0.32);
}

.nav-button .nav-icon {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-logo {
        width: 100%;
        justify-content: center;
    }

    .header-navigation {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .header-logo .logo-text {
        font-size: 1.25rem;
    }

    .header-logo .logo-icon {
        font-size: 2rem;
    }
}

/* ========================================
   CALCULATOR DROPDOWN MENU
   ======================================== */

/* Dropdown Container */
.nav-dropdown {
    position: relative;
}

/* Calculator Dropdown */
.calculator-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
    padding: 1.5rem;
    min-width: 700px;
    display: none;
    z-index: 1001;
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #e7e9f1;
}

.calculator-dropdown.active {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    animation: dropdownSlide 0.3s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown Category */
.dropdown-category {
    border-left: 3px solid #667eea;
    padding-left: 1rem;
}

.dropdown-category h4 {
    font-size: 1rem;
    color: #2c3e50;
    margin: 0 0 0.75rem 0;
    font-weight: 800;
}

.dropdown-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dropdown-category li {
    margin-bottom: 0.5rem;
}

.dropdown-category a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-category a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.25);
}

/* Dropdown Overlay */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

.dropdown-overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 992px) {
    .calculator-dropdown {
        min-width: 500px;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .calculator-dropdown {
        min-width: 90vw;
        grid-template-columns: 1fr;
        left: 50%;
        transform: translateX(-50%);
        max-height: 60vh;
    }

    .calculator-dropdown.active {
        transform: translateX(-50%);
    }
}

/* ========================================
   CATEGORY DROPDOWN MENU
   ======================================== */

/* Category Dropdown */
.category-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.12);
    padding: 1rem;
    min-width: 500px;
    display: none;
    z-index: 1001;
    max-height: 70vh;
    overflow-y: auto;
    border: 1px solid #e7e9f1;
}

.category-dropdown.active {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    animation: dropdownSlide 0.3s ease;
}

/* Category Item Cards */
.category-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #e7e9f1;
    text-decoration: none;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.category-item:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.08) 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 22px rgba(102, 126, 234, 0.18);
}

.category-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 10px 18px rgba(102, 126, 234, 0.25);
    color: #fff;
}

.category-info h4 {
    font-size: 1rem;
    color: #2c3e50;
    margin: 0 0 0.25rem 0;
    font-weight: 800;
}

.category-info p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

/* Responsive for categories */
@media (max-width: 768px) {
    .category-dropdown {
        min-width: 90vw;
        grid-template-columns: 1fr;
        left: 50%;
        transform: translateX(-50%);
    }

    .category-dropdown.active {
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .header-navigation {
        flex-direction: column;
        width: 100%;
    }

    .nav-button {
        width: 100%;
        justify-content: center;
    }
}