/* CSS Variables */
:root {
    --sky-blue: #00c4ff;
    --sky-pink: #ff005e;
    --sky-green: #00ffb3;
    --sky-blue-light: rgba(0, 196, 255, 0.1);
    --sky-pink-light: rgba(255, 0, 94, 0.1);
    --sky-green-light: rgba(0, 255, 179, 0.1);
    --light-bg: #ffffff;
    --card-bg: #f8f9fa;
    --card-hover: #f1f3f4;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #9aa0a6;
    --border-light: #dadce0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Header Styles */
header {
    background-color: var(--light-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.03);
}

.logo span {
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink), var(--sky-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 15px;
    transform: translateX(-30px); /* force move left */
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--sky-blue);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink));
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 1002;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0; /* Changed from left: 0 to right: 0 */
    background: white;
    min-width: 800px;
    max-width: 90vw; /* Limit maximum width */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 20px;
    z-index: 1000;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.dropdown:hover .dropdown-content {
    display: grid;
}

.dropdown-section {
    display: flex;
    flex-direction: column;
}

.dropdown-section h4 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--sky-blue);
    padding-bottom: 5px;
}

.dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dropdown-column a {
    padding: 8px 12px;
    border-radius: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-column a:hover {
    background: var(--sky-blue-light);
    color: var(--text-primary);
}

/* Desktop Responsive */
@media (max-width: 900px) {
    .dropdown-content {
        min-width: 600px;
        grid-template-columns: repeat(2, 1fr);
        right: 0; /* Ensure it stays on the right */
    }
}

@media (max-width: 650px) {
    .dropdown-content {
        min-width: 300px;
        grid-template-columns: 1fr;
        right: 0; /* Ensure it stays on the right */
        left: auto; /* Reset left positioning */
    }
}


/* Footer Styles */
footer {
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 15px 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
}

.footer-logo span {
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink), var(--sky-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-links h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 8px;
}

.footer-links h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--sky-blue), var(--sky-pink));
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--sky-blue);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 15px;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.footer-legal a:hover {
    color: var(--sky-blue);
}

/* Mobile Responsive Styles for Header and Footer */
@media (max-width: 768px) {
    .header-container {
        padding: 0 10px;
        height: 60px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--light-bg);
        flex-direction: column;
        padding: 15px;
        box-shadow: var(--shadow-hover);
        border-top: 1px solid var(--border-light);
        gap: 0;
        max-height: 80vh;
        overflow-y: auto;
        z-index: 1001;
        box-sizing: border-box;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-light);
        display: block;
        width: 100%;
        font-size: 1rem;
        box-sizing: border-box;
    }
    
    .nav-links li:last-child a {
        border-bottom: none;
    }
    
    /* Improved Dropdown Styles for Mobile */
    .dropdown {
        position: relative;
        padding-left: 15px;
    }
    
    .dropdown > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-right: 0px;
        padding-left: 15px;
    }
    
    .dropdown > a::after {
        content: '▾';
        font-size: 1.2rem;
        transition: transform 0.3s ease;
    }
    
    .dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    /* Mobile Dropdown Content */
    .dropdown-content {
        display: none !important;
        position: static;
        background-color: var(--card-bg);
        margin: 10px 0 0 0;
        padding: 15px;
        box-shadow: none;
        border-radius: 8px;
        border: 1px solid var(--border-light);
        animation: slideDown 0.3s ease;
        width: 100%;
        box-sizing: border-box;
        grid-template-columns: 1fr !important;
        gap: 15px;
        min-width: unset !important;
    }
    
    .dropdown.active .dropdown-content {
        display: grid !important;
    }
    
    .dropdown-section h4 {
        font-size: 1.1rem;
        margin-bottom: 10px;
        color: var(--text-primary);
        border-bottom: 2px solid var(--sky-blue);
        padding-bottom: 5px;
    }
    
    .dropdown-column a {
        padding: 10px 15px;
        border-radius: 6px;
        margin-bottom: 5px;
        background: rgba(255, 255, 255, 0.7);
        border: 1px solid var(--border-light);
    }
    
    .dropdown-column a:hover {
        background: var(--sky-blue-light);
    }
    
    .auth-buttons {
        display: none;
        position: absolute;
        top: calc(100% + 60px);
        left: 0;
        width: 100%;
        background-color: var(--light-bg);
        flex-direction: column;
        padding: 15px;
        box-shadow: var(--shadow-hover);
        border-top: 1px solid var(--border-light);
        gap: 10px;
        z-index: 1001;
        box-sizing: border-box;
    }
    
    .auth-buttons.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Animation for dropdown */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .header-container {
        height: 55px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .nav-links {
        padding: 10px;
    }
    
    .auth-buttons {
        top: calc(100% + 50px);
        padding: 10px;
    }
    
    .footer-container {
        padding: 30px 15px 15px;
    }
    
    .dropdown-content {
        padding: 10px;
    }
    
    .dropdown-column a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Ensure dropdown content is properly positioned on very small screens */
    .dropdown-content {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
}