/*
Theme Name: The Science Shop Hero
Theme URI: https://thescienceshopglobal.com/
Author: The Science Shop
Author URI: https://thescienceshopglobal.com/
Description: The Science Shop homepage with its approved layered hero, curriculum and subject browser, resource preview, school finder, curated guides and About section.
Version: 1.17.8
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: the-science-shop-hero
Tags: education, e-commerce, custom-logo, custom-menu, featured-images, accessibility-ready, responsive-layout
*/

:root {
  --tss-navy: #061d43;
  --tss-blue: #0876b9;
  --tss-orange: #ec4e0b;
  --tss-ink: #0a1f42;
  --tss-ivory: #fbfaf6;
  --tss-line: #d8e0e8;
  --tss-page: #ffffff;
  --tss-content-width: 1360px;
  --tss-radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--tss-ink);
  background: var(--tss-page);
  font-family: "Segoe UI", Aptos, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--tss-blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  color: var(--tss-orange);
}

button,
input,
select,
textarea {
  font: inherit;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  position: fixed !important;
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  margin: 0;
  clip: auto;
  color: #ffffff;
  background: var(--tss-navy);
  border-radius: 6px;
  white-space: normal;
}

.tss-topbar {
  color: #ffffff;
  background: var(--tss-navy);
  font-size: 14px;
}

.tss-topbar__inner,
.tss-header__inner,
.tss-content,
.tss-footer__inner {
  width: min(calc(100% - 40px), var(--tss-content-width));
  margin-inline: auto;
}

.tss-topbar__inner {
  display: flex;
  flex-wrap: wrap;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  padding-block: 6px;
}

.tss-topbar a {
  color: inherit;
  text-decoration: none;
}

.tss-utility-menu,
.tss-primary-menu {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.tss-topbar__inner nav {
  max-width: 100%;
}

.tss-utility-menu {
  flex-wrap: wrap;
  row-gap: 4px;
}

.tss-utility-menu a,
.tss-utility-unavailable {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.tss-utility-menu a:hover,
.tss-utility-menu a:focus-visible {
  text-decoration: underline;
}

.tss-utility-menu a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.tss-utility-unavailable {
  opacity: .75;
  cursor: default;
}

.tss-header {
  position: relative;
  z-index: 20;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--tss-line);
}

.tss-header__inner {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  min-height: 96px;
  align-items: center;
  gap: 32px;
}

.tss-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--tss-navy);
  text-decoration: none;
}

.tss-brand .custom-logo {
  display: block;
  width: auto;
  max-height: 72px;
}

.tss-brand__mark {
  display: grid;
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 50%;
  color: var(--tss-orange);
  background: var(--tss-navy);
  font-size: 32px;
  line-height: 1;
}

.tss-brand__copy {
  display: block;
  min-width: 0;
}

.tss-brand__title {
  display: block;
  overflow: hidden;
  color: #4d6074;
  font-size: clamp(25px, 2vw, 34px);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tss-brand__tagline {
  display: block;
  margin-top: 5px;
  color: var(--tss-ink);
  font-size: 16px;
  line-height: 1.2;
}

.tss-primary-menu a,
.tss-primary-menu span.tss-header-unavailable {
  display: block;
  padding: 35px 0 30px;
  color: var(--tss-navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 4px solid transparent;
}

.tss-primary-menu a:hover,
.tss-primary-menu a:focus-visible,
.tss-primary-menu .current-menu-item > a {
  color: var(--tss-navy);
  border-bottom-color: var(--tss-orange);
}

.tss-menu-toggle {
  display: none;
  padding: 10px 14px;
  color: #ffffff;
  background: var(--tss-navy);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

/* Layered hero styles are in assets/hero.css. */

.tss-main {
  min-height: 30vh;
}

.tss-content {
  padding-block: clamp(46px, 6vw, 88px);
}

.tss-content > :first-child {
  margin-top: 0;
}

.tss-content > :last-child {
  margin-bottom: 0;
}

.tss-entry-header,
.tss-entry-content,
.tss-post-list {
  width: min(100%, 920px);
  margin-inline: auto;
}

.tss-entry-title {
  margin: 0 0 24px;
  color: var(--tss-navy);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.tss-post-card {
  padding: 30px 0;
  border-bottom: 1px solid var(--tss-line);
}

.tss-post-card__title {
  margin: 0 0 8px;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.2;
}

.tss-footer {
  color: #dce8f5;
  background: var(--tss-navy);
}

.tss-footer__inner {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-block: 30px;
}

.tss-footer a {
  color: #ffffff;
}

@media (max-width: 1180px) {
  .tss-header__inner {
    grid-template-columns: 1fr auto;
    min-height: 82px;
  }

  .tss-menu-toggle {
    display: inline-flex;
  }

  .tss-primary-nav {
    position: absolute;
    z-index: 40;
    top: 100%;
    right: 20px;
    left: 20px;
    display: none;
    padding: 12px 20px;
    background: #ffffff;
    border: 1px solid var(--tss-line);
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(5, 29, 67, 0.16);
  }

  .tss-primary-nav.is-open {
    display: block;
  }

  .tss-primary-menu {
    display: block;
  }

  .tss-primary-menu a,
.tss-primary-menu span.tss-header-unavailable {
    padding: 12px 0;
    border-bottom-width: 2px;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 16px;
  }

  .tss-topbar__inner {
    min-height: 34px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    text-align: center;
  }

  .tss-utility-menu {
    justify-content: center;
  }

  .tss-header__inner,
  .tss-topbar__inner,
  .tss-content,
  .tss-footer__inner {
    width: min(calc(100% - 28px), var(--tss-content-width));
  }

  .tss-brand__mark {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
    font-size: 26px;
  }

  .tss-brand__title {
    font-size: 22px;
  }

  .tss-brand__tagline {
    display: none;
  }

  .tss-footer__inner {
    display: block;
    text-align: center;
  }
}

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

/* Compact supporting navigation below the page content. */
.tss-footer-menu { display: flex; flex-wrap: wrap; gap: 14px 25px; padding: 0; margin: 0; list-style: none; font-size: 14px; }
.tss-footer-menu a { text-decoration: none; }
.tss-footer-menu a:hover { text-decoration: underline; }
@media (max-width: 767px) { .tss-footer-menu { justify-content: center; } }

/* Single-row header navigation, including Blog and Contact. */
.tss-primary-menu { gap: clamp(14px, 1.6vw, 24px); }
.tss-primary-menu > li { flex-shrink: 0; }
.tss-primary-menu a, .tss-primary-menu span.tss-header-unavailable { white-space: nowrap; }
.tss-primary-menu span.tss-header-unavailable { opacity: .65; cursor: default; }

/* Resource archive context. Scoped to taxonomy archive headers only. */
.tss-resource-archive-header {
  width: min(100%, 920px);
  margin: 0 auto 20px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--tss-line);
}
.tss-resource-archive-header__title {
  margin: 0 0 18px;
  color: var(--tss-navy);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.tss-resource-archive-header__intro {
  max-width: 76ch;
  line-height: 1.7;
}
.tss-resource-archive-header__intro > :first-child { margin-top: 0; }
.tss-resource-archive-header__catalogue {
  display: inline-block;
  padding-block: 10px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tss-resource-archive-header__catalogue:focus-visible {
  outline: 2px solid var(--tss-blue);
  outline-offset: 4px;
}
