/*
Theme Name: MTs Aswaja Tengaran
Theme URI: https://mtsaswajatengaran.sch.id
Author: Tim IT MTs Aswaja Tengaran
Author URI: https://mtsaswajatengaran.sch.id
Description: Tema WordPress resmi untuk MTs Aswaja Tengaran dengan desain modern Islami, responsif, dilengkapi 7 menu utama (Beranda + Sambutan Kepala Sekolah, Berita, Pengumuman, Profil Visi & Misi, Program Unggulan, Fasilitas, Ekstrakurikuler & Organisasi) yang dapat diedit langsung melalui Editor Gutenberg, Customizer, dan Menu WordPress.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mts-aswaja
Tags: education, school, custom-menu, custom-logo, featured-images, block-patterns, editor-style
*/

:root {
  --primary: #065f46;
  --primary-dark: #064e3b;
  --primary-light: #047857;
  --primary-soft: #ecfdf5;
  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-soft: #fef3c7;
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 25px rgba(6, 95, 70, 0.08);
  --shadow-lg: 0 20px 40px rgba(6, 78, 59, 0.14);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-body);
  background-color: var(--bg-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Bar */
.topbar {
  background: var(--primary-dark);
  color: #d1fae5;
  font-size: 0.85rem;
  padding: 8px 0;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-info {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar-badge {
  background: rgba(217, 119, 6, 0.22);
  color: #fde68a;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
}

/* Header & Navigation */
.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 16px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-branding .custom-logo {
  max-height: 50px;
  width: auto;
}

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(6, 95, 70, 0.25);
}

.site-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.2;
}

.site-tagline {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.main-nav a {
  display: block;
  padding: 9px 13px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  border-radius: 8px;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-category-ancestor > a {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: var(--primary-soft);
  border: 1px solid #a7f3d0;
  color: var(--primary-dark);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.3);
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.btn-outline-light:hover {
  background: var(--white);
  color: var(--primary-dark);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
  color: var(--white);
  padding: 80px 0 95px;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-pill {
  display: inline-block;
  background: rgba(217, 119, 6, 0.9);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.18;
  margin: 0 0 18px;
  color: var(--white);
}

.hero-subtitle {
  font-size: 1.08rem;
  color: #ecfdf5;
  margin: 0 0 30px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.hero-card img {
  border-radius: 14px;
  width: 100%;
  height: 270px;
  object-fit: cover;
}

.hero-highlight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.hero-highlight-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(6, 78, 59, 0.45);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.93rem;
}

.hero-highlight-list strong {
  color: #fde68a;
  display: block;
}

/* Stats Strip */
.stats-wrap {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.stat-number {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--white);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 46px;
}

.section-tag {
  display: inline-block;
  color: var(--accent-hover);
  background: var(--accent-soft);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 5px 14px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  color: var(--text-dark);
}

.section-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Sambutan Kepala Sekolah */
.sambutan-box {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 38px;
  align-items: center;
}

.kepsek-photo-wrap {
  text-align: center;
}

.kepsek-photo {
  width: 100%;
  height: 330px;
  object-fit: cover;
  border-radius: 16px;
  border: 4px solid var(--primary-soft);
  box-shadow: var(--shadow-sm);
}

.kepsek-placeholder {
  width: 100%;
  height: 310px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--primary-soft), #d1fae5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-weight: 700;
  border: 2px dashed #6ee7b7;
  padding: 20px;
}

.kepsek-name-card {
  margin-top: 14px;
  background: var(--primary-dark);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 12px;
}

.kepsek-name-card h4 {
  margin: 0;
  font-size: 1rem;
  color: #fde68a;
}

.kepsek-name-card span {
  font-size: 0.82rem;
  color: #d1fae5;
}

.sambutan-quote {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  font-weight: 600;
  color: var(--text-dark);
  margin: 16px 0;
  font-style: italic;
}

/* Cards & Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-thumb {
  width: 100%;
  height: 205px;
  object-fit: cover;
  background: var(--primary-soft);
}

.card-thumb-placeholder {
  width: 100%;
  height: 190px;
  background: linear-gradient(135deg, var(--primary-soft), #d1fae5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 800;
  font-size: 2.2rem;
}

.card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.badge-cat {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
}

.badge-pengumuman {
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
}

.card-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.38;
}

.card-title a {
  color: var(--text-dark);
}

.card-title a:hover {
  color: var(--primary);
}

.card-text {
  color: var(--text-body);
  font-size: 0.93rem;
  margin: 0 0 18px;
  flex: 1;
}

.card-link {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Program Icon Box */
.program-card {
  padding: 28px 24px;
  border-top: 4px solid var(--primary);
}

.program-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

/* Pengumuman List Style */
.announcement-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.announcement-date {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  min-width: 82px;
  font-weight: 800;
  line-height: 1.2;
}

.announcement-date span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
}

/* Page Header */
.page-banner {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  padding: 54px 0;
  text-align: center;
}

.page-banner h1 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
}

.page-banner p {
  margin: 0 auto;
  max-width: 650px;
  color: #d1fae5;
}

/* Visi Misi Box */
.visi-card {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.visi-card h3 {
  color: #fde68a;
  margin-top: 0;
  font-size: 1.4rem;
}

.visi-text {
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.6;
  margin: 0;
}

.misi-card {
  background: var(--white);
  border-radius: 18px;
  padding: 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.misi-card h3 {
  color: var(--primary-dark);
  margin-top: 0;
  font-size: 1.4rem;
}

.misi-list {
  padding-left: 20px;
  margin: 0;
  display: grid;
  gap: 12px;
}

.misi-list li {
  padding-left: 6px;
}

/* Identity Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.info-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.info-table td:first-child {
  font-weight: 700;
  color: var(--text-dark);
  width: 34%;
  background: #f1f5f9;
}

/* Gutenberg Content Styling */
.entry-content {
  background: var(--white);
  padding: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.entry-content h2, .entry-content h3 {
  color: var(--primary-dark);
}

.alignwide {
  max-width: 100%;
}

.alignfull {
  width: 100%;
}

/* Pagination */
.pagination-wrap {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.page-numbers {
  padding: 9px 15px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--text-dark);
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* CTA Banner */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  color: var(--white);
  border-radius: 22px;
  padding: 48px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-section h2 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.cta-section p {
  margin: 0;
  color: #d1fae5;
  max-width: 600px;
}

/* Footer */
.site-footer {
  background: #042f2e;
  color: #cbd5e1;
  padding: 64px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 16px;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.footer-menu a {
  color: #cbd5e1;
  font-size: 0.92rem;
}

.footer-menu a:hover {
  color: #fde68a;
}

.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid,
  .sambutan-box,
  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    box-shadow: var(--shadow-md);
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 576px) {
  .stats-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .sambutan-box,
  .entry-content {
    padding: 24px;
  }

  .announcement-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
