/* Navigation Enhancements */
.nav-link {
    display: inline-block;
    position: relative;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #4B5563;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    margin: 0 0.125rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #2563eb;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 70%;
}

.nav-link:hover, .nav-link.active {
    color: #2563eb;
}

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

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid #E5E7EB;
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #4B5563;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #F3F4F6;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #F9FAFB;
    color: #2563eb;
    padding-left: 1.25rem;
}

.dropdown-item i {
    width: 20px;
    margin-right: 0.5rem;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Mobile Menu Button */
#mobile-menu-button {
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px; /* iOS touch target minimum */
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-menu-button:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

#mobile-menu-button:active {
    transform: scale(0.95);
}

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.hidden {
    max-height: 0 !important;
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    font-weight: 500;
    color: #4B5563;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px; /* iOS touch target minimum */
    display: flex;
    align-items: center;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.mobile-nav-link.active {
    font-weight: 600;
}

/* Mobile Dropdown Styles */
.mobile-dropdown-toggle {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    width: 100%;
}

.mobile-dropdown-toggle:active {
    transform: scale(0.98);
}

.mobile-dropdown-content {
    transition: all 0.3s ease;
}

.mobile-dropdown-content.show {
    display: block !important;
}

.mobile-nav-sublink {
    display: block;
    padding: 0.75rem;
    color: #6B7280;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.mobile-nav-sublink:hover {
    background-color: rgba(37, 99, 235, 0.05);
    color: #2563eb;
    padding-left: 1rem;
}

.mobile-dropdown-arrow.rotate {
    transform: rotate(180deg);
}

/* Footer Enhancements */
.footer-link {
    color: #D1D5DB;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0.75rem;
}

.footer-link::before {
    content: '»';
    position: absolute;
    left: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #FFFFFF;
    padding-left: 1.5rem;
}

.footer-link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Social Icons */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    transform: scale(1);
    color: white;
}

.social-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Enhance mobile menu spacing */
#mobile-menu {
    margin-top: 1px;
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
}

/* Add spacing between nav and main content */
main {
    padding-top: 5rem;
}

/* Fix the merge issue between header and content */
#main-nav {
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}
