/*
Theme Name: eBool
Theme URI: https://www.ebool.com/hub
Author: eBool
Description: Lightweight custom theme matching the eBool directory design — navy heroes, Sora/Manrope type, card-based layout. No frameworks, no build step.
Version: 1.0.0
Requires PHP: 8.0
License: Proprietary
Text Domain: ebool
*/

:root {
    --primary: #2c5478;
    --primary-50: #eef2f6;
    --primary-100: #dde6ee;
    --primary-300: #8ba6c2;
    --primary-600: #1f405d;
    --primary-700: #16304a;
    --primary-800: #102030;
    --primary-900: #0a1620;
    --accent: #4f46e5;
    --ink: #1e293b;
    --ink-600: #475569;
    --ink-700: #334155;
    --paper: #f8fafc;
    --line: #f1f5f9;
    --line-strong: #e2e8f0;
    --sans: 'Manrope', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --display: 'Sora', 'Avenir Next', 'Segoe UI', sans-serif;
    --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); }

.container { max-width: 1190px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.25; color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line-strong);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    height: 68px;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand svg { height: 34px; width: auto; display: block; }
.brand-hub {
    font-family: var(--display);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-50);
    border-radius: 999px;
    padding: .2rem .65rem;
}
.site-nav { display: flex; align-items: center; gap: .25rem; overflow-x: auto; }
.site-nav a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
    color: var(--ink-700);
    font-size: .93rem;
    font-weight: 600;
    padding: .5rem .8rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--primary); background: var(--paper); }
.site-nav a.nav-cta {
    background: var(--primary);
    color: #fff;
    margin-left: .35rem;
}
.site-nav a.nav-cta:hover { background: var(--primary-600); }
@media (max-width: 700px) {
    .site-header .container { height: auto; flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; row-gap: .35rem; }
    .site-nav { width: 100%; }
    .site-nav a { padding: .4rem .6rem; font-size: .88rem; }
}

/* ---------- Navy hero ---------- */
.hero {
    position: relative;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800) 55%, var(--primary-900));
}
.hero-glow-clip { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-glow {
    position: absolute;
    top: -8rem; right: -6rem;
    width: 24rem; height: 24rem;
    border-radius: 50%;
    background: rgba(79, 70, 229, .16);
    filter: blur(64px);
}
.hero .container { position: relative; padding-top: 2.25rem; padding-bottom: 2.25rem; }
.hero-eyebrow {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary-300);
    margin-bottom: .5rem;
}
.hero h1 {
    color: #fff;
    font-size: clamp(1.55rem, 3.5vw, 2.1rem);
    margin: 0 0 .4rem;
    text-wrap: balance;
}
.hero p.hero-sub { color: rgba(255,255,255,.72); margin: 0; max-width: 46rem; font-size: .98rem; }
.hero .post-meta { color: rgba(255,255,255,.65); font-size: .88rem; margin-top: .65rem; display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; align-items: center; }
.hero .post-meta a { color: rgba(255,255,255,.85); }

/* ---------- Content canvas ---------- */
.site-main { background: var(--paper); padding: 2.5rem 0 5rem; min-height: 45vh; }

/* ---------- Post cards ---------- */
.post-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
}
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 32, 48, .04);
    transition: transform .15s, box-shadow .15s, border-color .15s;
}
.post-card:hover {
    transform: translateY(-2px);
    border-color: rgba(44, 84, 120, .4);
    box-shadow: 0 8px 20px rgba(16, 32, 48, .08);
}
.post-card-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, var(--primary-50), var(--primary-100)); }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-thumb .thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.post-card-thumb .thumb-fallback svg { height: 30%; width: auto; opacity: .85; }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.15rem 1.25rem 1.25rem; }
.post-card-cat {
    align-self: flex-start;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-50);
    border-radius: 999px;
    padding: .18rem .6rem;
    margin-bottom: .6rem;
    text-decoration: none;
}
.post-card h2 { font-size: 1.05rem; margin: 0 0 .45rem; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--primary); }
.post-card p.excerpt { color: var(--ink-600); font-size: .9rem; line-height: 1.6; margin: 0 0 .9rem; flex: 1; }
.post-card time { color: #94a3b8; font-size: .8rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 2.25rem; flex-wrap: wrap; }
.pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.35rem; height: 2.35rem; padding: 0 .6rem;
    border: 1px solid var(--line-strong); border-radius: 8px;
    background: #fff; color: var(--ink-700);
    font-size: .9rem; font-weight: 600; text-decoration: none;
}
.pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Single post / page ---------- */
.entry-wrap { max-width: 780px; margin: 0 auto; }
.entry-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.4rem, 4vw, 2.75rem);
    box-shadow: 0 1px 2px rgba(16, 32, 48, .04);
}
.entry-thumb { border-radius: var(--radius); overflow: hidden; margin-bottom: 1.75rem; }
.entry-thumb img { display: block; width: 100%; }

.entry-content { font-size: 1.03rem; color: var(--ink-700); }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2 { font-size: 1.45rem; margin: 2.1rem 0 .75rem; }
.entry-content h3 { font-size: 1.18rem; margin: 1.8rem 0 .6rem; }
.entry-content h4 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.entry-content p, .entry-content ul, .entry-content ol { margin: 0 0 1.1rem; }
.entry-content li { margin-bottom: .35rem; }
.entry-content a { color: var(--primary); }
.entry-content img { border-radius: 10px; }
.entry-content blockquote {
    margin: 1.5rem 0; padding: .85rem 1.25rem;
    border-left: 3px solid var(--primary);
    background: var(--primary-50);
    border-radius: 0 10px 10px 0;
    color: var(--ink-700);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content pre {
    background: var(--primary-900); color: #dbe7f3;
    padding: 1rem 1.25rem; border-radius: 10px;
    overflow-x: auto; font-size: .88rem; line-height: 1.6;
}
.entry-content code { font-size: .9em; background: var(--primary-50); border-radius: 5px; padding: .1em .35em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.25rem; font-size: .93rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line-strong); padding: .55rem .75rem; text-align: left; }
.entry-content th { background: var(--paper); font-weight: 700; }
.entry-content iframe { max-width: 100%; }

.entry-tags { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .45rem; }
.entry-tags a {
    font-size: .78rem; font-weight: 600; text-decoration: none;
    color: var(--ink-600); background: var(--paper);
    border: 1px solid var(--line-strong); border-radius: 999px;
    padding: .22rem .7rem;
}
.entry-tags a:hover { color: var(--primary); border-color: var(--primary); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
.post-nav a {
    display: block; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: .9rem 1.1rem;
    text-decoration: none; font-size: .9rem; color: var(--ink);
    transition: border-color .15s;
}
.post-nav a:hover { border-color: var(--primary); }
.post-nav .nav-label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; margin-bottom: .2rem; }
.post-nav .nav-next { text-align: right; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav .nav-next { text-align: left; } }

/* ---------- CTA band ---------- */
.cta-band {
    position: relative;
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800) 55%, var(--primary-900));
}
.cta-band .container { position: relative; padding: 3.25rem 1rem; }
.cta-band h2 { color: #fff; font-size: 1.5rem; margin: 0 0 .55rem; }
.cta-band p { color: rgba(255,255,255,.7); margin: 0 auto 1.4rem; max-width: 40rem; }
.cta-band .btn-white {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #fff; color: var(--primary-800);
    font-weight: 700; font-size: .95rem; text-decoration: none;
    border-radius: 10px; padding: .8rem 1.7rem;
    transition: background .15s;
}
.cta-band .btn-white:hover { background: var(--primary-50); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-900); color: rgba(255,255,255,.65); font-size: .9rem; }
.site-footer .container { padding: 2.25rem 1rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--ink-600); }
.empty-state h2 { margin-bottom: .5rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: .3rem 1.25rem .75rem 0; }
.alignright { float: right; margin: .3rem 0 .75rem 1.25rem; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: .82rem; color: #94a3b8; text-align: center; margin-top: .35rem; }

.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
