
:root{
  --rcr-orange:#ff5a00;
  --rcr-navy:#0b1f4b;
  --rcr-black:#0a0a0a;
  --rcr-grey:#2b2f36;
  --rcr-light:#f4f5f7;
  --rcr-border:#dde2e8;
  --rcr-white:#ffffff;
  --rcr-radius:20px;
  --rcr-shadow:0 20px 50px rgba(11,31,75,.08);
  --rcr-max:1280px;
}

*,
*::before,
*::after{box-sizing:border-box}

html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:"Inter",system-ui,sans-serif;
  color:var(--rcr-grey);
  background:#fff;
  line-height:1.6;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--rcr-navy);text-decoration:none}
a:hover{color:var(--rcr-orange)}
.container{width:min(calc(100% - 2rem), var(--rcr-max));margin-inline:auto}
.content-narrow{max-width:980px}
.content-wide{max-width:1200px}
.site-shell{overflow:hidden}

.site-header{
  position:sticky;top:0;z-index:100;
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(11,31,75,.08);
}
.site-header__inner{
  display:flex;align-items:center;justify-content:space-between;gap:1.5rem;
  min-height:84px;
}
.site-branding{display:flex;align-items:center;gap:1rem}
.site-logo img{max-height:60px;width:auto}
.site-title{
  font-family:"Exo 2",sans-serif;font-weight:800;font-style:italic;
  color:var(--rcr-black);font-size:1.35rem;line-height:1;
}
.site-tagline{margin:.35rem 0 0;color:#657082;font-size:.95rem}

.main-navigation ul{display:flex;align-items:center;gap:1.25rem;list-style:none;margin:0;padding:0}
.main-navigation li{position:relative}
.main-navigation a{
  color:var(--rcr-black);font-weight:700;font-size:.98rem;
  font-family:"Exo 2",sans-serif;font-style:italic;
}
.main-navigation .current-menu-item > a{color:var(--rcr-orange)}

/* Nested menus */
.main-navigation ul ul{
  position:absolute;
  top:100%;
  left:0;
  min-width:240px;
  background:#fff;
  border:1px solid var(--rcr-border);
  border-radius:16px;
  padding:.75rem 0;
  box-shadow:var(--rcr-shadow);
  display:none;
  z-index:200;
}
.main-navigation ul ul li{width:100%}
.main-navigation ul ul a{
  display:block;
  padding:.6rem 1rem;
  width:100%;
}
.main-navigation ul li:hover > ul,
.main-navigation ul li:focus-within > ul{display:block}
.main-navigation ul ul ul{
  top:-1px;
  left:100%;
}
.main-navigation .menu-item-has-children > a::after{
  content:'▾';
  font-size:.7em;
  margin-left:.45rem;
}
.main-navigation ul ul .menu-item-has-children > a::after{
  content:'▸';
  float:right;
  margin-top:.15rem;
}

.nav-toggle{
  display:none;background:transparent;border:0;padding:.35rem;cursor:pointer;
}
.nav-toggle span{
  display:block;width:24px;height:2px;background:var(--rcr-black);margin:5px 0;border-radius:2px;
}

.hero-band{
  background:
    radial-gradient(circle at top right, rgba(255,90,0,.08), transparent 30%),
    linear-gradient(180deg, #fff 0%, #f7f8fb 100%);
  padding:5rem 0 3rem;
  border-bottom:1px solid var(--rcr-border);
}
.hero-grid{
  display:grid;grid-template-columns:1.2fr .8fr;gap:2rem;align-items:center;
}
.eyebrow{
  display:inline-flex;align-items:center;gap:.5rem;
  margin:0 0 1rem;padding:.35rem .75rem;border-radius:999px;
  background:rgba(255,90,0,.1);color:var(--rcr-orange);font-weight:800;
  font-size:.78rem;letter-spacing:.08em;text-transform:uppercase;
}
.hero-copy h1,
.section-heading h1,
.section-heading h2,
.entry-title{
  margin:0 0 1rem;
  font-family:"Exo 2",sans-serif;font-style:italic;font-weight:800;
  line-height:1.05;color:var(--rcr-black);
}
.hero-copy h1{font-size:clamp(2.6rem, 5vw, 4.75rem)}
.hero-subtext{font-size:1.1rem;max-width:60ch;color:#4b5565}

.button-row{display:flex;gap:1rem;flex-wrap:wrap;margin-top:1.5rem}
.button,
.wp-block-button__link,
button,
input[type=submit]{
  display:inline-flex;align-items:center;justify-content:center;
  border-radius:999px;padding:.95rem 1.4rem;border:2px solid transparent;
  font-weight:800;font-family:"Exo 2",sans-serif;font-style:italic;
  transition:.2s ease;cursor:pointer;
}
.button--primary,.wp-block-button__link,input[type=submit]{
  background:var(--rcr-orange);color:#fff;
}
.button--primary:hover,.wp-block-button__link:hover,input[type=submit]:hover{
  transform:translateY(-1px);box-shadow:0 12px 25px rgba(255,90,0,.25);color:#fff;
}
.button--secondary{
  background:#fff;border-color:var(--rcr-navy);color:var(--rcr-navy);
}
.button--secondary:hover{background:var(--rcr-navy);color:#fff}

.card{
  background:#fff;border:1px solid var(--rcr-border);border-radius:var(--rcr-radius);
  box-shadow:var(--rcr-shadow);padding:1.5rem;
  position:relative;overflow:hidden;
}
.card::before{
  content:"";position:absolute;inset:0 auto 0 0;width:6px;background:linear-gradient(180deg,var(--rcr-orange),var(--rcr-navy));
}
.feature-card h3,
.section-title,
.widget-title,
.post-card__title,
.post-list__item h3{
  margin:.1rem 0 .75rem;
  font-family:"Exo 2",sans-serif;font-style:italic;font-weight:800;color:var(--rcr-black);
}
.metric-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem}
.metric-tile{
  border:1px solid var(--rcr-border);border-radius:16px;padding:1rem;background:linear-gradient(180deg,#fff,#f9fafc);
}
.metric-label{
  display:block;color:var(--rcr-orange);font-size:.8rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
  margin-bottom:.4rem;
}

.content-section{padding:4rem 0}
.content-section--alt{background:linear-gradient(180deg,#fff 0,#f7f8fb 100%);border-top:1px solid var(--rcr-border);border-bottom:1px solid var(--rcr-border)}
.section-heading{margin-bottom:1.75rem}
.card-grid{display:grid;gap:1.25rem}
.three-up{grid-template-columns:repeat(3,1fr)}
.two-col-content{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem}

.front-widget-grid{display:grid;gap:1.25rem}
.front-widget-grid--three{grid-template-columns:repeat(3,minmax(0,1fr))}
.front-widget-grid--two{grid-template-columns:repeat(2,minmax(0,1fr))}
.front-widget-grid .widget,
.hero-panel .widget{margin:0}
.footer-widget + .footer-widget{margin-top:1rem}

.post-card + .post-card{margin-top:1rem}
.post-card__meta{font-size:.85rem;font-weight:700;color:#6b7280;text-transform:uppercase;letter-spacing:.06em}

.post-list{display:grid;gap:1rem}
.post-list__item{padding:0 0 1rem;border-bottom:1px solid var(--rcr-border)}
.post-list__item:last-child{border-bottom:0;padding-bottom:0}

.brand-list{margin:0;padding-left:1.2rem}
.brand-list li+li{margin-top:.65rem}

.entry-content > *:first-child{margin-top:0}
.entry-content h2,.entry-content h3,.entry-content h4{
  font-family:"Exo 2",sans-serif;font-style:italic;color:var(--rcr-black)
}

table{
  width:100%;border-collapse:collapse;background:#fff;
  border:1px solid var(--rcr-border);border-radius:16px;overflow:hidden;
}
th,td{padding:.95rem 1rem;border-bottom:1px solid var(--rcr-border);text-align:left}
th{
  background:var(--rcr-navy);color:#fff;font-family:"Exo 2",sans-serif;font-style:italic;
}
tr:nth-child(even) td{background:#fafbfc}

input:not([type=submit]),
textarea,
select{
  width:100%;padding:.9rem 1rem;border:1px solid #cfd6df;border-radius:14px;
  font:inherit;color:inherit;background:#fff;
}
input:focus,textarea:focus,select:focus{
  outline:3px solid rgba(255,90,0,.15);border-color:var(--rcr-orange);
}

.widget ul{list-style:none;padding-left:0;margin:0}
.widget li+li{margin-top:.6rem}
.widget p:last-child,
.widget ul:last-child{margin-bottom:0}

.comments-area .comment-list{padding-left:1.2rem}

.site-footer{
  background:var(--rcr-black);color:rgba(255,255,255,.85);padding-top:3rem;
}
.site-footer a{color:#fff}
.site-footer__grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:1.5rem;padding-bottom:2rem}
.site-footer .section-title{color:#fff}
.site-footer__bottom{
  border-top:1px solid rgba(255,255,255,.12);padding:1rem 0;font-size:.92rem;color:rgba(255,255,255,.7)
}

.screen-reader-text{
  border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);
  height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute !important;width:1px;word-wrap:normal !important;
}

@media (max-width: 980px){
  .hero-grid,
  .three-up,
  .two-col-content,
  .site-footer__grid,
  .front-widget-grid--three,
  .front-widget-grid--two{
    grid-template-columns:1fr;
  }
  .main-navigation{
    position:absolute;top:84px;left:0;right:0;background:#fff;border-bottom:1px solid var(--rcr-border);
    padding:1rem;display:none;
  }
  .main-navigation.is-open{display:block}
  .main-navigation ul{
    flex-direction:column;
    align-items:flex-start;
    width:100%;
  }
  .main-navigation ul li{width:100%}
  .main-navigation ul a{
    display:block;
    width:100%;
    padding:.5rem 0;
  }
  .main-navigation ul ul{
    position:static;
    display:block;
    border:0;
    box-shadow:none;
    padding:.25rem 0 .25rem 1rem;
    min-width:0;
  }
  .main-navigation .menu-item-has-children > a::after,
  .main-navigation ul ul .menu-item-has-children > a::after{
    content:'';
  }
  .nav-toggle{display:block}
}

@media (max-width: 640px){
  .site-header__inner{min-height:76px}
  .site-tagline{display:none}
  .hero-band{padding:4rem 0 2.5rem}
  .metric-grid{grid-template-columns:1fr}
  .button-row{flex-direction:column;align-items:stretch}
  .card{padding:1.2rem}
}


/* v1.2 page layout refinements */
.page-section{
  padding-top:3rem;
}
.entry-page{
  width:100%;
}
.page-header{
  margin:0 0 1.5rem;
}
.entry-content--page{
  width:100%;
}
.entry-content--page > *:first-child{
  margin-top:0;
}

/* Let plugin and shortcode pages breathe */
.page .content-wide{
  max-width:1280px;
}
.page .entry-content--page .card,
.page .entry-content--page table,
.page .entry-content--page .wp-block-group,
.page .entry-content--page .wp-block-columns{
  max-width:100%;
}

/* Better default spacing for shortcode-driven pages */
.page .entry-content--page > .wp-block-group,
.page .entry-content--page > .wp-block-columns,
.page .entry-content--page > .wp-block-cover,
.page .entry-content--page > .wp-block-media-text{
  margin-bottom:1.5rem;
}

/* Keep editorial content readable even when page wrapper is wide */
.entry-content--page p,
.entry-content--page ul,
.entry-content--page ol,
.entry-content--page blockquote{
  max-width:72ch;
}
.entry-content--page table,
.entry-content--page .wp-block-table,
.entry-content--page iframe,
.entry-content--page form,
.entry-content--page .rcrhwb-wrap,
.entry-content--page [class*="rcrhwb"],
.entry-content--page [class*="race"],
.entry-content--page [class*="driver"],
.entry-content--page [class*="club"],
.entry-content--page [class*="venue"]{
  max-width:100%;
}

/* Plugin-heavy pages often look better without the accent border treatment */
.entry-page .entry-content--page > .card::before{
  display:none;
}


/* v1.3 club / venue visual alignment */
.entry-content--page h2{
  font-size:clamp(1.8rem, 3vw, 2.4rem);
  margin-top:0;
  margin-bottom:.85rem;
}
.entry-content--page h3{
  font-size:clamp(1.2rem, 2vw, 1.5rem);
  margin-top:1.75rem;
  margin-bottom:.75rem;
  padding-bottom:.55rem;
  border-bottom:2px solid rgba(11,31,75,.08);
}

/* Make plugin-heavy sections feel closer to the front page */
.entry-content--page [class*="club"],
.entry-content--page [class*="venue"],
.entry-content--page [class*="meeting"],
.entry-content--page [class*="series"],
.entry-content--page [class*="driver"],
.entry-content--page [class*="stats"],
.entry-content--page [class*="leader"],
.entry-content--page [class*="browser"]{
  color:var(--rcr-grey);
}

/* Generic card styling for plugin panels */
.entry-content--page > div,
.entry-content--page > section{
  max-width:100%;
}
.entry-content--page > div + div,
.entry-content--page > section + section{
  margin-top:1.25rem;
}
.entry-content--page > div:has(> h3),
.entry-content--page > section:has(> h3),
.entry-content--page > div:has(table),
.entry-content--page > section:has(table){
  background:linear-gradient(180deg,#ffffff 0%, #f8fafe 100%);
  border:1px solid var(--rcr-border);
  border-radius:20px;
  padding:1.25rem;
  box-shadow:var(--rcr-shadow);
}

/* Stats / badges / chips */
.entry-content--page strong{
  color:var(--rcr-black);
}
.entry-content--page a{
  text-underline-offset:2px;
}
.entry-content--page a:hover{
  color:var(--rcr-orange);
}

.entry-content--page .button,
.entry-content--page a[class*="button"],
.entry-content--page input[type=submit]{
  border-radius:999px;
}

/* Tables on club and venue pages */
.entry-content--page table{
  margin-top:1rem;
  box-shadow:var(--rcr-shadow);
}
.entry-content--page table th{
  background:linear-gradient(90deg,var(--rcr-navy), #16377f);
}
.entry-content--page table td a{
  font-weight:700;
}

/* Tabs / year filters / pill links */
.entry-content--page a[href*="year="],
.entry-content--page a[href*="meeting"],
.entry-content--page a[href*="series_slug"],
.entry-content--page a[href*="driver_slug"]{
  transition:.2s ease;
}
.entry-content--page a[href*="year="]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.5rem .85rem;
  margin:.2rem .35rem .35rem 0;
  border:1px solid rgba(11,31,75,.12);
  border-radius:999px;
  background:#fff;
  font-weight:800;
  font-family:"Exo 2",sans-serif;
  font-style:italic;
}
.entry-content--page a[href*="year="]:hover{
  background:var(--rcr-navy);
  color:#fff;
  border-color:var(--rcr-navy);
}

/* Club stats area – stronger separation */
.entry-content--page img[alt*="logo"],
.entry-content--page img[alt*="Logo"]{
  background:#fff;
  border:1px solid var(--rcr-border);
  border-radius:18px;
  padding:.75rem;
  box-shadow:var(--rcr-shadow);
}

/* Lists of classes and meta text */
.entry-content--page ul,
.entry-content--page ol{
  padding-left:1.2rem;
}
.entry-content--page li::marker{
  color:var(--rcr-orange);
}

/* Clean leaders and rankings */
.entry-content--page table tr:hover td{
  background:#f3f6fc;
}

/* Bug form / utility forms */
.entry-content--page form{
  background:linear-gradient(180deg,#fff 0%, #f8fafe 100%);
  border:1px solid var(--rcr-border);
  border-radius:20px;
  padding:1.25rem;
  box-shadow:var(--rcr-shadow);
}

/* Small-screen tidy-up for plugin pages */
@media (max-width: 640px){
  .entry-content--page > div:has(> h3),
  .entry-content--page > section:has(> h3),
  .entry-content--page > div:has(table),
  .entry-content--page > section:has(table),
  .entry-content--page form{
    padding:1rem;
  }
  .entry-content--page table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
  }
}


/* v1.4 plugin table and page-title fixes */
.page-header,
.page .entry-title{
  display:none;
}

/* Ensure RC Racer HWB plugin tables always inherit the intended palette */
.entry-content--page .rcrhwb-sortable-table,
.entry-content--page .rcrhwb-lap-compact-table,
.entry-content--page .rcrhwb-table-wrap table,
.entry-content--page table.rcrhwb-sortable-table{
  width:100%;
  border-collapse:collapse;
}

.entry-content--page .rcrhwb-sortable-table thead th,
.entry-content--page .rcrhwb-lap-compact-table thead th,
.entry-content--page .rcrhwb-table-wrap thead th,
.entry-content--page table.rcrhwb-sortable-table thead th{
  background:linear-gradient(90deg,var(--rcr-navy), #16377f) !important;
  color:#fff !important;
  border-bottom:1px solid rgba(255,255,255,.12);
  font-family:"Exo 2",sans-serif;
  font-style:italic;
  font-weight:800;
}

.entry-content--page .rcrhwb-sortable-table tbody td,
.entry-content--page .rcrhwb-sortable-table tbody th,
.entry-content--page .rcrhwb-lap-compact-table tbody td,
.entry-content--page .rcrhwb-table-wrap tbody td{
  color:var(--rcr-grey) !important;
  background:#fff;
}

.entry-content--page .rcrhwb-sortable-table tbody tr:nth-child(even) td,
.entry-content--page .rcrhwb-lap-compact-table tbody tr:nth-child(even) td,
.entry-content--page .rcrhwb-table-wrap tbody tr:nth-child(even) td{
  background:#f8fafd;
}

.entry-content--page .rcrhwb-sortable-table a,
.entry-content--page .rcrhwb-lap-compact-table a,
.entry-content--page .rcrhwb-table-wrap a{
  color:var(--rcr-navy);
  font-weight:700;
}
.entry-content--page .rcrhwb-sortable-table a:hover,
.entry-content--page .rcrhwb-lap-compact-table a:hover,
.entry-content--page .rcrhwb-table-wrap a:hover{
  color:var(--rcr-orange);
}

/* Driver lookup filters and intro */
.entry-content--page .rcrhwb-panel,
.entry-content--page .rcrhwb-driver-hero,
.entry-content--page .rcrhwb-driver-summary-strip,
.entry-content--page .rcrhwb-filter-bar,
.entry-content--page .rcrhwb-year-tabs{
  color:var(--rcr-grey);
}

.entry-content--page .rcrhwb-panel h2,
.entry-content--page .rcrhwb-panel h3,
.entry-content--page .rcrhwb-driver-hero h2,
.entry-content--page .rcrhwb-driver-hero h3{
  color:var(--rcr-black);
  font-family:"Exo 2",sans-serif;
  font-style:italic;
}

.entry-content--page .rcrhwb-driver-meta span,
.entry-content--page .rcrhwb-driver-badge,
.entry-content--page .rcrhwb-section-pills a{
  background:#f5f8fb;
  color:var(--rcr-navy);
  border:1px solid #d7dee5;
}

.entry-content--page .rcrhwb-driver-badge{
  background:var(--rcr-navy);
  color:#fff;
  border-color:var(--rcr-navy);
}

.entry-content--page .rcrhwb-year-tabs a{
  color:var(--rcr-navy);
  background:#fff;
}
.entry-content--page .rcrhwb-year-tabs a:hover{
  color:#fff;
  background:var(--rcr-navy);
}

/* WordPress widgets should allow shortcode content to breathe */
.hero-widget .textwidget,
.front-widget .textwidget,
.footer-widget .textwidget{
  width:100%;
}
