/* Header Component Styles */
.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    font-family: "Poppins", sans-serif;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header__nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
    z-index: 110;
}

.header__logo-text {
    color: var(--color-text-primary);
}

.header__logo-animated {
    position: relative;
    display: inline-block;
    min-width: 140px;
    /* Ensure enough space for both texts */
    height: 1.5em;
    /* Fixed height to prevent jumping */
}

.header__text-initial,
.header__text-final {
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
    transition: opacity 0.8s ease-in-out;
}

.header__text-initial {
    opacity: 1;
    animation: fadeToFinal 4s forwards;
}

.header__text-final {
    opacity: 0;
    animation: fadeFromInitial 4s forwards;
}

@keyframes fadeToFinal {

    0%,
    40% {
        opacity: 1;
    }

    60%,
    100% {
        opacity: 0;
    }
}

@keyframes fadeFromInitial {

    0%,
    40% {
        opacity: 0;
    }

    60%,
    100% {
        opacity: 1;
    }
}

.header__dot {
    color: #3b82f6;
    animation: pulse 2s infinite;
    font-weight: 900;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.header__nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.header__nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
}

.header__nav-link:hover {
    color: var(--color-accent);
}

/* Active state styles for navigation */
.header__nav-link--active {
    color: #007aff !important;
    background: rgba(0, 122, 255, 0.1) !important;
    font-weight: 600;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

.header__dropdown-toggle {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
}

.header__dropdown--active-section>.header__dropdown-toggle,
.header__dropdown-toggle--active {
    color: #007aff !important;
    background: rgba(0, 122, 255, 0.1) !important;
    font-weight: 600;
    border: 1px solid rgba(0, 122, 255, 0.3);
}

/* Dark theme active states */
[data-theme="dark"] .header__nav-link--active {
    color: #60a5fa !important;
    background: rgba(96, 165, 250, 0.1) !important;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .header__dropdown--active-section>.header__dropdown-toggle,
[data-theme="dark"] .header__dropdown-toggle--active {
    color: #60a5fa !important;
    background: rgba(96, 165, 250, 0.1) !important;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

/* Dropdown Styles */
.header__dropdown {
    position: relative;
}

.header__dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.header__dropdown-arrow {
    transition: transform 0.2s ease;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
}

.header__dropdown-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header__dropdown--active .header__dropdown-arrow {
    transform: rotate(180deg);
}

.header__dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(26, 27, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 200;
    backdrop-filter: blur(20px);
}

.header__dropdown--active .header__dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__dropdown-menu li {
    margin: 0;
}

.header__dropdown-menu-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.header__dropdown-menu-link:hover {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    border-left-color: #007aff;
}

.header__dropdown-menu-link--active {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    border-left-color: #007aff;
    font-weight: 600;
}

.header__auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__theme-toggle {
    background: #1e3a8a;
    border: none;
    border-radius: 0;
    padding: 0.5rem;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__theme-toggle:hover {
    background: #1e40af;
    transform: scale(1.05);
}

.header__theme-toggle .sun-icon {
    display: block;
}

.header__theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .header__theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .header__theme-toggle .moon-icon {
    display: block;
}

.header__signup-btn {
    background: transparent;
    color: #666;
    border: 1px solid #e5e7eb;
    padding: 0.6rem 1.5rem;
    border-radius: 0;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    margin-left: 0.5rem;
}

.header__signup-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.header__signup-btn--primary {
    background: linear-gradient(135deg, #007aff 0%, #0051d5 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.header__signup-btn--primary:hover {
    background: linear-gradient(135deg, #0051d5 0%, #003d99 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 30px rgba(0, 122, 255, 0.4);
    color: white;
}

[data-theme="dark"] .header__signup-btn {
    background: transparent;
    color: #9ca3af;
    border-color: #374151;
}

[data-theme="dark"] .header__signup-btn:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: #4b5563;
    color: #d1d5db;
}

/* Mobile Menu Styles */
.header__mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.header__mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #1f2937;
    /* Default dark color for light theme */
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Dark theme hamburger lines */
[data-theme="dark"] .header__mobile-menu-toggle span {
    background: #f9fafb;
}

.header__mobile-menu-toggle--active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__mobile-menu-toggle--active span:nth-child(2) {
    opacity: 0;
}

.header__mobile-menu-toggle--active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.header__mobile-menu {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 85vw);
    max-width: 90vw;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height for mobile browsers */
    background: var(--color-surface, #ffffff);
    z-index: 1000;
    padding: max(6rem, env(safe-area-inset-top) + 4rem) 1.5rem max(2rem, env(safe-area-inset-bottom) + 1rem);
    transform: translate3d(-100%, 0, 0);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    border-right: 1px solid var(--color-border, #e5e7eb);
    box-shadow: 2px 0 25px rgba(0, 0, 0, 0.15);
    will-change: transform;
    -webkit-overflow-scrolling: touch;
}

.header__mobile-menu--active {
    transform: translate3d(0, 0, 0);
}

/* Mobile menu overlay */
.header__mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    /* Dynamic viewport height */
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.header__mobile-overlay--active {
    opacity: 1;
}

.header__mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
}

.header__mobile-nav-links li {
    margin-bottom: 0;
}

.header__mobile-nav-link {
    color: var(--color-text-primary, #1f2937);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    display: block;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    margin: 0.25rem 0;
}

.header__mobile-nav-link:hover,
.header__mobile-nav-link:focus {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    outline: none;
}

.header__mobile-nav-link:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.header__mobile-nav-link--active {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
    border-radius: 12px;
    font-weight: 600;
    padding: 1rem;
    margin: 0.25rem 0;
}

.header__mobile-dropdown--active-section>.header__mobile-dropdown-toggle,
.header__mobile-dropdown-toggle--active {
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.08) !important;
    border-radius: 12px;
    font-weight: 600;
    padding: 1rem;
    margin: 0.25rem 0;
}

/* Mobile Dropdown Styles */
.header__mobile-dropdown {
    position: relative;
    margin-bottom: 0;
}

.header__mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: var(--color-text-primary, #1f2937);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    margin: 0.25rem 0;
}

.header__mobile-dropdown-toggle:hover,
.header__mobile-dropdown-toggle:focus {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    outline: none;
}

.header__mobile-dropdown-toggle:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.header__mobile-dropdown-arrow {
    display: none !important;
    transition: transform 0.2s ease;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
}

.header__mobile-dropdown-arrow:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header__mobile-dropdown--active .header__mobile-dropdown-arrow {
    transform: rotate(180deg);
}

.header__mobile-dropdown-menu {
    display: none !important;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 8px;
    margin-top: 0.5rem;
    border: 1px solid var(--color-border, #e5e7eb);
}

.header__mobile-dropdown--active .header__mobile-dropdown-menu {
    max-height: 400px;
}

.header__mobile-dropdown-menu li {
    margin: 0.125rem 0;
}

.header__mobile-dropdown-menu-link {
    color: #6b7280;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin: 0 0.5rem;
    text-decoration: none;
    font-weight: 500;
    display: block;
    transition: all 0.2s ease;
}

.header__mobile-dropdown-menu-link:hover,
.header__mobile-dropdown-menu-link:focus {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    outline: none;
}

.header__mobile-dropdown-menu-link:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.header__mobile-dropdown-menu-link--active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
    font-weight: 600;
}

/* Dark theme dropdown menu styles */
[data-theme="dark"] .header__mobile-dropdown-menu {
    background: rgba(31, 41, 55, 0.9);
    border-color: var(--color-border, #374151);
}

[data-theme="dark"] .header__mobile-dropdown-menu-link {
    color: #9ca3af;
}

[data-theme="dark"] .header__mobile-dropdown-menu-link:hover {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .header__mobile-dropdown-menu-link--active {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
}

.header__mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
}

.header__mobile-signup-btn {
    background: transparent;
    color: #666;
    border: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.header__mobile-signup-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.header__mobile-signup-btn--primary {
    background-color: #3b82f6;
    color: white;
    border: none;
    font-weight: 600;
}

.header__mobile-signup-btn--primary:hover {
    background-color: #2563eb;
    color: white;
}

[data-theme="dark"] .header__mobile-signup-btn {
    background: transparent;
    color: #9ca3af;
    border-color: #374151;
}

[data-theme="dark"] .header__mobile-signup-btn:hover {
    background: rgba(55, 65, 81, 0.5);
    border-color: #4b5563;
    color: #d1d5db;
}

/* Dark theme mobile menu styles */
[data-theme="dark"] .header__mobile-menu {
    background: var(--color-surface, #1f2937);
    border-right-color: var(--color-border, #374151);
}

[data-theme="dark"] .header__mobile-nav-link {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .header__mobile-nav-link:hover {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .header__mobile-nav-link--active {
    color: #60a5fa !important;
    background: rgba(96, 165, 250, 0.15) !important;
}

[data-theme="dark"] .header__mobile-dropdown-toggle {
    color: var(--color-text-primary, #f9fafb);
}

[data-theme="dark"] .header__mobile-dropdown-toggle:hover {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
}

[data-theme="dark"] .header__mobile-dropdown--active-section>.header__mobile-dropdown-toggle,
[data-theme="dark"] .header__mobile-dropdown-toggle--active {
    color: #60a5fa !important;
    background: rgba(96, 165, 250, 0.15) !important;
}

@media (max-width: 1024px) {
    .header__container {
        padding: 0 1.5rem;
    }

    .header__nav-links {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {

    .header__nav-links,
    .header__auth-buttons {
        display: none;
    }

    .header__mobile-menu-toggle {
        display: flex;
    }

    .header__mobile-menu {
        display: block !important;
    }

    .header__container {
        padding: 0 1rem;
    }

    .header__nav-content {
        padding: 0.75rem 0;
    }
}

@media (max-width: 480px) {
    .header__logo {
        font-size: 1.1rem;
    }

    .header__mobile-menu {
        width: min(280px, 90vw);
        padding: max(5rem, env(safe-area-inset-top) + 3rem) 1rem max(2rem, env(safe-area-inset-bottom) + 1rem);
    }

    .header__container {
        padding: 0 1rem;
    }

    .header__mobile-nav-link,
    .header__mobile-dropdown-toggle {
        font-size: 1rem;
        padding: 0.875rem 0.5rem;
        margin: 0 -0.5rem;
        min-height: 44px;
        /* Minimum touch target size */
    }

    .header__mobile-nav-link--active,
    .header__mobile-dropdown--active-section>.header__mobile-dropdown-toggle,
    .header__mobile-dropdown-toggle--active {
        padding: 0.875rem 0.5rem;
        margin: 0 -0.5rem;
        min-height: 44px;
    }

    .header__mobile-dropdown-menu-link {
        font-size: 0.9rem;
        padding: 0.625rem 0.75rem;
        margin: 0 0.25rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .header__mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .header__mobile-menu {
        width: min(260px, 95vw);
        padding: max(5rem, env(safe-area-inset-top) + 3rem) 0.75rem max(2rem, env(safe-area-inset-bottom) + 1rem);
    }

    .header__logo {
        font-size: 1rem;
    }

    .header__container {
        padding: 0 0.75rem;
    }
}/* Footer Component Styles */
.footer {
    background: #1a202c;
    color: #ffffff;
    margin-top: 0;
    padding: 4rem 0 2rem;
}

.footer__content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__logo {
    margin-bottom: 1.5rem;
}

.footer__logo span {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.5rem;
}

.footer__branding p {
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 300px;
}

.footer__social-links {
    display: flex;
    gap: 1rem;
}

.footer__social-link {
    color: #a0aec0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer__social-link:hover {
    color: #ffffff;
}

.footer__section-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer__section-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__section-item {
    margin-bottom: 0.75rem;
}

.footer__section-link {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.875rem;
}

.footer__section-link:hover {
    color: #ffffff;
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid #2d3748;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__bottom p {
    color: #a0aec0;
    margin: 0;
    font-size: 0.875rem;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
}

.footer__link {
    color: #a0aec0;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer__link:hover {
    color: #ffffff;
}

@media (max-width: 768px) {
    .footer {
        padding: 3rem 0 2rem;
    }

    .footer__content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 640px) {
    .footer__bottom {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}
