/* ──────────────────────────────────────────────────────────────────────────
   Encounter Theme — base styles
   Colors/fonts are deliberately minimal here; per-site colors are injected
   as CSS custom properties via wp_add_inline_style() (see functions.php).
   ────────────────────────────────────────────────────────────────────────── */

:root {
    --enc-primary:   #2271b1;
    --enc-secondary: #b12278;
    --enc-text:      #1f2937;
    --enc-muted:     #6b7280;
    --enc-border:    #e5e7eb;
    --enc-bg-muted:  #f8f9fb;
    --enc-radius:    10px;
    --enc-font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --enc-font-serif: Georgia, "Times New Roman", serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--enc-font);
    color: var(--enc-text);
    line-height: 1.6;
    background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--enc-primary); }
h1, h2, h3, h4 { font-family: var(--enc-font-serif); line-height: 1.2; margin: 0 0 .5em; color: var(--enc-text); }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
button { font-family: inherit; }

.screen-reader-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link:focus {
    position: fixed; top: 8px; left: 8px; z-index: 999999;
    width: auto; height: auto; padding: 12px 20px; clip: auto;
    background: #fff; color: var(--enc-text); border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.2);
}

/* ── Layout utilities ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }
.section { padding: 64px 0; }
.section--muted { background: var(--enc-bg-muted); }
.text-center { text-align: center; }
.section-heading { font-size: 2rem; margin-bottom: 8px; }
.section-heading.text-center { text-align: center; }

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn--primary { background: var(--enc-primary); color: #fff; }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.15); color: #fff; }
.btn--secondary { background: transparent; border-color: var(--enc-primary); color: var(--enc-primary); }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }

/* ── Header ── */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--enc-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
}
.site-branding .custom-logo { max-height: 56px; width: auto; }
.site-title-link { text-decoration: none; }
.site-title { font-family: var(--enc-font-serif); font-size: 1.4rem; font-weight: 700; color: var(--enc-text); }

.main-nav .nav-menu {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.main-nav .nav-menu a {
    color: var(--enc-text);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .02em;
}
.main-nav .nav-menu a:hover { color: var(--enc-primary); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
}
.nav-toggle__bar { width: 24px; height: 2px; background: var(--enc-text); border-radius: 2px; }

@media (max-width: 780px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: #fff;
        border-bottom: 1px solid var(--enc-border);
        padding: 16px 24px;
    }
    .main-nav.is-open { display: block; }
    .main-nav .nav-menu { flex-direction: column; gap: 16px; }
}

/* ── Hero ── */
.encounter-hero {
    background: linear-gradient(180deg, rgba(15,23,42,.65), rgba(15,23,42,.75)), var(--enc-primary);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-align: center;
}
.encounter-hero__inner { max-width: 720px; margin: 0 auto; }
.encounter-hero .eyebrow {
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255,255,255,.15);
    border-radius: 20px;
    padding: 6px 16px;
    margin-bottom: 20px;
}
.encounter-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: .01em;
}
.encounter-hero__subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,.9);
    margin-bottom: 32px;
}
.encounter-hero .btn--primary { background: #fff; color: var(--enc-primary); }
.encounter-hero .btn--primary:hover { color: var(--enc-primary); }

/* ── Front page content (optional page-editor content above the fold) ── */
.front-page-content { max-width: 760px; margin: 0 auto; }

/* ── Upcoming Encounters — complements the plugin's own .er-encounter-list ── */
.empty-state {
    text-align: center;
    color: var(--enc-muted);
    font-style: italic;
    padding: 40px 20px;
}

/* ── Our Purpose ── */
.purpose-reference {
    font-weight: 700;
    color: var(--enc-primary);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .85rem;
    margin-bottom: 16px;
}
.purpose-body { font-size: 1.15rem; line-height: 1.8; font-style: italic; color: var(--enc-text); }

/* ── Our Goals ── */
.goals-intro { font-weight: 700; margin-bottom: 16px; }
.goals-list {
    list-style: none;
    padding: 0;
    display: inline-grid;
    gap: 12px;
    text-align: left;
    max-width: 560px;
}
.goals-list li {
    position: relative;
    padding-left: 32px;
    line-height: 1.5;
}
.goals-list li::before {
    content: "";
    position: absolute;
    left: 0; top: 6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--enc-primary);
}
.goals-list li::after {
    content: "";
    position: absolute;
    left: 6px; top: 10px;
    width: 6px; height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

/* ── News grid ── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 32px;
}
.news-card {
    background: #fff;
    border-radius: var(--enc-radius);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.news-card__image img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.news-card__body { padding: 20px; }
.news-card__title { font-size: 1.15rem; margin-bottom: 8px; }
.news-card__title a { color: var(--enc-text); text-decoration: none; }
.news-card__title a:hover { color: var(--enc-primary); }
.news-card__excerpt { color: var(--enc-muted); font-size: .95rem; margin: 0; }

/* ── Blog templates ── */
.post-list { display: flex; flex-direction: column; gap: 40px; }
.post-card__image { display: block; margin-bottom: 16px; border-radius: var(--enc-radius); overflow: hidden; }
.post-card__image img { aspect-ratio: 16/9; object-fit: cover; }
.entry-title { font-size: 1.6rem; }
.entry-title a { color: var(--enc-text); text-decoration: none; }
.entry-title a:hover { color: var(--enc-primary); }
.entry-meta { color: var(--enc-muted); font-size: .85rem; margin-bottom: 12px; }
.entry-more { font-weight: 700; text-decoration: none; }
.page-title { font-size: 2.2rem; }
.page-thumbnail { margin: 20px 0; border-radius: var(--enc-radius); overflow: hidden; }
.archive-description { color: var(--enc-muted); margin-bottom: 24px; }

.pagination { display: flex; justify-content: space-between; margin-top: 40px; }
.pagination .page-numbers {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--enc-text);
    margin: 0 4px;
}
.pagination .page-numbers.current { background: var(--enc-primary); color: #fff; }

/* ── Comments ── */
.comments-area { margin-top: 48px; border-top: 1px solid var(--enc-border); padding-top: 32px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 32px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--enc-border); }
.comment-author .fn { font-weight: 700; font-style: normal; }
.comment-metadata { font-size: .8rem; color: var(--enc-muted); }

/* ── Footer ── */
.site-footer {
    background: var(--enc-text);
    color: rgba(255,255,255,.8);
    padding: 56px 0 32px;
    margin-top: 64px;
}
.site-footer__inner { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.site-footer .site-title,
.site-footer .site-title-link { color: #fff; }
.site-footer__contact { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.site-footer__contact a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .95rem;
}
.site-footer__contact svg { width: 16px; height: 16px; }
.footer-menu { list-style: none; display: flex; gap: 20px; padding: 0; margin: 12px 0 0; flex-wrap: wrap; justify-content: center; }
.footer-menu a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .9rem; }

.social-links { display: flex; gap: 14px; list-style: none; padding: 0; margin: 8px 0; }
.social-links a {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: #fff;
}
.social-links svg { width: 18px; height: 18px; }
.social-links a:hover { background: var(--enc-primary); }

.site-footer__copyright { font-size: .85rem; color: rgba(255,255,255,.6); margin: 8px 0 0; }

/* ── Encounter Registration plugin shortcode headings ──
   The plugin's own [contact_form]/[scholarship_form] markup includes an <h2>;
   style it to match the theme's section headings instead of duplicating one. */
#contact .er-contact-wrap h2,
#contact .er-scholarship-wrap h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 24px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .section { padding: 48px 0; }
    .encounter-hero { padding: 72px 0; }
}
