/* ==========================================================
   SMPN 4 Sumberjaya — Stylesheet
   ========================================================== */

:root {
  --navy: #0f2a5c;
  --navy-dark: #0a1d40;
  --blue: #1f5fd9;
  --blue-light: #eaf1ff;
  --gold: #f0a53c;
  --gold-bg: #fdf1de;
  --purple-bg: #f1e7fb;
  --purple: #8a4fd6;
  --green-bg: #e4f6ea;
  --green: #2fa860;
  --ink: #1c2536;
  --ink-soft: #5b6473;
  --line: #e7eaf0;
  --bg-soft: #f6f8fb;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(15, 42, 92, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 8px 20px rgba(31, 95, 217, 0.35);
}

.btn-white {
  background: #fff;
  color: var(--navy);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-heading h2 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--navy);
}

.section-heading a {
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--navy-dark);
  color: #cdd8f0;
  font-size: 0.82rem;
}

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

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

.topbar-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-social {
  display: flex;
  gap: 10px;
}

.topbar-social a {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* ---------- Navbar ---------- */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 46px;
  height: 46px;
}

.brand-text h1 {
  font-size: 1.05rem;
  margin: 0;
  color: var(--navy);
  letter-spacing: 0.3px;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 1;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a.active {
  color: var(--blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy);
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  opacity: 0.85;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 29, 64, 0.88) 0%, rgba(10, 29, 64, 0.55) 45%, rgba(10, 29, 64, 0.1) 80%);
  display: flex;
  align-items: center;
}

.hero-content {
  color: #fff;
  max-width: 560px;
  padding: 0 24px;
}

.hero-content .eyebrow {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 4px;
  color: #dbe6ff;
}

.hero-content h2 {
  font-size: 2.4rem;
  margin: 0 0 14px;
  line-height: 1.15;
}

.hero-content p {
  color: #c9d5ef;
  margin: 0 0 22px;
  font-size: 1rem;
}

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

.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dots span.active {
  background: #fff;
  width: 22px;
  border-radius: 5px;
}

/* ---------- Stats strip ---------- */
.stats-strip {
  background: var(--bg-soft);
  padding: 28px 0;
}

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

.stat-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-card .num {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}

.stat-card .label {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- Main content grid ---------- */
.main-grid {
  padding: 44px 0;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

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

.news-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.news-thumb {
  position: relative;
  height: 130px;
  background: #dfe6f2;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  color: #fff;
}

.badge-kegiatan { background: #1f5fd9; }
.badge-kesiswaan { background: #2fa860; }
.badge-akademik { background: #8a4fd6; }
.badge-default { background: var(--navy); }

.news-body {
  padding: 14px 16px 16px;
}

.news-body h3 {
  font-size: 0.98rem;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.35;
}

.news-meta {
  font-size: 0.76rem;
  color: var(--ink-soft);
  display: flex;
  gap: 14px;
  margin-bottom: 8px;
}

.news-body p.excerpt {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Agenda */
.agenda-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}

.agenda-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.agenda-date {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.agenda-date .box {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.agenda-date .box small {
  font-size: 0.62rem;
  font-weight: 600;
}

.agenda-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.agenda-detail {
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Sidebar */
.sidebar-box {
  background: var(--gold-bg);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 24px;
}

.sidebar-box .section-heading h2 {
  font-size: 1.05rem;
}

.pengumuman-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 42, 92, 0.08);
}

.pengumuman-item:last-child {
  border-bottom: none;
}

.pengumuman-date {
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  text-align: center;
  min-width: 52px;
  height: fit-content;
}

.pengumuman-date .d {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.1;
}

.pengumuman-date .m {
  font-size: 0.68rem;
  color: var(--ink-soft);
}

.pengumuman-item h4 {
  margin: 0 0 4px;
  font-size: 0.88rem;
}

.pengumuman-item p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.principal-box {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 18px;
}

.principal-box .who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.principal-box .who img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: #cfd9ee;
}

.principal-box .who h3 {
  margin: 0;
  font-size: 0.98rem;
  color: var(--navy);
}

.principal-box p {
  font-size: 0.85rem;
  color: var(--ink-soft);
  white-space: pre-line;
}

/* About strip */
.about-strip {
  background: var(--bg-soft);
  padding: 40px 0;
  text-align: center;
}

.about-strip h2 {
  color: var(--navy);
  margin: 0 0 20px;
}

.about-grid {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 24px 0;
}

.about-grid .item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.about-grid .icon-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-dark);
  color: #b9c4de;
  padding: 44px 0 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin: 0 0 14px;
}

.footer-about img {
  width: 40px;
  margin-bottom: 10px;
}

.footer-about p {
  font-size: 0.82rem;
  line-height: 1.6;
}

.footer ul li {
  margin-bottom: 9px;
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.footer-social a {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-contact li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.footer-portal a {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.footer-portal .btn-primary {
  background: var(--blue);
  color: #fff;
}

.footer-portal .btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .main-grid { grid-template-columns: 1fr; }
  .news-grid, .agenda-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .news-grid, .agenda-grid, .stats-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-content h2 { font-size: 1.7rem; }
  .hero-img { height: 340px; }
}
