/*
Theme Name: ClassroomCenter UK
Theme URI: https://classroomcenter.co.uk
Author: ClassroomCenter UK
Description: Free teaching resources and education guides for UK teachers and parents.
Version: 1.0.5
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: classroomcenter
*/

/* ClassroomCenter UK — Responsive Layout */
*{box-sizing:border-box;margin:0;padding:0;}
html,body{overflow-x:hidden;}

/* Hide hamburger on desktop */
@media(min-width:1024px){
  #cc-hbg{display:none!important;}
}
@media(max-width:1023px){
  #cc-hbg{display:flex!important;}
}

/* Responsive article grid */
.cc-article-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:1.2rem;
}
@media(max-width:480px){
  .cc-article-grid{grid-template-columns:1fr;}
  section[id="hero"]{padding:4rem 1rem 2.5rem!important;}
}
@media(min-width:480px) and (max-width:767px){
  .cc-article-grid{grid-template-columns:1fr 1fr;}
}

/* Typography responsive */
@media(max-width:640px){
  h1{font-size:clamp(1.6rem,6vw,2.5rem)!important;}
  h2{font-size:clamp(1.2rem,4vw,1.8rem)!important;}
}

img{max-width:100%;height:auto;}

/* ═══ MOBILE & TABLET RESPONSIVE FIXES ═══ */
@media(max-width:768px){
  /* Article content */
  .single-wrap,.s-single,.entry-content{padding-left:1rem!important;padding-right:1rem!important;}
  /* Related posts - stack */
  .single-wrap div[style*="grid-template-columns:repeat(3"],
  .s-single div[style*="grid-template-columns:repeat(3"]{grid-template-columns:1fr!important;gap:.8rem!important;}
  /* Share buttons */
  div[style*="display:flex"][style*="Share:"]{flex-direction:column!important;}
  /* Author box */
  div[style*="display:flex"][style*="gap:1rem"][style*="flex-wrap:wrap"]{flex-direction:column!important;}
  /* TOC */
  div[style*="max-width:560px"],div[style*="max-width:480px"]{max-width:100%!important;}
  /* Images */
  img{max-width:100%!important;height:auto!important;}
  /* Prev/Next nav */
  .post-nav,.s-post-nav,div[style*="grid-template-columns:1fr 1fr"]{grid-template-columns:1fr!important;gap:.8rem!important;}
  /* Hero text */
  h1{font-size:1.4rem!important;line-height:1.25!important;}
  h2{font-size:1.15rem!important;}
  h3{font-size:1rem!important;}
  /* Cards grid */
  .card-grid,div[style*="grid-template-columns:repeat(2"],div[style*="grid-template-columns:repeat(4"]{grid-template-columns:1fr!important;}
  /* Newsletter form */
  div[style*="display:flex"][style*="max-width:380px"],
  div[style*="display:flex"][style*="max-width:400px"]{flex-direction:column!important;max-width:100%!important;}
  /* Footer grid */
  .footer-grid,footer div[style*="grid-template-columns:1fr 1fr"]{grid-template-columns:1fr!important;}
  /* Category pills/chips horizontal scroll */
  .cat-bar,.cat-strip,.s-cat-strip{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;}
  /* Hide desktop nav, show hamburger */
  .nav-links,.s-nav-links,.desk-nav{display:none!important;}
  /* Table overflow */
  table{display:block;overflow-x:auto;max-width:100%;}
  /* Breadcrumbs wrap */
  nav[aria-label="breadcrumb"]{font-size:.7rem!important;word-break:break-word;}
}

@media(max-width:480px){
  body{font-size:15px!important;}
  h1{font-size:1.2rem!important;}
  /* Tighter padding */
  .single-wrap,.s-single{padding:0 .7rem!important;}
  /* Stack everything */
  div[style*="display:grid"]{grid-template-columns:1fr!important;}
  /* Reading progress bar thicker on mobile */
  #ds-rp,#fb-rp,#cc-rp,#ab-rp,#slug-rp,#ser-rp,#onn-rp{height:4px!important;}
}

@media(min-width:769px) and (max-width:1024px){
  /* Tablet - 2 columns for cards */
  .card-grid,div[style*="grid-template-columns:repeat(4"]{grid-template-columns:repeat(2,1fr)!important;}
  /* Related posts - 2 columns */
  div[style*="grid-template-columns:repeat(3"]{grid-template-columns:repeat(2,1fr)!important;}
}

@media(min-width:1025px){
  /* Desktop content max-width */
  .single-wrap,.s-single{max-width:800px;margin-left:auto;margin-right:auto;}
}

