/*
Theme Name: Housing Standards Academy
Theme URI: https://housingstandardsacademy.co.uk
Author: Housing Standards Academy
Description: Editable WordPress landing page theme for Housing Standards Academy course pages.
Version: 1.0.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: housing-standards-academy
*/

:root {
  --font-stack: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --max-width: 1180px;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(20, 30, 44, 0.14);
  --line: rgba(20, 32, 51, 0.13);
  --page: #f8fbfc;
  --ink: #142033;
  --soft: #eaf4f1;
  --accent: #127a6b;
  --accent-2: #d6a12a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-stack);
}

a {
  color: inherit;
  text-decoration: none;
}

a,
summary {
  touch-action: manipulation;
}

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

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-140%);
  border-radius: 6px;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 12px 18px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.site-nav {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  width: min(var(--max-width), calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #ffffff;
}

.brand {
  flex: 0 1 280px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 1.02rem;
  font-weight: 900;
}

.brand img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 7px;
}

.brand span {
  max-width: 250px;
  line-height: 1.15;
}

.site-nav nav,
.site-nav .menu,
.site-nav .primary-menu {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.94rem;
  font-weight: 700;
  list-style: none;
}

.site-nav .menu li,
.site-nav .primary-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav nav a,
.site-nav .menu a,
.site-nav .primary-menu a,
.nav-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-action {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  font-weight: 800;
}

.hero {
  min-height: 72vh;
  display: grid;
  align-items: center;
  padding: 112px max(20px, calc((100vw - var(--max-width)) / 2)) 56px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.hero-inner {
  width: min(780px, 100%);
}

.hero .eyebrow {
  color: #78ead5;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: 4.3rem;
  line-height: 0.96;
}

.hero p:not(.eyebrow) {
  max-width: 640px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.18rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 38px 0 0;
}

.hero-stats div {
  min-width: 150px;
  padding: 0 28px 0 0;
  margin-right: 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats dt {
  font-size: 1.55rem;
  font-weight: 900;
}

.hero-stats dd {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.9rem;
}

.section {
  padding: 64px max(20px, calc((100vw - var(--max-width)) / 2));
  background: var(--page);
}

.section.alt {
  background: var(--soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading.compact {
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.12;
}

.section-heading p:not(.eyebrow) {
  margin: 12px 0 0;
  color: #344154;
  font-size: 1rem;
  line-height: 1.6;
}

.bento-grid,
.course-grid,
.audience-grid,
.resource-grid,
.blog-grid {
  display: grid;
  gap: 16px;
}

.bento-grid {
  grid-template-columns: 1.35fr 1fr 1fr;
}

.course-grid,
.audience-grid,
.resource-grid,
.blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.course-card,
.credential-panel,
.audience-card,
.resource-card,
.blog-card,
.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 36px rgba(20, 30, 44, 0.06);
}

.feature-card,
.course-card,
.audience-card,
.resource-card,
.blog-card {
  padding: 24px;
}

.feature-card {
  min-height: 220px;
}

.feature-card.wide {
  min-height: 260px;
}

.feature-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 14%, #ffffff);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
}

.feature-card h3,
.course-card h3,
.audience-card h3,
.resource-card h3,
.blog-card h3 {
  margin: 20px 0 8px;
  font-size: 1.2rem;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.feature-card p,
.course-card span,
.audience-card p,
.resource-card p,
.blog-card p {
  margin: 0;
  color: #344154;
  line-height: 1.55;
}

.course-card {
  min-height: 205px;
  display: flex;
  flex-direction: column;
}

.course-card p,
.resource-card span,
.blog-card span {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.course-price {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 22px;
  color: #e85d04;
  font-size: 1.06rem;
}

.course-price::before {
  content: "";
  display: block;
  width: 42px;
  height: 2px;
  margin-bottom: 12px;
  background: #e85d04;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.credential-panel {
  padding: 28px;
}

.standards-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.standards-list li {
  display: flex;
  min-height: 46px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.audience-card {
  min-height: 220px;
}

.audience-card span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.audience-card p {
  font-weight: 600;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
}

.faq-list details {
  box-shadow: 0 12px 30px rgba(20, 30, 44, 0.05);
}

.faq-list summary {
  cursor: pointer;
  padding: 18px 20px;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.faq-list p {
  margin: 0;
  padding: 0 20px 20px;
  color: #344154;
  line-height: 1.6;
}

.resource-card,
.blog-card {
  min-height: 210px;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 46px max(20px, calc((100vw - var(--max-width)) / 2));
  background: #0f1a2a;
  color: #ffffff;
}

.cta-band h2 {
  max-width: 700px;
  margin: 0;
  font-size: 2rem;
  line-height: 1.16;
}

.site-footer {
  padding: 50px max(20px, calc((100vw - var(--max-width)) / 2)) 26px;
  background: #0f1a2a;
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(160px, 0.7fr) minmax(160px, 0.7fr);
  gap: 32px;
}

.site-footer .brand {
  color: #ffffff;
}

.footer-brand p {
  max-width: 420px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.site-footer nav {
  display: grid;
  align-content: start;
  gap: 10px;
}

.site-footer h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 0.92rem;
}

.site-footer nav a,
.footer-bottom a {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.94rem;
  line-height: 1.45;
}

.site-footer nav a:hover,
.footer-bottom a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

@media (max-width: 1100px) {
  .course-grid,
  .audience-grid,
  .resource-grid,
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav nav,
  .site-nav .menu,
  .site-nav .primary-menu {
    gap: 12px;
  }

  .brand span {
    max-width: 210px;
  }
}

@media (max-width: 1040px) {
  html {
    scroll-padding-top: 146px;
  }

  .site-nav {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: auto;
    padding-top: 12px;
  }

  .site-nav nav,
  .site-nav .menu,
  .site-nav .primary-menu {
    flex: 1 1 100%;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 12px;
    scrollbar-width: thin;
  }

  .site-nav nav a,
  .site-nav .menu a,
  .site-nav .primary-menu a {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.1);
    white-space: nowrap;
  }

  .nav-action {
    display: none;
  }

  .hero {
    padding-top: 162px;
  }
}

@media (max-width: 860px) {
  .bento-grid,
  .course-grid,
  .split-panel,
  .audience-grid,
  .resource-grid,
  .blog-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .site-nav {
    width: calc(100% - 28px);
  }

  .hero {
    min-height: 72vh;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-stats div {
    min-width: 128px;
    margin: 0 18px 14px 0;
    padding-right: 18px;
  }

  .section-heading h2,
  .cta-band h2 {
    font-size: 1.75rem;
  }

  .cta-band,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  html {
    scroll-padding-top: 164px;
  }

  .brand {
    max-width: calc(100% - 4px);
    font-size: 0.92rem;
    line-height: 1.18;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .site-nav {
    width: calc(100% - 24px);
  }

  .site-nav nav a,
  .site-nav .menu a,
  .site-nav .primary-menu a {
    min-height: 44px;
    font-size: 0.86rem;
  }

  .hero {
    min-height: 76vh;
    padding-top: 176px;
    padding-bottom: 44px;
  }

  .hero h1 {
    font-size: 2.35rem;
    line-height: 1.02;
  }

  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .feature-card,
  .course-card,
  .audience-card,
  .resource-card,
  .blog-card,
  .credential-panel {
    padding: 20px;
  }

  .button {
    width: 100%;
    white-space: normal;
  }

  .hero-stats {
    display: none;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 2.05rem;
  }

  .hero p:not(.eyebrow) {
    line-height: 1.55;
  }

  .brand {
    font-size: 0.84rem;
  }
}
