/* ============================= */
/* Mobile-specific styles only  */
/* ============================= */

@media screen and (max-width: 768px) {

  /* General layout adjustments */
  .container,
  .row {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    flex-direction: column;
  }

  .site-branding,
  footer {
    text-align: center; 
    padding: 1rem;
  }

  .site-branding img,
  footer img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }

/* Hero banner */
.hero-banner {
  max-height: 130px;
  overflow: hidden;
  margin-bottom: 1rem;
  background-size: cover;
  background-position: center top;
  margin-top: -128px; /* Adjust this value to sit just right, 128 looks good */
  z-index: 1;
  position: relative;
}

.hero-banner img {
  width: 50%;
  height: auto;
  object-fit: cover;
}

  /* News ticker */
  .ticker,
  .news-ticker {
    font-size: 14px;
    padding: 0.5rem;
    line-height: 1.2;
    overflow-x: auto;
    white-space: nowrap;
    text-align: center;
    text-overflow: ellipsis;
  }

  .news-ticker span {
    display: inline-block;
    white-space: nowrap;
    animation: ticker-scroll 8s linear infinite;
  }

  .ticker ul {
    display: block;
  }

  .ticker ul li {
    margin-bottom: 4px;
  }

  /* News layout */
  .news-latest-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1rem;
}

/* FEATURED STORY — no box */
.spotlight-feature {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1.5rem;

  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

/* MINI STORIES — keep floating style */
.other-news-box,
.news-card {
  width: 100%;
  max-width: 100%;
  margin-bottom: 1.5rem;

  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 1rem;
  border-radius: 8px;
}

.news-card + .news-card {
  border-top: 1px solid #e0e0e0;
  padding-top: 1rem;
}

  /* 🔓 Widen text and fix alignment */
  .spotlight-feature,
  .news-card,
  .story-info {
    max-width: 100% !important;
    text-align: left !important;
  }
}



/* Single post (news) – nicer featured image on phones */
@media (max-width: 768px){
  body.single-post .post-thumbnail img,
  body.single-post .wp-post-image,
  body.single-post .featured-media img,
  body.single-post .wp-block-post-featured-image img {
    width: 100% !important;
    height: auto !important;         /* stops distortion */
    max-height: 260px !important;    /* make it smaller */
    object-fit: cover !important;    /* crop nicely if tall */
    border-radius: 10px;             /* optional: rounded corners */
  }

  /* if a parent wrapper is forcing a fixed height, kill it */
  body.single-post .post-thumbnail,
  body.single-post .featured-media,
  body.single-post .wp-block-post-featured-image {
    height: auto !important;
    overflow: hidden;                /* tidy crop */
    margin-bottom: 12px;
  }
}



@media screen and (max-width: 768px) {
  .spotlight-image,
  .spotlight-image img {
    margin: 0;
    padding: 0;
    border-radius: 0;
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}

@media screen and (max-width: 768px) {
  /* Navigation: hide desktop nav, show burger */
  .main-navigation {
    display: none !important;
  }

  .main-navigation .nav-menu {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 10px;
    background-color: #0b2471;
    font-size: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-navigation li {
    padding: 0.5rem 0;
    text-align: center;
    margin: 0.3rem 0;
  }

  .main-navigation a {
    font-size: 16px;
    padding: 0.3rem 0;
    display: block;
    text-align: center;
    color: white;
  }

/* Mobile header */
.mobile-header {
  background: #002147;
  padding: 0.1rem 1rem 0 1rem; /* top, right, bottom, left */
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky; /* Changed from relative */
  top: 0;
  z-index: 10000001; /* Higher than .mobile-nav but lower than .burger */
}
}

/* Hide burger on desktop */

.mobile-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  height: 60px;
  position: relative;
  z-index: 10000001;
}

.mobile-logo {
  flex: 1;
  text-align: center;
}

.mobile-logo img {
  max-height: 70px;
  margin: 0 auto;
  margin-top: 10px;
  display: inline-block;
}

body.menu-open {
  overflow: hidden;
  height: 100vh;
}

@media screen and (max-width: 768px) {

  /* Mobile-specific stacking */
  .content-headings-row-split {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }
}

@media screen and (max-width: 768px) {
  .site-header {
    z-index: 1;
    position: relative;
  }
}

@media screen and (max-width: 768px) {
  /* ✅ Style the main news-wrapper */
  body > main .news-wrapper {
    background: white !important;
    padding: 1.5rem 1rem 1rem 1rem !important;
    border-radius: 12px !important;
    margin: -30rem 1rem 0 1rem !important;  /* Pull up the box */
    padding-top: 0 !important;            /* Pull up content inside */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  }

  /* ❌ Reset inner wrapper if it exists (backup safety) */
  .news-wrapper .news-wrapper {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

  /* 🟡 Pull content inside the box up */
  .content-headings-row-split {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* 🛑 Hide section headings on mobile */
  .featured-heading,
  .other-news-heading {
    display: none !important;
  }

/* 🛠 Remove vertical gap above white box */
@media screen and (max-width: 768px) {
  .site-main,
  .site-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .hero-banner {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}

@media screen and (max-width: 768px) {
  .content-heading-left,
  .content-heading-right {
    display: none !important;
  }

  .mobile-news-heading {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #002664;
    text-align: center;
    margin: 1rem 0 -5rem 0;
  }
}

@media screen and (min-width: 769px) {
  .mobile-news-heading {
    display: none;
  }
}
/* ===== Inner-page header adjustments for mobile (inserted by cleanup) ===== */
@media screen and (max-width: 768px) {
  body.page:not(.home) .header-background {
    min-height: 200px;
    padding-bottom: 0;
  }
  body.page:not(.home) .page-hero-container {
    margin-top: 0;
    padding: 1.5rem 1rem;
  }
  body.page:not(.home) .page-hero-title {
    font-size: 2rem;
    padding: 0.75rem 1.25rem;
  }
  body.page:not(.home) .page-hero-subtitle {
    font-size: 1rem;
  }
}

/* === Slim header mobile tweaks === */
@media (max-width:768px){
  .page-header--slim{ padding: 1.25rem 1rem 1rem; }
  .page-header--slim .page-hero-title{ font-size: 1.8rem; }
  .page-header--slim-sub{ font-size: .95rem; }

  body.page:not(.home) .header-background{ min-height: 200px; }
  body.page:not(.home) .page-hero-container{ margin-top: 0; }
}

/* === Slim header vertical control overrides (mobile v2) === */
@media (max-width:768px){
  body.page:not(.home) .page-hero-container{ display:block !important; }
  .page-header--slim{ padding-top: 0.25rem; padding-bottom: 0.5rem; }
}

@media (max-width: 768px){
  .mdp-week-tabs{ display:none; }

  .mdp-week-select-wrap{
    display:flex;
    align-items:center;
    gap:8px;
    margin:12px auto 8px;
    max-width:420px;
  }

  .mdp-week-select-label{ font-weight:600; }

  .mdp-week-select{
    flex:1 1 auto;
    padding:8px 10px;
    border-radius:8px;
  }
}

@media (min-width: 769px){
  .mdp-week-select-wrap{ display:none; }
}

/* Lock scroll when open */
body.menu-open { overflow: hidden; }


/* =========================================
   Mobile Burger Menu (self-contained block)
   ========================================= */
@media screen and (max-width: 768px) {

  /* Burger Icon */
  .burger {
    position: absolute;
    left: 1rem;                 /* on the left */
    width: 32px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 10000060;          /* above drawer */
  }

  /* Top position based on admin bar presence */
  body:not(.admin-bar) .burger { top: 4.4rem; }   /* normal users */
  body.admin-bar .burger { top: 7.2rem; }         /* admin bar visible */

  .burger span {
    display: block;
    height: 4px;
    background: #FFD500;        /* Merseyside Yellow */
    border-radius: 2px;
  }

  /* Drawer (slides in from LEFT) */
#mobileMenu {
  position: fixed;
  top: 0;
  bottom: 0;  /* ✅ replaces height: 100vh to prevent cutoff */
  left: 0;                               /* anchor to left edge */
  transform: translateX(-100%);          /* fully hidden off-screen */
  width: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;     /* ✅ smooth iOS scroll */
  background: #2C3880;                   /* Merseyside blue */
  color: #fff;
  padding: 72px 1rem calc(1rem + env(safe-area-inset-bottom)); 
  box-shadow: 2px 0 10px rgba(0,0,0,.3); /* right-side shadow */
  transition: transform .25s ease;
  z-index: 10000050;                     /* below burger */
}

#mobileMenu.show { 
  transform: translateX(0); 
}


  /* Drawer heading + close “×” */
  #mobileMenu .mobile-menu-heading {
    margin: 0 0 .5rem;
    padding: 0 .5rem;
    font-size: 1.35rem;
    color: #FFD500;
  }
  #mobileMenu .menu-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 0;
    color: #FFD500;           /* Merseyside yellow */
    font-size: 48px;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
  }

  /* Menu list inside the drawer */
  #mobileMenu ul { list-style: none; margin: 0; padding: 0; }
  #mobileMenu li { border-bottom: 1px solid rgba(255,255,255,.12); }
  #mobileMenu a { display: block; padding: .9rem .5rem; color: #fff; text-decoration: none; }
  #mobileMenu a:hover { color: #FFD500; } /* yellow on hover */

  /* Non-clickable containers (headings/sections) */
  #mobileMenu .menu-heading > a,
  #mobileMenu .menu-section > a {
    pointer-events: none;
    cursor: default;
    color: #FFD500;              /* yellow */
    font-weight: 700;
    opacity: .95;
  }
  /* Spacing for containers */
  #mobileMenu .menu-heading > a {
    display: block;
    padding: .6rem .5rem .4rem;
    border-bottom: 1px solid rgba(255,255,255,.15);
    margin-bottom: .25rem;
  }
  #mobileMenu .menu-section > a {
    display: block;
    padding: .5rem .5rem .25rem;
    margin-top: .25rem;
  }
  /* Indentation for children (2nd & 3rd level) */
  #mobileMenu .menu-heading > .sub-menu,
  #mobileMenu .menu-section + .sub-menu { margin: .25rem 0 .5rem .75rem; }
  #mobileMenu .sub-menu .sub-menu { margin-left: 1.25rem; font-size: .95rem; }

  /* Hide outside burger when menu is open */
  .menu-open .burger { visibility: hidden; }

  /* Body lock (mobile only) */
  body.menu-open { overflow: hidden; touch-action: none; }
}




/* ===== Desktop kill-switch for mobile UI ===== */
@media (min-width: 769px){
  #burger,
  .burger,
  #mobileMenu,
  .mobile-nav {
    display: none !important;
  }

  /* if a menu stayed open then user resized to desktop, undo body lock */
  body.menu-open { overflow: auto !important; }
}



/* Base: hide mobile UI everywhere */
#burger,
#mobileMenu { display: none; }

/* Mobile: re-enable them */
@media (max-width: 768px){
  #burger { display: flex; }   /* your .burger flex box */
  #mobileMenu { display: block; }
}

/* Hide mobile-only branding on desktop */
@media (min-width: 769px){
  .mobile-header,
  .mobile-logo,
  .mobile-only {
    display: none !important;
    visibility: hidden !important;
  }
}


@media screen and (max-width: 1024px) {
    body.page:not(.home) .page-hero-container {
        margin-top: -140px; /* adjust until it looks right */
    }

    body.page:not(.home) .content-shell-inner {
        margin-top: -20px; /* adjust until it looks right */
    }
}


/* RESULTS (page 315 & 381) — mobile: BOTW full width, ONE match card per row */
@media (max-width: 768px){

  /* Keep the week section simple */
  body.page-id-315 .mdp-week-block,
  body.page-id-381 .mdp-week-block{
    display:block !important;
    width:100% !important;
    clear:both !important;
  }

  /* Best of the Week: full width on top */
  body.page-id-315 .mdp-best-of-week,
  body.page-id-381 .mdp-best-of-week{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 0 16px !important;
    float:none !important;
    clear:both !important;
    box-sizing:border-box !important;
  }

  /* EXACTLY one card per row */
  body.page-id-315 .mdp-week-block .mdp-match-card,
  body.page-id-381 .mdp-week-block .mdp-match-card{
    position:static !important;
    left:auto !important;
    right:auto !important;
    top:auto !important;
    bottom:auto !important;
    transform:none !important;

    display:block !important;
    float:none !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 0 16px !important;
    clear:both !important;

    flex:0 0 100% !important;
    box-sizing:border-box !important;
  }

  /* If your theme uses inner column classes, make them full width too */
  body.page-id-315 .mdp-week-block .mdp-match-card .column,
  body.page-id-315 .mdp-week-block .mdp-match-card [class*="col-"],
  body.page-id-381 .mdp-week-block .mdp-match-card .column,
  body.page-id-381 .mdp-week-block .mdp-match-card [class*="col-"]{
    width:100% !important;
    max-width:100% !important;
    float:none !important;
  }

  /* Safety: prevent inner overflow */
  body.page-id-315 .mdp-week-block .mdp-match-card *,
  body.page-id-381 .mdp-week-block .mdp-match-card *{
    max-width:100% !important;
    box-sizing:border-box !important;
  }
  body.page-id-315 .mdp-week-block .mdp-match-card img,
  body.page-id-381 .mdp-week-block .mdp-match-card img{
    height:auto !important;
  }
}

/* RESULTS (315 & 381) — mobile fine-tune: widen card + wrap text */
@media (max-width: 768px){

  /* Make each card span the phone width with small side gutters */
  body.page-id-315 .mdp-week-block .mdp-match-card,
  body.page-id-381 .mdp-week-block .mdp-match-card{
    width: calc(100% - 24px) !important;
    margin: 0 12px 16px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  /* Let long names/numbers wrap instead of colliding */
  body.page-id-315 .mdp-week-block .mdp-match-card *,
  body.page-id-381 .mdp-week-block .mdp-match-card *{
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  /* Tighten headings */
  body.page-id-315 .mdp-week-block .mdp-match-card h3,
  body.page-id-315 .mdp-week-block .mdp-match-card .card-title,
  body.page-id-381 .mdp-week-block .mdp-match-card h3,
  body.page-id-381 .mdp-week-block .mdp-match-card .card-title{
    font-size: 1rem !important;
    line-height: 1.25 !important;
    margin: 0 0 8px !important;
  }
}

/* Keep both averages (first + last cell) on one line */
@media (max-width: 768px){
  body.page-id-315 .mdp-week-block .mdp-match-card tr td:first-child,
  body.page-id-315 .mdp-week-block .mdp-match-card tr td:last-child,
  body.page-id-381 .mdp-week-block .mdp-match-card tr td:first-child,
  body.page-id-381 .mdp-week-block .mdp-match-card tr td:last-child{
    white-space: nowrap !important;
  }
}

/* RESULTS (315 & 381) — ensure cards stack vertically */
@media (max-width: 768px){
  /* make the section a normal block flow */
  body.page-id-315 .mdp-week-block,
  body.page-id-381 .mdp-week-block{
    display: block !important;
  }

  /* each card must start on a new line */
  body.page-id-315 .mdp-week-block .mdp-match-card,
  body.page-id-381 .mdp-week-block .mdp-match-card{
    display: block !important;
    float: none !important;
    clear: both !important;
    width: calc(100% - 24px) !important;
    margin: 0 12px 16px !important;
    max-width: 100% !important;
  }

  /* if any wrapper makes children inline-block, cancel it */
  body.page-id-315 .mdp-week-block > *,
  body.page-id-381 .mdp-week-block > *{
    display: block !important;
  }
}





/* LADIES results (381) — tiny alignment fix */
@media (max-width: 768px){

  /* give the wrapper symmetric padding and kill odd offsets */
  body.page-id-381 .mdp-week-block{
    padding: 0 12px !important;
    margin: 0 !important;
  }

  /* BOTW: align like the cards */
  body.page-id-381 .mdp-best-of-week{
    width: 100% !important;
    margin: 0 0 16px !important;
    box-sizing: border-box !important;
  }

  /* cards: full width inside the padded wrapper, no side drift */
  body.page-id-381 .mdp-week-block .mdp-match-card{
    width: 100% !important;            /* use wrapper padding instead of calc(...) */
    margin: 0 0 16px !important;
    left: 0 !important; right: auto !important; transform: none !important;
    box-sizing: border-box !important;
  }

  /* safety: if anything still nudges horizontally */
  body.page-id-381 { overflow-x: hidden; }
}

/* LADIES results (page 381) — make layout match men's (315) */
@media (max-width: 768px){

  /* kill any extra side padding/margins that are shrinking the white box */
  body.page-id-381 .mdp-week-block{
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* BOTW uses the same 12px gutters as cards */
  body.page-id-381 .mdp-best-of-week{
    width: calc(100% - 24px) !important;
    margin: 0 12px 16px !important;
    max-width: none !important;
    float: none !important;
    box-sizing: border-box !important;
  }

  /* cards: identical sizing/gutters to men's page */
  body.page-id-381 .mdp-week-block .mdp-match-card{
    position: static !important;
    display: block !important;
    width: calc(100% - 24px) !important;
    margin: 0 12px 16px !important;
    max-width: none !important;
    left: 0 !important; right: auto !important; top: auto !important; transform: none !important;
    float: none !important; clear: both !important;
    flex: 0 0 100% !important;
    box-sizing: border-box !important;
  }

  /* keep averages on one line (same as 315) */
  body.page-id-381 .mdp-week-block .mdp-match-card tr td:first-child,
  body.page-id-381 .mdp-week-block .mdp-match-card tr td:last-child{
    white-space: nowrap !important;
  }

  /* allow names to wrap cleanly */
  body.page-id-381 .mdp-week-block .mdp-match-card *{
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
  }
}

/* LADIES results (page 381) — match men's mobile width + gutters */
@media (max-width: 768px){

  /* kill extra side padding on the page wrappers */
  body.page-id-381 .content-shell-inner,
  body.page-id-381 .site-content,
  body.page-id-381 .entry-content,
  body.page-id-381 .container,
  body.page-id-381 .wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* ensure the week block itself isn't adding margins */
  body.page-id-381 .mdp-week-block{
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* BOTW: same 12px gutters as men's */
  body.page-id-381 .mdp-best-of-week{
    width: calc(100% - 24px) !important;
    margin: 0 12px 16px !important;
    max-width: none !important;
    float: none !important;
    box-sizing: border-box !important;
  }

  /* Cards: same width/gutters as men's, and centered */
  body.page-id-381 .mdp-week-block .mdp-match-card{
    width: calc(100% - 24px) !important;
    margin: 0 12px 16px !important;
    max-width: none !important;
    left: 0 !important; right: auto !important; top: auto !important; transform: none !important;
    float: none !important; clear: both !important;
    box-sizing: border-box !important;
  }
}



/* County Fixtures/Results — mobile quick fix */
@media (max-width: 768px){

  /* keep container full-width with comfy gutters */
  .fixtures-container{
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* kill multi-column/grid rows that force 2-up on phones */
  .fixtures-container .fixtures-grid,
  .fixtures-container .row,
  .fixtures-container .grid,
  .fixtures-container .cards,
  .fixtures-container .matches{
    display: block !important;
  }

  /* cards: one per row */
  .fixtures-container .fixture-card,
  .fixtures-container .match-card{
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 16px !important;
    float: none !important;
    clear: both !important;
    box-sizing: border-box !important;
  }

  /* tables: make them scrollable instead of breaking/overflowing */
  .fixtures-container table{
    width: 100% !important;
    border-collapse: collapse !important;
  }
  .fixtures-container table,
  .fixtures-container .table,
  .fixtures-container .table-wrap{
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin;
  }

  /* images/logos shouldn’t warp */
  .fixtures-container img{
    max-width: 100% !important;
    height: auto !important;
  }

  /* long team names wrap nicely */
  .fixtures-container *{
    overflow-wrap: anywhere !important;
    word-break: break-word;
    box-sizing: border-box;
  }
}


/* County Fixtures/Results — mobile colors & readability fix */
@media (max-width: 768px){
  /* Base text color inside fixtures on mobile */
  .fixtures-container,
  .fixtures-container * {
    color: #0f1e3a !important;        /* dark navy text */
    text-shadow: none !important;
    mix-blend-mode: normal !important;
  }

  /* Tables/cards backgrounds */
  .fixtures-container,
  .fixtures-container .table-wrap,
  .fixtures-container table,
  .fixtures-container tr,
  .fixtures-container .fixture-card,
  .fixtures-container .match-card {
    background: #ffffff !important;
  }

  /* Table cells */
  .fixtures-container table th,
  .fixtures-container table td {
    color: #0f1e3a !important;
    border-color: rgba(0,0,0,.08) !important;
    font-size: 14px !important;       /* bump legibility a touch */
    line-height: 1.3 !important;
    padding: 8px 10px !important;
  }

  /* Table header look */
  .fixtures-container table thead th {
    background: #f2f6ff !important;   /* light brandy blue */
    font-weight: 600 !important;
  }

  /* Muted/meta text */
  .fixtures-container .muted,
  .fixtures-container .subtext,
  .fixtures-container .meta {
    color: rgba(0,0,0,.65) !important;
  }

  /* Links */
  .fixtures-container a {
    color: #0f1e3a !important;
    text-decoration: none;
  }
  .fixtures-container a:hover { text-decoration: underline; }

  /* Logos/images should not distort */
  .fixtures-container img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* If any SVG icons went white, force fill/stroke */
  .fixtures-container svg,
  .fixtures-container svg * {
    fill: currentColor !important;
    stroke: currentColor !important;
  }
  
  
  /* County Fixtures – mobile card view */
table.mdp-fixtures,
table.mdp-fixtures thead,
table.mdp-fixtures tbody,
table.mdp-fixtures th,
table.mdp-fixtures td,
table.mdp-fixtures tr { display:block; width:100%; }

table.mdp-fixtures thead { display:none; }

table.mdp-fixtures tbody tr{
  background:#fff;
  border:1px solid #e6ebf5;
  border-radius:12px;
  margin:12px 0;
  box-shadow:0 4px 12px rgba(0,0,0,.04);
  overflow:hidden;
}

table.mdp-fixtures tbody td{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:none;
  font-size:16px;
  line-height:1.35;
}

/* Labels for columns */
table.mdp-fixtures tbody td:nth-child(1)::before{ content:"Date"; }
table.mdp-fixtures tbody td:nth-child(2)::before{ content:"Home Team"; }
table.mdp-fixtures tbody td:nth-child(3)::before{ content:"Away Team"; }

table.mdp-fixtures tbody td::before{
  color:#6b7280;
  text-transform:uppercase;
  letter-spacing:.4px;
  font-size:12px;
}
/* 404 mobile tweaks */
.mdp-404{ margin: 28px auto; padding: 18px; border-radius: 10px; box-shadow:none; }
.mdp-404-badge{ margin-top: -30px; padding: 10px 14px 8px; border-radius: 8px; }
.mdp-404-badge h1{ font-size: 1.25rem; }
.mdp-btn{ width: 100%; text-align: center; padding: 12px 0; }

}

@media (max-width: 768px) {
  /* Horizontal scroll */
  .mdp-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* Table sizing */
  .mdp-league {
    table-layout: fixed;
    border-collapse: collapse;
    min-width: 1200px; /* enough for all 12 cols without blowing up */
  }

  /* Cells */
  .mdp-league th,
  .mdp-league td {
    padding: 6px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
    box-sizing: border-box;
  }

  /* 1) POS – a touch wider */
  .mdp-league th.mdp-avg-pos,
  .mdp-league td.mdp-avg-pos {
    width: 25px;
    min-width: 25px;
    text-align: center;
  }

  /* 2) TEAM – a bit wider than before */
  .mdp-league th:nth-child(2),
  .mdp-league td.mdp-left {
    width: 140px;
    min-width: 140px;
  }

  /* 3) P (Played) – slim */
  .mdp-league th:nth-child(3),
  .mdp-league td:nth-child(3) {
    width: 44px;
    min-width: 44px;
    text-align: center;
  }

  /* 4) W */
  .mdp-league th:nth-child(4),
  .mdp-league td:nth-child(4) {
    width: 44px;
    min-width: 44px;
    text-align: center;
  }

  /* 5) D */
  .mdp-league th:nth-child(5),
  .mdp-league td:nth-child(5) {
    width: 44px;
    min-width: 44px;
    text-align: center;
  }

  /* 6) L */
  .mdp-league th:nth-child(6),
  .mdp-league td:nth-child(6) {
    width: 44px;
    min-width: 44px;
    text-align: center;
  }

  /* 7) Sets F */
  .mdp-league th:nth-child(7),
  .mdp-league td:nth-child(7) {
    width: 80px;
    min-width: 80px;
    text-align: center;
  }

  /* 8) Sets A */
  .mdp-league th:nth-child(8),
  .mdp-league td:nth-child(8) {
    width: 80px;
    min-width: 80px;
    text-align: center;
  }

  /* 9) Legs F */
  .mdp-league th:nth-child(9),
  .mdp-league td:nth-child(9) {
    width: 80px;
    min-width: 80px;
    text-align: center;
  }

  /* 10) Legs A */
  .mdp-league th:nth-child(10),
  .mdp-league td:nth-child(10) {
    width: 80px;
    min-width: 80px;
    text-align: center;
  }

  /* 11) +/- */
  .mdp-league th:nth-child(11),
  .mdp-league td.mdp-diff {
    width: 56px;
    min-width: 56px;
    text-align: center;
  }

  /* 12) Pts */
  .mdp-league th:nth-child(12),
  .mdp-league td.mdp-points {
    width: 56px;
    min-width: 56px;
    text-align: center;
  }
}

/* ===== Committee (Mobile) ===== */
@media screen and (max-width: 768px){
  .committee{
    max-width: 100%;
    margin: 1.25rem 0 2rem;
    padding: 0;                    /* allow full-bleed card look */
  }

  .committee-title{
    font-size: 1.1rem;
    padding: 10px 14px;
    border-radius: 0;              /* square edge for mobile aesthetic */
  }

  .committee-card{
    border-radius: 0;
    box-shadow: none;              /* flatter on mobile, cleaner */
    border-bottom: 8px solid #f6f7fb;
  }

  .committee-row{
    display: block;                /* stack Role over Name */
    padding: 12px 14px;
  }

  .committee-row .role{
    margin-bottom: 4px;
    min-width: 0;                  /* remove desktop min width */
  }

  .committee-row .name{
    text-align: left;              /* left-align for readability */
  }
}

/* Ladies averages – MOBILE ONLY, scoped to the Ladies page + table ID */
@media only screen and (max-width: 768px){

  /* Hide all cells on mobile… */
  body.page-id-381 #ladies-averages-table thead th,
  body.page-id-381 #ladies-averages-table tbody td {
    display: none;
  }

  /* …then show Pos, Player, Team (columns 1–3) */
  body.page-id-381 #ladies-averages-table thead th:nth-child(1),
  body.page-id-381 #ladies-averages-table thead th:nth-child(2),
  body.page-id-381 #ladies-averages-table thead th:nth-child(3),
  body.page-id-381 #ladies-averages-table tbody tr.mdp-row td:nth-child(1),
  body.page-id-381 #ladies-averages-table tbody tr.mdp-row td:nth-child(2),
  body.page-id-381 #ladies-averages-table tbody tr.mdp-row td:nth-child(3) {
    display: table-cell;
  }

  /* Toggle UI (no font-weight set here to avoid clobbering bold) */
  body.page-id-381 #ladies-averages-table .mdp-toggle{
    display:inline-flex; align-items:center; gap:6px; cursor:pointer;
  }
  body.page-id-381 #ladies-averages-table .mdp-toggle .icon::before{
    content:'+'; display:inline-block; width:1em; text-align:center;
  }
  body.page-id-381 #ladies-averages-table .mdp-toggle[aria-expanded="true"] .icon::before{
    content:'–';
  }

  /* Details row (no CSS Grid) */
  body.page-id-381 #ladies-averages-table .mdp-details td{
    padding:10px 12px; background:#fafafa; border-top:1px solid #e5e7eb;
  }
  body.page-id-381 #ladies-averages-table .mdp-detail-grid{
    display:flex; flex-wrap:wrap; margin-left:-8px; margin-right:-8px;
  }
  body.page-id-381 #ladies-averages-table .mdp-detail-cell{
    width:50%; padding:6px 8px; box-sizing:border-box;
    display:flex; justify-content:space-between; font-size:.95em;
  }
  body.page-id-381 #ladies-averages-table .mdp-detail-label{ opacity:.75; }
  /* ok to style detail values; doesn’t affect name bold */
  body.page-id-381 #ladies-averages-table .mdp-detail-value{ font-weight:600; }

  /* Compact row padding on mobile only */
  body.page-id-381 #ladies-averages-table .mdp-row td{ padding:8px 10px; }
}


/* ===== Mobile layout for MEN'S Averages table ===== */
@media (max-width: 640px){

  body.page-id-340 .mdp-avg-scope .averages-table{
    width:100%;
    table-layout:fixed;
    border-spacing:0;
  }

/* MEN ONLY: hide extra columns on mobile rows but keep data accessible */
  body.page-id-340 .mdp-avg-scope .averages-table thead th:nth-child(n+4),
  body.page-id-340 .mdp-avg-scope .averages-table tbody tr.mdp-row td:nth-child(n+4) {
    display: none !important;   /* visually gone, but text still exists for JS */
  }




  /* Column widths: Pos narrow, Player wide, Team medium */
  body.page-id-340 .mdp-avg-scope .averages-table thead th:nth-child(1),
  body.page-id-340 .mdp-avg-scope .averages-table tbody td:nth-child(1){ width:3.5ch; text-align:right; }
  body.page-id-340 .mdp-avg-scope .averages-table thead th:nth-child(2),
  body.page-id-340 .mdp-avg-scope .averages-table tbody td:nth-child(2){ width:62%; }
  body.page-id-340 .mdp-avg-scope .averages-table thead th:nth-child(3),
  body.page-id-340 .mdp-avg-scope .averages-table tbody td:nth-child(3){ width:38%; }

  /* Wrap Player/Team for readability */
  body.page-id-340 .mdp-avg-scope .averages-table tbody td:nth-child(2),
  body.page-id-340 .mdp-avg-scope .averages-table tbody td:nth-child(3){
    text-align:left;
    white-space:normal;
    word-break:break-word;
    hyphens:auto;
  }

  /* Compact spacing & font sizes */
  body.page-id-340 .mdp-avg-scope td{ padding:10px 8px; font-size:.95rem; }
  body.page-id-340 .mdp-avg-scope .mdp-avg-head h2{ font-size:1.05rem; }
  body.page-id-340 .mdp-avg-scope .mdp-avg-head .sub{ font-size:.8rem; }
}

@media (max-width: 768px) {
  .mdp-avg-head {
    flex-direction: column;
    align-items: flex-start; /* align everything left */
  }

  .mdp-avg-controls {
    margin-left: 0;
    width: 100%;
  }

  .mdp-avg-controls .mdp-team-filter {
    width: auto;
    min-width: 10ch;
    margin-top: 0.25rem;
  }
}

/* ===== Mobile layout for LADIES' Averages table ===== */
@media (max-width: 640px){

  body.page-id-381 .mdp-avg-scope .averages-table{
    width:100%;
    table-layout:fixed;
    border-spacing:0;
  }

  /* DO NOT hide columns for ladies – keep all stats available */

  /* Column widths: Pos narrow, Player wide, Team medium */
  body.page-id-381 .mdp-avg-scope .averages-table thead th:nth-child(1),
  body.page-id-381 .mdp-avg-scope .averages-table tbody td:nth-child(1){ width:3.5ch; text-align:right; }
  body.page-id-381 .mdp-avg-scope .averages-table thead th:nth-child(2),
  body.page-id-381 .mdp-avg-scope .averages-table tbody td:nth-child(2){ width:62%; }
  body.page-id-381 .mdp-avg-scope .averages-table thead th:nth-child(3),
  body.page-id-381 .mdp-avg-scope .averages-table tbody td:nth-child(3){ width:38%; }

  /* Wrap Player/Team for readability */
  body.page-id-381 .mdp-avg-scope .averages-table tbody td:nth-child(2),
  body.page-id-381 .mdp-avg-scope .averages-table tbody td:nth-child(3){
    text-align:left;
    white-space:normal;
    word-break:break-word;
    hyphens:auto;
  }

  /* Compact spacing & font sizes */
  body.page-id-381 .mdp-avg-scope td{ padding:10px 8px; font-size:.95rem; }
  body.page-id-381 .mdp-avg-scope .mdp-avg-head h2{ font-size:1.05rem; }
  body.page-id-381 .mdp-avg-scope .mdp-avg-head .sub{ font-size:.8rem; }
}

