/* sections.css — Stage J "Global Campus" rewrite (PUBLIC_UI_DESIGN.md).
   ONE sheet for kg / primary / highschl / highsec. The top hero is the shared
   hero partial now (geometry/caption in site.css); this sheet styles the
   events heading band, the photo band with the intro + content carousel +
   timeline accordion, and the event blocks. Per-page .bg-6 statics kept. */

/* ---------- events heading band (matches the home welcome band) ---------- */
.home-text {
  background: var(--sj-grad-brand);
  text-align: center;
  padding: clamp(44px, 6vw, 72px) 16px;
  word-spacing: 6px;
}
.home-text h2 {
  font-family: var(--sj-font-head);
  font-size: clamp(26px, 3.6vw, 46px);
  font-weight: 400;
  color: #fff;
  margin: 0;
}
.home-text span {
  font-family: var(--sj-font-head);
  font-size: clamp(26px, 3.6vw, 46px);
  font-weight: 400;
  color: var(--sj-gold);
}

/* ---------- photo band: intro + content carousel + timeline ---------- */
.bg-6 {
  /* F2: /media/static/* are downscaled full-frame copies of /photos originals */
  background: var(--sj-veil), url('/media/static/high1.jpg') no-repeat center / cover;
}
body.highsec .bg-6 { background: var(--sj-veil), url('/media/static/highsec1.jpg') no-repeat center / cover; }
body.primary .bg-6 { background: var(--sj-veil), url('/media/static/primary1.jpg') no-repeat center / cover; }
body.kg .bg-6      { background: var(--sj-veil), url('/media/static/kg1.jpg') no-repeat center / cover; }

.infra-new {
  width: min(1300px, 92%);
  margin: clamp(32px, 5vw, 56px) auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  border-radius: var(--sj-r-card);
  box-shadow: var(--sj-shadow-2);
  padding: clamp(24px, 4vw, 44px);
}
.infra-new-carousel {
  order: 2;
  flex: 1 1 500px;
  width: 100%;
  margin-top: 30px !important;
}
.infra-new-carousel .carousel-inner {
  width: 100%;
  /* K12: FIXED 4:3 box (see infrastructure.css) — content_slide is fit-mode,
     so without this the carousel resized between slides of different shapes.
     aspect-ratio + object-fit:cover below = every slide the same size. */
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--sj-r-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.infra-new-carousel .carousel-item,
.infra-new-carousel .carousel-item picture {
  height: 100%;
}
.infra-new-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.infra-new-text {
  order: 1;
  flex: 1 1 50%;
  margin: 0 20px;
  text-align: left;
}
.infra-new-text h4 {
  font-family: var(--sj-font-head);
  color: #fff;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 400;
}
.infra-new-text h4::after {
  content: ""; display: block;
  width: 44px; height: 4px; border-radius: 2px;
  background: var(--sj-gold); margin: 12px 0 16px;
}
.infra-new-text p {
  font-family: var(--sj-font-body);
  color: rgba(255, 255, 255, .88);
  line-height: 1.75;
}

/* timeline accordion shell */
.infra-new-text .accordion-main .card {
  background: #fff;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
}
.infra-new-text .accordion-main .btn {
  border: none !important;
  background: var(--sj-grad-brand) !important;
  color: #fff;
  font-family: var(--sj-font-body);
  font-weight: 600;
  border-radius: 0;
  text-decoration: none !important;
  transition: filter var(--sj-t-fast) ease;
}
.infra-new-text .accordion-main .btn:hover {
  filter: brightness(1.15);
  text-decoration: none !important;
}

@media (max-width: 1300px) {
  .infra-new { flex-direction: column; align-items: center; }
  .infra-new-carousel { order: 2; flex: 1 1 500px; margin: 0; }
  .infra-new-text { order: 1; flex: 1 1 100%; margin: 0; text-align: left; margin-top: 20px; }
  .infra-new-carousel .carousel-inner { height: auto; }
  .infra-new-carousel .carousel-image { height: 500px; }
}
@media (max-width: 768px) {
  .infra-new { flex-direction: column; align-items: center; }
  .infra-new-carousel { order: 2; flex: 1 1 100%; margin: 0; }
  .infra-new-text { order: 1; flex: 1 1 100%; margin: 20px 0 0; text-align: left; }
  .infra-new-text p { text-align: justify; }
  .infra-new-carousel .carousel-inner { height: auto; }
}

/* content-carousel controls */
.infra-new-carousel .carousel-control-prev-icon,
.infra-new-carousel .carousel-control-next-icon {
  background-color: var(--sj-navy) !important;
  border-radius: 50% !important;
  padding: 15px;
}

/* ---------- event blocks ---------- */
.newtemp-body {
  background: var(--sj-paper);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: var(--sj-sec-pad) 0;
}
.about-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1200px;
  width: min(1200px, 92%);
  margin: 20px;
}
.about-section {
  display: flex;
  flex-direction: row;
  background-color: #fff;
  border-radius: var(--sj-r-card);
  box-shadow: var(--sj-shadow-1);
  overflow: hidden;
  transition: transform var(--sj-t-med) var(--sj-ease), box-shadow var(--sj-t-med) var(--sj-ease);
}
.about-section:hover { transform: translateY(-4px); box-shadow: var(--sj-shadow-2); }
.about-image { width: 50%; object-fit: cover; }
.about-content {
  padding: clamp(22px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}
.about-content h2 {
  font-family: var(--sj-font-head);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 32px);
  color: var(--sj-navy-dark);
  margin-bottom: 6px;
}
.about-content h2::after {
  content: ""; display: block;
  width: 36px; height: 3px; border-radius: 2px;
  background: var(--sj-gold); margin-top: 10px;
}
.about-content p {
  font-family: var(--sj-font-body);
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--sj-ink-soft);
  margin: 14px 0 0;
}
@media (max-width: 768px) {
  .about-section { flex-direction: column; }
  .about-section:nth-child(2) .about-content { order: 2; }
  .about-section:nth-child(2) .about-image { order: 1; }
  body.kg .about-section:nth-child(4) .about-content { order: 2; }
  body.kg .about-section:nth-child(4) .about-image { order: 1; }
  .about-image { width: 100%; }
  .about-content p { text-align: justify; }
}

/* ================ The Timeline (structure kept; brand accents) ================ */
.timeline {
  position: relative;
  width: 660px;
  margin: 20px auto 0;
  padding: 1em 0;
  list-style-type: none;
}
.timeline:before {
  position: absolute;
  left: 50%;
  top: 0;
  content: ' ';
  display: block;
  width: 6px;
  height: 100%;
  margin-left: -3px;
  background: linear-gradient(to bottom, rgba(43, 75, 138, 0) 0%, var(--sj-navy) 8%, var(--sj-navy) 92%, rgba(43, 75, 138, 0) 100%);
  z-index: 5;
}
.timeline li { padding: 1em 0; }
.timeline li:after { content: ""; display: block; height: 0; clear: both; visibility: hidden; }
.direction-l { position: relative; width: 300px; float: left; text-align: right; }
.direction-r { position: relative; width: 300px; float: right; }
.flag-wrapper { position: relative; display: inline-block; text-align: center; }
.flag {
  position: relative;
  display: inline;
  background: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--sj-font-body);
  font-weight: 700;
  color: var(--sj-navy-dark);
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.direction-l .flag:before,
.direction-r .flag:before {
  position: absolute;
  top: 50%;
  right: -40px;
  content: ' ';
  display: block;
  width: 12px;
  height: 12px;
  margin-top: -10px;
  background: #fff;
  border-radius: 10px;
  border: 4px solid var(--sj-gold);
  z-index: 10;
}
.direction-r .flag:before { left: -40px; }
.direction-l .flag:after {
  content: "";
  left: 100%; top: 50%; height: 0; width: 0; margin-top: -8px;
  border: solid transparent; border-left-color: #f8f8f8; border-width: 8px;
  pointer-events: none;
}
.direction-r .flag:after {
  content: "";
  right: 100%; top: 50%; height: 0; width: 0; margin-top: -8px;
  border: solid transparent; border-right-color: #f8f8f8; border-width: 8px;
  pointer-events: none;
}
.time-wrapper {
  display: inline;
  line-height: 1em;
  font-size: 0.66666em;
  color: var(--sj-gold-ink);
  vertical-align: middle;
}
.direction-l .time-wrapper { float: left; }
.direction-r .time-wrapper { float: right; }
.time {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--sj-gold-soft);
  font-weight: 700;
}
.desc {
  margin: 1em 0.75em 0 0;
  font-size: 0.77777em;
  font-style: italic;
  line-height: 1.5em;
  color: var(--sj-ink);
}
.direction-r .desc { margin: 1em 0 0 0.75em; }

@media screen and (max-width: 660px) {
  .timeline { width: 100%; padding: 4em 0 1em 0; }
  .timeline li { padding: 2em 0; }
  .direction-l, .direction-r { float: none; width: 100%; text-align: center; }
  .flag-wrapper { text-align: center; }
  .flag { background: #fff; z-index: 15; }
  .direction-l .flag:before,
  .direction-r .flag:before {
    top: -30px; left: 50%;
    content: ' '; display: block;
    width: 12px; height: 12px; margin-left: -9px;
    background: #fff; border-radius: 10px;
    border: 4px solid var(--sj-gold);
    z-index: 10;
  }
  .direction-l .flag:after,
  .direction-r .flag:after {
    content: "";
    left: 50%; top: -8px; height: 0; width: 0; margin-left: -8px;
    border: solid transparent; border-bottom-color: #fff; border-width: 8px;
    pointer-events: none;
  }
  .time-wrapper { display: block; position: relative; margin: 4px 0 0 0; z-index: 14; }
  .direction-l .time-wrapper, .direction-r .time-wrapper { float: none; }
  .desc {
    position: relative;
    margin: 1em 0 0 0;
    padding: 1em;
    background: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 0 1px rgba(0, 0, 0, .2);
    z-index: 15;
  }
  .direction-l .desc, .direction-r .desc { position: relative; margin: 1em 1em 0 1em; padding: 1em; z-index: 15; }
}
@media screen and (min-width: 400px) {
  .direction-l .desc, .direction-r .desc { margin: 1em 4em 0 4em; }
}
@media screen and (max-width: 660px) {
  .direction-l .desc, .direction-r .desc { margin: 1em 4em 0 4em; }
}
