:root {
--primary: #2563eb;
--primary-dark: #1e40af;
--text: #0f172a;
--muted: #64748b;
--bg: #f8fafc;
--surface: #fff;
--border: #e2e8f0;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: "Segoe UI", system-ui, sans-serif;
color: var(--text);
background: var(--bg);
}
a {
color: inherit;
text-decoration: none;
}

/* ===== Navbar ===== */
.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
padding: 12px 40px;
z-index: 100;
display: flex;
justify-content: space-between;
align-items: center;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}
.brand {
display: flex;
align-items: center;
gap: 10px;
font-weight: 700;
font-size: 1.1rem;
}
.brand img {
width: 40px;
height: 40px;
object-fit: contain;
}
.nav-links {
display: flex;
gap: 24px;
}
.nav-links a {
font-size: 0.9rem;
color: var(--muted);
transition: 0.2s;
}
.nav-links a:hover {
color: var(--primary);
}
.nav-actions {
display: flex;
gap: 10px;
}
.btn {
padding: 10px 22px;
border-radius: 8px;
border: none;
font-weight: 600;
cursor: pointer;
font-size: 0.9rem;
transition: 0.2s;
}
.btn-primary {
background: var(--primary);
color: #fff;
}
.btn-primary:hover {
background: var(--primary-dark);
}
.btn-ghost {
background: transparent;
color: var(--text);
}
.btn-ghost:hover {
background: #f1f5f9;
}

/* ===== Hero ===== */
.hero {
position: relative;
height: 90vh;
min-height: 560px;
display: flex;
align-items: center;
justify-content: center;
background:
    linear-gradient(rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.75)),
    url("../assets/img/sekolah.jpg") center/cover no-repeat;
color: #fff;
text-align: center;
padding: 0 20px;
}
.hero-content {
max-width: 780px;
}
.hero h1 {
font-size: clamp(2rem, 5vw, 3.2rem);
margin-bottom: 16px;
line-height: 1.2;
}
.hero p {
font-size: 1.15rem;
opacity: 0.9;
margin-bottom: 32px;
}
.hero-cta {
display: flex;
gap: 14px;
justify-content: center;
flex-wrap: wrap;
}
.hero-cta .btn {
padding: 14px 30px;
font-size: 1rem;
}
.btn-white {
background: #fff;
color: var(--primary);
}
.btn-white:hover {
background: #f1f5f9;
}
.btn-outline-white {
background: transparent;
color: #fff;
border: 2px solid #fff;
}
.btn-outline-white:hover {
background: rgba(255, 255, 255, 0.15);
}

/* ===== Sections ===== */
.section {
max-width: 1200px;
margin: 0 auto;
padding: 80px 40px;
}
.section-header {
text-align: center;
margin-bottom: 48px;
}
.section-header h2 {
font-size: 2rem;
margin-bottom: 12px;
}
.section-header p {
color: var(--muted);
}

/* ===== Stats ===== */
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 20px;
margin-top: -60px;
position: relative;
z-index: 10;
}
.stat {
background: #fff;
padding: 28px 20px;
border-radius: 14px;
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
text-align: center;
}
.stat .num {
font-size: 2.2rem;
font-weight: 800;
color: var(--primary);
}
.stat .lbl {
color: var(--muted);
font-size: 0.9rem;
margin-top: 4px;
}

/* ===== Berita ===== */
.berita-grid {
display: grid;
gap: 24px;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.berita-card {
background: #fff;
border-radius: 14px;
overflow: hidden;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
transition:
    transform 0.25s,
    box-shadow 0.25s;
cursor: pointer;
}
.berita-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.berita-card img {
width: 100%;
height: 200px;
object-fit: cover;
}
.berita-body {
padding: 20px;
}
.berita-tag {
display: inline-block;
background: #dbeafe;
color: var(--primary);
padding: 3px 10px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
margin-bottom: 10px;
}
.berita-body h3 {
font-size: 1.1rem;
margin-bottom: 8px;
line-height: 1.35;
}
.berita-body p {
color: var(--muted);
font-size: 0.9rem;
line-height: 1.5;
margin-bottom: 14px;
}
.berita-meta {
display: flex;
justify-content: space-between;
font-size: 0.8rem;
color: var(--muted);
}

/* ===== Loading & Empty State ===== */
.loading-state,
.empty-state {
grid-column: 1 / -1;
text-align: center;
padding: 60px 20px;
color: var(--muted);
}
.loading-state .spinner {
width: 40px;
height: 40px;
border: 3px solid var(--border);
border-top-color: var(--primary);
border-radius: 50%;
margin: 0 auto 16px;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
    transform: rotate(360deg);
}
}
.empty-state .icon {
font-size: 3rem;
margin-bottom: 12px;
}

/* ===== Footer ===== */
footer {
background: #0f172a;
color: #cbd5e1;
padding: 40px;
text-align: center;
margin-top: 60px;
}
footer p {
font-size: 0.9rem;
}

.container {
  width: 70%;
  justify-self: center;
  place-self: center;
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }
    .nav-links {
        display: none;
    }
    .section {
        padding: 60px 20px;
    }
    .hero {
        height: 80vh;
    }
    .container {
        width: 95%;
        justify-self: center;
        place-self: center;
    }
}