/* Swansea PAT Training UI (pattestingcourseswansea.co.uk) */
:root {
  --ink: #0E3144;
  --ink-2: #144964;
  --primary: #1577BC;
  --primary-d: #105E96;
  --soft: #E7F3FA;
  --soft-2: #F4F8FB;
  --success: #1B9A46;
  --success-soft: #E6F5EA;
  --star: #00B67A;
  --bg: #FFFFFF;
  --border: #DCE7F0;
  --text: #222B35;
  --muted: #556575;
}

@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/hanken-grotesk-var.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/poppins-700.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/poppins-800.woff2) format('woff2'); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(24, 102, 220, .15);
}
img { max-width: 100%; }
img.sw-brand-crop { max-width: none; }
picture { display: contents; }

a:focus-visible, button:focus-visible, summary:focus-visible, label:focus-within {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

@keyframes swFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes swPop { from { opacity: 0; transform: scale(.97) } to { opacity: 1; transform: scale(1) } }

.sw-vh {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sw-skip {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: 0 0 10px 0; font-weight: 700;
}
.sw-skip:focus { left: 0; }
.sw-wrap { max-width: 1180px; margin: 0 auto; padding: 0 26px; width: 100%; }
.sw-list-plain { list-style: none; margin: 0; padding: 0; }

/* Header & Navigation */
.sw-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.sw-header-inner {
  position: relative; height: 82px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.sw-nav-check { display: none; }
.sw-nav-toggle {
  display: none; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  background: none; border: none; padding: 0; pointer-events: none;
}
.sw-nav-toggle span {
  width: 22px; height: 2px; border-radius: 2px;
  background: var(--ink); display: block; transition: .2s;
}
.sw-nav { display: flex; align-items: center; gap: 20px; }
.sw-nav-link { font-size: 14px; font-weight: 600; color: var(--text); transition: color .15s; }
.sw-nav-link:hover { color: var(--primary); }
.sw-nav-link[aria-current="page"] {
  font-weight: 700; color: var(--ink);
  border-bottom: 2px solid var(--primary); padding-bottom: 3px;
}
.sw-nav-phone {
  font-size: 14px; font-weight: 700; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.sw-btn-soft {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--soft); color: var(--ink);
  font-size: 13.5px; font-weight: 700; padding: 10px 15px; border-radius: 10px;
}
.sw-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--primary); color: #fff;
  font-size: 13.5px; font-weight: 700; padding: 10px 18px; border-radius: 10px;
  transition: background .15s; white-space: nowrap;
}
.sw-btn-primary:hover { background: var(--primary-d); }

@media (max-width: 1040px) {
  .sw-nav-toggle { display: flex; }
  .sw-nav-check {
    display: block; position: absolute; top: 19px; right: 26px;
    width: 44px; height: 44px; margin: 0; opacity: 0; cursor: pointer; z-index: 5;
  }
  .sw-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 12px 20px 18px;
    box-shadow: 0 24px 40px -24px rgba(14, 40, 75, .38);
    display: none;
  }
  #sw-navcheck:checked ~ .sw-nav { display: flex; }
  #sw-navcheck:checked ~ .sw-nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #sw-navcheck:checked ~ .sw-nav-toggle span:nth-child(2) { opacity: 0; }
  #sw-navcheck:checked ~ .sw-nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .sw-nav > a { padding: 12px 6px; border-bottom: 1px solid var(--border); }
  .sw-nav > a:last-child { border-bottom: none; justify-content: center; margin-top: 8px; padding: 13px; }
}

/* Hero Band */
.sw-hero {
  background: var(--ink);
  padding: 56px 0 52px; position: relative; overflow: hidden; color: #fff;
}
.sw-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 44px; align-items: center;
}
.sw-h1 {
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 42px;
  line-height: 1.1; letter-spacing: -.02em; color: #fff; margin: 0 0 18px;
}
.sw-hero-lead { font-size: 17px; line-height: 1.65; color: rgba(255, 255, 255, .92); margin: 0 0 14px; }
.sw-hero-sub { font-size: 14.8px; line-height: 1.65; color: rgba(255, 255, 255, .78); margin: 0 0 22px; }
.sw-hero-facts {
  list-style: none; padding: 14px 0; margin: 0 0 24px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px;
  font-size: 14px; font-weight: 600; color: #fff;
}
.sw-hero-facts li { display: flex; align-items: center; gap: 8px; }
.sw-fact-check { color: #6ee7b7; font-weight: 800; }
.sw-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sw-btn-hero {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff; font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: 8px;
}
.sw-btn-hero:hover { background: var(--primary-d); }
.sw-btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid rgba(255, 255, 255, .32);
  color: #fff; font-weight: 700; font-size: 14.5px; padding: 12px 18px; border-radius: 8px;
}
.sw-hero-media {
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
}
.sw-hero-media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.sw-guarantee-strip {
  margin-top: 26px; padding: 14px 18px; border-radius: 10px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 14px; color: rgba(255, 255, 255, .9);
}

/* Live Dates Section */
.sw-dates-sec { scroll-margin-top: 100px; padding: 54px 0 24px; }
.sw-sec-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.sw-h2 { font-family: 'Poppins', sans-serif; font-size: 29px; font-weight: 800; letter-spacing: -.018em; line-height: 1.22; color: var(--ink); margin: 0 0 12px; }
.sw-lead { max-width: 740px; margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.sw-refresh {
  flex: none; padding: 10px 15px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.sw-refresh:disabled { cursor: wait; opacity: .68; }
.sw-venue-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.sw-venue-card {
  min-width: 0; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; overflow: hidden;
}
.sw-venue-head {
  padding: 20px 24px 16px;
  background: var(--soft-2);
  border-bottom: 1px solid var(--border);
}
.sw-area-sub {
  display: block; margin-bottom: 4px; color: var(--muted);
  font-size: 13px; font-weight: 600;
}
.sw-venue-head h3 { margin: 0 0 5px; color: var(--ink); font-family: 'Poppins', sans-serif; font-size: 20px; line-height: 1.25; font-weight: 800; }
.sw-venue-sub { margin: 0 0 4px; font-weight: 700; font-size: 14px; color: var(--ink); }
.sw-venue-addr { font-style: normal; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.sw-venue-jump { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.sw-venue-jump a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
[data-sw-dates] { padding: 8px 26px 22px; }
.sw-session-list { padding: 0; margin: 0; list-style: none; }
.sw-session {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px 20px; align-items: center;
  border-bottom: 1px solid var(--border); padding: 16px 0; font-size: 14px;
}
.sw-session:last-child { border-bottom: 0; }
.sw-session-price { text-align: right; }
.sw-date { display: block; color: var(--ink); font-weight: 800; font-size: 16px; }
.sw-time { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.sw-price { display: block; color: var(--ink); font-weight: 800; font-size: 16.5px; }
.sw-price-total { display: block; color: var(--muted); font-size: 13px; }
.sw-price small, .sw-price-total small { font-weight: 400; font-size: 12px; color: var(--muted); }
.sw-places { display: block; color: #166534; font-size: 12px; font-weight: 700; margin-top: 2px; }
.sw-places-low { color: #b45309; }
.sw-book {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 18px; min-height: 42px; border-radius: 10px;
  background: var(--primary); color: #fff; font-size: 13.5px; font-weight: 700; white-space: nowrap;
}
.sw-book:hover { background: var(--primary-d); }
.sw-full {
  color: var(--muted); background: #edf2f7; border-radius: 8px;
  font-size: 12px; font-weight: 700; padding: 7px 12px; white-space: nowrap;
}
.sw-empty { color: var(--muted); padding: 14px 0 4px; font-size: 14px; }
.sw-empty a { color: var(--primary); font-weight: 700; text-decoration: underline; }
.sw-more { border-top: 1px solid var(--border); margin-top: 4px; }
.sw-more summary { cursor: pointer; padding: 13px 0 4px; color: var(--primary); font-size: 13.5px; font-weight: 700; }
.sw-status { font-size: 13px; color: var(--muted); margin: 14px 0 0; min-height: 20px; }

/* Content + Sticky Booking Aside */
.sw-band { padding: 56px 0; }
.sw-band-soft { padding: 58px 0; background: var(--soft-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sw-content-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px; align-items: start;
}
.sw-book-card {
  position: sticky; top: 102px;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  padding: 26px; box-shadow: 0 16px 36px -22px rgba(14, 53, 75, .28);
}
.sw-book-tabs {
  display: flex; background: var(--soft-2); border: 1px solid var(--border);
  border-radius: 11px; padding: 4px; gap: 4px; margin-bottom: 18px;
}
.sw-book-tab {
  flex: 1; text-align: center; padding: 10px 8px; border-radius: 8px;
  font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--muted); user-select: none;
}
#sw-aud-me:checked ~ .sw-book-tabs .sw-tab-me,
#sw-aud-teams:checked ~ .sw-book-tabs .sw-tab-teams {
  background: var(--primary); color: #fff;
}
.sw-teams-note {
  display: none; background: var(--soft); border-radius: 11px;
  padding: 12px 14px; margin-bottom: 16px; font-size: 13px; color: var(--ink); font-weight: 600;
}
#sw-aud-teams:checked ~ .sw-teams-note { display: block; }
.sw-amt-vat, .sw-suf-vat { display: none; }
#sw-vat-toggle:checked ~ .sw-price-row .sw-amt-novat,
#sw-vat-toggle:checked ~ .sw-price-row .sw-suf-novat { display: none; }
#sw-vat-toggle:checked ~ .sw-price-row .sw-amt-vat,
#sw-vat-toggle:checked ~ .sw-price-row .sw-suf-vat { display: inline; }
.sw-vat-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 40px; }
.sw-vat-track {
  width: 40px; height: 23px; border-radius: 99px; background: #cbd5e1;
  position: relative; display: inline-block; transition: .18s;
}
.sw-vat-knob {
  position: absolute; top: 2px; left: 2px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 2px rgba(0,0,0,.28);
}
#sw-vat-toggle:checked ~ .sw-price-row .sw-vat-track { background: var(--primary); }
#sw-vat-toggle:checked ~ .sw-price-row .sw-vat-knob { left: 19px; }
.sw-cta-me { display: flex; }
.sw-cta-teams { display: none; }
#sw-aud-teams:checked ~ .sw-cta-me { display: none; }
#sw-aud-teams:checked ~ .sw-cta-teams { display: flex; }

/* Feature Cards & Compliance Grid */
.sw-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.sw-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.sw-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; box-shadow: 0 2px 8px rgba(14, 53, 75, .03);
}
.sw-card h3 {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 17.5px;
  color: var(--ink); margin: 0 0 10px; line-height: 1.3;
}
.sw-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.sw-check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.sw-check-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 15px; color: var(--text); }
.sw-check-dot {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: var(--success-soft); color: var(--success);
  display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; font-weight: 800; font-size: 13px;
}

/* Accordions (Syllabus Modules & FAQs) */
.sw-acc {
  border: 1px solid var(--border); border-radius: 14px;
  background: #fff; overflow: hidden;
}
.sw-acc summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; font-weight: 700; color: var(--ink); font-size: 16px; line-height: 1.35;
}
.sw-acc summary::-webkit-details-marker { display: none; }
.sw-acc-num {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  background: var(--soft); color: var(--primary);
  font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.sw-acc-sign {
  width: 28px; height: 28px; flex: none; border-radius: 8px;
  background: var(--soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; line-height: 1;
}
.sw-acc-sign::after { content: "+"; }
.sw-acc[open] .sw-acc-sign::after { content: "-"; }
.sw-acc-body { padding: 0 22px 20px; color: var(--muted); font-size: 14.8px; line-height: 1.7; animation: swFade .16s ease; }
.sw-acc-body p { margin: 0 0 12px; }
.sw-acc-body p:last-child { margin-bottom: 0; }

/* Semantic Data Tables (IET Thresholds & Certificate Comparison) */
.sw-table-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: 16px; background: #fff; margin-top: 22px;
}
.sw-table { width: 100%; border-collapse: collapse; min-width: 620px; text-align: left; font-size: 14.2px; }
.sw-table th {
  background: var(--ink); color: #fff; font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 13.5px; padding: 14px 18px;
}
.sw-table td { padding: 14px 18px; border-top: 1px solid var(--border); vertical-align: top; color: var(--text); line-height: 1.55; }
.sw-table tr:nth-child(even) td { background: #fafcff; }
.sw-table td strong { color: var(--ink); }

/* Gallery Grid */
.sw-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.sw-gallery figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.sw-gallery img { width: 100%; height: 210px; object-fit: cover; display: block; }
.sw-gallery figcaption { padding: 10px 14px; font-size: 13px; color: var(--muted); }

/* Venue Travel Cards */
.sw-venue-detail-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 26px;
}
.sw-venue-detail-card h3 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 21px; color: var(--ink); margin: 0 0 8px; }
.sw-venue-detail-card p { margin: 10px 0; font-size: 14.5px; color: var(--muted); }
.sw-venue-detail-card strong { color: var(--ink); }
.sw-map-details { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 14px; }
.sw-map-details summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--primary); }
.sw-map-details iframe { width: 100%; height: 260px; border: 0; border-radius: 12px; margin-top: 14px; display: block; }

/* Forms & Prose */
.sw-form { display: flex; flex-direction: column; gap: 16px; }
.sw-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.sw-input {
  width: 100%; padding: 13px 15px; border: 1px solid var(--border);
  border-radius: 11px; font-size: 15px; color: var(--text); background: #fff;
}
.sw-prose { color: var(--text); font-size: 15.5px; line-height: 1.75; max-width: 840px; }
.sw-prose h2 { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 23px; color: var(--ink); margin: 32px 0 12px; }
.sw-prose h3 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 17.5px; color: var(--ink); margin: 22px 0 8px; }
.sw-prose p, .sw-prose li { color: var(--muted); }
.sw-prose a { color: var(--primary); font-weight: 600; text-decoration: underline; }

/* Footer */
.sw-footer { background: var(--ink); color: #fff; padding: 54px 0 30px; }
.sw-footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.sw-footer-heading {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .55); margin-bottom: 14px;
}
.sw-footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: rgba(255, 255, 255, .82); }
.sw-footer-links a:hover { color: #fff; text-decoration: underline; }

/* Sticky Bottom Bar */
.sw-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); box-shadow: 0 -10px 30px -18px rgba(14, 40, 75, .4);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateY(115%); opacity: 0; pointer-events: none; transition: .26s ease;
}
.sw-sticky.is-visible { transform: translateY(0); opacity: 1; pointer-events: auto; }
.sw-sticky-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

@media (max-width: 920px) {
  .sw-hero-grid, .sw-content-grid { grid-template-columns: 1fr; gap: 32px; }
  .sw-book-card { position: static; }
  .sw-venue-grid, .sw-grid-2, .sw-grid-3 { grid-template-columns: 1fr; }
  .sw-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .sw-wrap { padding: 0 18px; }
  .sw-h1 { font-size: 32px; }
  .sw-h2 { font-size: 25px; }
  .sw-session { grid-template-columns: 1fr auto; }
  .sw-session .sw-book, .sw-session .sw-full { grid-column: 1 / -1; }
  .sw-gallery { grid-template-columns: 1fr; }
  .sw-footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
