:root {
  --bg: #f7f5ef;
  --bg-alt: #efe9dc;
  --ink: #1a1f26;
  --muted: #4a5565;
  --brand: #c24027;
  --brand-dark: #942f1e;
  --card: rgba(255, 255, 255, 0.62);
  --line: rgba(26, 31, 38, 0.12);
  --shadow: 0 16px 40px rgba(15, 25, 35, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, #ffe8c7 0%, transparent 45%),
    radial-gradient(circle at left bottom, #d9ebe8 0%, transparent 40%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(to right, rgba(26, 31, 38, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 31, 38, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -3;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(60px);
  pointer-events: none;
  z-index: -2;
}

.shape-1 {
  width: 280px;
  height: 280px;
  background: rgba(194, 64, 39, 0.25);
  top: -80px;
  right: -30px;
}

.shape-2 {
  width: 320px;
  height: 320px;
  background: rgba(72, 119, 108, 0.24);
  bottom: -90px;
  left: -70px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 16px auto 0;
  width: min(1120px, calc(100% - 24px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  background: rgba(247, 245, 239, 0.82);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-badge {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.site-nav {
  display: flex;
  gap: 16px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  opacity: 0.88;
}

.site-nav a:hover {
  opacity: 1;
}

.inline-link {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-size: 1rem;
  cursor: pointer;
}

main {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto;
}

.hero {
  padding: 84px 0 46px;
}

.page-hero {
  padding: 84px 0 20px;
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.08;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2.2px;
  font-size: 0.77rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.hero h1 {
  margin: 14px 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1.04;
}

.hero-lead {
  margin: 0;
  max-width: 700px;
  font-size: 1.03rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  padding: 11px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(194, 64, 39, 0.35);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
}

.hero-stats {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-stats article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-stats h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
}

.hero-stats p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section {
  padding: 46px 0;
}

.section-alt {
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(239, 233, 220, 0.65), rgba(239, 233, 220, 0.28));
  border: 1px solid rgba(26, 31, 38, 0.07);
  padding: 46px 20px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
}

.cards,
.program-grid,
.news-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card,
.program-card,
.news-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.card h3,
.program-card h3,
.news-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-family: "Space Grotesk", sans-serif;
}

.card p,
.program-card p,
.news-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.program-card span {
  display: inline-flex;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.85rem;
}

.facility-list {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.facility-item {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(26, 31, 38, 0.18);
  background: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.news-date {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 0.86rem;
  color: var(--brand-dark);
  font-weight: 700;
}

.contact-box {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.contact-box p {
  margin: 7px 0;
  color: var(--muted);
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.feature-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-family: "Space Grotesk", sans-serif;
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.section-kicker {
  margin-top: 14px;
  margin-bottom: 12px;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--brand-dark);
  font-weight: 700;
}

.site-footer {
  width: min(1120px, calc(100% - 24px));
  margin: 30px auto 28px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
  color: var(--muted);
}

.gallery-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  min-height: 160px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.78), rgba(217, 235, 232, 0.5));
  box-shadow: var(--shadow);
}

.gallery-item h3 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
}

.gallery-item p {
  margin: 0;
  color: var(--muted);
}

.ppdb-form {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.ppdb-form label {
  display: grid;
  gap: 7px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

.ppdb-form input,
.ppdb-form select,
.ppdb-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(26, 31, 38, 0.2);
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
}

.ppdb-form input:focus,
.ppdb-form select:focus,
.ppdb-form textarea:focus {
  outline: 2px solid rgba(194, 64, 39, 0.25);
  border-color: var(--brand);
}

.form-message {
  margin: 12px 0 0;
  min-height: 24px;
  font-weight: 700;
  color: var(--brand-dark);
}

.form-hint {
  margin: 10px 0 0;
  color: var(--muted);
}

.is-hidden {
  display: none;
}

.admin-login {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  max-width: 540px;
}

.admin-login label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.admin-login-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.admin-login-row input,
.admin-controls input,
.admin-controls select {
  border-radius: 10px;
  border: 1px solid rgba(26, 31, 38, 0.2);
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 14px;
}

.stat-card h3 {
  margin: 0;
  font-size: 1.5rem;
  font-family: "Space Grotesk", sans-serif;
}

.stat-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-controls {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-actions {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

.pagination p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
}

.ppdb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.ppdb-table th,
.ppdb-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(26, 31, 38, 0.12);
  vertical-align: top;
  font-size: 0.92rem;
}

.ppdb-table thead th {
  background: rgba(194, 64, 39, 0.08);
  font-family: "Space Grotesk", sans-serif;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.action-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.action-btn.delete {
  color: #8b1f0f;
  border-color: rgba(139, 31, 15, 0.25);
}

.edit-modal {
  border: none;
  padding: 0;
  border-radius: 16px;
  width: min(720px, calc(100% - 20px));
  background: transparent;
}

.edit-modal::backdrop {
  background: rgba(18, 23, 31, 0.45);
}

.edit-modal h3 {
  margin-top: 0;
  font-family: "Space Grotesk", sans-serif;
}

.admin-audit {
  margin-top: 20px;
}

.student-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.student-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.student-inline-tools {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.captcha-question {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}

.student-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.student-stat-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.student-stat-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.student-stat-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
}

.student-security-wrap,
.student-activity-wrap {
  margin-top: 16px;
}

.student-security-wrap h3,
.student-activity-wrap h3 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
}

.activity-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.activity-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
}

.activity-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.audit-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.audit-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.audit-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .cards,
  .program-grid,
  .news-grid,
  .gallery-grid,
  .student-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .student-stats {
    grid-template-columns: 1fr;
  }

  .audit-list {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(247, 245, 239, 0.98);
  }

  .site-nav.open {
    display: flex;
  }

  .cards,
  .program-grid,
  .news-grid,
  .facility-list,
  .gallery-grid,
  .form-grid,
  .student-grid {
    grid-template-columns: 1fr;
  }

  .student-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-login-row,
  .admin-controls {
    grid-template-columns: 1fr;
  }

  .pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 60px;
  }
}
