/*
Theme Name: CFL Theme
Theme URI: http://plymkr.com/cfl
Author: CFL
Description: A clean custom CFL theme with hero section, featured headers, and transparent nav.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cfltheme
*/

body {
    margin: 0;
    font-family: system-ui, sans-serif;
}

/* =======================================================
   HEADER + NAVIGATION (clean rebuild)
   ======================================================= */

/* === Sticky Header === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  background: transparent;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* inner wrapper keeps logo + nav aligned */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1400px;
}

/* logo */
.logo img {
  max-height: 60px;
  width: auto;
  display: block;
}

/* navigation menu */
.site-navigation {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-navigation .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 40px;
}

.site-navigation .menu li a {
  position: relative;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  padding: 10px 0;
  transition: color 0.3s;
}

/* underline animation */
.site-navigation .menu li a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.25s ease-in-out;
}

.site-navigation .menu li a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.site-navigation .menu li a:hover {
  color: #fff;
}

/* === Header scroll effect === */
.site-header.scrolled {
  background-color: rgba(255,255,255,0.85);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  margin-top: 0px !important;
}

.site-header.scrolled .menu li a {
  color: #1b252b;
}

/* === Admin bar offset === */
.admin-bar .site-header {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* === Page content spacing below fixed header === */
.site-content {
  margin-top: 100px;
}

/* =======================================================
   MOBILE NAVIGATION (drawer)
   ======================================================= */
.mobile-menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  display: none;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100vh;
  background: #111;
  color: #fff;
  z-index: 2000;
  transition: right 0.3s ease;
  padding: 80px 25px;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-menu-list li {
  margin-bottom: 18px;
}

.mobile-menu-list a {
  color: #fff;
  font-size: 1.25rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.mobile-menu-list a:hover {
  color: #eecf72;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1900;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.site-header.scrolled .mobile-menu-toggle {
  color: #1b252b;
}

/* === Responsive Toggle (Improved for phone landscape) === */

/* Hide main nav & show hamburger on small screens OR small height */
@media (max-width: 900px), (max-height: 600px) {
  .site-navigation {
    display: none;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .header-inner {
    width: 100%;
    padding: 0 20px;
  }

  .logo img {
    max-height: 48px;
  }
}

/* Tablet & up (wider + taller screens) show full nav */
@media (min-width: 901px) and (min-height: 601px) {
  .site-navigation {
    display: block;
  }

  .mobile-menu-toggle {
    display: none;
  }
}

.page-header.no-thumb {
  background: #0d1117;
}

.page-title {
  font-size: 2.5rem;
  margin: 0;
}

.cfl-page-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-top: 6px;
  font-weight: 500;
}

.page-header-inner {
  position: relative;
  z-index: 2;
}

.cfl-week-header {
	display: none;
}


/* === Hero === */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    position: relative;
    background-size: cover;
    background-position: center;
    color: white;
    padding: 150px 20px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* put it behind content */
    pointer-events: none; /* lets clicks pass through */
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 5em;
    margin-bottom: 0px;
}

/* For tablets and below */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3rem;
  }
}

/* For phones (narrow screens) */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.2rem;   /* smaller heading */
    line-height: 1.2;    /* better readability */
  }
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 20px;
}

.hero a.cta {
    display: inline-block;
    padding: 20px 40px;
	margin: 0 10px;
    background-color: #eecf72;
	border-top-color: #eecf72;
    border-top-width: 1px;
    border-top-style: solid;
    border-right-color: #eecf72;
    border-right-width: 1px;
    border-right-style: solid;
    border-bottom-color: #eecf72;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-left-color: #eecf72;
    border-left-width: 1px;
	border-left-style: solid;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    border-radius: 0px;
    transition: background 0.3s ease;
}

.hero a.cta:hover {
    background-color: #edbb22;
	border-top-color: #edbb22;
    border-top-width: 1px;
    border-top-style: solid;
    border-right-color: #edbb22;
    border-right-width: 1px;
    border-right-style: solid;
    border-bottom-color: #edbb22;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-left-color: #edbb22;
    border-left-width: 1px;
	border-left-style: solid;
}

.hero-buttons .cta:hover {
    background-color: #cc2e2e;
}

.hero-buttons .cta.secondary {
    background-color: transparent;
    color: #ffffff;
	border-top-color: #fff;
    border-top-width: 1px;
    border-top-style: solid;
    border-right-color: #fff;
    border-right-width: 1px;
    border-right-style: solid;
    border-bottom-color: #fff;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-left-color: #fff;
    border-left-width: 1px;
	border-left-style: solid;
}

.hero-buttons .cta.secondary:hover {
    background-color: #ffffff !important;
	border-top-color: #fff;
    border-top-width: 1px;
    border-top-style: solid;
    border-right-color: #fff;
    border-right-width: 1px;
    border-right-style: solid;
    border-bottom-color: #fff;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-left-color: #fff;
    border-left-width: 1px;
	border-left-style: solid;
	color: #000;
}

.page-header {
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(65, 64, 68, 0.55);
    z-index: 1;
}

/* keep text/content above overlay */
.page-header * {
    position: relative;
    z-index: 2;
}

.content-area {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
}

/* === Header / Navigation Refinements === */

/* Logo constraints */
.site-header .logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

/* Push page content down a bit below header */
.site-content {
    margin-top: 40px; /* keeps content from colliding with header */
}

/* For smaller screens (mobile admin bar is taller) */
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        margin-top: 46px;
    }
}

/* Hero overlay and CTA visibility fixes */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 0px 20px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* behind hero-content */
    pointer-events: none; /* allow clicks to pass through */
}

.hero-content {
    position: relative;
    z-index: 2; /* above overlay */
}

.wpcp-wrapper-759 {
	padding: 100px 0 !important;
}
.wpcp-wrapper-759 .sp-wpcpro-section-title {
	margin-top: 0px;
	font-size: 2.5rem;
	color: #1b252b;
}

.cflm-stars { font-size: 1.05rem; letter-spacing: .06em; display:inline-block; }
.cflm-stars { color: #f5b301; } /* gold-ish filled star color */
.cflm-table td .cflm-stars { font-size: 1rem; }

/* Teams page styling */
.cfl-teams-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns */
  gap: 20px;
  margin: 30px 0;
}

.cfl-team-card {
  position: relative;
  background: none;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s ease;
}

/* Tablet & smaller landscape screens (max 1024px) */
@media (max-width: 1024px) {
  .cfl-teams-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile portrait (max 768px) */
@media (max-width: 768px) {
  .cfl-teams-grid {
    grid-template-columns: repeat(3, 1fr); /* ✅ 3-wide on mobile */
    gap: 15px;
  }

  .cfl-team-card {
    padding: 10px;
  }
}

/* Very small screens (max 480px) */
@media (max-width: 480px) {
  .cfl-teams-grid {
    grid-template-columns: repeat(2, 1fr); /* fallback for tiny phones */
  }
}

.cfl-team-card a {
  text-decoration: none;
}

.cfl-team-card:hover {
  transform: scale(1.05);
}

/* ======================================================
   CFL TEAM GRID – FIX PRESTIGE VISIBILITY ON MOBILE
   ====================================================== */

.cfl-team-prestige {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
  color: #FFD700;
}

/* Ensure the stars never get hidden in responsive grid compression */
@media (max-width: 768px) {
  .cfl-teams-grid {
    grid-auto-rows: auto;
  }

  .cfl-team-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 10px;
  }

  .cfl-team-prestige {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 6px;
  }

  .cfl-team-card img.cfl-team-logo {
    max-width: 90%;
    height: auto;
  }
}

/* Extra safeguard for very small screens (max 480px) */
@media (max-width: 480px) {
  .cfl-teams-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
  }

  .cfl-team-card {
    min-height: auto !important;
    height: auto !important;
  }

  .cfl-team-prestige {
    margin-top: 4px;
    text-align: center;
  }
}

.cfl-team-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e91e63;
  color: #111;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
}

.cfl-team-logo {
  max-width: 120px;
  max-height: 120px;
  margin: 0 auto 0px;
  display: block;
}

.cfl-team-placeholder {
  width: 120px;
  height: 120px;
  margin: 0 auto 10px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  border-radius: 8px;
}

.cfl-team-name {
  color: #111;
  font-size: 16px;
  margin: 0;
}

.cfl-team-prestige {
  margin-top: 6px;
  font-size: 20px;
  display: inline-block;
  gap: 2px;
}

.cfl-star {
  font-size: 20px;
  color: #ccc; /* default empty gray */
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
}

.cfl-star.full {
  color: gold;
}

.cfl-star.empty {
  color: #ccc;
}

/* Half star trick: left side gold, right side gray */
.cfl-star.half .cfl-star-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  overflow: hidden;
  color: gold;
}
.cfl-star.half .cfl-star-right {
  color: #ccc;
}

/* Rulebook */
.rulebook-container {
  display: grid !important;
  grid-template-columns: 250px 1fr !important;
  gap: 2rem !important;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.rulebook-sidebar {
  position: sticky;
  top: 160px;
  z-index: 9;
  align-self: start;
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.rulebook-sidebar h3 {
  margin-top: 0;
}

.rulebook-sidebar ul {
  list-style: none;
  padding: 0;
}

.rulebook-sidebar li {
  margin: 0.5rem 0;
}

.rulebook-sidebar a {
  text-decoration: none;
  color: #0056b3;
}

.rulebook-sidebar a:hover {
  text-decoration: underline;
}

.rulebook-content {
  /* content area styling */
}

.rulebook-content h2 {
  margin-top: 3rem;
  border-bottom: 2px solid #ddd;
  padding-bottom: 0.5rem;
}

/* === Rulebook quick jump padding === */
:target {
  scroll-margin-top: 120px; /* adjust this based on your header height + spacing */
}

/* =========================
   Rulebook Responsive Styles
   ========================= */

/* Tablet breakpoint (under 1024px) */
@media (max-width: 1024px) {
  .rulebook-container {
    grid-template-columns: 200px 1fr !important;
    gap: 1.5rem !important;
    padding: 1.5rem;
  }

  .rulebook-sidebar {
    top: 120px;
  }
}

/* Mobile screens (under 768px) */
@media (max-width: 768px) {
  .rulebook-container {
    grid-template-columns: 1fr !important; /* stack vertically */
    gap: 1rem !important;
    padding: 1rem;
  }

  .rulebook-sidebar {
    position: relative; /* disable sticky for small screens */
    top: auto;
    z-index: auto;
    margin-bottom: 1.5rem;
  }

  .rulebook-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .rulebook-sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .rulebook-sidebar li {
    margin: 0;
  }

  .rulebook-sidebar a {
    display: inline-block;
    background: #eef4ff;
    border-radius: 6px;
    padding: 6px 10px;
    color: #004080;
    font-size: 0.9rem;
  }

  .rulebook-sidebar a:hover {
    background: #dceaff;
    text-decoration: none;
  }

  .rulebook-content h2 {
    margin-top: 2rem;
    font-size: 1.2rem;
  }
}

/* Very small screens (under 480px) */
@media (max-width: 480px) {
  .rulebook-container {
    padding: 0.75rem;
  }

  .rulebook-sidebar a {
    font-size: 0.85rem;
    padding: 5px 8px;
  }
}


html {
  scroll-behavior: smooth;
}

/* === CFL Query Loop Overlay Cards (Centered Overlay, Title → Date → Excerpt) === */
.cfl-query-loop-overlay {
  margin-top: 80px;
  margin-bottom: 80px;
}

/* Each card */
.cfl-query-loop-overlay .wp-block-post {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;       /* stack content vertically */
  justify-content: center;      /* vertically center entire text block */
  align-items: center;          /* horizontally center */
  text-align: center;
  min-height: 420px;
  color: #fff;
}

/* Image fills card background */
.cfl-query-loop-overlay .wp-block-post-featured-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
}

.cfl-query-loop-overlay .wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cfl-query-loop-overlay .wp-block-post:hover .wp-block-post-featured-image img {
  transform: scale(1.05);
}

/* Gradient overlay */
.cfl-query-loop-overlay .wp-block-post::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.85) 100%);
  z-index: 1;
}

/* Text overlays (stacked vertically) */
.cfl-query-loop-overlay .wp-block-post-title,
.cfl-query-loop-overlay .wp-block-post-date,
.cfl-query-loop-overlay .wp-block-post-excerpt {
  position: relative;
  z-index: 2;
  padding: 0 20px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
  margin: 0;
}

/* Title styling */
.cfl-query-loop-overlay .wp-block-post-title {
  font-size: 3rem;
  line-height: 1.3;
  margin-bottom: 6px;
}

.cfl-query-loop-overlay .wp-block-post-title a {
  color: #fff;
  text-decoration: none;
}

.cfl-query-loop-overlay .wp-block-post-title a:hover {
  text-decoration: underline;
}

/* Date directly below the title */
.cfl-query-loop-overlay .wp-block-post-date {
  display: block;
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 10px; /* space between date and excerpt */
}

/* Excerpt below date (optional) */
.cfl-query-loop-overlay .wp-block-post-excerpt {
  font-size: 1rem;
  opacity: 0.9;
}

/* Layout grid for posts */
.cfl-query-loop-overlay .wp-block-post-template {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

/* Force visual order in Query Loop cards: Title → Date → Excerpt */
.cfl-query-loop-overlay .wp-block-post {
  display: flex;
  flex-direction: column;      /* stack vertically */
  justify-content: center;     /* center vertically in the card */
  align-items: center;         /* center horizontally */
  text-align: center;
}

/* 1 = Title, 2 = Date, 3 = Excerpt */
.cfl-query-loop-overlay .wp-block-post-title { order: 1; }
.cfl-query-loop-overlay .wp-block-post-date  { order: 2; display: block; margin-top: 6px; }
.cfl-query-loop-overlay .wp-block-post-excerpt { order: 3; margin-top: 10px; }

/* (Optional) if you have categories/author showing, put them after excerpt */
.cfl-query-loop-overlay .wp-block-post-terms,
.cfl-query-loop-overlay .wp-block-post-author {
  order: 4;
  margin-top: 10px;
}


/* Responsive */
@media (max-width: 768px) {
  .cfl-query-loop-overlay .wp-block-post {
    min-height: 320px;
  }
}

.cfl-home-block .wp-block-media-text__media img {
  transition: transform 0.4s ease;
}

.cfl-home-block .wp-block-media-text__media:hover img {
  transform: scale(1.05);
}

/* 2.1 — Allow Gutenberg "Full width" blocks to truly go edge-to-edge */
.entry-content .alignfull,
.content-area .alignfull,
.main .alignfull,
.alignfull {
  /* break out of centered content containers */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* If your theme adds inner padding to Groups, neutralize it for this CTA */
.cfl-discord-cta .wp-block-group__inner-container {
  padding: 0 !important;
}

/* 2.2 — Discord CTA visual styling */
.cfl-discord-cta.alignfull {
  /* remove gaps so it can sit flush to the footer */
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 72px 0; /* vertical breathing room; adjust to taste */

  /* Discord gradient */
  background: linear-gradient(135deg, #5865F2, #404EED);
  color: #fff;
  text-align: center;
  position: relative;
}

/* Keep the content width sane inside the full-width section */
.cfl-discord-cta.alignfull > * {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 20px;
}

/* Headings & text */
.cfl-discord-cta h2,
.cfl-discord-cta p {
  color: #fff;
  margin: 0 0 18px 0;
}

/* Button style (optional) */
.cfl-discord-cta a,
.cfl-discord-cta .wp-element-button,
.cfl-discord-cta .wp-block-button__link {
  display: inline-block;
  background: #fff;
  color: #404EED;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.cfl-discord-cta a:hover,
.cfl-discord-cta .wp-element-button:hover,
.cfl-discord-cta .wp-block-button__link:hover {
  background: #2b2f77;
  color: #fff;
  transform: translateY(-2px);
}

/* 2.3 — Remove any extra gap above your footer if the theme adds it */
.cfl-discord-cta.alignfull + .site-footer,
.cfl-discord-cta.alignfull + footer {
  margin-top: 0 !important;
  padding-top: 0; /* lower if your footer has big top padding */
}

/* Optional: if the parent container clips overflow, unclip the CTA */
.cfl-discord-cta.alignfull {
  z-index: 1;
}

/* === Remove theme's top/bottom margins on the Discord CTA page only === */
/* Replace 123 with your actual page ID */
body.page-id-50 .content-area,
body.page-id-50 .entry-content,
body.page-id-50 main {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.cfl-discord-cta a {
    background-color: transparent !important;
    color: #ffffff;
	border-top-color: #fff;
    border-top-width: 1px;
    border-top-style: solid;
    border-right-color: #fff;
    border-right-width: 1px;
    border-right-style: solid;
    border-bottom-color: #fff;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-left-color: #fff;
    border-left-width: 1px;
	border-left-style: solid;
}

.cfl-discord-cta a:hover {
    background-color: #ffffff !important;
	border-top-color: #fff !important;
    border-top-width: 1px !important;
    border-top-style: solid !important;
    border-right-color: #fff !important;
    border-right-width: 1px !important;
    border-right-style: solid !important;
    border-bottom-color: #fff !important;
    border-bottom-width: 1px !important;
    border-bottom-style: solid !important;
    border-left-color: #fff !important;
    border-left-width: 1px !important;
	border-left-style: solid !important;
	color: #5865f2 !important;
	transform: none !important;
}

/* Prevent horizontal overflow globally */
html, body {
  overflow-x: hidden;
}

/* === Full-width Discord CTA without causing horizontal scroll === */
.cfl-discord-cta.alignfull {
  position: relative;
  width: 100vw;            /* truly full viewport width */
  left: 50%;               /* center based on viewport */
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;        /* contain child overflow */
  box-sizing: border-box;
}

/* ======================================================
   CFL RECRUITING TABLE — FINAL RESPONSIVE + CENTERED STYLE
   ====================================================== */

/* === Scrollable table wrapper === */
.cflm-recruits-list,
.cflm-team-commits {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 auto 40px;
  background: #fefefe;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
  text-align: center;
}

/* === Table Base === */
.cflm-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  min-width: 900px;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 0.95rem;
  text-align: center;
}

/* ======================================================
   STICKY HEADER IMPROVEMENT — Always visible on scroll
   ====================================================== */
.cflm-table thead {
  background-color: #f6f6f6;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cflm-recruits-list.scrolled thead,
.cflm-team-commits.scrolled thead {
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

/* === Table Header === */
.cflm-table th {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  font-size: 0.8rem;
  color: #1b252b;
  padding: 12px 14px;
  border-bottom: 2px solid #f1f1f1;
  white-space: nowrap;
  text-align: center;
}

/* === Table Body === */
.cflm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f1f1;
  vertical-align: middle;
  white-space: nowrap;
  text-align: center;
  color: #1b252b;
}

/* === Striped & Hover Rows === */
.cflm-table tbody tr:nth-child(even) {
  background-color: #f6f6f6;
}

.cflm-table tbody tr:hover {
  background-color: rgba(255,255,255,0.08);
  transition: background 0.25s ease;
}

/* === Player Name + State === */
.cflm-table td:nth-child(2) {
  font-weight: 600;
  color: #eecf72;
}

.cflm-table td:nth-child(2) small {
  display: block;
  color: #ccc;
  font-weight: 400;
  font-size: 0.85rem;
}

/* === Gem/Bust Icon === */
.cflm-bustgem img {
  display: inline-block;
  height: 20px;
  width: auto;
  vertical-align: middle;
  margin-top: -2px;
}

/* === Stars === */
.cflm-stars {
  color: #eecf72;
  font-size: 1.4rem !important;
  letter-spacing: 1px;
}

/* === Team Logo === */
.cflm-team-logo-link img {
  height: 40px !important;
  width: auto;
  vertical-align: middle;
  border-radius: 4px;
}

/* === Position Tag (like 247Sports) === */
.cflm-pos-tag {
  display: inline-block;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 4px 7px;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #1b252b;
  background: transparent;
  line-height: 1;
  white-space: nowrap;
}

.cflm-table tbody tr:hover .cflm-pos-tag {
  border-color: #eecf72;
}

/* ======================================================
   CFL RECRUITING — RESPONSIVE 3-COLUMN CARD STYLE
   (like 247 layout; works with current <table>)
   ====================================================== */
@media (max-width: 768px) {

  /* Hide table headers */
  .cflm-table thead { display: none; }

  /* Each row becomes a card */
  .cflm-table tbody tr {
    display: grid;
    grid-template-columns: 60px 1fr 60px; /* rank | details | logo/team */
    grid-template-rows: auto auto auto auto auto;
    gap: 2px 8px;
    background: #fff;
    border-radius: 10px;
    margin: 10px 0;
    padding: 12px 14px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  }

  .cflm-table tbody td {
    border: none;
    background: transparent;
    padding: 0;
    text-align: left;
    color: #fff;
    font-size: 0.95rem;
  }

  /* 1️⃣ Rank */
  .cflm-table tbody td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    font-size: 1.4rem;
    font-weight: 900;
    color: #00ff9c;
    text-align: center;
    align-self: start;
  }

  /* 2️⃣ Player name + state */
  .cflm-table tbody td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    font-weight: 700;
    color: #ffd700;
  }

  .cflm-table tbody td:nth-child(2) small {
    display: block;
    color: #ccc;
    font-size: 0.9rem;
  }

  /* 3️⃣ Team logo */
  .cflm-table tbody td:nth-child(10) {
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
    align-self: center;
  }

  /* 4️⃣ Height / Weight line */
  .cflm-table tbody td:nth-child(6),
  .cflm-table tbody td:nth-child(7) {
    grid-column: 2;
    color: #ddd;
    font-size: 0.9rem;
    display: inline;
  }
  .cflm-table tbody td:nth-child(6)::after {
    content: " / ";
    opacity: 0.6;
  }

  /* 5️⃣ Stars line */
  .cflm-table tbody td:nth-child(9) {
    grid-column: 2;
    grid-row: 3;
    margin-top: 4px;
  }
  .cflm-stars {
    font-size: 1.1rem !important;
    color: #FFD700;
  }

  /* 6️⃣ Position */
  .cflm-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 4;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
  }

  /* 7️⃣ Pos Rank + Archetype (if you want under position) */
  .cflm-table tbody td:nth-child(5),
  .cflm-table tbody td:nth-child(4) {
    grid-column: 2;
    grid-row: 4;
    color: #aaa;
    font-size: 0.85rem;
  }

  /* Hide bust/gem column for simplicity */
  .cflm-table tbody td:nth-child(8) {
    display: none;
  }

  /* tighter mobile adjustments */
  .cflm-table tbody tr + tr { margin-top: 12px; }
}

/* ====== CFL Top Recruits – Modern 6-column layout ====== */
/* Prefix: croot- */

.croot-table {
  display: grid;
  gap: 10px;
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

/* Header row */
.croot-row.croot-head {
  display: grid;
  grid-template-columns: 60px 1.6fr 0.6fr 0.8fr 0.6fr 1.2fr; /* rank | player | position | stars | tag | team */
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f8f8fb;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

/* Data rows */
.croot-row {
  display: grid;
  grid-template-columns: 60px 1.6fr 0.6fr 0.8fr 0.6fr 1.2fr; /* must match header columns */
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #f1f1f4;
  border-radius: 12px;
  background: #fff;
  transition: box-shadow .2s ease, transform .2s ease;
}
.croot-row:not(.croot-head):hover {
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
  transform: translateY(-2px);
}

/* Columns */
.croot-col { min-width: 0; }

.croot-rank {
  font-weight: 700;
  font-size: 18px;
  text-align: center;
}

.croot-player .croot-player-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.croot-avatar {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  background: #f0f0f3;
  border: 1px solid #ececf2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.croot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.croot-player-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.croot-player-info .croot-name {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
  font-size: 15px;
}

.croot-meta {
  font-size: 12px;
  color: #555;
  margin-bottom: 2px;
  line-height: 1.25;
}
.croot-state {
  font-size: 12px;
  color: #777;
}

/* Position column */
.croot-position {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: #1c1c1c;
}

/* Stars column */
.croot-stars {
  text-align: center;
}
.croot-stars .cflm-stars {
  font-size: 18px;
  letter-spacing: 2px;
  display: inline-block;
  color: #eab308;
}

/* Tag (Gem/Bust) */
.croot-tag {
  display: flex;
  align-items: center;
  justify-content: center;
}
.croot-gb {
  height: 26px;
  width: auto;
  display: block;
}
.croot-gb--empty {
  display: inline-block;
  width: 26px;
  height: 26px;
  opacity: 0.2;
  background: transparent;
}

/* Team logo column */
.croot-team {
  display: flex;
  align-items: center;
  justify-content: center;
}
.croot-team-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.croot-team-logo {
  height: 40px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.1));
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.croot-team-name {
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
}

/* Empty message */
.croot-empty {
  padding: 20px;
  text-align: center;
  color: #666;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .croot-row.croot-head,
  .croot-row {
    grid-template-columns: 52px 1.6fr 0.8fr 0.6fr 0.6fr 1.2fr;
  }
  .croot-team-logo { height: 36px; }
}

@media (max-width: 700px) {
  .croot-position { display: none; }
  .croot-row.croot-head,
  .croot-row {
    grid-template-columns: 52px 1.8fr 0.8fr 0.6fr 1.2fr; /* hides position column */
  }
  .croot-avatar { width: 48px; height: 48px; }
  .croot-team-logo { height: 34px; }
}

@media (max-width: 540px) {
  .croot-row.croot-head { display: none; } /* hide table header on mobile */

  .croot-row {
    grid-template-columns: 44px 1fr 64px;
    grid-template-areas:
      "rank player team"
      "rank stars tag";
    gap: 8px 10px;
    padding: 10px;
  }
  .croot-rank { grid-area: rank; text-align: center; }
  .croot-player { grid-area: player; }
  .croot-stars { grid-area: stars; text-align: left; }
  .croot-tag   { grid-area: tag;   justify-content: flex-start; }
  .croot-team  { grid-area: team;  justify-content: flex-end; }

  .croot-player .croot-player-wrap {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 8px;
  }
  .croot-avatar { width: 44px; height: 44px; }
  .croot-team-logo { height: 30px; }
}

.cflm-rm-footerbar {
    text-align: right;
    margin-top: 10px;
    border-top: 1px solid #e2e2e2;
    padding-top: 10px;
}
.cflm-rm-footerbar .button {
    background: #1a73e8;
    color: #fff;
    border-radius: 6px;
}


/* === CFL Rank Card Layout === */
.cfl-rank-card {
  position: relative;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cfl-rank-card:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
}
.cfl-rank-overlay {
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px;
  flex-wrap: wrap;
  color: #fff;
}
.rank-number {
  font-size: 4rem;
  font-weight: 900;
  color: #FFD700;
  margin-right: 20px;
  line-height: 1;
  text-shadow: 3px 3px 8px rgba(0,0,0,0.8);
}
.team-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.team-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #FFD700;
  object-fit: cover;
  margin-bottom: 8px;
}
.team-name {
  font-size: 2rem;
  margin: 0;
  font-weight: 700;
}
.team-meta {
  margin-top: 4px;
  font-size: 1rem;
  color: #eee;
}
.team-meta span {
  margin-right: 16px;
}
.cfl-score {
  font-size: 3.5rem;
  font-weight: 800;
  color: #00FF9C;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}
.trend {
  font-size: 2rem;
  font-weight: 900;
  text-align: right;
}
.trend.up { color: #00FF9C; }
.trend.down { color: #FF4444; }
.trend.equal { color: #AAAAAA; }

/* Mobile Adjustments */
@media (max-width: 768px) {
  .cfl-rank-overlay {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .rank-number { font-size: 2.5rem; margin: 0 0 8px; }
  .cfl-score { font-size: 2.25rem; margin-top: 12px; }
  .team-logo { width: 60px; height: 60px; margin: 0 auto 8px; }
}

/* === Center ONLY the team name/nickname, keep everything else the same === */

/* Anchor the overlay so we can position the name in the middle */
.cfl-rank-overlay {
  position: relative;
  min-height: 220px; /* ensures enough vertical room for a true center */
}

/* Keep original stack for logo/meta, but reserve a little space since the name is absolute */
.team-details {
  position: relative;
  padding-top: 56px; /* prevents meta from sliding up under the centered name */
}

/* Center the team name horizontally & vertically within the card */
.team-name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90%, 900px);
  text-align: center;
  z-index: 2;

  /* keep your original look, just making it pop a bit */
  color: #FFD700;
  text-shadow: 3px 3px 8px rgba(0,0,0,0.8);
  letter-spacing: 1px;
  line-height: 1.1;
}

/* Make sure right-side score/trend always sit above the background */
.cfl-rank-right {
  position: relative;
  z-index: 3;
}

/* Mobile: revert to normal flow so nothing overlaps on small screens */
@media (max-width: 768px) {
  .cfl-rank-overlay {
    min-height: unset;
  }
  .team-details {
    padding-top: 0;
  }
  .team-name {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 8px;
    text-align: center;
  }
}

/* === CFL Rank link styling for team and coach names === */
/* Force styling for team name link inside CFL Rank cards */
.cfl-rank-card .team-name a {
  display: inline-block;
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-decoration: none !important;
  letter-spacing: 1px;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.8);
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.cfl-rank-card .team-name a:hover {
  color: #ffffff !important;
  text-shadow: 4px 4px 12px rgba(255, 215, 0, 0.9);
}


/* Coach name link inside the meta area */
.team-meta a,
.coach-link {
  color: #00FF9C;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.team-meta a:hover,
.coach-link:hover {
  color: #FFD700;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

/* ===== CFL Login Page Styling ===== */

.cfl-login-box {
  max-width: 420px;
  margin: 60px auto;
  padding: 36px 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.08);
  text-align: center;
  font-family: "Inter", system-ui, sans-serif;
}

.cfl-login-box h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #101010;
}

.cfl-login-subtext {
  color: #666;
  font-size: 14px;
  margin-bottom: 24px;
}

.cfl-login-form-wrap form p {
  margin-bottom: 16px;
  text-align: left;
}

.cfl-login-form-wrap label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.cfl-login-form-wrap input[type="text"],
.cfl-login-form-wrap input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.cfl-login-form-wrap input[type="text"]:focus,
.cfl-login-form-wrap input[type="password"]:focus {
  border-color: #0f3ecf;
  outline: none;
}

.cfl-login-form-wrap input[type="submit"] {
  width: 100%;
  background: #0f3ecf;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cfl-login-form-wrap input[type="submit"]:hover {
  background: #142fa8;
}

/* Divider */
.cfl-login-divider {
  position: relative;
  text-align: center;
  margin: 28px 0;
}
.cfl-login-divider span {
  background: #fff;
  padding: 0 10px;
  color: #888;
  font-size: 13px;
  position: relative;
  z-index: 2;
}
.cfl-login-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e2e2e2;
  z-index: 1;
}

/* Discord Button */
.cfl-discord-login {
  text-align: center;
}
.cfl-discord-login .mo_openid_login,
.cfl-discord-login .miniorange-social-login {
  display: inline-block;
}
.cfl-discord-login button,
.cfl-discord-login a {
  background: #5865F2 !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 10px 20px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(88,101,242,0.3);
  transition: background 0.2s ease;
}
.cfl-discord-login button:hover,
.cfl-discord-login a:hover {
  background: #4752C4 !important;
}

/* Links */
.cfl-login-links {
  margin-top: 24px;
  font-size: 14px;
}
.cfl-login-links a {
  color: #0f3ecf;
  text-decoration: none;
  font-weight: 500;
}
.cfl-login-links a:hover {
  text-decoration: underline;
}

.mo-openid-app-icons>p {
	display: none;
}

/* Logout view */
.cfl-login-box.logged-in {
  text-align: center;
}
.cfl-btn-logout {
  display: inline-block;
  padding: 10px 20px;
  background: #e52d27;
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
}
.cfl-btn-logout:hover {
  background: #c11f19;
}

/* ✅ Universal Modal Overlay Fix */
.cflm-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9999;
  overflow-y: auto; /* Allow vertical scroll inside overlay */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.cflm-overlay.active {
  display: flex;
}

.cflm-overlay-content {
  background: #fff;
  color: #333;
  border-radius: 10px;
  max-width: 480px;
  width: 90%;
  padding: 24px;
  margin: 40px 0; /* allows space to scroll if needed */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* ✅ Disable background scrolling when overlay is active */
body.cflm-modal-open {
  overflow: hidden;
  touch-action: none;
}



/* ==========================
   FOOTER STYLING (Desktop)
   ========================== */
.site-footer {
  background-color: #1b252b; /* dark background */
  color: #fff;
  padding: 80px 0;
  position: relative;
}

/* Use flex to align logos left and text right */
.site-footer .content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* left logos, right text */
  flex-wrap: wrap;
}

/* === LOGO GROUP === */
.footer-logos {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo,
.footer-logo-secondary {
  display: block;
  height: 60px;
  width: auto;
}

/* === TEXT GROUP === */
.footer-text {
  text-align: right;
}

.footer-text p {
  margin: 0;
  line-height: 1.4;
  font-size: 0.95rem;
}

.footer-text .footer-subtext {
  opacity: 0.6;
  font-size: 1rem;
}

/* ==========================
   Tablet Portrait (≤1024px)
   ========================== */
@media (max-width: 1024px) {
  .footer-logo,
  .footer-logo-secondary {
    height: 40px;
  }

  .footer-text p {
    font-size: 0.9rem;
  }

  .footer-text .footer-subtext {
    font-size: 0.8rem;
  }
}

/* ==========================
   Mobile Portrait (≤768px)
   ========================== */
@media (max-width: 768px) {
  .site-footer {
    padding: 30px 0;
    text-align: center;
  }

  .site-footer .content-area {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .footer-logos {
    justify-content: center;
    gap: 12px;
  }

  .footer-logo,
  .footer-logo-secondary {
    height: 32px;
  }

  .footer-text {
    text-align: center;
  }

  .footer-text p {
    font-size: 14px;
  }

  .footer-text .footer-subtext {
    font-size: 13px;
  }
}

/* ==========================
   Very Small Phones (≤480px)
   ========================== */
@media (max-width: 480px) {
  .site-footer {
    padding: 40px 0;
  }

  .footer-logo,
  .footer-logo-secondary {
    height: 26px;
  }

  .footer-text p {
    font-size: 13px;
  }

  .footer-text .footer-subtext {
    font-size: 12px;
  }
}
