/* ==========================================================================
   Components - Reusable UI Elements
   ========================================================================== */

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    transition: all 0.4s var(--transition);
    cursor: pointer;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: none;
    font-family: var(--font-main);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-purple) 100%);
    color: #fff;
    box-shadow:
        0 4px 15px rgba(92, 164, 248, 0.3),
        0 0 30px rgba(139, 92, 246, 0.2);
    white-space: nowrap;
    animation: btn-pulse 3s ease-in-out infinite;
}

@keyframes btn-pulse {

    0%,
    100% {
        box-shadow:
            0 4px 15px rgba(92, 164, 248, 0.3),
            0 0 30px rgba(139, 92, 246, 0.2);
    }

    50% {
        box-shadow:
            0 4px 20px rgba(92, 164, 248, 0.4),
            0 0 40px rgba(139, 92, 246, 0.3);
    }
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6fb4ff 0%, #a78bfa 100%);
    box-shadow:
        0 0 40px rgba(92, 164, 248, 0.6),
        0 0 80px rgba(139, 92, 246, 0.4);
    transform: translateY(-3px) scale(1.02);
    animation: none;
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.01);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(92, 164, 248, 0.4);
    color: #fff;
    box-shadow: 0 0 15px rgba(92, 164, 248, 0.1);
}

.btn-outline:hover {
    border-color: var(--brand-blue);
    background: rgba(92, 164, 248, 0.1);
    box-shadow: 0 0 25px rgba(92, 164, 248, 0.3);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 12px 24px;
    font-size: 0.8rem;
}

/* --- HEADER & NAVIGATION --- */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: all 0.4s ease;
}

#header.scrolled {
    background: rgba(3, 4, 6, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-sm) 0;
}

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

.logo {
    font-family: var(--font-main);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: var(--brand-blue);
    display: flex;
    align-items: center;
    text-transform: uppercase;
}

.logo img {
    height: 32px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.nav-links a.active {
    color: var(--brand-blue);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    gap: 4px;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--brand-blue);
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: 2px;
}

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

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

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

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #030406;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.3s;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    visibility: hidden;
    opacity: 0;
}

.mobile-nav.active {
    transform: translateX(0);
    visibility: visible;
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0s;
}

.mobile-nav a {
    font-size: 1.5rem;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mobile-nav a:hover {
    color: var(--brand-blue);
}

/* --- CARDS --- */
.card {
    background: var(--surface-color);
    border: 1px solid var(--border-light);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    transition: all 0.5s var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    background: var(--surface-hover);
    transform: translateY(-8px);
    border-color: rgba(92, 164, 248, 0.3);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--brand-blue);
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    background: var(--brand-blue);
    color: #fff;
}

/* --- FAQ ACCORDION --- */
.faq-item {
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-md) 0;
    cursor: pointer;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    transition: color 0.3s ease;
}

.faq-item:hover .faq-question {
    color: var(--brand-blue);
}

.faq-item.active .faq-question {
    color: #fff;
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition:
        grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    line-height: 1.6;
    padding-top: 0;
}

.faq-answer>div,
.faq-answer>p {
    overflow: hidden;
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
    opacity: 1;
    padding-top: var(--space-sm);
}

.faq-toggle {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.5rem;
    color: var(--brand-blue);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

/* --- FOOTER --- */
footer {
    border-top: 1px solid var(--border-light);
    padding: var(--space-2xl) 0 var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.footer-grid h5 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-grid li {
    margin-bottom: 10px;
}

.footer-grid a:hover {
    color: var(--brand-blue);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* --- BACK TO TOP --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    transform: translateY(-5px);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    nav {
        position: relative;
        justify-content: center;
    }

    .nav-links {
        display: none;
    }

    .nav-actions {
        position: absolute;
        right: 0;
    }

    .nav-actions .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav .btn {
        font-size: 0.9rem;
        width: 80%;
        max-width: 300px;
        color: #000;
    }

    .mobile-nav .btn:hover {
        color: #fff;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        justify-content: center;
        text-align: center;
    }

    /* Mobile Performance */
    #header.scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(3, 4, 6, 0.95);
    }

    .back-to-top {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(3, 4, 6, 0.9);
    }

    .btn-primary {
        animation: none;
        box-shadow: 0 4px 15px rgba(92, 164, 248, 0.2);
    }
}