/* css/components.css - Navigation, Footer, Shared Components */

/* ===== HEADER & NAVIGATION ===== */

.site-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.97);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    padding: 0 var(--space-6);
    max-width: var(--container-2xl);
    margin: 0 auto;
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: var(--weight-bold);
    color: var(--color-primary-800);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.logo-accent {
    color: var(--color-secondary-600);
}

.logo-tagline {
    font-size: 0.55rem;
    color: var(--color-text-tertiary);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: var(--weight-medium);
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: var(--space-1);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.5rem 0.875rem;
    color: var(--color-text-secondary);
    font-weight: var(--weight-medium);
    font-size: var(--text-sm);
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--color-primary-700);
    background: var(--color-gray-50);
}

.nav-link.active {
    color: var(--color-primary-700);
    background: var(--color-primary-50);
    font-weight: var(--weight-semibold);
}

/* Nav CTA Button */
.nav-cta {
    padding: 0.5rem 1.25rem;
    background: var(--color-secondary-600);
    color: white;
    border-radius: 8px;
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--color-secondary-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 106, 44, 0.3);
    color: white;
}

/* ===== DROPDOWN STYLING - DESKTOP & MOBILE ===== */

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-family: var(--font-primary);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 100%;
}

.dropdown-toggle:hover {
    color: var(--color-primary-700);
    background: var(--color-gray-50);
}

.dropdown-toggle .dropdown-icon {
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

/* Desktop Dropdown */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--space-3);
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border-light);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu,
.dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu .dropdown-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 0.6rem 0.875rem;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    transition: all 0.2s ease;
}

.dropdown-menu .dropdown-link:hover {
    background: var(--color-gray-50);
    color: var(--color-primary-700);
}

.dropdown-menu .dropdown-link i {
    width: 18px;
    color: var(--color-secondary-500);
    font-size: 0.9rem;
}

.dropdown-menu .dropdown-link.active {
    color: var(--color-primary-700);
    background: var(--color-primary-50);
    font-weight: var(--weight-semibold);
}

/* ===== MOBILE DROPDOWN - ACCORDION STYLE ===== */

@media (max-width: 820px) {
    /* Reset dropdown position for mobile */
    .dropdown-menu {
        position: static !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        min-width: auto !important;
        width: 100% !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none !important;
        transition: none !important;
        overflow: hidden;
    }
    
    /* Show when parent is open */
    .nav-dropdown.open .dropdown-menu {
        display: block !important;
    }
    
    /* Mobile dropdown links - indented */
    .dropdown-menu .dropdown-link {
        padding: 0.75rem 1rem 0.75rem 2.5rem !important;
        font-size: var(--text-base) !important;
        border-radius: 8px !important;
        border-bottom: 1px solid var(--color-border-light);
        width: 100%;
    }
    
    .dropdown-menu .dropdown-link:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu .dropdown-link i {
        width: 20px;
        font-size: 1rem;
    }
    
    /* Mobile dropdown toggle - full width */
    .dropdown-toggle {
        padding: 0.75rem 1rem !important;
        font-size: var(--text-base) !important;
        width: 100%;
        justify-content: space-between;
        border-bottom: 1px solid var(--color-border-light);
    }
    
    .dropdown-toggle:hover {
        background: var(--color-gray-50);
    }
    
    /* Mobile dropdown icon - rotate animation */
    .dropdown-toggle .dropdown-icon {
        font-size: 0.7rem;
        transition: transform 0.3s ease;
    }
    
    .dropdown-toggle[aria-expanded="true"] .dropdown-icon {
        transform: rotate(180deg);
    }
    
    /* Mobile nav item adjustments */
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        font-size: var(--text-base) !important;
        border-radius: 8px !important;
        width: 100%;
        border-bottom: 1px solid var(--color-border-light);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Mobile nav links container */
    .nav-links {
        gap: 0 !important;
    }
    
    /* Mobile dropdown open state indicator */
    .nav-dropdown.open .dropdown-toggle {
        background: var(--color-gray-50);
    }
    
    /* Smooth height animation for dropdown */
    .dropdown-menu {
        transition: max-height 0.3s ease !important;
        max-height: 0 !important;
    }
    
    .nav-dropdown.open .dropdown-menu {
        max-height: 500px !important;
        transition: max-height 0.4s ease !important;
    }
}

/* Additional breakpoint for tablets */
@media (max-width: 1024px) and (min-width: 821px) {
    .nav-link {
        padding: 0.4rem 0.7rem;
        font-size: var(--text-xs);
    }
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-menu-btn:hover {
    background: var(--color-gray-50);
}

.mobile-menu-btn .hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 3px 0;
}

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

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

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

/* Responsive Navigation */
@media (max-width: 1024px) {
    .nav-links {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.4rem 0.7rem;
        font-size: var(--text-xs);
    }
}

@media (max-width: 820px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--space-4);
        gap: var(--space-2);
        border-top: 1px solid var(--color-border-light);
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link,
    .dropdown-toggle {
        padding: 0.8rem 1rem;
        font-size: var(--text-base);
        border-radius: 10px;
        width: 100%;
    }
    
    .dropdown-toggle {
        background: var(--color-gray-50);
        justify-content: space-between;
        color: var(--color-primary-800);
    }
    
    .nav-cta {
        display: none;
    }
    
    .dropdown-menu {
        position: static;
        transform: none;
        min-width: auto;
        box-shadow: none;
        border: 1px solid var(--color-border-light);
        border-radius: 10px;
        padding: var(--space-2) 0;
        opacity: 1;
        visibility: visible;
        display: none;
        background: rgba(248, 250, 252, 0.95);
        margin-top: 0.35rem;
    }
    
    .nav-dropdown.open .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu .dropdown-label {
        padding: 0.35rem 0.95rem 0.2rem;
    }
    
    .dropdown-menu .dropdown-link {
        padding: 0.7rem 0.95rem;
        margin: 0 0.25rem;
    }
    
    .dropdown-toggle .dropdown-icon {
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .header-content {
        height: 64px;
        padding: 0 var(--space-4);
    }
    
    .logo-text {
        font-size: 1.15rem;
    }
    
    .logo-tagline {
        font-size: 0.45rem;
    }
    
    .nav-links {
        top: 64px;
        max-height: calc(100vh - 64px);
    }
}

/* Focus states for accessibility */
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.nav-cta:focus-visible {
    outline: 2px solid var(--color-secondary-600);
    outline-offset: 2px;
}

/* ===== FOOTER ===== */

.site-footer.improved-footer {
    background: linear-gradient(135deg, var(--color-primary-800), var(--color-primary-900));
    padding: var(--space-16) 0 var(--space-6);
    position: relative;
    overflow: hidden;
    margin-top: var(--space-8);
    border-top: 4px solid var(--color-secondary-600);
}

.site-footer.improved-footer .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 2fr 1.5fr;
    gap: var(--space-8);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer.improved-footer .footer-brand {
    max-width: 320px;
}

.site-footer.improved-footer .footer-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin: var(--space-4) 0;
}

.site-footer.improved-footer .footer-trust-badges {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.site-footer.improved-footer .footer-trust-badges .trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.2rem 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.6);
}

.site-footer.improved-footer .footer-trust-badges .trust-badge i {
    color: var(--color-secondary-400);
}

.site-footer.improved-footer .footer-links-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.site-footer.improved-footer .footer-links h4 {
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.site-footer.improved-footer .footer-links ul {
    list-style: none;
    padding: 0;
}

.site-footer.improved-footer .footer-links ul li {
    margin-bottom: var(--space-2);
}

.site-footer.improved-footer .footer-links ul li a {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.site-footer.improved-footer .footer-links ul li a:hover {
    color: white;
    transform: translateX(4px);
}

.site-footer.improved-footer .footer-connect h4 {
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.site-footer.improved-footer .connect-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-sm);
}

.site-footer.improved-footer .connect-item i {
    width: 18px;
    color: var(--color-secondary-400);
    flex-shrink: 0;
}

.site-footer.improved-footer .connect-item a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer.improved-footer .connect-item a:hover {
    color: white;
}

.site-footer.improved-footer .footer-cta {
    display: inline-block;
    margin-top: var(--space-4);
    color: var(--color-secondary-400);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all 0.2s ease;
}

.site-footer.improved-footer .footer-cta:hover {
    color: white;
    transform: translateX(4px);
}

.site-footer.improved-footer .footer-social {
    display: flex;
    gap: var(--space-3);
}

.site-footer.improved-footer .footer-social .social-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.site-footer.improved-footer .footer-social .social-link:hover {
    background: var(--color-secondary-600);
    color: white;
    transform: translateY(-2px);
}

.site-footer.improved-footer .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-6);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.3);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.site-footer.improved-footer .footer-legal {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.site-footer.improved-footer .footer-legal a {
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer.improved-footer .footer-legal a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer.improved-footer .footer-legal .separator {
    color: rgba(255, 255, 255, 0.1);
}

/* Footer Responsive */
@media (max-width: 1024px) {
    .site-footer.improved-footer .footer-grid {
        grid-template-columns: 1fr 2fr;
        gap: var(--space-6);
    }
    
    .site-footer.improved-footer .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
    }
}

@media (max-width: 820px) {
    .site-footer.improved-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .site-footer.improved-footer .footer-links-group {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .site-footer.improved-footer {
        padding: var(--space-8) 0 var(--space-4);
    }
    
    .site-footer.improved-footer .footer-links-group {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .site-footer.improved-footer .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-2);
    }
    
    .site-footer.improved-footer .footer-legal {
        justify-content: center;
    }
}