/*
 * LTF site shell: the ONE header and footer for every static page (and the WordPress
 * home/404 templates). Current site look: blue wordmark + mascot, Blog / Thai Course /
 * Login, dark footer with Privacy / Terms / Return to Top.
 * Safe on any page: every rule is scoped to .site-header / .site-footer / .skip-link and
 * resets the element styles old pages set globally, so page CSS cannot move it.
 * Loaded once per page by includes/site-header.php and site-footer.php.
 */

:root {
    --ltf-blue: #3b82f6;
    --ltf-blue-dark: #1d4ed8;
    --ltf-gray: #6b7280;
    --ltf-ink: #1f2937;
    --ltf-rule: #e5e7eb;
    --ltf-footer-bg: #1e293b;
    --ltf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ltf-header-h: 64px;
}

/* The one global rule: a few old pages keep the browser's default 8px body margin, which
   would inset the header. Every other page already sets body { margin: 0 }. */
body { margin: 0; }

/* ---------- isolation: old page styles must not reach the shell ---------- */

.site-header, .site-footer, .site-header *, .site-footer * {
    box-sizing: border-box;
    font-family: var(--ltf-font);
    letter-spacing: normal; text-transform: none; text-shadow: none;
}
.site-header a, .site-footer a { text-decoration: none; border: 0; background: none; box-shadow: none; }
.site-header nav, .site-header ul, .site-header li, .site-footer ul, .site-footer li, .site-footer p, .site-footer nav {
    margin: 0; padding: 0; border: 0; list-style: none; text-align: left; float: none;
}
.site-header img, .site-footer img { display: block; max-width: none; margin: 0; border: 0; box-shadow: none; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; color: var(--ltf-blue-dark); padding: 8px 12px; font: 600 14px var(--ltf-font); }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- header ---------- */

.site-header {
    position: sticky; top: 0; z-index: 100;
    width: 100%; margin: 0; padding: 0;
    background: #ffffff; border-bottom: 1px solid var(--ltf-rule);
    line-height: 1.2;
}
.site-header__inner {
    position: relative;
    max-width: 1152px; height: var(--ltf-header-h); margin: 0 auto; padding: 0 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-brand {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    color: var(--ltf-blue); font-size: 18px; font-weight: 600; white-space: nowrap;
}
.site-header a.site-brand:hover { color: var(--ltf-blue-dark); }
.site-brand img { width: 28px; height: 44px; flex: none; }
.site-header .site-nav { display: flex; align-items: center; gap: 24px; }
.site-header .site-nav a { color: var(--ltf-gray); font-size: 14px; font-weight: 500; }
.site-header .site-nav a:hover { color: var(--ltf-blue); }
.site-header .site-nav a.site-nav__cta { background: var(--ltf-blue); color: #fff; font-weight: 600; padding: 8px 16px; border-radius: 6px; }
.site-header .site-nav a.site-nav__cta:hover { background: var(--ltf-blue-dark); color: #fff; }
.site-header .site-nav a.site-nav__login { font-weight: 400; }
.site-menu-toggle {
    display: none; margin: 0; padding: 4px 8px; border: 0; background: none; cursor: pointer;
    color: var(--ltf-ink); font-size: 24px; line-height: 1; font-family: var(--ltf-font);
}

/* Logo-only header (sales page, funnel pages): centred, like the pages it sits on. */
.site-header--minimal .site-header__inner { justify-content: center; }

@media (max-width: 768px) {
    .site-header__inner { padding: 0 16px; }
    .site-brand { font-size: 17px; }
    .site-menu-toggle { display: block; }
    .site-header .site-nav {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--ltf-rule); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 8px 16px 16px;
    }
    .site-header .site-nav.is-open { display: flex; }
    .site-header .site-nav a { padding: 12px 0; font-size: 16px; }
    .site-header .site-nav a.site-nav__cta { margin-top: 8px; text-align: center; padding: 12px 16px; }
}
@media (max-width: 360px) { .site-brand { font-size: 15px; } }

/* ---------- footer ---------- */

.site-footer {
    width: 100%; margin: 0; padding: 0;
    background: var(--ltf-footer-bg); color: #e5e7eb; line-height: 1.5;
}
.site-footer__inner { max-width: 1152px; margin: 0 auto; padding: 28px 16px 20px; text-align: center; }
.site-footer .site-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 0 0 14px; }
.site-footer .site-footer__links a { color: #fff; font-size: 15px; }
.site-footer .site-footer__links a:hover { color: #93c5fd; text-decoration: underline; }
.site-footer p.site-footer__copy { margin: 0; text-align: center; color: #cbd5e1; font-size: 14px; }
@media (max-width: 768px) {
    .site-footer__inner { padding: 24px 16px 18px; }
    .site-footer .site-footer__links { gap: 10px 20px; }
}
