/* ============================================================================
   Masahati - shared site chrome: brand palette + header (navigation) + footer
   ----------------------------------------------------------------------------
   Self-contained: it does NOT depend on style.css variables, and it only styles
   the elements created by js/site-chrome.js (.site-header / .site-footer), so it
   cannot disturb page content or the planner layout. It is also the single source
   of the brand colour tokens (--m-*) reused by theme-pink.css.

   Contrast (WCAG AA): nav text #5A3D47 on #F1C9C0 = 6.3:1; active item white on
   #AD5C75 = 4.6:1; logo #6F3F50 on #F1C9C0 = 5.6:1; footer text #F6E7EC on #5A3D47 = 9.5:1, links #E6A9B8 = 4.9:1.
   ============================================================================ */

:root {
    --m-plum: #8F5868;          /* strong: headings, hover, pressed */
    --m-rose: #AD5C75;          /* primary actions / active item (AA with white text) */
    --m-pink: #C98298;          /* accents, borders */
    --m-pink-soft: #E6A9B8;     /* soft accents, header underline */
    --m-blush: #F1C9C0;         /* header surface */
    --m-blush-pale: #FBEFF3;    /* pale surfaces, footer */
    --m-cream: #FFF8FA;         /* page / panel background */
    --m-sand: #F3E9E4;
    --m-dusty: #D9A6A0;
    --m-mauve: #B98CA0;
    --m-text: #5A3D47;          /* dark warm mauve text */
    --m-brown: #5B4038;
}

/* ---------------------------------- Header ---------------------------------- */
.site-header {
    background: linear-gradient(90deg, #F6D6D3 0%, var(--m-blush) 100%);
    border-bottom: 1px solid var(--m-pink-soft);
    box-shadow: 0 2px 10px rgba(143, 88, 104, 0.12);
    color: var(--m-text);
    direction: rtl;
    font-family: inherit;
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: #6F3F50;
    text-decoration: none;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.site-logo:hover { color: var(--m-plum); }

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.site-nav__link {
    display: inline-block;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    color: var(--m-text);
    font-size: 0.97rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav__link:hover {
    background-color: rgba(173, 92, 117, 0.16);
    color: var(--m-plum);
}

.site-nav__link[aria-current="page"] {
    background-color: var(--m-rose);
    color: #ffffff;
}

.site-nav__link:focus-visible,
.site-logo:focus-visible,
.site-nav-toggle:focus-visible {
    outline: 3px solid var(--m-plum);
    outline-offset: 2px;
    border-radius: 8px;
}

.site-nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--m-rose);
    color: var(--m-plum);
    border-radius: 10px;
    padding: 0.35rem 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

@media (min-width: 861px) {
    .site-header { position: sticky; top: 0; z-index: 100; }
}

/* Small screens: the menu collapses behind a button and, when open, pushes the page down
   (it never overlays content). */
@media (max-width: 860px) {
    .site-nav-toggle { display: inline-block; }

    .site-nav { display: none; width: 100%; }
    .site-nav.is-open { display: block; }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        padding: 0.4rem 0 0.2rem;
    }

    .site-nav__link {
        display: block;
        padding: 0.7rem 0.9rem;       /* comfortable touch target */
        border-radius: 12px;
    }
}

/* ---------------------------------- Footer ---------------------------------- */
/* Dark plum footer with light-pink links - the same look the content pages already used. */
.site-footer {
    background: var(--m-text);
    border-top: 3px solid var(--m-pink);
    color: #F6E7EC;
    direction: rtl;
    padding: 1.6rem 1rem 1.8rem;
    margin-top: 0;                /* sits flush under the page content (no body-background band) */
    font-family: inherit;
    font-size: 0.95rem;
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    text-align: center;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 1.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer a {
    color: var(--m-pink-soft);
    font-weight: 600;
    text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; color: var(--m-blush); }

.site-footer a:focus-visible {
    outline: 3px solid var(--m-blush);
    outline-offset: 2px;
    border-radius: 6px;
}

.site-footer__copy,
.site-footer__contact { margin: 0; }

@media print { .site-header, .site-footer { display: none; } }
