/* ============================================================
   EvolveWP Global Components CSS
   ============================================================ */

/* ---- Header ---- */
.header {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 100;
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(12px);
    border-block-end: 1px solid var(--color-border);
    height: 64px;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.2s;
}

.header__logo:hover {
    opacity: 0.8;
}

.header__logo-icon {
    font-size: 1.4rem;
}

.header__logo-text {
    letter-spacing: -0.5px;
}

/* Desktop Navigation */
.header__nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__nav li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.header__nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.header__nav-link:hover {
    color: var(--color-text);
}

.header__nav-link.is-active {
    color: var(--color-primary-light);
    font-weight: 600;
}

.header__nav-link.is-active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary-light);
    border-radius: 1px;
}

/* Mobile Menu Toggle */
.header__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s;
}

.header__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.header__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.header__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Menu */
.header__mobile-menu {
    display: none;
    position: absolute;
    top: 64px;
    inset-inline: 0;
    background: var(--color-bg);
    border-block-end: 1px solid var(--color-border);
    padding: 1.5rem;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
}

.header__mobile-menu.is-open {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header__mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.header__mobile-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.header__mobile-link {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.header__mobile-link:hover {
    color: var(--color-text);
}

/* Responsive: Show mobile menu toggle */
@media (max-width: 768px) {
    .header__toggle {
        display: flex;
    }

    .header__nav {
        display: none;
    }
}

/* ---- Footer ---- */
.footer {
    background: var(--color-bg-alt);
    border-block-start: 1px solid var(--color-border);
    padding-block-start: 4rem;
    margin-block-start: 3rem;
    font-size: 0.85rem;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-block-end: 2rem;
}

.footer__brand {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.footer__logo {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.footer__title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    color: var(--color-text);
}

.footer__tagline {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0 0 0;
}

/* Footer Grid */
.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
}

.footer__col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer__col li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer__col-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem 0;
}

.footer__col a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-block;
}

.footer__col a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

/* Footer Bottom */
.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-block-start: 1px solid var(--color-border);
    padding-block-start: 2rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.footer__copyright {
    margin: 0;
}

.footer__copyright a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer__copyright a:hover {
    color: var(--color-text);
}

/* Footer Social Links */
.footer__social {
    display: flex;
    gap: 1.5rem;
}

.footer__social-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer__social-link:hover {
    color: var(--color-primary-light);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer__inner {
        gap: 2rem;
    }

    .footer__grid {
        gap: 1.5rem;
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer__social {
        justify-content: center;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .header__nav-link,
    .header__toggle span,
    .header__mobile-link,
    .footer__col a,
    .footer__social-link {
        transition: none;
    }

    @keyframes slideDown {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* Focus states */
.header__nav-link:focus-visible,
.header__mobile-link:focus-visible,
.footer__col a:focus-visible,
.footer__social-link:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
    border-radius: 2px;
}

.header__toggle:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
}
