/*
Theme Name: Astra Sekolah
Theme URI: https://example.sch.id
Description: Child theme Astra untuk web sekolah. Header lengket yang mengecil, beranda berbasis block pattern, dan footer empat kolom.
Author: Tim Web Sekolah
Template: astra
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: astra-sekolah
*/

/* ==========================================================================
   1. Token identitas sekolah — ubah di sini saja
   ========================================================================== */
:root {
  --sk-utama: #0e5a4a;
  --sk-utama-gelap: #093d32;
  --sk-utama-muda: #e3f0ec;
  --sk-aksen: #e0a526;
  --sk-teks: #1c2b27;
  --sk-teks-redup: #52625d;
  --sk-latar: #f5f7f4;
  --sk-garis: #d9e1dd;
  --sk-radius: 10px;
  --sk-radius-besar: 16px;
  --sk-ruang-bagian: clamp(48px, 8vw, 96px);
  --sk-tinggi-header: 84px;
  --sk-tinggi-header-kecil: 60px;
  --sk-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--sk-font);
  color: var(--sk-teks);
  background: #fff;
}

h1, h2, h3, h4 {
  font-family: var(--sk-font);
  letter-spacing: -0.01em;
  color: var(--sk-teks);
}

a { color: var(--sk-utama); }

:focus-visible {
  outline: 3px solid var(--sk-aksen);
  outline-offset: 2px;
}

/* ==========================================================================
   2. Header — lengket, mengecil saat di-scroll
   ========================================================================== */
#masthead {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  transition: box-shadow .25s ease;
}

.admin-bar #masthead { top: 32px; }
@media (max-width: 782px) {
  .admin-bar #masthead { top: 46px; }
}

#masthead .ast-primary-header-bar,
#masthead .main-header-bar {
  border-bottom: 1px solid var(--sk-garis);
}

#masthead .site-primary-header-wrap,
#masthead .ast-builder-grid-row {
  min-height: var(--sk-tinggi-header);
  transition: min-height .25s ease;
}

#masthead .custom-logo {
  max-height: 56px;
  width: auto;
  transition: max-height .25s ease;
}

body.sk-scrolled #masthead {
  box-shadow: 0 4px 18px rgba(9, 61, 50, .10);
}

body.sk-scrolled #masthead .site-primary-header-wrap,
body.sk-scrolled #masthead .ast-builder-grid-row {
  min-height: var(--sk-tinggi-header-kecil);
}

body.sk-scrolled #masthead .custom-logo {
  max-height: 40px;
}

/* Menu: garis aksen pada item aktif */
.main-header-menu > .menu-item > a {
  font-weight: 600;
  font-size: 15px;
  color: var(--sk-teks);
}

.main-header-menu > .menu-item > a:hover,
.main-header-menu > .current-menu-item > a {
  color: var(--sk-utama);
  box-shadow: inset 0 -3px 0 var(--sk-aksen);
}

/* Tombol aksi di menu: beri CSS class "sk-cta" pada item menu (mis. Daftar / PPDB) */
.main-header-menu > .menu-item.sk-cta > a {
  background: var(--sk-utama);
  color: #fff;
  border-radius: var(--sk-radius);
  padding: 0 20px;
  margin-left: 12px;
  box-shadow: none;
}

.main-header-menu > .menu-item.sk-cta > a:hover {
  background: var(--sk-utama-gelap);
  color: #fff;
  box-shadow: none;
}

/* ==========================================================================
   3. Tombol
   ========================================================================== */
.wp-block-button__link,
.ast-button,
button,
input[type="submit"] {
  border-radius: var(--sk-radius);
  font-weight: 600;
}

.wp-block-button.is-style-sk-garis .wp-block-button__link {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .7);
}

/* ==========================================================================
   4. Beranda — hero
   ========================================================================== */
.sk-hero {
  position: relative;
  background-color: var(--sk-utama-gelap);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: clamp(72px, 12vw, 148px) 24px;
  isolation: isolate;
}

.sk-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 61, 50, .92) 0%, rgba(9, 61, 50, .55) 60%, rgba(9, 61, 50, .25) 100%);
  z-index: -1;
}

.sk-hero h1,
.sk-hero p {
  color: #fff;
}

.sk-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.12;
  max-width: 18ch;
  margin-bottom: .5em;
}

.sk-hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 52ch;
  line-height: 1.65;
}

.sk-hero .wp-block-buttons { margin-top: 28px; gap: 12px; }

.sk-hero .wp-block-button__link {
  background: var(--sk-aksen);
  color: var(--sk-teks);
  padding: 14px 26px;
}

.sk-hero .wp-block-button__link:hover {
  background: #f0b93e;
  color: var(--sk-teks);
}

.sk-hero .wp-block-button.is-style-sk-garis .wp-block-button__link {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .7);
}

.sk-hero .wp-block-button.is-style-sk-garis .wp-block-button__link:hover {
  background: rgba(255, 255, 255, .12);
}

/* ==========================================================================
   5. Beranda — strip statistik
   ========================================================================== */
.sk-statistik {
  background: var(--sk-latar);
  border-top: 4px solid var(--sk-aksen);
  padding: 36px 24px;
}

.sk-statistik .wp-block-column { text-align: left; }

.sk-statistik .sk-angka {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  margin: 0 0 6px;
  color: var(--sk-utama);
}

.sk-statistik .sk-label {
  margin: 0;
  color: var(--sk-teks-redup);
  font-size: .95rem;
}

/* ==========================================================================
   6. Bagian umum beranda
   ========================================================================== */
.sk-bagian {
  padding: var(--sk-ruang-bagian) 24px;
}

.sk-bagian.sk-latar { background: var(--sk-latar); }

.sk-bagian > h2,
.sk-judul-bagian {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 8px;
}

.sk-subjudul {
  color: var(--sk-teks-redup);
  max-width: 60ch;
  margin: 0 0 32px;
}

/* Grid berita (Query Loop) */
.sk-berita .wp-block-post-template {
  gap: 28px;
}

.sk-berita .wp-block-post {
  background: #fff;
  border: 1px solid var(--sk-garis);
  border-radius: var(--sk-radius-besar);
  overflow: hidden;
}

.sk-berita .wp-block-post-featured-image { margin: 0; }
.sk-berita .wp-block-post-featured-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.sk-berita .wp-block-post-date,
.sk-berita .wp-block-post-title,
.sk-berita .wp-block-post-excerpt {
  padding-left: 18px;
  padding-right: 18px;
}

.sk-berita .wp-block-post-date {
  margin-top: 16px;
  font-size: .85rem;
  color: var(--sk-teks-redup);
}

.sk-berita .wp-block-post-title {
  font-size: 1.15rem;
  line-height: 1.35;
  margin: 6px 0 8px;
}

.sk-berita .wp-block-post-title a {
  color: var(--sk-teks);
  text-decoration: none;
}

.sk-berita .wp-block-post-title a:hover { color: var(--sk-utama); }

.sk-berita .wp-block-post-excerpt {
  color: var(--sk-teks-redup);
  font-size: .95rem;
  padding-bottom: 18px;
}

/* ==========================================================================
   7. Footer — empat kolom
   ========================================================================== */
.site-footer,
.site-primary-footer-wrap,
.ast-small-footer {
  background: var(--sk-utama-gelap);
  color: #d3e2dd;
}

.site-primary-footer-wrap {
  padding-top: 56px;
  padding-bottom: 40px;
  border-top: 5px solid var(--sk-aksen);
}

.site-footer .widget-title,
.site-footer h2,
.site-footer h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.site-footer a { color: #d3e2dd; text-decoration: none; }
.site-footer a:hover { color: var(--sk-aksen); text-decoration: underline; }

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }

.site-footer p { color: #d3e2dd; line-height: 1.7; }

.site-below-footer-wrap {
  background: #062a22;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .9rem;
}

.site-below-footer-wrap,
.site-below-footer-wrap a { color: #a9c0b8; }

/* ==========================================================================
   8. Responsif dan aksesibilitas
   ========================================================================== */
@media (max-width: 768px) {
  .sk-hero::before {
    background: rgba(9, 61, 50, .78);
  }
  .sk-statistik .wp-block-columns { gap: 20px; }
  #masthead .custom-logo { max-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  #masthead,
  #masthead * {
    transition: none !important;
  }
}
