/*
Theme Name: Boxlight Home
Theme URI: https://boxlight.com/home
Author: Boxlight
Description: A responsive, classic WordPress theme recreating the Boxlight home page experience.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: boxlight-home
*/

:root {
  --ink: #0b1531;
  --muted: #505b6c;
  --blue: #1f67bb;
  --deep-blue: #005eb8;
  --green: #87bd40;
  --purple: #762a83;
  --mist: #f3f5f7;
  --line: #dce2e8;
  --white: #fff;
  --shadow: 0 20px 55px rgba(10, 28, 58, .14);
  --container: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font-family: "Open Sans", "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.6; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }

.utility-bar { display: flex; justify-content: flex-end; min-height: 34px; }
.utility-link { min-width: 130px; padding: 8px 16px; color: #fff; text-align: center; font-size: 12px; font-weight: 700; }
.utility-link:nth-child(1) { background: #2767b6; }
.utility-link:nth-child(2) { background: var(--purple); }
.utility-link:nth-child(3) { background: #4cae83; }
.utility-link:nth-child(4) { background: var(--green); }

.site-header { position: relative; z-index: 20; background: #fff; box-shadow: 0 2px 9px rgba(10,20,40,.08); }
.main-nav { height: 78px; display: grid; grid-template-columns: 230px 1fr 210px; gap: 24px; align-items: center; }
.brand img, .custom-logo { width: 185px; height: auto; }
.menu-list { display: flex; justify-content: center; align-items: center; gap: 29px; padding: 0; margin: 0; list-style: none; }
.menu-list a { position: relative; font-size: 14px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.menu-list a::after { content: ""; position: absolute; right: 50%; bottom: -12px; left: 50%; height: 3px; background: var(--green); transition: .2s ease; }
.menu-list a:hover::after, .menu-list a:focus-visible::after { right: 0; left: 0; }
.nav-search { display: flex; align-items: center; background: #f7f7f7; }
.nav-search input { width: 100%; padding: 12px 14px; border: 0; outline: 0; background: transparent; }
.nav-search button { width: 46px; height: 44px; border: 0; color: var(--purple); background: transparent; cursor: pointer; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; margin: 6px auto; background: var(--ink); transition: .2s; }

.announcement { color: #fff; background: var(--green); }
.announcement-inner { min-height: 182px; display: grid; grid-template-columns: 130px 1fr auto; gap: 28px; align-items: center; padding-block: 24px; }
.announcement img { width: 130px; aspect-ratio: 1; object-fit: cover; background: #fff; }
.announcement h2 { margin: 0 0 4px; font-size: clamp(22px, 2vw, 28px); line-height: 1.2; }
.announcement p { max-width: 730px; margin: 0; font-size: 16px; line-height: 1.45; }
.text-link { display: inline-flex; gap: 11px; align-items: center; font-weight: 800; }
.text-link::after { content: "\2192"; font-size: 26px; line-height: 1; transition: transform .2s; }
.text-link:hover::after { transform: translateX(5px); }
.announcement .text-link { align-self: end; margin-bottom: 4px; white-space: nowrap; }

.hero { position: relative; overflow: hidden; background: #f1f2f4; }
.hero-grid { min-height: 520px; display: grid; grid-template-columns: 42% 58%; align-items: stretch; }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 58px 20px 58px 0; }
.hero-copy::after { content: ""; position: absolute; z-index: -1; top: 0; right: -110px; bottom: 0; width: 220px; background: #f1f2f4; clip-path: polygon(0 0, 50% 0, 100% 100%, 50% 100%); }
.hero h1 { max-width: 520px; margin: 0 0 20px; color: #4d9a6d; font-size: clamp(44px, 5vw, 67px); font-weight: 300; line-height: 1.14; letter-spacing: -.025em; }
.hero p { max-width: 470px; margin: 0; font-size: 23px; line-height: 1.35; }
.hero-media { min-height: 520px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.section { padding: 92px 0; }
.section-heading { max-width: 920px; margin: 0 auto 50px; text-align: center; }
.section-heading h2 { margin: 0 0 18px; font-size: clamp(35px, 4vw, 53px); line-height: 1.12; letter-spacing: -.035em; }
.section-heading p { max-width: 860px; margin: 0 auto; color: var(--muted); font-size: 18px; }
.gradient-title { color: transparent; background: linear-gradient(90deg, var(--green), var(--deep-blue) 70%); -webkit-background-clip: text; background-clip: text; }
.gradient-title.purple { background-image: linear-gradient(90deg, var(--purple), var(--deep-blue)); }

.brand-logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; align-items: center; max-width: 760px; margin: 42px auto 0; }
.brand-logos a { display: grid; place-items: center; min-height: 125px; filter: grayscale(1); opacity: .78; transition: .2s; }
.brand-logos a:hover { filter: grayscale(0); opacity: 1; transform: translateY(-3px); }
.brand-logos img { max-width: 175px; max-height: 100px; object-fit: contain; }

.feature-band { position: relative; overflow: hidden; color: #fff; background: #102347; }
.feature-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,27,65,.97) 0%, rgba(7,27,65,.88) 48%, rgba(7,27,65,.18) 100%); }
.feature-band .band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-content { position: relative; z-index: 1; max-width: 670px; padding: 82px 0; }
.feature-content h2 { margin: 0 0 16px; font-size: clamp(36px, 4vw, 52px); line-height: 1.1; }
.feature-content p { margin: 0 0 16px; font-size: 18px; }
.feature-content ul { padding-left: 20px; margin: 20px 0 28px; }
.feature-content li { margin: 7px 0; }
.button { display: inline-flex; gap: 10px; align-items: center; justify-content: center; min-height: 50px; padding: 12px 25px; border: 2px solid var(--blue); border-radius: 999px; color: #fff; background: var(--blue); font-weight: 800; transition: .2s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,74,155,.25); }
.button.button-outline { color: var(--blue); background: transparent; }
.button.button-white { border-color: #fff; color: var(--ink); background: #fff; }

.suite-intro { margin-bottom: 44px; text-align: center; }
.suite-intro h3 { margin: 0 0 4px; font-size: 24px; }
.suite-intro p { margin: 0; color: var(--muted); }
.grant-link { display: inline-block; margin-top: 14px; color: var(--deep-blue); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.solutions-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.solution-card { min-height: 235px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 14px; border: 1px solid var(--line); text-align: center; background: #fff; transition: .22s ease; }
.solution-card:hover { transform: translateY(-8px); border-color: transparent; box-shadow: var(--shadow); }
.solution-card img { width: auto; height: 94px; margin-bottom: 24px; }
.solution-card span { font-size: 15px; font-weight: 800; line-height: 1.25; }

.whats-new { background: var(--mist); }
.story { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 390px; margin-bottom: 32px; background: #fff; box-shadow: 0 9px 30px rgba(18,44,77,.08); }
.story:nth-child(even) .story-image { order: 2; }
.story-image { height: 100%; min-height: 390px; overflow: hidden; }
.story-image img { width: 100%; height: 100%; object-fit: cover; }
.story-copy { padding: 52px; }
.story-copy h3 { margin: 0 0 15px; font-size: 32px; line-height: 1.2; }
.story-copy p { margin: 0 0 22px; color: var(--muted); }
.story-copy .text-link { color: var(--deep-blue); }

.challenges { background: #fff; }
.challenge-layout { display: grid; grid-template-columns: 330px 1fr; gap: 55px; align-items: start; }
.challenge-tabs { position: sticky; top: 24px; display: flex; flex-direction: column; }
.challenge-tab { padding: 16px 18px; border: 0; border-bottom: 1px solid var(--line); color: #596579; text-align: left; background: transparent; font-weight: 700; cursor: pointer; }
.challenge-tab.active { color: var(--deep-blue); background: #edf5fb; box-shadow: inset 4px 0 var(--green); }
.challenge-panel { display: none; min-height: 410px; padding: 52px; color: #fff; background: linear-gradient(140deg, #762a83, #145ea7); box-shadow: var(--shadow); }
.challenge-panel.active { display: block; animation: panelIn .35s ease; }
.challenge-panel h3 { margin: 0 0 30px; font-size: 37px; line-height: 1.15; }
.challenge-panel p { margin: 0 0 20px; font-size: 18px; }
.challenge-panel strong { color: #c7ef84; }
.challenge-panel .text-link { margin-top: 14px; }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } }

.resources-band { position: relative; min-height: 500px; display: flex; align-items: center; overflow: hidden; color: #fff; }
.resources-band::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(4,32,75,.94), rgba(4,32,75,.4)); }
.resources-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.resources-content { position: relative; z-index: 2; max-width: 640px; padding-block: 70px; }
.resources-content h2 { margin: 0 0 7px; font-size: clamp(42px, 5vw, 64px); line-height: 1.05; }
.resources-content > p { margin: 0 0 30px; font-size: 21px; }
.resource-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.resource-links a { padding: 13px 16px; border: 1px solid rgba(255,255,255,.45); font-weight: 700; transition: .2s; }
.resource-links a:hover { color: var(--ink); background: #fff; }

.trust { padding: 95px 0; text-align: center; }
.trust h2 { max-width: 900px; margin: 0 auto 28px; font-size: clamp(38px, 4.5vw, 58px); line-height: 1.1; }
.trust p { max-width: 850px; margin: 0 auto 16px; color: var(--muted); font-size: 19px; }
.trust h3 { margin: 35px 0 25px; font-size: 24px; }

.site-footer { color: #fff; background: #081934; }
.footer-cta { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; padding: 48px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.footer-cta strong { display: block; font-size: 30px; }
.footer-cta span { color: #bfc9d7; }
.footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1fr; gap: 55px; padding: 58px 0; }
.footer-brand img { width: 190px; margin-bottom: 20px; }
.footer-brand p { color: #bfc9d7; font-size: 13px; }
.footer-column h4 { margin: 0 0 18px; color: #98ca52; font-size: 16px; text-transform: uppercase; }
.footer-column ul { padding: 0; margin: 0; list-style: none; }
.footer-column li { margin-bottom: 10px; }
.footer-column a { color: #d6dde7; font-size: 14px; }
.footer-column a:hover { color: #fff; text-decoration: underline; }
.socials { display: flex; gap: 9px; margin-top: 22px; }
.socials img { width: 34px; height: 34px; }
.legal { display: flex; justify-content: space-between; gap: 25px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.14); color: #aeb9c8; font-size: 12px; }

.cookie-banner { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 420px; padding: 28px; border-top: 4px solid var(--blue); background: #fff; box-shadow: 0 16px 70px rgba(6,22,47,.25); }
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { margin: 0 0 8px; font-size: 23px; }
.cookie-banner p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions button { flex: 1; min-height: 43px; border: 2px solid var(--blue); border-radius: 999px; color: var(--blue); background: #fff; font-weight: 800; cursor: pointer; }
.cookie-actions .accept { color: #fff; background: var(--blue); }

@media (max-width: 1020px) {
  .main-nav { grid-template-columns: 1fr auto; }
  .menu-toggle { display: block; }
  .nav-search { display: none; }
  .menu-list { position: fixed; top: 0; right: -100%; width: min(390px, 88vw); height: 100vh; z-index: 30; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; padding: 100px 32px 32px; background: #fff; box-shadow: -12px 0 45px rgba(0,0,0,.2); transition: right .25s; }
  .menu-list.open { right: 0; }
  .menu-list li { width: 100%; border-bottom: 1px solid var(--line); }
  .menu-list a { display: block; padding: 17px 4px; }
  .utility-bar { display: none; }
  .announcement-inner { grid-template-columns: 90px 1fr; }
  .announcement img { width: 90px; }
  .announcement .text-link { grid-column: 2; margin: -14px 0 0; }
  .solutions-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .container { width: min(100% - 32px, var(--container)); }
  .main-nav { height: 68px; }
  .brand img, .custom-logo { width: 158px; }
  .announcement-inner { min-height: 0; grid-template-columns: 70px 1fr; gap: 17px; padding-block: 19px; }
  .announcement img { width: 70px; }
  .announcement h2 { font-size: 20px; }
  .announcement p { display: none; }
  .hero-grid { min-height: 0; display: flex; flex-direction: column; }
  .hero-copy { padding: 45px 0; }
  .hero-copy::after { display: none; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 19px; }
  .hero-media { min-height: 300px; order: -1; }
  .section { padding: 66px 0; }
  .brand-logos { gap: 15px; }
  .brand-logos img { max-width: 110px; max-height: 70px; }
  .feature-content { padding: 65px 0; }
  .solutions-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .solution-card { min-height: 200px; }
  .story { display: block; }
  .story:nth-child(even) .story-image { order: initial; }
  .story-image { min-height: 250px; height: 250px; }
  .story-copy { padding: 32px 25px; }
  .challenge-layout { display: block; }
  .challenge-tabs { position: static; margin-bottom: 22px; overflow-x: auto; flex-direction: row; }
  .challenge-tab { min-width: 190px; }
  .challenge-panel { min-height: 0; padding: 35px 25px; }
  .resource-links { grid-template-columns: 1fr; }
  .footer-cta, .footer-grid { grid-template-columns: 1fr; }
  .footer-grid { gap: 30px; }
  .legal { flex-direction: column; }
  .cookie-banner { right: 12px; bottom: 12px; left: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
