/* ============================================================
   GLOBAL.CSS — Therapy Moms
   Shared across every page. Includes navbar + base resets.
   ============================================================ */

:root {
    /* ── Nav tokens ── */
    --nav-bg:               #ede8f5;
    --nav-border-accent:    rgba(81, 41, 116, 0.12);
    --nav-divider:          rgba(81, 41, 116, 0.2);

    --link-color:           #4a2468;
    --link-hover-color:     #2e1340;
    --link-hover-bg:        rgba(81, 41, 116, 0.1);

    --dropdown-bg:          #f5f1fb;
    --dropdown-border:      rgba(81, 41, 116, 0.2);
    --dropdown-shadow:      rgba(81, 41, 116, 0.15);

    --donate-bg:            #512974;
    --donate-bg-hover:      #3d1d57;
    --donate-text:          white;
    --donate-ring:          #3d1d57;
    --donate-ring-hover:    white;
    --donate-shadow:        rgba(221, 137, 175, 0.3);
    --donate-shadow-hover:  rgba(221, 137, 175, 0.45);
    --donate-mobile-shadow: rgba(221, 137, 175, 0.3);
    --mobile-sub-bg:        rgba(221, 137, 175, 0.3);
    --mobile-sub-bg-hover:  rgba(221, 137, 175, 0.45);

    --logo-height:          74px;
    --nav-height:           88px;
    --nav-font:             Georgia, serif;

    /* ── Layout tokens (used by all pages) ── */
    --page-pad-h:           clamp(1.5rem, 4vw, 3rem);
    --content-max-w:        1100px;
}

/* ── Base reset ─────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-body);
    background: var(--bg-white);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================================
   NAVBAR
   ============================================================ */

nav#navbar {
    position: sticky;
    top: 0;
    background: var(--nav-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--page-pad-h);
    height: var(--nav-height);
    font-family: var(--nav-font);
    width: 100%;
    z-index: 100;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

nav#navbar.scrolled {
    box-shadow: 0 2px 12px var(--nav-border-accent);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--content-max-w);
    margin: 0 auto;
}

.nav-logo-wrap {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo {
    height: var(--logo-height);
    width: auto;
    display: block;
}

/* ── Desktop links ─────────────────────────────────── */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    flex-wrap: nowrap;
}

.nav-links > li > a {
    color: var(--link-color);
    text-decoration: none;
    font-size: clamp(13px, 1.3vw, 16px);
    font-weight: 400;
    padding: 8px clamp(8px, 1.1vw, 16px);
    border-radius: 6px;
    display: block;
    transition: color 0.18s, background 0.18s;
    white-space: nowrap;
}

.nav-links > li > a:hover {
    color: var(--link-hover-color);
    background: var(--link-hover-bg);
}

/* ── Donate button ─────────────────────────────────── */
.donate-btn {
    background: var(--donate-bg) !important;
    color: var(--donate-text) !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    padding: 10px clamp(14px, 1.8vw, 22px) !important;
    margin-left: 8px !important;
    box-shadow: 0 0 0 1.5px var(--donate-ring), 0 4px 16px var(--donate-shadow) !important;
    letter-spacing: 0.03em;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s !important;
}

.donate-btn:hover {
    background: var(--donate-bg-hover) !important;
    color: var(--donate-text) !important;
    box-shadow: 0 0 0 2px var(--donate-ring-hover), 0 6px 22px var(--donate-shadow-hover) !important;
    transform: translateY(-1px);
}

.donate-btn:active { transform: translateY(0); }

/* ── Divider pipe ──────────────────────────────────── */
.divider {
    width: 1px;
    height: 20px;
    background: var(--nav-divider);
    margin: 0 6px;
    flex-shrink: 0;
}

/* ── Dropdown ──────────────────────────────────────── */
.dropdown { position: relative; }

.dropdown > a { cursor: default; }

.dropdown > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 6px;
    vertical-align: 2px;
    opacity: 0.6;
}

/* Bridge gap so dropdown doesn't close when moving cursor down */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--dropdown-bg);
    border: 0.5px solid var(--dropdown-border);
    border-radius: 10px;
    padding: 6px;
    min-width: 200px;
    z-index: 100;
    box-shadow: 0 8px 28px var(--dropdown-shadow);
}

.dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu a {
    display: block;
    font-size: 14px;
    color: var(--link-color);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    color: var(--link-hover-color);
    background: var(--link-hover-bg);
}

/* ── Hamburger ─────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--link-color);
    border-radius: 2px;
    transition: all 0.25s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile menu ───────────────────────────────────── */
.mobile-menu {
    display: none;
    position: sticky;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-top: 0.5px solid var(--nav-border-accent);
    padding: 10px var(--page-pad-h) 22px;
    z-index: 200;
    flex-direction: column;
    gap: 2px;
}

.mobile-menu.open { display: flex; }

.mobile-menu > a,
.mobile-accordion > .mobile-acc-trigger {
    color: var(--link-color);
    text-decoration: none;
    font-size: 16px;
    padding: 11px 14px;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    display: block;
}

.mobile-menu > a:hover,
.mobile-accordion > .mobile-acc-trigger:hover {
    background: var(--mobile-sub-bg-hover);
    color: var(--link-hover-color);
}

.mobile-acc-trigger {
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.mobile-acc-trigger .acc-arrow {
    width: 7px;
    height: 7px;
    border-right: 2px solid var(--link-color);
    border-bottom: 2px solid var(--link-color);
    transform: rotate(45deg);
    transition: transform 0.25s;
    flex-shrink: 0;
    margin-left: 8px;
}

.mobile-accordion.open .mobile-acc-trigger .acc-arrow {
    transform: rotate(-135deg);
}

.mobile-acc-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-accordion.open .mobile-acc-items {
    max-height: 300px;
}

.mobile-acc-items a {
    display: block;
    color: var(--link-color);
    text-decoration: none;
    font-size: 14.5px;
    padding: 10px 14px 10px 28px;
    border-radius: 6px;
    background: var(--mobile-sub-bg);
    margin: 2px 0;
    transition: background 0.15s, color 0.15s;
}

.mobile-acc-items a:hover {
    background: var(--mobile-sub-bg-hover);
    color: var(--link-hover-color);
}

.mobile-donate {
    margin-top: 12px;
    background: var(--donate-bg) !important;
    color: var(--donate-text) !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    text-align: center;
    box-shadow: 0 4px 16px var(--donate-mobile-shadow);
    font-size: 16px !important;
}

.mobile-donate:hover {
    background: var(--donate-bg-hover) !important;
}

/* ── Breakpoint: collapse to hamburger ─────────────── */
@media (max-width: 820px) {
    .nav-links   { display: none; }
    .hamburger   { display: flex; }
}

/* ============================================================
   FOOTER
   Shared across every page — include this file and drop in
   the footer HTML and it will look correct automatically.
   ============================================================ */

footer {
    background: var(--text-dark, #1a0c2e);
    color: rgba(255,255,255,0.6);
    padding: 3rem var(--page-pad-h) 2rem;

    flex: 1;
    min-height: fit-content;
}

.footer-inner {
    max-width: var(--content-max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Logo in original brand colors — no filter applied */
footer img.footer-logo {
    height: 48px;
    width: auto;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.18s;
}

.footer-nav a:hover {
    color: rgba(255,255,255,0.9);
}
.footer-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    opacity: 0.55;
    transition: opacity 0.18s;
    text-decoration: none;
}

.footer-social a:hover { opacity: 1; }

.footer-social svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.footer-social a[href^="mailto"] {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

.footer-social a[href^="mailto"]:hover {
    color: rgba(255, 255, 255, 0.9);
}

.footer-bottom {
    max-width: var(--content-max-w);
    margin: 1.5rem auto 0;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* ── Footer responsive ─────────────────────────────── */
@media (max-width: 960px) {
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.25rem;
        justify-items: center;
    }
    .footer-logo  { order: -1; }
    .footer-nav   { justify-content: center; }
    .footer-social {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
}