/*
Theme Name: QRlon Youth Basketball Coach
Theme URI: https://howtocoachyouthbasketball.com/
Author: QRlon
Author URI: https://qrlon.com/
Description: A fast, accessible editorial theme for youth basketball coaching guides, drills, practice plans, and player development.
Version: 1.0.3
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: qrlon-youth-coach
*/

:root {
    --navy-950: #07182d;
    --navy-900: #0a2342;
    --navy-800: #12345a;
    --blue-100: #eaf2fa;
    --orange-600: #e95f0c;
    --orange-500: #ff7417;
    --orange-100: #fff1e7;
    --ink: #122033;
    --muted: #5c6878;
    --line: #dce3ea;
    --surface: #ffffff;
    --canvas: #f5f8fb;
    --success: #19754a;
    --radius: 18px;
    --shadow: 0 18px 45px rgba(7, 24, 45, 0.11);
    --content: 760px;
    --wide: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.7;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
a { color: var(--navy-800); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--orange-600); }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed;
    z-index: 100000;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    clip: auto;
    padding: 12px 18px;
    background: #fff;
    color: var(--navy-950);
    border-radius: 8px;
}

.site-shell { width: min(calc(100% - 40px), var(--wide)); margin-inline: auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(220, 227, 234, 0.95);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 28px;
}

.site-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-brand:empty { display: none; }
.custom-logo { display: block; max-height: 50px; width: auto; }
.brand-link { color: var(--navy-950); text-decoration: none; font-weight: 900; letter-spacing: -0.035em; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.1; }
.brand-link span { color: var(--orange-600); }

.menu-toggle {
    display: none;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--navy-950);
    border-radius: 10px;
    padding: 9px 12px;
    font: inherit;
    font-weight: 800;
}

.primary-menu { display: flex; align-items: center; gap: 24px; list-style: none; padding: 0; margin: 0; }
.primary-menu a { color: var(--ink); font-size: 0.94rem; font-weight: 750; text-decoration: none; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--orange-600); }

.hero {
    color: #fff;
    background: var(--navy-950);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.02fr 0.98fr;
    min-height: 560px;
    align-items: stretch;
}

.hero-copy { padding: clamp(64px, 8vw, 112px) clamp(24px, 5vw, 76px) clamp(64px, 8vw, 104px) max(20px, calc((100vw - var(--wide)) / 2)); }
.eyebrow { margin: 0 0 14px; color: var(--orange-500); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 900; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(2.7rem, 5.6vw, 5.3rem); line-height: 0.98; letter-spacing: -0.055em; }
.hero-lead { max-width: 630px; margin: 26px 0 0; color: #d7e3ee; font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 19px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: var(--orange-500);
    color: var(--navy-950);
    font-weight: 900;
    text-decoration: none;
}

.button:hover { background: #ff8b3d; color: var(--navy-950); }
.button-secondary { background: transparent; border-color: rgba(255,255,255,.42); color: #fff; }
.button-secondary:hover { background: #fff; color: var(--navy-950); }

.hero-media { position: relative; min-height: 420px; background: var(--navy-800); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy-950) 0%, transparent 23%); pointer-events: none; }

.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-white { background: var(--surface); }
.section-dark { background: var(--navy-900); color: #fff; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-heading h2 { margin: 0; max-width: 760px; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.05; letter-spacing: -0.045em; }
.section-heading p { max-width: 560px; margin: 10px 0 0; color: var(--muted); }

.topic-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.topic-card { min-height: 210px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #f2a36d; }
.topic-number { color: var(--orange-600); font-weight: 900; font-size: 0.82rem; letter-spacing: .08em; }
.topic-card h3 { margin: 36px 0 8px; color: var(--navy-950); font-size: 1.24rem; line-height: 1.15; }
.topic-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 25px rgba(7,24,45,.05); }
.post-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--blue-100); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-media img { transform: scale(1.035); }
.post-card-body { padding: 22px; }
.post-card h2, .post-card h3 { margin: 7px 0 10px; font-size: 1.35rem; line-height: 1.2; letter-spacing: -.025em; }
.post-card h2 a, .post-card h3 a { color: var(--navy-950); text-decoration: none; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--orange-600); }
.post-card p { color: var(--muted); font-size: .96rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.post-category { color: var(--orange-600); text-transform: uppercase; letter-spacing: .07em; }

.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.path-step { padding: 30px; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); }
.path-step strong { display: block; color: var(--orange-500); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.path-step h3 { margin: 16px 0 10px; font-size: 1.4rem; }
.path-step p { color: #c9d8e5; margin-bottom: 0; }

.empty-state { grid-column: 1 / -1; padding: 34px; border: 1px dashed #aebbc8; border-radius: var(--radius); background: #fff; color: var(--muted); }

.page-header { padding: 72px 0 48px; background: var(--navy-950); color: #fff; }
.page-header .eyebrow { margin-bottom: 12px; }
.page-header h1 { max-width: 900px; margin: 0; font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: 1; letter-spacing: -.05em; }
.page-header p { max-width: 720px; color: #d6e2ee; font-size: 1.1rem; }

.breadcrumbs { margin-bottom: 16px; color: #b8c8d8; font-size: .83rem; }
.breadcrumbs a { color: #fff; }

.content-layout { width: min(calc(100% - 40px), var(--content)); margin: 0 auto; padding: 64px 0 96px; }
.article-featured { width: min(calc(100% - 40px), 1080px); margin: -22px auto 0; position: relative; }
.article-featured img { display: block; width: 100%; max-height: 610px; object-fit: cover; border: 8px solid #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.entry-content { font-size: 1.08rem; }
.entry-content > * { margin-top: 0; margin-bottom: 1.45em; }
.entry-content h2, .entry-content h3 { color: var(--navy-950); line-height: 1.16; letter-spacing: -.035em; scroll-margin-top: 100px; }
.entry-content h2 { margin-top: 2.1em; font-size: clamp(1.8rem, 4vw, 2.55rem); }
.entry-content h3 { margin-top: 1.8em; font-size: 1.45rem; }
.entry-content blockquote { margin-inline: 0; padding: 18px 24px; border-left: 5px solid var(--orange-500); background: var(--orange-100); font-weight: 650; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 12px; border: 1px solid var(--line); text-align: left; }
.entry-content th { background: var(--navy-900); color: #fff; }
.entry-content img { border-radius: 12px; }

.toc { margin: 28px 0 38px; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.toc strong { color: var(--navy-950); }
.toc ol { margin-bottom: 0; padding-left: 22px; }

.author-box { display: grid; grid-template-columns: 64px 1fr; gap: 18px; margin-top: 54px; padding-top: 28px; border-top: 1px solid var(--line); }
.author-box img { border-radius: 50%; }
.author-box h2 { margin: 0 0 5px; font-size: 1.2rem; }
.author-box p { margin: 0; color: var(--muted); font-size: .95rem; }

.pagination { margin-top: 38px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; min-width: 42px; min-height: 42px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; }
.pagination .current { background: var(--navy-900); color: #fff; }

.site-footer { padding: 54px 0 30px; background: #041222; color: #c6d3df; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 40px; align-items: start; }
.site-footer .brand-link { color: #fff; }
.site-footer p { max-width: 620px; }
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 0; margin: 0; }
.footer-menu a { color: #dbe6ef; text-decoration: none; }
.footer-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.13); font-size: .84rem; }

@media (max-width: 1040px) {
    .topic-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-copy { padding-inline: max(20px, calc((100vw - var(--wide)) / 2)); }
    .hero-media { max-height: 500px; }
    .hero-media::after { background: linear-gradient(180deg, var(--navy-950), transparent 28%); }
}

@media (max-width: 820px) {
    .menu-toggle { display: inline-flex; }
    .site-nav { display: none; position: absolute; left: 0; right: 0; top: 76px; padding: 18px 20px 24px; background: #fff; border-bottom: 1px solid var(--line); }
    .site-nav.is-open { display: block; }
    .primary-menu { align-items: stretch; flex-direction: column; gap: 4px; }
    .primary-menu a { display: block; padding: 10px; }
    .post-grid, .path-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    body { font-size: 16px; }
    .site-shell, .content-layout, .article-featured { width: min(calc(100% - 28px), var(--wide)); }
    .hero-copy { padding: 58px 20px; }
    .hero h1 { font-size: clamp(2.55rem, 14vw, 4rem); }
    .hero-media { min-height: 280px; }
    .section { padding: 60px 0; }
    .section-heading { align-items: start; flex-direction: column; }
    .topic-grid, .post-grid, .path-grid { grid-template-columns: 1fr; }
    .topic-card { min-height: 175px; }
    .page-header { padding: 58px 0 40px; }
    .content-layout { padding: 48px 0 72px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
