/* ==========================================
   1. GLOBAL HOMEPAGE SETTINGS (Always Active)
   ========================================== */

.home h1.entry-title { display: none !important; }
.rlj-wrap { padding-top: 0 !important; margin-top: 0 !important; }
.home .entry-content, .home .site-content { padding-top: 0 !important; margin-top: 0 !important; }

/* HOMEPAGE INTRO & GRIDS */
.rlj-intro { text-align: center; padding: 12px 0 6px; }
.rlj-intro p { margin: 4px 0; }
.rlj-stat { font-size: 18px; font-weight: bold; }

.rlj-comp-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 8px; }
.rlj-comp-grid a { display: flex; flex-direction: column; align-items: center; text-decoration: none; font-size: 11px; font-weight: bold; text-align: center; width: 80px; }
.rlj-comp-grid img { width: 70px; height: 70px; object-fit: contain; border: 1px solid #ddd; border-radius: 4px; padding: 4px; background: #fff; margin-bottom: 4px; }

.rlj-stats-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 6px; }
.rlj-stats-grid a, .rlj-browse-teams a, .rlj-more-link a { display: inline-block; padding: 8px 16px; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; font-weight: bold; }
.rlj-browse-teams { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

/* SECTIONS & BLOCKS */
.rlj-section-title { background: #0056b3; color: #fff !important; padding: 8px 12px; text-align: center; font-weight: bold; text-transform: uppercase; border-radius: 4px; margin: 18px 0 12px; }
.rlj-comp-year-label { display: block; width: 100%; text-align: center; font-weight: bold; background: #0056b3; color: #fff !important; padding: 8px; border-radius: 4px; margin: 10px 0; }
.rlj-comp-label { text-align: center; justify-content: center; padding: 8px 14px; font-size: 12px; font-weight: bold; text-transform: uppercase; color: #fff !important; }
.rlj-more-link { text-align: center; }
.rlj-additions-grid .gallery-caption { text-align: center; font-size: 11px; }
.rlj-comp-block { border-radius: 5px; margin-bottom: 14px; overflow: hidden; }

/* COMP BLOCKS */
.rlj-comp-block--nrl { background: #eefaf1; border-left: 5px solid #22c55e; }
.rlj-comp-block--nrl .rlj-comp-label { background: #22c55e; }
.rlj-comp-block--esl { background: #eef7fd; border-left: 5px solid #3b82f6; }
.rlj-comp-block--esl .rlj-comp-label { background: #3b82f6; }
.rlj-comp-block--nrlw { background: #fdf0f8; border-left: 5px solid #ec4899; }
.rlj-comp-block--nrlw .rlj-comp-label { background: #ec4899; }
.rlj-comp-block--qld { background: #fff1f0; border-left: 5px solid #ef4444; }
.rlj-comp-block--qld .rlj-comp-label { background: #ef4444; }
.rlj-comp-block--nsw { background: #f6f0ff; border-left: 5px solid #a855f7; }
.rlj-comp-block--nsw .rlj-comp-label { background: #a855f7; }
.rlj-comp-block--intl { background: #fff9e6; border-left: 5px solid #d4a017; }
.rlj-comp-block--intl .rlj-comp-label { background: #d4a017; }
.rlj-comp-block--championship { background: #fff3eb; border-left: 5px solid #f97316; }
.rlj-comp-block--championship .rlj-comp-label { background: #f97316; }
.rlj-comp-block--refs { background: #eefdfb; border-left: 5px solid #14b8a6; }
.rlj-comp-block--refs .rlj-comp-label { background: #14b8a6; }
.rlj-comp-block--amateur { background: #f5f5f5; border-left: 5px solid #888; }
.rlj-comp-block--amateur .rlj-comp-label { background: #888; }

/* TABS */
ul.wpsm_nav-tabs li a { background: #e5e5e5 !important; color: #222 !important; }
ul.wpsm_nav-tabs li.active a { background: #0056b3 !important; color: #fff !important; }
ul.wpsm_nav-tabs li.active a span { color: #fff !important; }
.tab-content, div[id*="wpsm_tab_"] { border: 1px solid #ddd !important; padding: 16px !important; }

/* MOBILE */
@media (max-width: 480px) {
    .rlj-comp-grid a { width: 68px; }
    .rlj-comp-grid img { width: 58px; height: 58px; }
}

/* ==========================================
   2. DARK MODE OVERRIDES (Internal Pages Only)
   ========================================== */

body.wp-dark-mode-active:not(.home) {
    color: #ffffff !important;
}

body.wp-dark-mode-active:not(.home) a {
    color: #4da6ff !important;
}

body.wp-dark-mode-active:not(.home) a:hover {
    color: #ffffff !important;
}

body.wp-dark-mode-active:not(.home) h1,
body.wp-dark-mode-active:not(.home) h2,
body.wp-dark-mode-active:not(.home) h3,
body.wp-dark-mode-active:not(.home) .rlj-section-title {
    color: #ffffff !important;
}