/*
Theme Name: Circuit Endurance
Theme URI: https://www.circuitendurance.ca/
Author: Circuit Endurance
Description: Custom responsive starter theme for the Circuit Endurance running series.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: circuit-endurance
*/
:root {
  --ce-green: #07513f;
  --ce-deep: #003d32;
  --ce-lime: #9bea27;
  --ce-blue: #0756a2;
  --ce-ink: #102b27;
  --ce-muted: #64736f;
  --ce-paper: #f7f8f5;
  --ce-white: #fff;
  --ce-radius: 18px;
  --ce-shadow: 0 12px 32px rgba(0, 35, 27, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ce-ink); background: var(--ce-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.ce-container { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.ce-top { background: #fff; border-bottom: 1px solid #e6ece8; }
.ce-brand-row { min-height: 112px; display: flex; align-items: center; gap: 28px; }
.ce-logo { display: block; width: min(285px, 35vw); max-height: 92px; object-fit: contain; object-position: left center; }
.ce-brand-divider { width: 4px; height: 70px; background: var(--ce-lime); transform: skew(-18deg); }
.ce-tagline { margin: 0; max-width: 560px; color: var(--ce-ink); font-size: clamp(15px, 2vw, 22px); font-weight: 850; letter-spacing: .13em; line-height: 1.25; text-transform: uppercase; }
.ce-header-right { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.ce-language { display: flex; gap: 10px; align-items: center; font-weight: 800; }
.ce-language a { text-decoration: none; }
.ce-nav { background: var(--ce-deep); color: #fff; }
.ce-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 58px; }
.ce-menu { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(14px, 2.5vw, 34px); margin: 0; padding: 0; list-style: none; }
.ce-menu a { color: #fff; font-weight: 750; text-decoration: none; }
.ce-menu a:hover, .ce-menu a:focus { color: var(--ce-lime); }
.ce-register, .ce-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: 12px; padding: 12px 22px; background: var(--ce-lime);
  color: #09251d; font-weight: 900; text-decoration: none; transition: transform .2s, filter .2s;
}
.ce-register:hover, .ce-button:hover { transform: translateY(-2px); filter: brightness(1.04); }
.ce-button-outline { color: #fff; background: rgba(0,0,0,.18); border: 2px solid #fff; }
.ce-menu-toggle { display: none; background: transparent; color: white; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; padding: 8px 12px; }
.ce-hero {
  position: relative; min-height: 520px; display: flex; align-items: center; overflow: hidden;
  color: #fff; background: #12382f;
}
.ce-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,35,29,.94) 0%, rgba(0,35,29,.78) 31%, rgba(0,35,29,.15) 72%, rgba(0,35,29,.12) 100%);
  z-index: 1;
}
.ce-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.ce-hero-content { position: relative; z-index: 2; padding-block: 68px; max-width: 570px; }
.ce-kicker { margin: 0 0 14px; color: var(--ce-lime); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.ce-hero h1 { margin: 0; font-size: clamp(48px, 7vw, 88px); line-height: .94; letter-spacing: -.055em; font-weight: 950; font-style: italic; }
.ce-hero h1 span { display: block; color: var(--ce-lime); font-size: .56em; letter-spacing: -.02em; margin-top: 12px; }
.ce-hero-copy { max-width: 470px; margin: 24px 0 28px; font-size: clamp(17px, 2vw, 21px); line-height: 1.35; font-weight: 650; }
.ce-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ce-hero-location { position: absolute; z-index: 2; right: max(20px, calc((100% - 1200px)/2)); bottom: 24px; color: #fff; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; text-align: right; }
.ce-section { padding: 62px 0; }
.ce-section-heading { margin: 0; font-size: clamp(32px, 4vw, 48px); line-height: 1; font-weight: 950; font-style: italic; text-transform: uppercase; }
.ce-section-heading::after { content: ""; display: block; width: 76px; height: 5px; border-radius: 8px; margin-top: 18px; background: var(--ce-lime); }
.ce-events-layout { display: grid; grid-template-columns: 240px 1fr; align-items: center; gap: 32px; }
.ce-event-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.ce-event-card { display: grid; grid-template-columns: 42% 1fr; overflow: hidden; background: #fff; border: 1px solid #e5eae6; border-radius: var(--ce-radius); box-shadow: var(--ce-shadow); min-height: 205px; }
.ce-event-card img { width: 100%; height: 100%; min-height: 205px; object-fit: cover; }
.ce-event-body { padding: 20px; display: flex; flex-direction: column; align-items: flex-start; }
.ce-event-date { color: #087247; font-weight: 950; font-style: italic; text-transform: uppercase; }
.ce-event-body h3 { margin: 8px 0; font-size: 21px; line-height: 1.15; }
.ce-event-location { color: var(--ce-muted); margin: 0 0 12px; }
.ce-distances { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.ce-distance { padding: 3px 9px; border: 1px solid #d6dfd9; border-radius: 8px; background: #f5f7f4; font-size: 12px; font-weight: 800; }
.ce-event-link { margin-top: 14px; color: var(--ce-green); font-weight: 900; text-decoration: none; }
.ce-benefits { background: var(--ce-deep); color: #fff; padding: 28px 0; }
.ce-benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.ce-benefit { display: flex; align-items: center; gap: 14px; padding-inline: 14px; border-right: 1px solid rgba(155,234,39,.7); font-weight: 750; }
.ce-benefit:last-child { border: 0; }
.ce-benefit-icon { color: var(--ce-lime); font-size: 30px; }
.ce-sponsor { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 28px 0; }
.ce-sponsor p { margin: 0; color: var(--ce-muted); font-size: 13px; text-align: right; }
.ce-sponsor img { width: 180px; max-height: 92px; object-fit: contain; }
.ce-footer { background: #002f28; color: #fff; padding: 32px 0; }
.ce-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ce-footer a { color: #fff; }
.ce-footer small { color: rgba(255,255,255,.75); }
.ce-page { padding: 55px 0; min-height: 45vh; }
.ce-page h1 { font-size: clamp(36px,5vw,58px); line-height: 1.05; }
@media (max-width: 1000px) {
  .ce-events-layout { grid-template-columns: 1fr; }
  .ce-event-grid { grid-template-columns: 1fr 1fr; }
  .ce-benefit-grid { grid-template-columns: 1fr 1fr; }
  .ce-benefit:nth-child(2) { border-right: 0; }
}
@media (max-width: 760px) {
  .ce-container { width: min(100% - 28px, 1200px); }
  .ce-brand-row { min-height: 88px; gap: 12px; }
  .ce-logo { width: 145px; }
  .ce-brand-divider { height: 52px; }
  .ce-tagline { font-size: 11px; letter-spacing: .09em; }
  .ce-header-right { gap: 8px; }
  .ce-language { font-size: 13px; }
  .ce-nav-inner { min-height: 54px; flex-wrap: wrap; padding-block: 8px; }
  .ce-menu-toggle { display: inline-block; }
  .ce-menu { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: 12px 0; }
  .ce-menu.is-open { display: flex; }
  .ce-register { padding: 9px 13px; font-size: 13px; }
  .ce-hero { min-height: 560px; align-items: flex-end; }
  .ce-hero::before { background: linear-gradient(0deg, rgba(0,35,29,.95), rgba(0,35,29,.58) 55%, rgba(0,35,29,.12)); }
  .ce-hero-image { object-position: 58% center; }
  .ce-hero-content { padding-block: 46px 62px; }
  .ce-hero h1 { font-size: clamp(48px, 15vw, 72px); }
  .ce-hero-location { display: none; }
  .ce-section { padding: 42px 0; }
  .ce-event-grid { grid-template-columns: 1fr; }
  .ce-event-card { grid-template-columns: 36% 1fr; }
  .ce-event-body { padding: 14px; }
  .ce-event-body h3 { font-size: 18px; }
  .ce-benefit-grid { grid-template-columns: 1fr 1fr; gap: 16px 8px; }
  .ce-benefit { padding: 8px; font-size: 13px; border-right: 0; }
  .ce-benefit-icon { font-size: 24px; }
  .ce-footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 430px) {
  .ce-tagline { max-width: 130px; font-size: 9px; }
  .ce-logo { width: 125px; }
  .ce-brand-divider { width: 2px; }
  .ce-event-card { grid-template-columns: 1fr; }
  .ce-event-card img { height: 160px; min-height: 160px; }
  .ce-benefit-grid { grid-template-columns: 1fr; }
}

/* 2027: consistent editorial layout for every existing WordPress page and event. */
.ce-inner-page{max-width:1050px}.ce-article{max-width:940px;margin:0 auto}.ce-page-heading{background:var(--ce-deep);color:#fff;padding:42px clamp(20px,5vw,64px);border-radius:18px;margin-bottom:35px}.ce-page-heading h1{margin:0;color:#fff}.ce-page-heading .ce-kicker{color:var(--ce-lime)}.ce-entry-content{font-size:17px;line-height:1.75;overflow-wrap:anywhere}.ce-entry-content h2{font-size:clamp(27px,4vw,38px);margin:2em 0 .5em;color:var(--ce-deep)}.ce-entry-content h3{font-size:clamp(21px,3vw,27px);margin:1.6em 0 .4em}.ce-entry-content a{color:#086a4a;text-underline-offset:3px}.ce-entry-content img{max-width:100%;height:auto;border-radius:12px}.ce-entry-content figure{max-width:100%;margin:25px 0}.ce-entry-content table{border-collapse:collapse;width:100%;font-size:15px}.ce-entry-content th{background:var(--ce-deep);color:white;text-align:left}.ce-entry-content td,.ce-entry-content th{padding:12px 14px;border:1px solid #dce6df}.ce-entry-content tbody tr:nth-child(even){background:#f2f7f3}.ce-entry-content .wp-block-table{overflow-x:auto}.ce-featured{max-width:100%;height:auto;border-radius:14px;margin-bottom:25px}.ce-event-meta{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin:25px 0}.ce-entry-content iframe{max-width:100%}@media(max-width:760px){.ce-page-heading{padding:28px 22px}.ce-entry-content{font-size:16px}.ce-entry-content td,.ce-entry-content th{padding:9px 10px}}
