/*
Theme Name: Benchmark Institute
Theme URI: https://benchmark.etest.lk
Author: ETEST Technical Team
Description: Lightweight custom theme for Benchmark Educational Institute.
Version: 1.0.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: benchmark
*/

:root {
  --ink: #14211f;
  --muted: #5d6b67;
  --line: #d9e2df;
  --paper: #ffffff;
  --wash: #f5f8f7;
  --brand: #1f6f5b;
  --brand-dark: #103a33;
  --accent: #c7932c;
  --accent-soft: #f2e4c8;
  --alert: #9f3f34;
  --max: 1160px;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(20, 33, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

h1,
h2,
h3,
p,
li,
a {
  overflow-wrap: anywhere;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner,
.section-inner {
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.1;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand-text {
  min-width: 0;
}

.brand-text span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--brand-dark);
  cursor: pointer;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle-lines {
  position: relative;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  position: absolute;
  left: 0;
  content: "";
}

.nav-toggle-lines::before {
  top: -7px;
}

.nav-toggle-lines::after {
  top: 7px;
}

.is-menu-open .nav-toggle-lines {
  transform: rotate(45deg);
}

.is-menu-open .nav-toggle-lines::before {
  transform: translateY(7px) rotate(90deg);
}

.is-menu-open .nav-toggle-lines::after {
  opacity: 0;
}

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

.primary-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 700;
  border-radius: var(--radius);
}

.primary-menu a:hover,
.primary-menu a:focus {
  color: var(--brand-dark);
  background: var(--wash);
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 68vh;
  overflow: hidden;
  color: #ffffff;
  background-color: var(--brand-dark);
  background-image: url("assets/benchmark-logo.png");
  background-position: right 8% center;
  background-repeat: no-repeat;
  background-size: min(52vw, 560px);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(16, 58, 51, 0.72);
}

.hero .section-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 68vh;
  padding: 72px 0;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-soft);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  font-size: 3.25rem;
  max-width: 760px;
}

h2 {
  font-size: 2.15rem;
}

h3 {
  font-size: 1.18rem;
}

.lead {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.18rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.button:focus {
  text-decoration: none;
}

.button-primary {
  color: var(--ink);
  background: var(--accent-soft);
}

.button-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.button-outline {
  color: var(--brand-dark);
  border-color: var(--brand);
  background: #ffffff;
}

.section {
  padding: 72px 0;
}

.section-wash {
  background: var(--wash);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading p {
  max-width: 560px;
  margin: 10px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 22px;
  min-width: 0;
}

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

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(20, 33, 31, 0.06);
}

.card-pad {
  padding: 24px;
}

.card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.card-link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 800;
}

.pathway-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.partner-band {
  color: #ffffff;
  background: var(--brand-dark);
}

.partner-band p {
  color: rgba(255, 255, 255, 0.85);
}

.partner-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 34px;
  align-items: center;
  min-width: 0;
}

.partner-panel {
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

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

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 18px;
  height: 18px;
  content: "";
  border-radius: 50%;
  background: var(--accent);
}

.content-page {
  width: min(100% - 40px, 860px);
  margin: 0 auto;
  padding: 64px 0 84px;
}

.content-page h1 {
  margin-bottom: 22px;
  color: var(--brand-dark);
  font-size: 2.45rem;
}

.content-page h2 {
  margin-top: 36px;
  font-size: 1.55rem;
}

.content-page p,
.content-page li {
  color: #32413d;
}

.content-page ul,
.content-page ol {
  padding-left: 1.2rem;
}

.archive-intro {
  padding: 58px 0 36px;
  background: var(--wash);
}

.archive-intro h1 {
  color: var(--brand-dark);
  font-size: 2.45rem;
}

.archive-intro p {
  max-width: 720px;
  color: var(--muted);
}

.site-footer {
  color: rgba(255, 255, 255, 0.85);
  background: var(--ink);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  width: min(100% - 40px, var(--max));
  margin: 0 auto;
  padding: 44px 0;
}

.footer-inner h2,
.footer-inner h3 {
  color: #ffffff;
  font-size: 1rem;
}

.footer-inner p,
.footer-inner a {
  color: rgba(255, 255, 255, 0.78);
}

.footer-links {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li {
  margin-top: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-bottom .section-inner {
  padding: 18px 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.9rem;
}

@media (max-width: 880px) {
  .header-inner {
    min-height: 66px;
    gap: 14px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-text {
    max-width: min(56vw, 360px);
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .is-menu-open .site-nav {
    display: block;
  }

  .primary-menu {
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
  }

  .primary-menu a {
    min-height: 44px;
    padding: 10px 12px;
  }

  h1 {
    font-size: 2.35rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero,
  .hero .section-inner {
    min-height: 540px;
  }

  .hero {
    background-position: right -90px bottom 20px;
    background-size: 380px;
  }

  .hero .section-inner {
    align-items: flex-start;
    padding: 62px 0 170px;
  }

  .lead {
    font-size: 1.08rem;
  }

  .grid-3,
  .grid-2,
  .partner-grid,
  .footer-inner {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .section-inner,
  .content-page,
  .footer-inner {
    width: min(100% - 28px, var(--max));
  }

  .brand-text {
    max-width: calc(100vw - 120px);
    font-size: 0.94rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-text span {
    display: none;
  }

  .primary-menu a {
    font-size: 0.95rem;
  }

  .section {
    padding: 46px 0;
  }

  .hero {
    min-height: auto;
    background-position: center bottom 24px;
    background-size: 280px;
  }

  .hero .section-inner {
    min-height: auto;
    padding: 46px 0 160px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.55rem;
  }

  .eyebrow {
    font-size: 0.78rem;
  }

  .lead {
    margin-top: 16px;
    font-size: 1rem;
  }

  .hero-actions,
  .section-actions {
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
  }

  .button {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    text-align: center;
  }

  .section-heading {
    gap: 10px;
    margin-bottom: 22px;
  }

  .card-pad,
  .partner-panel {
    padding: 18px;
  }

  .grid {
    gap: 16px;
  }

  .card h2,
  .card h3 {
    font-size: 1.42rem;
  }

  .content-page {
    padding: 42px 0 58px;
  }

  .content-page h1,
  .archive-intro h1 {
    font-size: 1.85rem;
  }

  .content-page h2 {
    margin-top: 28px;
    font-size: 1.32rem;
  }

  .archive-intro {
    padding: 42px 0 30px;
  }

  .footer-inner {
    gap: 18px;
    padding: 34px 0;
  }
}
