/* =========================================================
   Act Ready Training - shared styles for every page
   ========================================================= */

/* ---------- 1. Colours, fonts and sizes (change them once here) ---------- */
:root {
  --navy: #14213D;
  --navy-dark: #0E1830;
  --navy-soft: #23345C;
  --red: #D62828;
  --red-dark: #B91C1C;
  --red-tint: #FDECEC;
  --grey-bg: #F5F7FA;
  --grey-line: #E5E7EB;
  --text: #1F2937;
  --text-soft: #4B5563;
  --white: #FFFFFF;
  --whatsapp: #25D366;

  --font-heading: "Montserrat", Arial, sans-serif;
  --font-body: "Inter", Arial, sans-serif;

  --radius: 16px;
  --max-width: 1200px;
}

/* ---------- 2. Basic reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--navy);
}

a:hover {
  color: var(--red);
}

/* Keeps content centred with space on the sides */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}

.section-grey {
  background: var(--grey-bg);
}

.section-title {
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 40px);
}

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--red-dark);
}

.lead {
  font-size: 18px;
  color: var(--text-soft);
}

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(20, 33, 61, 0.2);
}

.btn-red {
  background: var(--red);
  color: var(--white);
}

.btn-red:hover {
  color: var(--white);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
}

.btn-white:hover {
  color: var(--navy);
}

/* ---------- 4. Header and menu ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--grey-line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo img {
  height: 80px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--navy);
}

.nav a:hover {
  color: var(--red);
}

.nav .btn {
  padding: 12px 20px;
  font-size: 15px;
}

.nav a.btn-red,
.nav a.btn-red:hover {
  color: var(--white);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  color: var(--navy);
  cursor: pointer;
}

/* Phone and small tablet: the menu folds behind the button */
@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .logo img {
    height: 64px;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--grey-line);
    padding: 8px 24px 20px;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--grey-line);
  }

  .nav .btn {
    margin-top: 12px;
    justify-content: center;
    border-bottom: none;
  }
}

/* ---------- 5. Hero (top banner) ---------- */
.hero {
  background: var(--navy);
  color: var(--white);
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding-top: 72px;
  padding-bottom: 72px;
}

.hero-text {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero .eyebrow {
  color: #FCA5A5;
}

.hero h1 {
  color: var(--white);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
}

.hero-sub {
  font-size: 19px;
  color: #E5E7EB;
  max-width: 520px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.credentials {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid #2E4170;
  font-size: 15px;
  color: #E5E7EB;
}

/* WSIB First Aid Program badge: always shown at its own shape (height follows width) */
.badge {
  display: block;
  flex-shrink: 0;
  height: auto;
  border-radius: 8px; /* softens the white edge of the image only, the badge itself is untouched */
}

.badge-hero {
  width: 150px;
}

.badge-large {
  width: 200px;
}

.badge-footer {
  width: 140px;
}

@media (max-width: 480px) {
  .credentials {
    flex-direction: column;
    align-items: flex-start;
  }
}

.badge-placeholder {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--white);
  color: #6B7280;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
}

/* Grey boxes that hold the place of a photo until we have it */
.image-placeholder {
  border-radius: var(--radius);
  background: #E5E9F0;
  border: 2px dashed #C3CAD6;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-size: 15px;
}

.hero .image-placeholder {
  flex: 1 1 400px;
  min-width: 0;
  height: 400px;
  background: var(--navy-soft);
  border-color: #4B5E8A;
  color: #C7D2FE;
}

/* ---------- 6. Trust strip ---------- */
.trust {
  background: var(--grey-bg);
  border-bottom: 1px solid var(--grey-line);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 32px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  color: var(--navy);
}

.trust-item svg {
  flex-shrink: 0;
}

/* ---------- 7. Course cards ---------- */
.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin-bottom: 40px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.course-card {
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(20, 33, 61, 0.06);
}

.course-card .image-placeholder {
  height: 200px;
  border: none;
  border-radius: 0;
  background: #EEF1F6;
  font-size: 14px;
}

.course-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-grow: 1;
}

.tag {
  align-self: flex-start;
  background: var(--red-tint);
  color: var(--red-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.course-card h3 {
  font-weight: 700;
  font-size: 24px;
}

.course-card p {
  color: var(--text-soft);
}

.price {
  margin-top: auto !important;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 26px;
  color: var(--navy) !important;
}

.price span {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-soft);
}

.text-link {
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
}

/* ---------- 8. Two-column block (picture + text) ---------- */
.split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
}

.split > .image-placeholder {
  flex: 1 1 400px;
  min-width: 0;
  height: 340px;
}

.split-text {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.split-text .btn {
  align-self: flex-start;
}

/* ---------- 9. How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--grey-bg);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 20px;
}

.step h3 {
  font-size: 20px;
}

.step p {
  color: var(--text-soft);
}

.center {
  text-align: center;
}

/* ---------- 10. "Which course" box ---------- */
.helper {
  max-width: 1000px;
  margin: 0 auto;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.helper h2 {
  font-size: 26px;
}

.helper .btn {
  align-self: flex-start;
  padding: 14px 24px;
}

.small-print {
  font-size: 13px;
  color: #6B7280;
}

/* ---------- 11. Closing call to action ---------- */
.cta {
  background: var(--navy);
  color: var(--white);
  text-align: center;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 72px;
  padding-bottom: 72px;
}

.cta h2 {
  color: var(--white);
}

.cta p {
  font-size: 18px;
  color: #E5E7EB;
}

.cta .button-row {
  justify-content: center;
}

/* ---------- 12. Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #D1D5DB;
  font-size: 15px;
}

/* Three tidy columns: brand, links, contact. Each starts at the same
   line and none is much taller than the others. */
.footer-top {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.4fr;
  gap: 40px 56px;
  align-items: start;
  padding-top: 48px;
  padding-bottom: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col p {
  margin: 0;
}

.footer-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.footer-heading {
  margin: 0 0 4px;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

/* Contact rows: a small icon, then the text, lined up on one edge */
.footer-contact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.footer-icon {
  flex: none;
  margin-top: 2px;
  color: #F4A3A3;
}

/* Tablets: brand across the top, links and contact side by side */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1.4fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Phones: one column, with less space between the groups */
@media (max-width: 560px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }
}

.footer-logo {
  align-self: flex-start;
  background: var(--white);
  border-radius: 12px;
  padding: 6px;
}

.footer-logo img {
  height: 100px;
  width: auto;
}

.site-footer a {
  color: #D1D5DB;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #2A3A5E;
  padding-top: 20px;
  padding-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

/* ---------- 13. Floating chat button ---------- */
.chat-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  z-index: 60;
  transition: transform 0.2s ease;
}

.chat-float:hover {
  transform: scale(1.08);
}

/* ---------- 14. Gentle scroll animation ---------- */
/* Sections start slightly lower and see-through, then slide into place.
   main.js adds "is-visible" when a section scrolls into view. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Visitors who turned off motion in their device settings get no animation */
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .chat-float {
    transition: none;
  }
}

/* =========================================================
   Styles for the inner pages (Courses, Workplace, About, Contact)
   ========================================================= */

/* ---------- 15. Current page in the menu ---------- */
.nav a[aria-current="page"] {
  color: var(--red);
  font-weight: 600;
}

/* ---------- 16. Page banner (smaller hero for inner pages) ---------- */
.page-hero {
  background: var(--navy);
  color: var(--white);
}

.page-hero-inner {
  padding-top: 64px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.page-hero-inner > * {
  max-width: 760px;
}

.page-hero h1 {
  color: var(--white);
  font-weight: 800;
  font-size: clamp(32px, 4.5vw, 48px);
}

.page-hero .eyebrow {
  color: #FCA5A5;
}

/* ---------- 17. Comparison table ---------- */
.table-wrap:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
}

.compare {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 16px;
}

.compare th,
.compare td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--grey-line);
  vertical-align: top;
}

.compare thead th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 17px;
}

.compare tbody th {
  color: var(--navy);
  font-weight: 600;
  background: var(--grey-bg);
  width: 30%;
}

.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- 18. Course detail blocks ---------- */
.course-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
  scroll-margin-top: 120px;
}

.course-detail + .course-detail {
  margin-top: 72px;
  padding-top: 72px;
  border-top: 1px solid var(--grey-line);
}

.course-detail .image-placeholder {
  flex: 1 1 360px;
  min-width: 0;
  height: 300px;
}

.course-detail-text {
  flex: 1 1 460px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.course-detail-text h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.course-detail-text .btn {
  align-self: flex-start;
}

.fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text-soft);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- 19. Info cards (benefits, audiences, values) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-grey .info-card {
  border-color: transparent;
}

.info-card h3 {
  font-size: 20px;
}

.info-card p {
  color: var(--text-soft);
}

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--red-tint);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- 20. Contact page: tabs and forms ---------- */
.contact-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: flex-start;
}

.contact-main {
  flex: 999 1 560px;
  min-width: 0;
}

.contact-side {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--grey-line);
  margin-bottom: 28px;
}

.tab {
  min-height: 48px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
}

.tab[aria-selected="true"] {
  color: var(--navy);
  border-bottom-color: var(--red);
}

.tab:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  font-weight: 600;
  color: var(--navy);
  font-size: 15px;
}

.optional {
  font-weight: 400;
  color: #6B7280;
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid #9CA3AF;
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  min-height: 48px;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(214, 40, 40, 0.35);
  border-color: var(--red);
}

.field-error {
  color: var(--red-dark);
  font-size: 14px;
  min-height: 0;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--red);
}

.form .btn {
  justify-self: start;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.form-status {
  grid-column: 1 / -1;
  padding: 16px 20px;
  border-radius: 8px;
  font-weight: 500;
}

.form-status.success {
  background: #E7F6EC;
  color: #14532D;
}

.form-status.error {
  background: var(--red-tint);
  color: #7F1D1D;
}

/* Hidden from people but kept for spam bots to fill in */
.hp-field {
  position: absolute;
  left: -9999px;
}

.side-card {
  background: var(--grey-bg);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-card h2 {
  font-size: 20px;
}

/* ---------- 21. FAQ ---------- */
.faq {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.faq details {
  border: 1px solid var(--grey-line);
  border-radius: 12px;
  padding: 0 20px;
  background: var(--white);
}

.faq summary {
  cursor: pointer;
  padding: 18px 0;
  font-weight: 600;
  color: var(--navy);
  min-height: 44px;
}

.faq details p {
  padding-bottom: 18px;
  color: var(--text-soft);
}

/* Photos: fill the same space the grey boxes used, cropping the edges if needed */
.photo {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  background: #E5E9F0;
}

.hero .photo {
  flex: 1 1 400px;
  min-width: 0;
  height: 400px;
}

.course-card .photo {
  height: 200px;
  border-radius: 0;
}

.split > .photo {
  flex: 1 1 400px;
  min-width: 0;
  height: 340px;
}

.course-detail .photo {
  flex: 1 1 360px;
  min-width: 0;
  height: 300px;
}

/* Keeps both the instructor and the learner in view at the top of the Home page */
.photo-hero {
  object-position: 45% center;
}

/* Keeps faces in view when a photo is cropped into a short box */
.photo-top {
  object-position: center 20%;
}

/* Text that screen readers announce but is not shown on screen */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
