/*
Theme Name: DeJoy Wos Foundation
Author: Forcefield Web Development
Author URI: https://forcefieldnc.com
Version: 1.0
Description: Custom theme for the Louis DeJoy and Aldona Wos Family Foundation, built on Forcefield Stratum
*/

/* ── Fonts ──
   font-display: optional with the preload in functions.php: the font is used
   when it arrives in time and never swaps mid-load, so headings don't reflow. */
@font-face {
    font-family: 'Gothic A1';
    src: url('fonts/GothicA1-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}
@font-face {
    font-family: 'Gothic A1';
    src: url('fonts/GothicA1-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: optional;
}
@font-face {
    font-family: 'Spectral';
    src: url('fonts/Spectral-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: optional;
}
@font-face {
    font-family: 'Spectral';
    src: url('fonts/Spectral-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: optional;
}

:root {
    --blue: #02528a;
    --blue-dark: #013e6b;
    --footer: #444444;
    --light: #f8f8f8;
    --line: #cccccc;
    --text: #333333;
    --heading: #222222;
    --serif: 'Spectral', Georgia, 'Times New Roman', serif;
    --sans: 'Gothic A1', Arial, Helvetica, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; }

/* ── Base ── */
html {
    /* No elastic overscroll bounce above the sticky header; the background
       matches the header so any gap on older browsers blends. */
    overscroll-behavior-y: none;
    background: #02528a;
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.75;
    color: var(--text);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.2;
    color: var(--heading);
}

h1 { font-size: 37px; }
h2 { font-size: 30px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }

p + p { margin-top: 1em; }

a:hover { text-decoration: none; }

/* ── Layout ── */
.ff-container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
}

.ff-section { padding: 54px 0; }

/* ── Buttons ──
   .button and .more-link cover links typed into page content. */
.ff-btn,
.entry-content a.button,
.more-link {
    display: inline-block;
    background: var(--blue);
    color: #fff;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    padding: 10px 20px;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color .2s ease;
}

.ff-btn:hover,
.ff-btn:focus-visible,
.entry-content a.button:hover,
.more-link:hover {
    background: var(--blue-dark);
    color: #fff;
}

.ff-btn-wide,
.entry-content a.button.wide {
    min-width: 420px;
}

.entry-content a.button.white {
    background: #fff;
    color: var(--blue);
}

.entry-content a.button.white:hover {
    background: var(--light);
}

/* ── Skip link / accessibility ── */
.ff-skip-link,
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal;
}
.ff-skip-link:focus {
    clip: auto;
    display: block;
    height: auto;
    width: auto;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 100000;
    padding: 15px 23px;
    background: #fff;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, .6);
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--blue);
    border-bottom: 2px solid var(--line);
    padding: 20px 0;
    transition: padding .2s ease;
}

.site-header.is-scrolled { padding: 8px 0; }

.header-container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo-wrap { display: block; flex: 0 0 auto; }

.logo-primary {
    width: 200px;
    height: auto;
    transition: width .2s ease;
}

.site-header.is-scrolled .logo-primary { width: 150px; }

.logo-text {
    color: #fff;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 24px;
}

.main-nav a {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease, opacity .2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible { opacity: .75; }

.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_parent > a { border-bottom-color: #fff; }

/* Hamburger and drawer: hidden until the 768px breakpoint. */
.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: none;
    border: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.hamburger span {
    display: block;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.hamburger.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: #fff;
    border-left: 3px solid var(--blue);
    padding: 70px 30px 30px;
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 1100;
    overflow-y: auto;
}

.mobile-drawer.is-open { transform: translateX(0); }

.drawer-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 44px;
    height: 44px;
    background: none;
    border: 0;
    color: var(--blue);
    font-size: 22px;
    cursor: pointer;
}

.drawer-nav a {
    display: block;
    color: var(--blue);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid #e6e6e6;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 82, 138, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 1050;
}

.drawer-overlay.is-open { opacity: 1; visibility: visible; }

/* ── Footer ── */
#footer {
    background: var(--footer);
    color: #fff;
    font-size: 12px;
    line-height: 1.7;
    padding: 20px 0;
}

.footer-inner {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-copy a { color: #fff; text-decoration: none; }
.footer-copy a:hover { text-decoration: underline; }
.footer-sep { margin: 0 8px; }

.footer-logo { flex: 0 0 auto; }
.footer-logo img { width: 100px; height: auto; }

/* ── Content typography (page, post and philanthropy bodies) ── */
.entry-content > * + * { margin-top: 1em; }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 1.4em; }
.entry-content h2:first-child, .entry-content h3:first-child { margin-top: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content ul ul, .entry-content ol ul { list-style: circle; margin-top: .3em; }
.entry-content li + li { margin-top: .3em; }
.entry-content a { color: var(--blue); }
.entry-content strong { font-weight: 700; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.entry-content blockquote { border-left: 4px solid var(--blue); padding-left: 20px; font-style: italic; }
.entry-content img { height: auto; }
.entry-content .alignright { float: right; margin: 0 0 1em 1.5em; }
.entry-content .alignleft { float: left; margin: 0 1.5em 1em 0; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content::after { content: ''; display: table; clear: both; }
.entry-content iframe { max-width: 100%; }
.entry-content iframe[src*="youtube"],
.entry-content iframe[src*="vimeo"] {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

/* ── Pagination ── */
.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 3px;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.pagination .page-numbers.dots { border: 0; }

/* ── 404 ── */
.error-404 { padding: 80px 0; text-align: center; }
.error-404 p { margin: 16px 0 28px; }

/* ── Responsive ── */
@media (max-width: 1200px) {
    .header-container { flex-direction: column; gap: 12px; }
    .main-nav { justify-content: center; gap: 2px 18px; }
    .main-nav a { font-size: 13px; }
    .ff-btn-wide, .entry-content a.button.wide { min-width: 0; }
}

@media (max-width: 768px) {
    h1 { font-size: 30px; }
    h2 { font-size: 26px; }
    h3 { font-size: 21px; }
    .ff-section { padding: 40px 0; }

    .site-header { padding: 14px 0; }
    .header-container { flex-direction: row; }
    .logo-primary { width: 160px; }
    #site-navigation { display: none; }
    .hamburger { display: flex; }

    .footer-inner { flex-direction: column; text-align: center; gap: 16px; }
    .entry-content .alignright, .entry-content .alignleft { float: none; margin: 0 0 1em; }
}

@media (max-width: 480px) {
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    .logo-primary { width: 130px; }
    .ff-btn, .entry-content a.button { display: block; }
}
