/*
Theme Name: SEPSPEL Foundation
Theme URI: https://sepspel.com/
Author: Dell Wall Technologies
Description: Lightweight, accessible and performance-focused custom WordPress theme for South Eastern Private Sector Promotion Enterprise (SEPSPEL).
Version: 1.0.3
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: sepspel-foundation
Tags: custom-logo, custom-menu, featured-images, accessibility-ready, responsive-layout, block-styles
*/

:root {
  --sepspel-blue: #112e8a;
  --sepspel-blue-dark: #0d225f;
  --sepspel-blue-soft: #f1f4fb;
  --sepspel-ink: #121820;
  --sepspel-muted: #596474;
  --sepspel-line: #dce3ec;
  --sepspel-surface: #f7f9fc;
  --sepspel-white: #ffffff;
  --sepspel-max: 1180px;
  --sepspel-radius: 10px;
  --sepspel-shadow: 0 14px 35px rgba(18, 24, 32, .08);
  --sepspel-font: Arial, Helvetica, sans-serif;
  --sepspel-hero-overlay: .62;
  --sepspel-hero-position: center center;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sepspel-ink);
  background: var(--sepspel-white);
  font-family: var(--sepspel-font);
  font-size: 16px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--sepspel-blue); text-underline-offset: 3px; }
a:hover { color: var(--sepspel-blue-dark); }
button, input, select, textarea { font: inherit; }
button, .button, .wp-element-button {
  border-radius: 6px;
  border: 1px solid transparent;
}
:focus-visible { outline: 3px solid rgba(17, 46, 138, .35); outline-offset: 3px; }

.container { width: min(calc(100% - 40px), var(--sepspel-max)); margin-inline: auto; }
.site-main { min-height: 50vh; }
.screen-reader-text {
  position: absolute !important; 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 { width: auto; height: auto; clip: auto; padding: 12px 16px; background: #fff; z-index: 100000; }

/* Header */
.site-topbar { background: var(--sepspel-blue-dark); color: #fff; font-size: 13px; }
.topbar-inner { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar-contact { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-width: 0; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: #fff; text-decoration: none; }
.topbar-item > span:last-child { overflow-wrap: anywhere; }
.contact-icon { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.topbar-social, .footer-social { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.social-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; color: #fff; text-decoration: none; line-height: 1; }
.social-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 1em; font-size: 12px; font-weight: 900; letter-spacing: -.04em; }
.social-linkedin .social-mark { font-size: 10px; }
.social-instagram .social-mark { font-size: 15px; }
.social-youtube .social-mark { font-size: 10px; transform: translateX(1px); }
.site-topbar a { color: #fff; text-decoration: none; }
.site-topbar .topbar-item:hover { text-decoration: underline; }
.site-topbar .social-icon:hover, .site-topbar .social-icon:focus-visible { background: #fff; color: var(--sepspel-blue-dark); border-color: #fff; text-decoration: none; }

.site-header { position: sticky; top: 0; z-index: 999; background: rgba(255,255,255,.98); border-bottom: 1px solid rgba(18,24,32,.08); }
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-branding { flex: 0 0 auto; display: flex; align-items: center; min-width: 160px; }
.custom-logo, .default-brand-logo img { display: block; width: auto; max-height: 72px; }
.default-brand-logo { display: inline-flex; align-items: center; text-decoration: none; }
.site-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: .02em; }
.site-title a { text-decoration: none; color: var(--sepspel-blue-dark); }
.site-description { margin: 2px 0 0; font-size: 12px; color: var(--sepspel-muted); }

.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; padding: 0; margin: 0; }
.primary-nav li { position: relative; }
.primary-nav a { display: block; padding: 28px 11px; color: var(--sepspel-ink); text-decoration: none; font-size: 14px; font-weight: 700; }
.primary-nav > ul > li > a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a { color: var(--sepspel-blue); }
.primary-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 240px; padding: 10px;
  background: #fff; border: 1px solid var(--sepspel-line); box-shadow: var(--sepspel-shadow); border-radius: 8px;
}
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: block; }
.primary-nav .sub-menu a { padding: 10px 12px; border-radius: 5px; font-size: 13px; }
.primary-nav .sub-menu a:hover { background: var(--sepspel-blue-soft); }
.header-cta { flex: 0 0 auto; }
.header-cta a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 17px; background: var(--sepspel-blue); color: #fff; text-decoration: none; font-weight: 800; font-size: 13px; border-radius: 6px; }
.header-cta a:hover { background: var(--sepspel-blue-dark); color: #fff; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 25px; height: 2px; margin: 5px 0; background: var(--sepspel-ink); }

/* Inner-page photo header */
.page-hero { position: relative; isolation: isolate; min-height: 320px; display: flex; align-items: end; background: var(--sepspel-blue-dark); overflow: hidden; }
.page-hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.page-hero-image { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--sepspel-hero-position); }
.page-hero-overlay { position: absolute; inset: 0; z-index: -1; background: rgba(10, 24, 55, var(--sepspel-hero-overlay)); }
.page-hero:not(.has-image) .page-hero-overlay { background: rgba(10, 24, 55, .18); }
.page-hero-content { position: relative; z-index: 1; width: min(calc(100% - 40px), var(--sepspel-max)); margin: 0 auto; padding: 72px 0 48px; color: #fff; }
.page-hero-kicker { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; }
.page-hero h1 { margin: 0; max-width: 920px; font-size: clamp(34px, 6vw, 58px); line-height: 1.08; letter-spacing: -.035em; }
.breadcrumbs { margin-top: 15px; font-size: 13px; opacity: .9; }
.breadcrumbs a { color: #fff; }

/* Homepage */
.home-hero { position: relative; min-height: clamp(520px, 76vh, 720px); display: grid; align-items: center; background: var(--sepspel-blue-dark); overflow: hidden; }
.home-hero-media { position: absolute; inset: 0; }
.home-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.home-hero-media::after { content: ""; position: absolute; inset: 0; background: rgba(9, 23, 54, .62); }
.home-hero .container { position: relative; z-index: 2; }
.hero-copy { max-width: 820px; padding: 72px 0; color: #fff; }
.hero-eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; }
.hero-copy h1 { margin: 0; max-width: 780px; font-size: clamp(42px, 6.5vw, 72px); line-height: 1.02; letter-spacing: -.04em; }
.hero-copy p { max-width: 710px; margin: 20px 0 0; font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 20px; border-radius: 6px; font-weight: 800; text-decoration: none; }
.btn-primary { background: var(--sepspel-blue); color: #fff; }
.btn-primary:hover { background: #fff; color: var(--sepspel-blue-dark); }
.btn-secondary { border: 1px solid rgba(255,255,255,.7); color: #fff; }
.btn-secondary:hover { background: #fff; color: var(--sepspel-blue-dark); }

.section { padding: 82px 0; }
.section-sm { padding: 58px 0; }
.section-surface { background: var(--sepspel-surface); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 34px; }
.section-heading > div { max-width: 760px; }
.section-kicker { margin: 0 0 8px; color: var(--sepspel-blue); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.12; letter-spacing: -.03em; }
.section-heading p { margin: 12px 0 0; color: var(--sepspel-muted); }
.text-link { font-weight: 800; white-space: nowrap; text-decoration-thickness: 1px; }

.programme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.programme-card { position: relative; display: flex; min-height: 300px; align-items: end; overflow: hidden; border-radius: var(--sepspel-radius); background: var(--sepspel-blue-dark); color: #fff; text-decoration: none; }
.programme-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.programme-card::after { content: ""; position: absolute; inset: 0; background: rgba(12, 27, 62, .64); }
.programme-card:hover img { transform: scale(1.035); }
.programme-card-content { position: relative; z-index: 2; padding: 24px; }
.programme-card h3 { margin: 0 0 8px; color: #fff; font-size: 21px; line-height: 1.2; }
.programme-card p { margin: 0; color: rgba(255,255,255,.88); font-size: 14px; }

.intro-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 68px; align-items: center; }
.intro-media img { width: 100%; aspect-ratio: 5/4; object-fit: cover; border-radius: var(--sepspel-radius); }
.intro-copy h2 { margin: 0; font-size: clamp(32px, 4vw, 50px); line-height: 1.12; letter-spacing: -.03em; }
.intro-copy p { color: var(--sepspel-muted); }

.stats-strip { background: var(--sepspel-blue); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 34px 28px; border-right: 1px solid rgba(255,255,255,.2); }
.stat:last-child { border-right: 0; }
.stat-number { display: block; font-size: clamp(34px, 4vw, 50px); font-weight: 900; line-height: 1; }
.stat-label { display: block; margin-top: 9px; font-size: 13px; font-weight: 700; opacity: .88; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.content-card { overflow: hidden; border: 1px solid var(--sepspel-line); border-radius: var(--sepspel-radius); background: #fff; }
.content-card-media { display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--sepspel-blue-soft); }
.content-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.content-card:hover .content-card-media img { transform: scale(1.025); }
.content-card-body { padding: 22px; }
.content-card-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 8px; color: var(--sepspel-blue); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.content-card-meta span + span::before { content: "•"; margin-right: 12px; color: #9aa5b5; }
.content-card h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.25; }
.content-card h3 a { color: var(--sepspel-ink); text-decoration: none; }
.content-card h3 a:hover { color: var(--sepspel-blue); }
.content-card p { margin: 0; color: var(--sepspel-muted); font-size: 14px; }
.content-card-read-more { display: inline-flex; align-items: center; margin-top: 16px; color: var(--sepspel-blue); font-size: 13px; font-weight: 800; text-decoration: none; }
.content-card-read-more:hover { text-decoration: underline; }

.cta-band { background: var(--sepspel-blue-dark); color: #fff; }
.cta-inner { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.cta-inner h2 { margin: 0; max-width: 760px; font-size: clamp(30px, 4vw, 48px); line-height: 1.12; }
.cta-inner p { margin: 12px 0 0; color: rgba(255,255,255,.82); }

.partners-section { overflow: hidden; }
.partner-marquee { width: 100%; overflow: hidden; padding: 6px 0; }
.partner-track { display: flex; width: max-content; align-items: stretch; }
.partner-marquee.is-animated .partner-track { animation: sepspel-partner-scroll var(--sepspel-partner-speed, 34s) linear infinite; }
.partner-marquee.is-animated:hover .partner-track, .partner-marquee.is-animated:focus-within .partner-track { animation-play-state: paused; }
.partner-set { display: flex; flex: 0 0 auto; align-items: stretch; gap: 18px; padding-right: 18px; }
.partner-logo { flex: 0 0 184px; min-height: 112px; border: 1px solid var(--sepspel-line); border-radius: 8px; background: #fff; }
.partner-logo a, .partner-logo span { display: grid; place-items: center; width: 100%; height: 100%; min-height: 112px; padding: 18px; }
.partner-logo img { display: block; max-width: 145px; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.partner-logo a:hover, .partner-logo a:focus-visible { background: var(--sepspel-blue-soft); }
@keyframes sepspel-partner-scroll { to { transform: translateX(-50%); } }

/* Content */
.content-wrap { width: min(calc(100% - 40px), 900px); margin-inline: auto; padding: 68px 0 86px; }
.content-wrap.wide { width: min(calc(100% - 40px), var(--sepspel-max)); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { line-height: 1.2; letter-spacing: -.02em; }
.entry-content h2 { margin-top: 2.2em; font-size: clamp(28px, 3.5vw, 40px); }
.entry-content h3 { margin-top: 1.8em; font-size: 26px; }
.entry-content p, .entry-content li { color: #2e3742; }
.entry-content blockquote { margin: 32px 0; padding: 20px 24px; border-left: 4px solid var(--sepspel-blue); background: var(--sepspel-blue-soft); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 14px; }
.entry-content th, .entry-content td { padding: 11px 12px; border: 1px solid var(--sepspel-line); text-align: left; vertical-align: top; }
.entry-content th { background: var(--sepspel-blue-dark); color: #fff; }
.entry-content figure { margin-inline: 0; }

.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pagination, .nav-links { margin-top: 40px; display: flex; gap: 8px; flex-wrap: wrap; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 12px; border: 1px solid var(--sepspel-line); border-radius: 5px; text-decoration: none; }
.page-numbers.current, .page-numbers:hover { background: var(--sepspel-blue); color: #fff; }

.project-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 0 0 38px; background: var(--sepspel-line); border: 1px solid var(--sepspel-line); }
.project-meta div { background: #fff; padding: 18px; }
.project-meta dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--sepspel-muted); }
.project-meta dd { margin: 6px 0 0; font-weight: 800; }

.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-card { overflow: hidden; border: 1px solid var(--sepspel-line); border-radius: 9px; background: #fff; }
.team-card-image { aspect-ratio: 4 / 5; background: var(--sepspel-blue-soft); overflow: hidden; }
.team-card-image img { width: 100%; height: 100%; object-fit: cover; }
.team-card-body { padding: 18px; }
.team-card h3 { margin: 0; font-size: 19px; }
.team-card .role { margin: 4px 0 0; color: var(--sepspel-blue); font-size: 13px; font-weight: 800; }

/* Footer */
.site-footer { background: #0d1730; color: rgba(255,255,255,.78); }
.footer-main { padding: 66px 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1.35fr .8fr .8fr 1fr; gap: 42px; }
.footer-brand .custom-logo, .footer-default-logo { display: block; width: auto; max-height: 88px; margin-bottom: 17px; }
.footer-brand .custom-logo { filter: none; }
.footer-brand h2 { color: #fff; margin: 0 0 12px; font-size: 22px; }
.footer-heading { margin: 0 0 17px; color: #fff; font-size: 15px; }
.footer-menu, .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-menu li, .footer-contact li { margin: 9px 0; }
.site-footer a { color: rgba(255,255,255,.82); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-social { margin-top: 18px; }
.footer-social .social-icon { width: 30px; height: 30px; }
.footer-social .social-icon:hover, .footer-social .social-icon:focus-visible { background: #fff; color: #0d1730; border-color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.footer-bottom-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: 13px; }

/* Job plugin compatibility */
.jb-job-list, .job-listings { max-width: var(--sepspel-max); margin-inline: auto; }
.jb-job-list input, .jb-job-list select, .job_filters input, .job_filters select { min-height: 44px; border: 1px solid var(--sepspel-line); border-radius: 5px; padding: 8px 11px; }

/* Forms */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], textarea, select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd8e4; border-radius: 5px; background: #fff; color: var(--sepspel-ink);
}
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--sepspel-blue); outline: 3px solid rgba(36,72,154,.12); }
input[type="submit"], button[type="submit"] { min-height: 46px; padding: 0 18px; border: 0; background: var(--sepspel-blue); color: #fff; font-weight: 800; cursor: pointer; }

@media (max-width: 1024px) {
  .programme-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .project-meta { grid-template-columns: repeat(2, 1fr); }
  .header-cta { display: none; }
  .menu-toggle { display: block; margin-left: auto; }
  .primary-nav { position: absolute; top: 100%; left: 16px; right: 16px; max-height: calc(100vh - 110px); overflow: auto; display: none; margin: 0; padding: 12px; background: #fff; border: 1px solid var(--sepspel-line); border-radius: 0 0 8px 8px; box-shadow: var(--sepspel-shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav a { padding: 12px; }
  .primary-nav .sub-menu { position: static; display: block; box-shadow: none; border: 0; padding: 0 0 0 14px; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 720px) {
  .container, .content-wrap, .content-wrap.wide, .page-hero-content { width: min(calc(100% - 28px), var(--sepspel-max)); }
  .site-topbar { display: block; font-size: 11px; }
  .topbar-inner { min-height: 0; padding: 7px 0; flex-direction: column; justify-content: center; gap: 6px; }
  .topbar-contact { width: 100%; justify-content: center; gap: 6px 12px; }
  .topbar-social { justify-content: center; }
  .header-inner { min-height: 70px; gap: 12px; }
  .custom-logo, .default-brand-logo img { max-height: 58px; }
  .home-hero { min-height: 560px; }
  .hero-copy { padding: 58px 0; }
  .hero-copy h1 { font-size: clamp(39px, 12vw, 58px); }
  .section { padding: 62px 0; }
  .section-heading { display: block; margin-bottom: 26px; }
  .section-heading .text-link { display: inline-block; margin-top: 14px; }
  .programme-grid, .card-grid, .team-grid, .archive-grid, .stats-grid, .footer-grid, .project-meta { grid-template-columns: 1fr; }
  .partner-logo { flex-basis: 150px; min-height: 96px; }
  .partner-logo a, .partner-logo span { min-height: 96px; padding: 14px; }
  .partner-logo img { max-width: 122px; max-height: 54px; }
  .programme-card { min-height: 250px; }
  .intro-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats-grid { padding: 8px 0; }
  .stat { padding: 22px 6px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
  .stat:last-child { border-bottom: 0; }
  .cta-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-main { padding: 50px 0 36px; }
  .footer-grid { gap: 28px; }
  .footer-bottom-inner { padding: 18px 0; display: block; }
  .page-hero { min-height: 230px; }
  .page-hero-content { padding: 46px 0 32px; }
  .page-hero h1 { font-size: clamp(32px, 10vw, 48px); }
  .entry-content table { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 440px) {
  .topbar-contact { flex-direction: column; gap: 3px; }
  .topbar-item { line-height: 1.35; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .partner-marquee .partner-track { width: 100%; transform: none !important; }
  .partner-marquee .partner-set { width: 100%; flex-wrap: wrap; justify-content: center; padding-right: 0; }
  .partner-marquee .partner-set.is-duplicate { display: none; }
}
