/*
Theme Name: SimpleGrid
Theme URI: https://example.com/simplegrid
Author: Milo
Author URI: https://example.com
Description: A simple, responsive WordPress theme with a full-width sticky header, a custom grid layout, no sidebars, and a footer that always sticks to the bottom of the viewport.
Version: 2.8.0
Requires at least: 5.9
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simplegrid
Tags: full-width-template, grid-layout, custom-menu, sticky-post, translation-ready
*/

/* =========================================================
   1. CSS Variables / Design Tokens
   ========================================================= */
:root {
  --sg-bg: #f5f5f3;          /* page background — matches provided screenshot */
  --sg-header-bg: #ffffff;   /* header background — white per spec */
  --sg-text: #2b2b2b;
  --sg-muted: #6b6b6b;
  --sg-border: #e2e2df;
  --sg-accent: #2b6cb0;
  --sg-accent-dark: #1e4e82;
  --sg-card-bg: #ffffff;
  --sg-radius: 10px;
  --sg-header-height: 72px;
  --sg-transition: 0.25s ease;
}

/* =========================================================
   2. Reset / Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--sg-bg);
  color: var(--sg-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sg-accent); text-decoration: none; transition: color var(--sg-transition); }
a:hover { color: var(--sg-accent-dark); }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
  width: 1px; word-wrap: normal !important;
}

/* =========================================================
   3. Sticky-footer page skeleton
   Full-height flex column so the footer always sits at the
   bottom of the viewport when content is short, and pushes
   below the fold naturally when content is long.
   ========================================================= */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1 0 auto; /* grow to fill space, pushing footer down */
  width: 100%;
}

/* =========================================================
   4. Full-width Header + Sticky Menu
   The topbar (branding + nav) is what actually sticks; the
   category grid below it scrolls away normally and uses the
   theme's page background colour, not white.
   ========================================================= */
.site-header {
  width: 100%;
}

.header-topbar {
  width: 100%;
  background-color: var(--sg-header-bg);
  border-bottom: 1px solid var(--sg-border);
  position: sticky;
  top: 0;
  z-index: 999;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--sg-header-height);
}

/* -- Category grid (bottom of header, page-background colour) -- */
.header-categories {
  width: 100%;
  background-color: var(--sg-bg);
  padding: 2.5rem 0 0;
}

/* -- Featured image banner (shown under the 8-tab category grid) -- */
.page-featured-image {
  width: 100%;
  background-color: var(--sg-bg);
  padding: 1.75rem 0 0;
}

.page-featured-image__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--sg-radius);
  border: 1px solid var(--sg-border);
}

@media (max-width: 600px) {
  .page-featured-image__img {
    max-height: 220px;
  }
}

.category-card {
  display: block;
  background: var(--sg-card-bg);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  padding: 1.5rem;
  transition: box-shadow var(--sg-transition), border-color var(--sg-transition), transform var(--sg-transition);
}

.category-card:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  border-color: #c9c9c5;
  transform: translateY(-2px);
}

.category-card__title {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--sg-text);
  margin-bottom: 0.25rem;
}

.category-card__subtitle {
  display: block;
  font-size: 0.85rem;
  color: var(--sg-muted);
}

.site-branding .site-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.site-branding .site-title a {
  color: var(--sg-text);
}

.site-branding .site-description {
  margin: 0;
  font-size: 0.85rem;
  color: var(--sg-muted);
}

.custom-logo-link img {
  max-height: 44px;
  width: auto;
}

/* Primary nav */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  display: flex;
  gap: 1.75rem;
}

.main-navigation ul ul {
  position: absolute;
  background: var(--sg-header-bg);
  border: 1px solid var(--sg-border);
  border-radius: 8px;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0;
  min-width: 180px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all var(--sg-transition);
}

.main-navigation li { position: relative; }

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-navigation ul ul li { width: 100%; }

.main-navigation ul ul a {
  display: block;
  padding: 0.5rem 1rem;
}

.main-navigation a {
  color: var(--sg-text);
  font-weight: 500;
  padding: 0.5rem 0;
  display: inline-block;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--sg-accent);
}

/* Mobile menu toggle button (hamburger) */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--sg-border);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  align-items: center;
  justify-content: center;
}

.menu-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--sg-text);
  margin: 4px 0;
  transition: transform var(--sg-transition), opacity var(--sg-transition);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   5. Custom Grid System (gridgrid)
   Float-based responsive grid — 1/2, 1/3, 1/4, 1/5, 1/6
   columns with offsets. Collapses to full width under 768px.
   ========================================================= */
.gridgrid { width: 1000px; position: relative; margin: 0 auto; padding: 0; }
.gridgrid:after { content: "\0020"; display: block; height: 0; clear: both; visibility: hidden; }

.gridgrid .f-right { float: right !important; }
.gridgrid .f-left  { float: left !important; }

.gridgrid .row {}
.gridgrid .row:before, .gridgrid .row:after { content: '\0020'; display: block; overflow: hidden; visibility: hidden; width: 0; height: 0; }
.gridgrid .row:after { clear: both; }
.gridgrid .row { zoom: 1; }

.gridgrid .wrap-col { margin: 10px; }

.gridgrid .col-1-2, .gridgrid .col-1-3, .gridgrid .col-2-3, .gridgrid .col-1-4, .gridgrid .col-2-4, .gridgrid .col-3-4, .gridgrid .col-1-5, .gridgrid .col-2-5, .gridgrid .col-3-5, .gridgrid .col-4-5, .gridgrid .col-1-6, .gridgrid .col-2-6, .gridgrid .col-3-6, .gridgrid .col-4-6, .gridgrid .col-5-6 { float: left; display: inline-block; }

.gridgrid .col-full { width: 100%; }

.gridgrid .col-1-2, .gridgrid .col-1-2-fixed { width: 50%; }
.gridgrid .offset-1-2 { margin-left: 50%; }

.gridgrid .col-1-3, .gridgrid .col-1-3-fixed { width: 33.33%; }
.gridgrid .col-2-3, .gridgrid .col-2-3-fixed { width: 66.66%; }
.gridgrid .offset-1-3 { margin-left: 33.33%; }
.gridgrid .offset-2-3 { margin-left: 66.66%; }

.gridgrid .col-1-4, .gridgrid .col-1-4-fixed { width: 25%; }
.gridgrid .col-2-4, .gridgrid .col-2-4-fixed { width: 50%; }
.gridgrid .col-3-4, .gridgrid .col-3-4-fixed { width: 75%; }
.gridgrid .offset-1-4 { margin-left: 25%; }
.gridgrid .offset-2-4 { margin-left: 50%; }
.gridgrid .offset-3-4 { margin-left: 75%; }

.gridgrid .col-1-5, .gridgrid .col-1-5-fixed { width: 20%; }
.gridgrid .col-2-5, .gridgrid .col-2-5-fixed { width: 40%; }
.gridgrid .col-3-5, .gridgrid .col-3-5-fixed { width: 60%; }
.gridgrid .col-4-5, .gridgrid .col-4-5-fixed { width: 80%; }
.gridgrid .offset-1-5 { margin-left: 20%; }
.gridgrid .offset-2-5 { margin-left: 40%; }
.gridgrid .offset-3-5 { margin-left: 60%; }
.gridgrid .offset-4-5 { margin-left: 80%; }

.gridgrid .col-1-6, .gridgrid .col-1-6-fixed { width: 16.66%; }
.gridgrid .col-2-6, .gridgrid .col-2-6-fixed { width: 33.33%; }
.gridgrid .col-3-6, .gridgrid .col-3-6-fixed { width: 50%; }
.gridgrid .col-4-6, .gridgrid .col-4-6-fixed { width: 66.66%; }
.gridgrid .col-5-6, .gridgrid .col-5-6-fixed { width: 83.33%; }
.gridgrid .offset-1-6 { margin-left: 16.66%; }
.gridgrid .offset-2-6 { margin-left: 33.33%; }
.gridgrid .offset-3-6 { margin-left: 50%; }
.gridgrid .offset-4-6 { margin-left: 66.66%; }
.gridgrid .offset-5-6 { margin-left: 83.33%; }

/* Grid responsive breakpoints */
@media only screen and (min-width: 960px) and (max-width: 1199px) {
  .gridgrid { width: 960px; }
}

@media only screen and (min-width: 768px) and (max-width: 959px) {
  .gridgrid { width: 768px; }
}

@media only screen and (max-width: 767px) {
  .gridgrid, .gridgrid .col-1-2, .gridgrid .col-1-3, .gridgrid .col-2-3, .gridgrid .col-1-4, .gridgrid .col-2-4, .gridgrid .col-3-4, .gridgrid .col-1-5, .gridgrid .col-2-5, .gridgrid .col-3-5, .gridgrid .col-4-5, .gridgrid .col-1-6, .gridgrid .col-2-6, .gridgrid .col-3-6, .gridgrid .col-4-6, .gridgrid .col-5-6 { width: 100%; }

  .gridgrid .offset-1-2, .gridgrid .offset-1-3, .gridgrid .offset-2-3, .gridgrid .offset-1-4, .gridgrid .offset-2-4, .gridgrid .offset-3-4, .gridgrid .offset-1-5, .gridgrid .offset-2-5, .gridgrid .offset-3-5, .gridgrid .offset-4-5, .gridgrid .offset-1-6, .gridgrid .offset-2-6, .gridgrid .offset-3-6, .gridgrid .offset-4-6, .gridgrid .offset-5-6 { margin-left: 0; }
}

/* =========================================================
   5b. Equal-height card grids (header categories + footer
   guides). The gridgrid system above is float-based, which
   breaks down when cards have uneven text length: a shorter
   card lets the float algorithm pull the *next* card up into
   the gap beside it instead of respecting a clean row, so
   cards end up misaligned/staggered instead of forming a
   tidy grid. Real CSS Grid fixes this — rows always line up
   no matter how much a card's text wraps.
   ========================================================= */
.header-categories .row--cards,
.footer-guides .row--cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.header-categories .row--cards::before,
.header-categories .row--cards::after,
.footer-guides .row--cards::before,
.footer-guides .row--cards::after {
  content: none;
}

.header-categories .row--cards .col-1-4,
.footer-guides .row--cards .col-1-4 {
  float: none;
  display: block;
  width: auto;
}

.header-categories .row--cards .wrap-col,
.footer-guides .row--cards .wrap-col {
  margin: 0;
  height: 100%;
}

.category-card,
.footer-guide-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media only screen and (min-width: 768px) and (max-width: 959px) {
  .header-categories .row--cards,
  .footer-guides .row--cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 767px) {
  .header-categories .row--cards,
  .footer-guides .row--cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* =========================================================
   6. Content Area + Cards (built on gridgrid)
   ========================================================= */
.content-area {
  padding: 10px 0 3rem;
  width: 100%;
}

.sg-card {
  background: var(--sg-card-bg);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  overflow: hidden;
  transition: transform var(--sg-transition), box-shadow var(--sg-transition);
}

.sg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.sg-card__thumb { aspect-ratio: 16 / 10; overflow: hidden; }
.sg-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

.sg-card__body { padding: 1.25rem; }
.sg-card__title { font-size: 1.15rem; margin: 0 0 0.5rem; }
.sg-card__title a { color: var(--sg-text); }
.sg-card__meta { font-size: 0.8rem; color: var(--sg-muted); margin-bottom: 0.75rem; }
.sg-card__excerpt { color: var(--sg-muted); font-size: 0.95rem; }
.sg-card__readmore { display: inline-block; margin-top: 1rem; font-weight: 600; }

/* Single post / page article */
.entry-header { margin-bottom: 1.5rem; }
.entry-title { font-size: 2rem; margin: 0 0 0.5rem; text-align: center; }
.entry-meta { color: var(--sg-muted); font-size: 0.9rem; }
.entry-content { background: var(--sg-bg); border: none; border-radius: 0; padding: 0; }
.entry-content img { border-radius: 8px; }

.pagination { display: flex; justify-content: center; gap: 0.75rem; margin-top: 2.5rem; }
.pagination a, .pagination span {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--sg-border);
  border-radius: 6px;
  background: var(--sg-card-bg);
}
.pagination .current { background: var(--sg-accent); color: #fff; border-color: var(--sg-accent); }

/* =========================================================
   7. Full-width Footer (always at bottom via flex skeleton)
   Contains: "Useful guides" link grid -> divider -> bottom bar
   (legal links + copyright).
   ========================================================= */
.site-footer {
  width: 100%;
  background-color: var(--sg-header-bg);
  flex-shrink: 0; /* never compress — anchors to bottom */
}

/* -- Useful guides grid -- */
.footer-guides {
  padding: 2.5rem 0 1.5rem;
}

.footer-guides__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: var(--sg-text);
}

.footer-guide-card {
  display: block;
  padding: 0.9rem 1.1rem;
  background: var(--sg-card-bg);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  color: var(--sg-accent);
  font-weight: 500;
  font-size: 0.95rem;
  transition: box-shadow var(--sg-transition), border-color var(--sg-transition);
}

.footer-guide-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  border-color: #c9c9c5;
  color: var(--sg-accent-dark);
}

/* -- Divider between guides and legal bar -- */
.footer-divider {
  max-width: 1000px;
  margin: 0 auto;
  border-top: 1px solid var(--sg-border);
}

/* -- Bottom bar: legal links + copyright -- */
.footer-bottom {
  padding: 1.25rem 0;
}

.footer-legal-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-legal-nav a {
  color: var(--sg-accent);
  font-size: 0.95rem;
}

.footer-legal-nav a:hover {
  color: var(--sg-accent-dark);
}

.footer-copy {
  color: var(--sg-muted);
  font-size: 0.85rem;
  text-align: right;
}

/* =========================================================
   8. Responsive breakpoints (menu + footer)
   Grid breakpoints are handled in section 5 above.
   ========================================================= */
@media (max-width: 782px) {
  .menu-toggle { display: inline-flex; }

  .main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sg-header-bg);
    border-bottom: 1px solid var(--sg-border);
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
  }

  .main-navigation ul {
    flex-direction: column;
    width: 100%;
    padding: 0.5rem 1.5rem 1rem;
    display: none;
    gap: 0;
  }

  .main-navigation.is-open ul { display: flex; }

  .main-navigation ul ul {
    position: static;
    box-shadow: none;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    padding-left: 1rem;
  }

  .main-navigation li.is-submenu-open > ul { display: flex; }

  .main-navigation a { padding: 0.65rem 0; width: 100%; }

  .footer-guides { padding: 2rem 1rem 1rem; }
  .footer-guides__title { padding: 0 0.5rem; }
  .footer-divider { margin: 0 1rem; }
  .footer-bottom { padding: 1.25rem 1rem; }
  .footer-copy { text-align: left; margin-top: 0.5rem; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 1rem; }
  .header-categories { padding: 1.75rem 1rem 0; }
  .content-area { padding: 10px 0 2.5rem; }
  .entry-title { font-size: 1.6rem; }
  .entry-content { padding: 1.25rem; }
}

/* =========================================================
   9. Guide / Informational Page Templates
   Styling for the 16 footer guide pages — breadcrumbs,
   article content, callout boxes, and FAQ schema blocks.
   ========================================================= */

/* -- Breadcrumbs -- */
.sg-breadcrumbs {
  padding: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--sg-muted);
  text-align: center;
}

.sg-breadcrumbs a {
  color: var(--sg-accent);
}

.sg-breadcrumbs span {
  margin: 0 0.4rem;
}

/* -- Guide article header -- */
.guide-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--sg-border);
}

.guide-header h1 {
  text-align: center;
  font-size: 2.2rem;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  color: var(--sg-text);
}

.guide-header .guide-intro {
  font-size: 1.1rem;
  color: var(--sg-muted);
  margin: 0;
  line-height: 1.6;
}

/* -- Guide article body -- */
.guide-body {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--sg-text);
}

.guide-body h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
  color: var(--sg-text);
}

.guide-body h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--sg-text);
}

.guide-body p {
  margin: 0 0 1.1rem;
}

.guide-body ul,
.guide-body ol {
  margin: 0 0 1.1rem 1.5rem;
  padding: 0;
}

.guide-body ul li {
  list-style: disc;
  margin-bottom: 0.4rem;
}

.guide-body ol li {
  list-style: decimal;
  margin-bottom: 0.4rem;
}

.guide-body a {
  color: var(--sg-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* -- Course listing cards -- */
.course-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 1.5rem 0;
  list-style: none;
  padding: 0;
}

.course-list__item {
  background: #eef4fa;
  border: 1px solid #c3dbeb;
  border-left: 4px solid var(--sg-accent);
  border-radius: var(--sg-radius);
  padding: 1.5rem;
  transition: box-shadow var(--sg-transition), border-color var(--sg-transition), background var(--sg-transition);
}

.course-list__item:hover {
  box-shadow: 0 6px 18px rgba(43,108,176,0.12);
  border-color: var(--sg-accent);
  background: #e4eff8;
}

.course-list__title {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--sg-accent-dark);
  margin: 0 0 0.5rem;
  text-align: center;
}

.course-list__desc {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--sg-muted);
  margin: 0 0 0.75rem;
}

.course-list__link {
  display: block;
  width: fit-content;
  margin: 0.75rem auto 0;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--sg-accent);
  text-decoration: none !important;
  border-radius: var(--sg-radius);
  transition: background var(--sg-transition), box-shadow var(--sg-transition);
}

.course-list__link:hover,
.course-list__link:focus {
  color: #fff !important;
  background: var(--sg-accent-dark);
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(43,108,176,0.25);
}


.guide-body a:hover {
  color: var(--sg-accent-dark);
}

/* -- Callout / highlight box -- */
.guide-callout {
  background: #eef6fc;
  border-left: 4px solid var(--sg-accent);
  border-radius: 0 8px 8px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.97rem;
}

.guide-callout p:last-child {
  margin-bottom: 0;
}

/* -- Course calendar / dates table -- */
.course-calendar {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.course-calendar__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--sg-card-bg);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  overflow: hidden;
}

.course-calendar__table thead {
  background: var(--sg-accent);
}

.course-calendar__table thead th {
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.course-calendar__table tbody tr {
  border-top: 1px solid var(--sg-border);
  transition: background var(--sg-transition);
}

.course-calendar__table tbody tr:hover {
  background: #eef4fa;
}

.course-calendar__table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

/* Status badges */
.calendar-status {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}

.calendar-status--available {
  background: #d4edda;
  color: #155724;
}

.calendar-status--limited {
  background: #fff3cd;
  color: #856404;
}

.calendar-status--full {
  background: #f8d7da;
  color: #721c24;
}

/* Disabled / waitlist button variant */
.btn-book--disabled {
  background: var(--sg-muted);
  border-color: var(--sg-muted);
  color: #fff !important;
  cursor: default;
}

.btn-book--disabled:hover {
  background: var(--sg-muted);
  border-color: var(--sg-muted);
  box-shadow: none;
}

/* Responsive: stack as cards on mobile */
@media (max-width: 640px) {
  .course-calendar__table thead { display: none; }

  .course-calendar__table,
  .course-calendar__table tbody,
  .course-calendar__table tr,
  .course-calendar__table td {
    display: block;
    width: 100%;
  }

  .course-calendar__table tr {
    border: 1px solid var(--sg-border);
    border-radius: var(--sg-radius);
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
  }

  .course-calendar__table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 1rem;
    text-align: right;
  }

  .course-calendar__table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--sg-accent-dark);
    text-align: left;
    padding-right: 1rem;
  }
}

/* -- Enrolment / Payment box -- */
.enrolment-box {
  background: #eef6fc;
  border: 1px solid #c3dbeb;
  border-left: 4px solid var(--sg-accent);
  border-radius: var(--sg-radius);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  font-size: 0.97rem;
  line-height: 1.7;
}

.enrolment-box h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sg-accent-dark);
  margin: 1rem 0 0.5rem;
}

.enrolment-box h3:first-child {
  margin-top: 0;
}

.enrolment-box p:last-child {
  margin-bottom: 0;
}

.enrolment-box__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.btn-book {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--sg-accent);
  text-decoration: none !important;
  border: 1.5px solid var(--sg-accent);
  border-radius: var(--sg-radius);
  transition: background var(--sg-transition), color var(--sg-transition), box-shadow var(--sg-transition);
}

.btn-book:hover,
.btn-book:focus {
  color: #fff !important;
  background: var(--sg-accent-dark);
  border-color: var(--sg-accent-dark);
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(43,108,176,0.25);
}

.btn-book--outline {
  color: var(--sg-accent-dark) !important;
  background: #fff;
  border: 1.5px solid var(--sg-accent);
}

.btn-book--outline:hover,
.btn-book--outline:focus {
  background: var(--sg-accent);
  color: #fff !important;
  border-color: var(--sg-accent);
}


/* -- FAQ block -- */
.guide-faq {
  margin: 2rem 0;
}

.guide-faq__item {
  background: var(--sg-card-bg);
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.guide-faq__item h3 {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--sg-text);
}

.guide-faq__item h3::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--sg-accent);
}

.guide-faq__item .guide-faq__answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--sg-muted);
  line-height: 1.7;
}

/* -- Guide footer links (related guides) -- */
.guide-related {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--sg-border);
}

.guide-related h3 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: var(--sg-text);
}

.guide-related ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.guide-related ul li a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--sg-card-bg);
  border: 1px solid var(--sg-border);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--sg-accent);
  text-decoration: none;
  transition: border-color var(--sg-transition), box-shadow var(--sg-transition);
}

.guide-related ul li a:hover {
  border-color: var(--sg-accent);
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}


/* -- Contact form -- */
.guide-contact-form label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sg-text);
}
.guide-contact-form input[type="text"],
.guide-contact-form input[type="email"],
.guide-contact-form select,
.guide-contact-form textarea {
  border: 1px solid var(--sg-border);
  border-radius: var(--sg-radius);
  background: var(--sg-card-bg);
  color: var(--sg-text);
  font-size: 0.95rem;
  transition: border-color var(--sg-transition), box-shadow var(--sg-transition);
}
.guide-contact-form input[type="text"]:focus,
.guide-contact-form input[type="email"]:focus,
.guide-contact-form select:focus,
.guide-contact-form textarea:focus {
  outline: none;
  border-color: var(--sg-primary, #0B7BFF);
  box-shadow: 0 0 0 3px rgba(11, 123, 255, 0.12);
}
.guide-contact-form input[type="submit"] {
  background: var(--sg-primary, #0B7BFF);
  color: #fff;
  border: none;
  border-radius: var(--sg-radius);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 24px;
  cursor: pointer;
  transition: opacity var(--sg-transition), transform var(--sg-transition);
}
.guide-contact-form input[type="submit"]:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.guide-contact-form .required {
  color: #dc2626;
}

/* -- Responsive -- */
@media (max-width: 767px) {
  .guide-header h1 { font-size: 1.6rem; }
  .guide-body { font-size: 0.97rem; }
  .guide-body h2 { font-size: 1.25rem; }
}

/* =========================================================
   11. Homepage (front-page.php)
   ========================================================= */

/* -- Hero -- */
.home-hero {
  padding: 2.5rem 0 1.5rem;
}

.home-hero__title {
  font-size: 2rem;
  text-align: center;
  margin: 0 0 1.25rem;
  color: var(--sg-text);
}

.home-hero__copy {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--sg-text);
  line-height: 1.75;
}

.home-hero__copy p {
  margin: 0 0 1rem;
  font-size: 0.97rem;
}

/* -- Course grid -- */
.home-courses {
  padding: 0 0 2.5rem;
}

.home-courses .wrap-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.home-course-card {
  background: var(--sg-card-bg);
  border: 1px solid var(--sg-border);
  border-left: 4px solid var(--sg-accent);
  border-radius: var(--sg-radius);
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--sg-transition), transform var(--sg-transition);
}

.home-course-card:hover {
  box-shadow: 0 10px 24px rgba(0,0,0,0.07);
  transform: translateY(-3px);
}

.home-course-card__level {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sg-accent);
  margin: 0 0 0.35rem;
}

.home-course-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--sg-text);
  margin: 0 0 0.6rem;
}

.home-course-card__desc {
  font-size: 0.88rem;
  color: var(--sg-muted);
  line-height: 1.6;
  flex-grow: 1;
  margin: 0 0 1rem;
}

.home-course-card__readmore {
  display: inline-block;
  align-self: flex-start;
  padding: 0.45rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff !important;
  background: var(--sg-accent);
  border: 1.5px solid var(--sg-accent);
  border-radius: var(--sg-radius);
  text-decoration: none !important;
  transition: background var(--sg-transition), color var(--sg-transition), box-shadow var(--sg-transition);
}

.home-course-card__readmore:hover {
  background: var(--sg-accent-dark);
  border-color: var(--sg-accent-dark);
  box-shadow: 0 4px 12px rgba(43,108,176,0.2);
}

/* -- Trust strip -- */
.home-trust {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--sg-border);
}

.home-trust__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.home-trust__item {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sg-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.home-trust__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sg-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* -- Optional body content -- */
.home-body {
  padding: 0 0 2.5rem;
}

/* -- Responsive -- */
@media (max-width: 959px) {
  .home-courses .wrap-col {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-trust__row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
  }
}

@media (max-width: 767px) {
  .home-courses .wrap-col {
    grid-template-columns: 1fr;
  }
  .home-trust__row {
    grid-template-columns: 1fr;
  }
  .home-hero__title {
    font-size: 1.6rem;
  }
}
