/* HSTC site header - CPR First Aid-style single-row logo + nav */

:root,
.home-site-header {
  --home-navy: #071a2f;
  --home-red: #d71920;
  --home-text-dark: #07111f;
  --home-text-muted: #5b6470;
  --home-light-bg: #f6f8fb;
  --home-white: #ffffff;
  --home-border-light: #e5e9f0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 10000;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: #fff;
  color: #071a2f;
  border-radius: 8px;
}

.home-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.home-trust-bar {
  background: var(--home-navy);
  color: rgba(255, 255, 255, 0.95);
  min-height: 38px;
}

.home-trust-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 8px 24px;
  font-size: 13px;
}

.home-trust-left {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.home-trust-icon {
  color: #f87171;
  font-size: 1rem;
}

.home-trust-right {
  margin: 0;
}

.home-trust-phone {
  color: #fff !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.home-trust-phone:hover {
  color: #fecaca !important;
}

.home-nav-shell {
  background: var(--home-white);
  border-bottom: 1px solid var(--home-border-light);
  position: relative;
  z-index: 1000;
  overflow: visible;
}

.home-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--home-navy);
  flex-shrink: 0;
}
.home-brand:hover {
  color: var(--home-navy);
}

.home-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.home-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-family: Inter, Montserrat, Arial, sans-serif;
}

@media (max-width: 400px) {
  .home-brand-text {
    display: none;
  }
}

.home-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--home-border-light);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.home-nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--home-navy);
  border-radius: 1px;
}

.home-nav-panel {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  justify-content: flex-end;
}

.home-nav-primary {
  flex: 1;
  display: flex;
  justify-content: center;
}

.home-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
}

.home-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--home-text-dark) !important;
  text-decoration: none !important;
  border-radius: 8px;
  position: relative;
  font-family: Inter, Arial, sans-serif;
}
.home-nav-link:hover {
  color: var(--home-red) !important;
  background: rgba(215, 25, 32, 0.06);
}

.home-nav-link.is-active {
  color: var(--home-red) !important;
  font-weight: 700;
}
.home-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--home-red);
  border-radius: 2px;
}

.home-chevron {
  font-size: 0.7rem;
  opacity: 0.7;
}

.home-mega-parent {
  position: relative;
}

.home-mega {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  padding: 20px 0 24px;
  background: var(--home-white);
  border-bottom: 1px solid var(--home-border-light);
  box-shadow: 0 18px 40px rgba(7, 17, 31, 0.12);
  z-index: 1100;
}

@media (min-width: 992px) {
  .home-nav-shell.is-courses-mega-open .home-mega {
    display: block;
  }
  .home-nav-shell.is-courses-mega-open .home-mega-parent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
    background: transparent;
    z-index: 1101;
  }
}

.home-mega-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.home-mega-card {
  display: block;
  padding: 18px 16px;
  border-radius: 14px;
  border: 1px solid var(--home-border-light);
  background: var(--home-light-bg);
  text-decoration: none !important;
  color: var(--home-text-dark) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}
.home-mega-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(7, 17, 31, 0.1);
  border-color: rgba(215, 25, 32, 0.35);
}

.home-mega-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--home-navy) !important;
}

.home-mega-desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--home-text-muted) !important;
  margin: 0 0 12px;
}

.home-mega-more {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--home-red) !important;
}

.home-dropdown-sm {
  position: relative;
}

.home-dropdown-sm-panel {
  list-style: none;
  margin: 0;
  padding: 10px 0;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(7, 17, 31, 0.14);
  border: 1px solid var(--home-border-light);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1200;
}
.home-dropdown-sm-panel a {
  display: block;
  padding: 10px 18px;
  color: var(--home-text-dark) !important;
  font-size: 14px;
  text-decoration: none !important;
}
.home-dropdown-sm-panel a:hover {
  background: rgba(215, 25, 32, 0.08);
  color: var(--home-red) !important;
}

@media (min-width: 992px) {
  .home-dropdown-sm:hover .home-dropdown-sm-panel,
  .home-dropdown-sm.is-open .home-dropdown-sm-panel,
  .home-dropdown-sm:focus-within .home-dropdown-sm-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .home-dropdown-sm-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
  }
}

@media (min-width: 992px) and (max-width: 1200px) {
  .home-mega-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .home-nav-toggle {
    display: flex;
  }
  .home-nav-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--home-border-light);
    box-shadow: 0 16px 32px rgba(7, 17, 31, 0.12);
    z-index: 1100;
  }
  .home-nav-panel.is-open {
    display: flex;
  }
  .home-nav-primary {
    width: 100%;
    justify-content: stretch;
  }
  .home-nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .home-nav-link {
    width: 100%;
    min-height: 48px;
    justify-content: space-between;
  }
  .home-nav-link.is-active::after {
    display: none;
  }
  .home-mega {
    position: static;
    display: none;
    padding: 8px 0 12px;
    box-shadow: none;
    border: none;
    background: transparent;
  }
  .home-nav-shell.is-courses-mega-open .home-mega {
    display: block;
  }
  .home-mega-grid {
    grid-template-columns: 1fr;
  }
  .home-dropdown-sm-panel {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    box-shadow: none;
    border: none;
    padding: 4px 0 8px 12px;
    min-width: auto;
  }
  .home-dropdown-sm.is-open .home-dropdown-sm-panel {
    display: block;
  }
  .home-btn-book {
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }
}

.home-btn-book {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  min-height: 48px;
  border-radius: 8px;
  background: var(--home-red);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
}
.home-btn-book:hover {
  background: #b9151b;
  color: #fff !important;
  transform: translateY(-1px);
}
