/*
Theme Name: ROTC Theme
Theme URI: https://www.returnofthechampions.com/
Author: Return of the Champions
Description: News-site theme for returnofthechampions.com, built to match the visual language of the league's custom /manage/ app (same palette, type, card system, and helmet art) instead of the stock seos-football theme. Installs alongside seos-football as a selectable option -- activating it does not modify or remove the existing theme. Pulls real league data (this week's headline result, standings, top performer) from /manage/api/wp-feed.php so the WordPress-hosted news pages and the fantasy-management app read as one site.
Version: 0.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rotc-theme
*/

/* ============================================================
   PALETTE + TYPE TOKENS
   Ported directly from manage/assets/mfl26.css's :root block so
   the WordPress-hosted pages and the /manage/ app share one
   design language instead of two. Keep these two files in sync
   by hand if the palette ever changes -- there's no build step
   linking them, this theme is a plain PHP/CSS WordPress theme.
   ============================================================ */
:root{
  --ink:    #2A1810;   /* darkest chrome: nav, footer */
  --ink-2:  #4A2312;   /* brown: links, secondary chrome */
  --accent: #E0531B;   /* orange: the one bright color */
  --paper:  #FDFBF7;   /* cream: page background */
  --card:   #FFFFFF;   /* white: cards */
  --sand:   #EFEAE2;   /* tint: hover + highlighted row */
  --line:   #E4DACE;   /* hairline divider */
  --muted:  #8A7A6C;   /* dates, secondary text */
  --on-ink: #FDFBF7;   /* text on dark chrome */
  --radius: 14px;
}

*{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  font-family:"Roboto", Arial, sans-serif;
  color:var(--ink);
  background:var(--paper);
  margin:0;
  line-height:1.5;
}
img{ max-width:100%; height:auto; }
a{ color:var(--ink-2); text-decoration:none; }
a:hover{ color:var(--accent); }
h1,h2,h3,h4{ font-family:"Roboto Condensed","Arial Narrow",sans-serif; line-height:1.15; margin:0 0 .5em; }

.rotc-wrap{ max-width:1180px; margin:0 auto; padding:0 16px; }
.rotc-container{ max-width:1180px; margin:0 auto; padding:0 16px; }

/* ---- Kicker / section-title pattern, same as .card-title in mfl26.css --- */
.rotc-kicker{
  font-family:"Roboto Condensed",sans-serif; text-transform:uppercase;
  letter-spacing:.08em; font-size:12px; color:var(--accent); font-weight:700;
  margin-bottom:6px; display:block;
}
.rotc-section-title{
  font-family:"Roboto Condensed",sans-serif; text-transform:uppercase;
  font-weight:700; font-size:20px; letter-spacing:.02em; color:var(--ink);
  border-bottom:2px solid var(--line); padding-bottom:8px; margin:0 0 16px;
}

/* ---- Cards -------------------------------------------------- */
.rotc-card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:18px; margin-bottom:20px;
}
.rotc-card:hover{ }

/* ---- Top nav (matches /manage/'s dark bar) ------------------- */
.rotc-nav{ background:var(--ink); color:var(--on-ink); }
.rotc-nav-inner{
  max-width:1180px; margin:0 auto; padding:0 16px; display:flex;
  align-items:center; gap:24px; min-height:60px; flex-wrap:wrap;
}
.rotc-logo{
  font-family:"Roboto Condensed",sans-serif; font-weight:700; font-size:20px;
  text-transform:uppercase; letter-spacing:.03em; color:var(--on-ink);
}
.rotc-logo span{ color:var(--accent); }
.rotc-nav-menu{ list-style:none; display:flex; gap:6px; margin:0; padding:0; flex-wrap:wrap; }
.rotc-nav-menu li{ position:relative; }
.rotc-nav-menu a{
  display:block; padding:20px 12px; color:var(--on-ink); font-family:"Roboto Condensed",sans-serif;
  text-transform:uppercase; font-size:13px; letter-spacing:.05em; font-weight:600;
}
.rotc-nav-menu a:hover{ color:var(--accent); }
.rotc-nav-menu .current-menu-item > a{ color:var(--accent); }
.rotc-nav-menu .sub-menu{
  list-style:none; margin:0; padding:8px 0; position:absolute; top:100%; left:0;
  background:var(--ink); min-width:200px; display:none; z-index:20;
  box-shadow:0 12px 24px rgba(0,0,0,.25);
}
.rotc-nav-menu li:hover > .sub-menu{ display:block; }
.rotc-nav-menu .sub-menu a{ padding:9px 16px; text-transform:none; letter-spacing:0; font-size:13px; }
.rotc-nav-toggle{ display:none; }

@media (max-width:820px){
  .rotc-nav-menu{ display:none; width:100%; flex-direction:column; gap:0; }
  .rotc-nav-menu.is-open{ display:flex; }
  .rotc-nav-menu li{ width:100%; border-top:1px solid rgba(255,255,255,.08); }
  .rotc-nav-menu a{ padding:14px 4px; }
  .rotc-nav-menu .sub-menu{ position:static; box-shadow:none; padding-left:12px; }
  .rotc-nav-toggle{
    display:inline-flex; margin-left:auto; background:none; border:1px solid rgba(255,255,255,.3);
    border-radius:6px; color:var(--on-ink); padding:8px 10px; font-size:13px; cursor:pointer;
  }
}

/* ---- Homepage: league snapshot -------------------------------- */
.rotc-league-wrap{ display:grid; grid-template-columns:2fr 1fr; gap:24px; align-items:start; }
@media (max-width:820px){ .rotc-league-wrap{ grid-template-columns:1fr; } }
.rotc-league-hero{ display:flex; gap:24px; align-items:flex-start; flex-wrap:wrap; }
.rotc-league-hero-helmet{ width:110px; height:110px; object-fit:contain; flex:none; }
.rotc-league-hero-body{ flex:1 1 320px; min-width:240px; }
.rotc-league-headline{ font-size:24px; text-transform:uppercase; margin:4px 0 8px; }
.rotc-league-score{ font-family:"Roboto Condensed",sans-serif; color:var(--muted); font-size:13px; text-transform:uppercase; letter-spacing:.03em; margin-bottom:8px; }
.rotc-league-excerpt{ font-size:15px; line-height:1.6; margin:0 0 10px; }
.rotc-league-cta{ font-family:"Roboto Condensed",sans-serif; text-transform:uppercase; font-size:13px; font-weight:700; letter-spacing:.03em; color:var(--accent); }

/* Small "other games" tiles beside the primary hero -- clicking one
   swaps which game is shown in the primary spot (JS in front-page.php),
   same interactive pattern as /manage/'s recap hub. */
.rotc-league-tiles{ display:flex; flex-direction:column; gap:8px; }
.rotc-league-tile{
  display:flex; align-items:center; gap:10px; text-align:left; background:none;
  border:1px solid var(--line); border-radius:var(--radius); padding:8px 10px;
  cursor:pointer; font-family:inherit; width:100%;
}
.rotc-league-tile:hover{ background:var(--sand); }
.rotc-league-tile.is-active{ background:var(--sand); box-shadow:inset 3px 0 0 var(--accent); }
.rotc-league-tile img{ width:34px; height:34px; object-fit:contain; flex:none; }
.rotc-league-tile-kicker{ display:block; font-family:"Roboto Condensed",sans-serif; text-transform:uppercase; letter-spacing:.06em; font-size:10px; color:var(--accent); font-weight:700; }
.rotc-league-tile-headline{ display:block; font-family:"Roboto Condensed",sans-serif; text-transform:uppercase; font-size:13px; color:var(--ink); line-height:1.3; }

.rotc-standings-mini{ list-style:none; margin:0; padding:0; }
.rotc-standings-mini li{ display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid var(--line); font-size:14px; }
.rotc-standings-mini li:last-child{ border-bottom:none; }
.rotc-standings-mini .rotc-standings-rank{ font-family:"Roboto Condensed",sans-serif; font-weight:700; color:var(--muted); width:18px; flex:none; }
.rotc-standings-mini img{ width:24px; height:24px; object-fit:contain; flex:none; }
.rotc-standings-mini .rotc-standings-name{ flex:1 1 auto; }
.rotc-standings-mini .rotc-standings-record{ color:var(--muted); font-size:13px; }

.rotc-top-performer{ display:flex; align-items:center; gap:12px; }
.rotc-top-performer img{ width:56px; height:56px; border-radius:50%; object-fit:cover; object-position:top center; flex:none; }

/* ---- News grid / cards ----------------------------------------- */
.rotc-news-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:20px; }
.rotc-post-card{ display:flex; flex-direction:column; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; }
.rotc-post-card-media{ aspect-ratio:16/9; background:var(--sand); overflow:hidden; }
.rotc-post-card-media img{ width:100%; height:100%; object-fit:cover; display:block; }
.rotc-post-card-body{ padding:14px 16px 16px; flex:1; display:flex; flex-direction:column; }
.rotc-post-card-date{ font-family:"Roboto Condensed",sans-serif; text-transform:uppercase; letter-spacing:.05em; font-size:11px; color:var(--muted); margin-bottom:6px; }
.rotc-post-card-title{ font-size:18px; margin:0 0 8px; text-transform:none; }
.rotc-post-card-title a{ color:var(--ink); }
.rotc-post-card-title a:hover{ color:var(--accent); }
.rotc-post-card-excerpt{ font-size:14px; color:var(--muted); flex:1; margin:0 0 10px; }
.rotc-post-card-more{ font-family:"Roboto Condensed",sans-serif; text-transform:uppercase; font-size:12px; font-weight:700; letter-spacing:.03em; }

/* ---- Single post / page ----------------------------------------- */
.rotc-article-header{ margin-bottom:20px; }
.rotc-article-title{ font-size:32px; text-transform:none; margin:6px 0 10px; }
.rotc-article-meta{ font-family:"Roboto Condensed",sans-serif; text-transform:uppercase; letter-spacing:.04em; font-size:12px; color:var(--muted); }
.rotc-article-body{ font-size:17px; line-height:1.7; }
.rotc-article-body img{ border-radius:var(--radius); }
.rotc-article-body h2{ font-size:22px; text-transform:uppercase; margin-top:1.6em; }
.rotc-article-body blockquote{ border-left:3px solid var(--accent); margin:1.2em 0; padding:.2em 1.2em; color:var(--muted); font-style:italic; }
.rotc-article-body table{ width:100%; border-collapse:collapse; }
.rotc-article-body table th,.rotc-article-body table td{ border:1px solid var(--line); padding:6px 10px; text-align:left; }
.rotc-tags{ margin-top:24px; display:flex; gap:6px; flex-wrap:wrap; }
.rotc-tags a{ font-size:12px; border:1px solid var(--line); border-radius:999px; padding:4px 10px; color:var(--muted); }

/* ---- Layout: main + sidebar -------------------------------------- */
.rotc-layout{ display:grid; grid-template-columns:2fr 1fr; gap:32px; align-items:start; padding:28px 0 60px; }
@media (max-width:900px){ .rotc-layout{ grid-template-columns:1fr; } }
.rotc-sidebar .rotc-card{ }

/* ---- Comments ----------------------------------------------------- */
.rotc-comments{ margin-top:36px; }
.rotc-comment-list{ list-style:none; margin:0; padding:0; }
.rotc-comment-list li{ border-bottom:1px solid var(--line); padding:16px 0; }
.rotc-comment-form input[type=text],
.rotc-comment-form input[type=email],
.rotc-comment-form textarea{
  width:100%; padding:10px 12px; border:1px solid var(--line); border-radius:8px;
  font-family:inherit; font-size:14px; margin-bottom:10px;
}
.rotc-btn{
  display:inline-block; background:var(--accent); color:var(--on-ink); border:none;
  font-family:"Roboto Condensed",sans-serif; text-transform:uppercase; letter-spacing:.04em;
  font-weight:700; font-size:13px; padding:11px 22px; border-radius:8px; cursor:pointer;
}
.rotc-btn:hover{ background:var(--ink); color:var(--on-ink); }

/* ---- Footer --------------------------------------------------------- */
.rotc-footer{ background:var(--ink); color:var(--on-ink); margin-top:40px; padding:36px 0; }
.rotc-footer a{ color:var(--on-ink); opacity:.85; }
.rotc-footer a:hover{ opacity:1; color:var(--accent); }
.rotc-footer-cols{ display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:24px; }
.rotc-footer-heading{ font-family:"Roboto Condensed",sans-serif; text-transform:uppercase; font-size:13px; letter-spacing:.05em; color:var(--accent); margin-bottom:10px; }
.rotc-footer-bottom{ margin-top:28px; padding-top:16px; border-top:1px solid rgba(255,255,255,.12); font-size:12px; opacity:.7; }

/* ---- Echo Knowledge Base + wpforo baseline compatibility ------------
   These plugins render their own markup inside the_content(); rather
   than fight their internal classes, this just makes sure they sit in
   the same page frame (max-width, background, base font) as the rest
   of the theme. See inc/epkb-compat.php and inc/wpforo-compat.php for
   the PHP side of this. */
.epkb-container, #wpforo{ font-family:"Roboto",Arial,sans-serif; }
.epkb-container a, #wpforo a{ color:var(--ink-2); }
.epkb-container a:hover, #wpforo a:hover{ color:var(--accent); }

/* ---- Generic WP block/editor baseline -------------------------------- */
.alignwide{ margin-left:calc(50% - 50vw + 8px); margin-right:calc(50% - 50vw + 8px); max-width:none; }
.wp-caption-text,figcaption{ font-size:13px; color:var(--muted); text-align:center; margin-top:6px; }
.screen-reader-text{ position:absolute !important; clip:rect(1px,1px,1px,1px); overflow:hidden; height:1px; width:1px; }
