/* elementary.css — layout refinements scoped to elementary.html only (loads after index.css) */

/* Intro: tighter, more readable lead block */
#elementary .elem-intro {
  max-width: 44rem;
  font-size: 1.12rem;
  line-height: 1.6;
}
/* First intro sentence: full width so it sits on one line on desktop; balanced wrap on small screens */
#elementary .elem-intro:first-of-type {
  max-width: none;
  font-size: 1.05rem;
  text-wrap: balance;
}
#elementary .elem-note {
  display: table;
  margin: 0.6rem auto 2.4rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--yellow-border, rgba(245,194,0,.35));
  background: var(--yellow-dim, rgba(245,194,0,.12));
  border-radius: 999px;
  font-size: 0.92rem;
}

/* Section headings with a yellow accent bar */
#elementary .academy-heading {
  position: relative;
  margin: 0 0 1.1rem;
  padding-bottom: 0.7rem;
  font-size: 1.6rem;
}
#elementary .academy-heading::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin: 0.55rem auto 0;
  border-radius: 4px;
  background: #F5C200;
}

/* CPACES: one unbroken word; gold letters match the gold badges on the cards */
#elementary .elem-discover { margin-bottom: 1.4rem; padding-bottom: 0; }
#elementary .elem-discover::after { display: none; }
#elementary .elem-discover small {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--section-muted, #64748b);
}
#elementary .elem-acronym {
  display: block;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 5.2rem);
  line-height: 1;
  letter-spacing: 0.1em;
  padding-left: 0.1em; /* balances trailing letter-spacing so the word is truly centered */
  color: #C9902A;
}
[data-theme="dark"] #elementary .elem-acronym { color: #F5C200; }

/* CPACES: 3-column card grid instead of six stacked alternating rows */
#elementary .elem-spaces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1040px;
  margin: 0 auto 3rem;
}
#elementary .elem-spaces li,
#elementary .elem-spaces li:nth-child(even) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
#elementary .elem-spaces li:hover {
  transform: translateY(-3px);
  border-color: var(--card-hover-border, #F5C200);
  box-shadow: var(--card-hover-shadow, 0 4px 16px rgba(245,194,0,.15));
}
#elementary .elem-spaces li:nth-child(even) img { order: 0; }
#elementary .elem-spaces img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center top;
  border-radius: 0;
}
#elementary .elem-spaces span {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem 1rem;
  font-size: 1.05rem;
  line-height: 1.3;
}
#elementary .elem-spaces b {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin: 0;
  border-radius: 12px;
  background: #F5C200;
  color: #0c1e42;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
}
[data-theme="dark"] #elementary .elem-spaces li { background: #12263c; border-color: rgba(232,184,75,.35); }
[data-theme="dark"] #elementary .elem-spaces b { color: #0c1e42; }

/* Requirements: even cards, yellow header strip, 3 across on desktop */
#elementary .elem-reqs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}
#elementary .elem-reqs article { flex: 0 1 calc((100% - 2rem) / 3); }
#elementary .elem-reqs article {
  padding: 1.1rem 1.2rem 1.25rem;
  border-radius: 16px;
}
#elementary .elem-reqs article {
  position: relative;
  overflow: hidden;
  border-top: 4px solid #F5C200;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
#elementary .elem-reqs article:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow, 0 4px 16px rgba(245,194,0,.15));
}
#elementary .elem-reqs h3 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed var(--card-border, rgba(26,42,74,.15));
  font-size: 1.1rem;
  text-align: left;
}
#elementary .elem-reqs .req-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: #F5C200;
  color: #0c1e42;
}
#elementary .elem-reqs .req-icon svg { width: 1.25rem; height: 1.25rem; }

/* Check-mark bullets */
#elementary .elem-reqs ul { padding-left: 0; list-style: none; }
#elementary .elem-reqs li {
  position: relative;
  margin: 0.5rem 0;
  padding-left: 1.9rem;
}
#elementary .elem-reqs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 1.2rem;
  height: 1.2rem;
  background-color: #C9902A;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
[data-theme="dark"] #elementary .elem-reqs li::before { background-color: #F5C200; }
[data-theme="dark"] #elementary .elem-reqs h3 { border-bottom-color: rgba(232,184,75,.3); }
@media (prefers-reduced-motion: reduce) {
  #elementary .elem-reqs article { transition: none; }
  #elementary .elem-reqs article:hover { transform: none; }
}

/* Contact banner */
#elementary .academy-close {
  padding: 1.6rem 1.8rem;
  border-radius: 18px;
}
#elementary .academy-close address a { font-size: 1.1rem; }
#elementary .academy-next { margin-top: 1.8rem; font-size: 1.05rem; }

/* Tablet */
@media (max-width: 960px) {
  #elementary .elem-spaces { grid-template-columns: repeat(2, 1fr); }
  #elementary .elem-reqs article { flex-basis: calc((100% - 1rem) / 2); }
}
/* Phone */
@media (max-width: 800px) {
  #elementary .elem-spaces li,
  #elementary .elem-spaces li:nth-child(even) { grid-template-columns: none; }
  #elementary .elem-spaces img { max-width: none; margin: 0; }
  #elementary .elem-spaces span { text-align: left; }
}
@media (max-width: 560px) {
  #elementary .elem-spaces { grid-template-columns: 1fr; }
  #elementary .elem-reqs article { flex-basis: 100%; }
  #elementary .academy-heading { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  #elementary .elem-spaces li { transition: none; }
  #elementary .elem-spaces li:hover { transform: none; }
}

/* Facebook button in the contact banner */
#elementary .elem-fb {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  background: #F5C200;
  color: #0c1e42;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, transform .18s ease;
}
#elementary .elem-fb svg { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
#elementary .elem-fb:hover { background: #ffd84a; transform: translateY(-2px); }
#elementary .elem-fb:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
@media (max-width: 800px) { #elementary .elem-fb { margin-top: 1rem; } }
@media (prefers-reduced-motion: reduce) { #elementary .elem-fb { transition: none; } #elementary .elem-fb:hover { transform: none; } }

/* Elementary seal above the page heading */
#elementary .elem-logo {
  width: auto;
  height: 340px;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 6px 14px rgba(12, 30, 66, 0.18));
}
@media (max-width: 560px) { #elementary .elem-logo { height: 260px; } }

/* Dark mode refinements */
[data-theme="dark"] #elementary .elem-discover small { color: rgba(232, 238, 245, 0.82); }
[data-theme="dark"] #elementary .elem-note { color: #f0e8d8; border-color: rgba(245,194,0,.45); }
[data-theme="dark"] #elementary .elem-spaces li:hover,
[data-theme="dark"] #elementary .elem-reqs article:hover { border-color: rgba(245,194,0,.6); }

/* Logo beside the heading + intro (desktop); stacked and centered on small screens */
#elementary .elem-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2rem 3.5rem;
  max-width: 1040px;
  margin: 0 auto 2.6rem;
}
#elementary .elem-top .elem-logo { height: 300px; margin: 0; }
#elementary .elem-top-text .section-header { text-align: left; margin-bottom: 1rem; }
#elementary .elem-top-text .elem-intro,
#elementary .elem-top-text .elem-intro:first-of-type {
  max-width: none;
  margin: 0 0 0.7rem;
  text-align: left;
  font-size: 1.1rem;
  text-wrap: pretty;
}
#elementary .elem-top-text .elem-note { margin: 0.9rem 0 0; }
@media (max-width: 800px) {
  #elementary .elem-top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  #elementary .elem-top .elem-logo { height: 240px; }
  #elementary .elem-top-text .section-header,
  #elementary .elem-top-text .elem-intro,
  #elementary .elem-top-text .elem-intro:first-of-type { text-align: center; }
  #elementary .elem-top-text .elem-note { margin: 0.9rem auto 0; }
}

/* Left-align the label and title next to the logo (desktop only) */
@media (min-width: 801px) {
  #elementary .elem-top-text .pc-label,
  #elementary .elem-top-text .pc-title { text-align: left; }
}
