/* ===== PROFESSIONAL NAVIGATION - UserActive Style ===== */

/* Navigation Bar */
.main-nav {
    background: var(--white);
    padding: 0.75rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo/Brand */
.nav-brand {
    flex-shrink: 0;
}

.nav-brand a {
    display: block;
    line-height: 0;
}

.nav-brand img {
    height: 44px;
    width: auto;
    display: block;
}

.nav-brand svg {
    height: 44px;
    width: auto;
    display: block;
}

/* Main Navigation Links */
.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
}

.nav-links > a,
.nav-links > .nav-dropdown > .nav-dropdown-toggle {
    color: var(--deep-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-links > a:hover,
.nav-links > .nav-dropdown:hover > .nav-dropdown-toggle {
    background: rgba(27, 54, 93, 0.06);
    color: var(--deep-blue);
}

/* Dropdown Container */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Toggle Arrow */
.nav-dropdown-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.nav-dropdown:hover .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

/* Dropdown Menu - Clean Card Style */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.1);
    border-radius: 12px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    padding: 12px;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

/* Dropdown Menu Items with Icons & Descriptions */
.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: #f5f7fa;
}

.dropdown-item-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e8f4fd 0%, #d4e8f7 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.dropdown-item-content {
    flex: 1;
}

.dropdown-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--deep-blue);
    margin-bottom: 2px;
    display: block;
}

.dropdown-item-desc {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.4;
    display: block;
}

/* Mega Menu for Free Tools - Wide with Icons */
.nav-dropdown-menu.mega-menu {
    min-width: 720px !important;
    padding: 24px 28px !important;
    left: 50%;
    transform: translateX(-50%);
}

/* Override any conflicting styles for tools dropdown */
.nav-dropdown.tools-dropdown .nav-dropdown-menu.mega-menu {
    min-width: 720px !important;
    padding: 24px 28px !important;
}

.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.mega-menu-column h4 {
    color: var(--deep-blue);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-menu-column h4 .header-icon {
    font-size: 1rem;
    opacity: 0.8;
}

/* Menu Item with Icon */
.menu-item-with-icon {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin: 0 -12px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.menu-item-with-icon:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    transform: translateX(4px);
}

.menu-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.menu-item-with-icon:hover .menu-item-icon {
    transform: scale(1.08);
}

/* Icon Color Variants */
.menu-item-icon.calc-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.menu-item-icon.checklist-icon {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.menu-item-icon.guide-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.menu-item-content {
    flex: 1;
    min-width: 0;
}

.menu-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--deep-blue);
    margin-bottom: 4px;
    display: block;
    line-height: 1.3;
}

.menu-item-desc {
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.45;
    display: block;
}

/* Legacy simple links */
.mega-menu-column a:not(.menu-item-with-icon) {
    display: block;
    color: #374151;
    text-decoration: none;
    padding: 8px 12px;
    margin: 4px -12px;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.mega-menu-column a:not(.menu-item-with-icon):hover {
    background: #f5f7fa;
    color: var(--coral);
}

.mega-menu-column a.view-all {
    color: var(--coral);
    font-weight: 600;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mega-menu-column a.view-all::after {
    content: '→';
    transition: transform 0.2s ease;
}

.mega-menu-column a.view-all:hover::after {
    transform: translateX(4px);
}

/* CTA Button */
.nav-cta {
    background: var(--coral);
    color: white !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.25rem !important;
    border-radius: 8px !important;
    border: none !important;
    transition: all 0.2s ease !important;
    white-space: nowrap;
}

.nav-cta:hover {
    background: #e55a5a !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Tools Dropdown */
.tools-menu-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    gap: 5px;
}

.hamburger-menu span {
    width: 24px;
    height: 2px;
    background: var(--deep-blue);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Mobile Menu - Hidden by default on all screens */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    padding: 80px 24px 24px;
    overflow-y: auto;
    visibility: hidden;
}

.mobile-menu.active {
    right: 0;
    visibility: visible;
}

.mobile-menu > a {
    display: block;
    color: var(--deep-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid #e5e7eb;
    transition: color 0.2s ease;
}

.mobile-menu > a:hover {
    color: var(--coral);
}

/* Mobile Dropdown Toggles */
.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--deep-blue);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-dropdown-toggle:hover {
    color: var(--coral);
}

.mobile-dropdown-toggle::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--coral);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mobile-dropdown-toggle.active::after {
    content: '−';
    transform: rotate(90deg);
}

/* Mobile Submenu */
.mobile-submenu {
    display: none;
    padding: 8px 0 8px 16px;
    background: #fafbfc;
    margin: 0 -24px;
    padding-left: 40px;
    padding-right: 24px;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu a {
    display: block;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    transition: color 0.2s ease;
}

.mobile-submenu a:last-child {
    border-bottom: none;
}

.mobile-submenu a:hover {
    color: var(--coral);
}

/* Mobile Section Label */
.mobile-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin-bottom: 8px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-section-label:first-child {
    margin-top: 8px;
}

/* Mobile Item with Icon */
.mobile-item-with-icon {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 0 !important;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-item-icon {
    font-size: 1.25rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 8px;
    flex-shrink: 0;
}

.mobile-item-text {
    font-size: 0.95rem;
    color: #374151;
    flex: 1;
}

.mobile-item-with-icon:hover .mobile-item-text {
    color: var(--coral);
}

.mobile-view-all {
    display: block;
    color: var(--coral) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 14px 0 !important;
    margin-top: 8px;
    border-bottom: none !important;
}

/* Mobile Calculator Cards */
.mobile-calculator-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.mobile-calc-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, #1B365D 0%, #2a4a7a 100%);
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-calc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 54, 93, 0.3);
}

.mobile-calc-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.mobile-calc-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mobile-calc-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    word-break: break-word;
}

.mobile-calc-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    word-break: break-word;
    line-height: 1.3;
}

/* Mobile Nav Divider */
.mobile-nav-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0 16px;
}

/* Mobile CTA */
.mobile-cta {
    display: block;
    background: var(--coral);
    color: white !important;
    text-align: center;
    font-weight: 600;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 24px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.mobile-cta:hover {
    background: #e55a5a;
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-links {
        gap: 4px;
    }
    
    .nav-links > a,
    .nav-links > .nav-dropdown > .nav-dropdown-toggle {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .nav-dropdown-menu.mega-menu {
        min-width: 600px;
        padding: 20px;
    }
    
    .mega-menu-content {
        gap: 20px;
    }
    
    .menu-item-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .menu-item-with-icon {
        padding: 10px;
        gap: 10px;
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
}

@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
    }
}
