/* Unified header and mobile navigation */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line, #e5e7eb);
}

.header-inner {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--green, #167336);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 20px;
}

.logo-title {
    display: block;
    font-weight: 900;
    font-size: 22px;
    line-height: 1.1;
}

.logo-subtitle {
    display: block;
    font-size: 13px;
    color: var(--muted, #6b7280);
    margin-top: 2px;
}

.desktop-nav {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13.5px;
    flex: 1 1 auto;
}

.desktop-nav a {
    white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--green, #167336);
}

.header-btn {
    background: var(--green, #167336);
    color: white;
    padding: 14px 20px;
    border-radius: 14px;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(22, 115, 54, .22);
    flex: 0 0 auto;
}

.mobile-menu-btn {
    display: none;
    border: 1px solid var(--line, #e5e7eb);
    background: white;
    color: var(--green, #167336);
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    background: white;
    border-top: 1px solid var(--line, #e5e7eb);
    padding: 12px 16px 18px;
}

.mobile-nav a {
    display: block;
    padding: 14px 12px;
    border-radius: 12px;
    font-weight: 800;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: #eef8f0;
}

.mobile-appeal {
    margin-top: 8px;
    background: var(--green, #167336);
    color: white !important;
    text-align: center;
}

@media (max-width: 980px) {
    .desktop-nav,
    .header-btn {
        display: none !important;
    }

    .mobile-menu-btn {
        display: grid;
        place-items: center;
    }

    body.menu-open .mobile-nav {
        display: block;
    }

    .header-inner {
        height: 72px;
    }
}

@media (max-width: 520px) {
    .logo-title {
        font-size: 18px;
    }

    .logo-subtitle {
        font-size: 12px;
    }

    .logo-mark {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }
}

/* Mobile menu fix */
.mobile-nav {
    display: none;
}

body.menu-open .mobile-nav {
    display: block !important;
}

@media (max-width: 980px) {
    .desktop-nav,
    .header-btn {
        display: none !important;
    }

    .mobile-menu-btn {
        display: grid !important;
        place-items: center;
    }
}

/* Force identical mobile menu button across all pages */
.mobile-menu-btn {
    display: none;
    border: 1px solid var(--line, #e5e7eb) !important;
    background: #ffffff !important;
    color: var(--green, #167336) !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    border-radius: 14px !important;
    font-size: 24px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 980px) {
    .mobile-menu-btn {
        display: grid !important;
        place-items: center !important;
    }

    .desktop-nav,
    .header-btn {
        display: none !important;
    }

    body.menu-open .mobile-nav {
        display: block !important;
    }
}

/* Unified footer */

.site-footer {
    background: #ffffff;
    border-top: 1px solid var(--line, #e5e7eb);
    color: var(--ink, #111827);
    padding: 44px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr .7fr .7fr 1fr;
    gap: 32px;
    align-items: start;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--green, #167336);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 20px;
}

.footer-logo strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
}

.footer-logo span:last-child {
    display: block;
    color: var(--muted, #6b7280);
    font-size: 13px;
    margin-top: 3px;
}

.footer-brand p,
.footer-col p {
    color: var(--muted, #6b7280);
    line-height: 1.6;
    margin: 0;
}

.footer-col h3 {
    margin: 0 0 14px;
    font-size: 16px;
}

.footer-col a {
    display: block;
    color: var(--muted, #6b7280);
    margin-bottom: 10px;
    font-weight: 700;
}

.footer-col a:hover {
    color: var(--green, #167336);
}

.footer-bottom {
    margin-top: 34px;
    border-top: 1px solid var(--line, #e5e7eb);
    padding: 18px 0;
    color: var(--muted, #6b7280);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

/* Header search link */

.search-top-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line, #e5e7eb);
    background: #ffffff;
    color: var(--green, #167336);
    font-weight: 900;
    font-size: 13.5px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.search-top-link:hover,
.search-top-link.active {
    background: #eef8f0;
    color: var(--green, #167336);
}

@media (max-width: 980px) {
    .search-top-link {
        display: none !important;
    }
}
