/* =====================================================
   WEBSITE SEKOLAH DASAR - Main Stylesheet
   ===================================================== */

:root {
  --green: #1B6B3A;
  --green-mid: #2E8B57;
  --green-light: #E8F5EF;
  --green-accent: #4CAF7D;
  --gold: #F5A623;
  --red: #C0392B;
  --dark: #1A2235;
  --text: #2C3E50;
  --muted: #6C7A89;
  --border: #DDE3EA;
  --gray: #F4F6F8;
  --white: #fff;
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito', sans-serif; color: var(--text); background: var(--white); font-size: 15px; line-height: 1.6; }
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
h1, h2, h3 { font-family: 'Lora', serif; }
ul { list-style: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== TOPBAR ===== */
.topbar { background: var(--dark); color: rgba(255,255,255,.75); font-size: 12px; padding: 7px 0; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar-left { display: flex; gap: 20px; }
.topbar-left span { display: flex; align-items: center; gap: 6px; }
.topbar-right { display: flex; gap: 12px; }
.topbar-right a { color: rgba(255,255,255,.65); font-size: 14px; transition: .2s; }
.topbar-right a:hover { color: var(--green-accent); }

/* ===== NAVBAR ===== */
.navbar { background: var(--white); border-bottom: 3px solid var(--green); box-shadow: 0 2px 12px rgba(0,0,0,0.07); position: sticky; top: 0; z-index: 900; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.logo-placeholder { width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex-shrink: 0; }
.brand-name { font-size: 14px; font-weight: 800; color: var(--green); line-height: 1.2; }
.brand-sub { font-size: 10px; color: var(--muted); font-weight: 600; }

.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-item > a { display: flex; align-items: center; gap: 5px; padding: 8px 14px; font-weight: 700; font-size: 13px; color: var(--text); border-radius: 6px; transition: .2s; white-space: nowrap; }
.nav-item > a:hover, .nav-item.active > a { color: var(--green); background: var(--green-light); }
.nav-item > a .fa-chevron-down { font-size: 10px; transition: .2s; }
.nav-item.has-dropdown:hover > a .fa-chevron-down { transform: rotate(180deg); }

.dropdown { display: none; position: absolute; top: calc(100% + 8px); left: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); min-width: 200px; z-index: 999; overflow: hidden; }
.nav-item.has-dropdown:hover .dropdown { display: block; animation: fadeDown .15s ease; }
.dropdown li a { display: block; padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--text); transition: .15s; border-bottom: 1px solid var(--border); }
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: var(--green-light); color: var(--green); }

.btn-admin { background: var(--green) !important; color: #fff !important; border-radius: 6px !important; padding: 7px 14px !important; }
.btn-admin:hover { background: var(--green-mid) !important; }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: .3s; }

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 55%, #27AE60 100%); color: #fff; padding: 80px 0 70px; overflow: hidden; position: relative; }
.hero::after { content: ''; position: absolute; top: -100px; right: -100px; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,.04); pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); border-radius: 20px; padding: 5px 14px; font-size: 12px; font-weight: 700; margin-bottom: 20px; }
.hero h1 { font-size: 2.4rem; line-height: 1.2; margin-bottom: 16px; }
.hero p { font-size: 15px; opacity: .9; line-height: 1.7; margin-bottom: 28px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 14px; border: none; cursor: pointer; transition: .2s; font-family: 'Nunito', sans-serif; }
.btn-white { background: var(--white); color: var(--green); }
.btn-white:hover { background: var(--green-light); }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.12); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-mid); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.hero-image { display: flex; justify-content: center; align-items: center; }
.hero-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); max-height: 320px; object-fit: cover; }
.hero-img-placeholder { width: 100%; height: 280px; background: rgba(255,255,255,.1); border-radius: var(--radius-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed rgba(255,255,255,.3); color: rgba(255,255,255,.6); font-size: 50px; }

/* ===== STATS ===== */
.stats-bar { background: var(--dark); padding: 28px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat-item { text-align: center; padding: 16px; border-right: 1px solid rgba(255,255,255,.08); }
.stat-item:last-child { border-right: none; }
.stat-num { font-size: 2rem; font-weight: 800; color: var(--gold); font-family: 'Lora', serif; }
.stat-label { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 4px; font-weight: 600; }

/* ===== SECTION COMMONS ===== */
.section { padding: 60px 0; }
.section-gray { background: var(--gray); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header .badge-tag { display: inline-block; background: var(--green-light); color: var(--green); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 4px 14px; border-radius: 20px; margin-bottom: 10px; }
.section-header h2 { font-size: 1.8rem; color: var(--dark); margin-bottom: 10px; }
.section-header p { font-size: 14px; color: var(--muted); max-width: 500px; margin: 0 auto; }
.section-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.section-top h2 { font-size: 1.4rem; color: var(--dark); }
.btn-more { background: var(--green-light); color: var(--green); border: none; padding: 8px 18px; border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: 'Nunito', sans-serif; transition: .2s; }
.btn-more:hover { background: var(--green); color: #fff; }

/* ===== QUICK LINKS ===== */
.ql-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ql-card { background: var(--white); border-radius: var(--radius-lg); padding: 28px 22px; text-align: center; border: 1px solid var(--border); transition: .25s; cursor: pointer; }
.ql-card:hover { border-color: var(--green); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ql-icon { width: 60px; height: 60px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 26px; }
.ql-card h3 { font-size: 14px; font-weight: 800; color: var(--dark); margin-bottom: 6px; font-family: 'Nunito', sans-serif; }
.ql-card p { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ===== BERITA/NEWS GRID ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); transition: .25s; }
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.news-img { height: 180px; overflow: hidden; background: var(--gray); display: flex; align-items: center; justify-content: center; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.news-card:hover .news-img img { transform: scale(1.04); }
.news-img-placeholder { display: flex; align-items: center; justify-content: center; font-size: 40px; height: 100%; width: 100%; }
.news-body { padding: 18px; }
.news-cat { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--green); margin-bottom: 8px; }
.news-body h3 { font-size: 14px; font-weight: 800; color: var(--dark); line-height: 1.4; margin-bottom: 10px; font-family: 'Nunito', sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; }
.news-summary { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== AGENDA ===== */
.agenda-list { display: flex; flex-direction: column; gap: 14px; }
.agenda-item { background: var(--white); border-radius: var(--radius); padding: 18px; display: flex; gap: 18px; align-items: center; border: 1px solid var(--border); transition: .2s; }
.agenda-item:hover { border-color: var(--green); box-shadow: var(--shadow); }
.agenda-date { min-width: 56px; height: 60px; background: var(--green); color: #fff; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.agenda-date .day { font-size: 20px; font-weight: 800; line-height: 1; }
.agenda-date .mon { font-size: 11px; font-weight: 600; opacity: .85; text-transform: uppercase; }
.agenda-info h4 { font-size: 14px; font-weight: 800; color: var(--dark); margin-bottom: 4px; font-family: 'Nunito', sans-serif; }
.agenda-info p { font-size: 12px; color: var(--muted); }

/* ===== PENGUMUMAN ===== */
.pengumuman-list { display: flex; flex-direction: column; gap: 14px; }
.pengumuman-item { background: var(--white); border-radius: var(--radius); padding: 20px; border-left: 4px solid var(--green); box-shadow: var(--shadow); transition: .2s; }
.pengumuman-item:hover { transform: translateX(4px); }
.pengumuman-item h3 { font-size: 15px; font-weight: 800; color: var(--dark); margin-bottom: 6px; font-family: 'Nunito', sans-serif; }
.pengumuman-item p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pengumuman-item .pdate { font-size: 11px; color: var(--muted); margin-top: 8px; }

/* ===== PRESTASI ===== */
.prestasi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.prestasi-card { background: var(--white); border-radius: var(--radius); padding: 18px; border: 1px solid var(--border); display: flex; align-items: flex-start; gap: 14px; transition: .2s; }
.prestasi-card:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.prestasi-medal { width: 46px; height: 46px; border-radius: 10px; background: var(--green-light); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.prestasi-info h4 { font-size: 13px; font-weight: 800; color: var(--dark); margin-bottom: 3px; font-family: 'Nunito', sans-serif; }
.prestasi-info .meta { font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.prestasi-info .detail { font-size: 12px; color: var(--text); }
.badge-tingkat { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 800; background: var(--green-light); color: var(--green); margin-top: 6px; }

/* ===== GTK ===== */
.gtk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gtk-card { background: var(--white); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border); text-align: center; transition: .2s; }
.gtk-card:hover { border-color: var(--green); box-shadow: var(--shadow); }
.gtk-avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; }
.gtk-avatar-placeholder { width: 68px; height: 68px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 22px; font-weight: 800; font-family: 'Lora', serif; }
.gtk-card h4 { font-size: 13px; font-weight: 800; color: var(--dark); margin-bottom: 4px; font-family: 'Nunito', sans-serif; }
.gtk-card .jabatan { font-size: 11px; color: var(--green); font-weight: 700; }
.gtk-card .mapel { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* ===== GALERI ===== */
.galeri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.galeri-item { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--gray); cursor: pointer; position: relative; }
.galeri-item img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.galeri-item:hover img { transform: scale(1.06); }
.galeri-overlay { position: absolute; inset: 0; background: rgba(27,107,58,.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: .3s; color: #fff; font-size: 22px; }
.galeri-item:hover .galeri-overlay { opacity: 1; }

/* ===== PAGE HEADER ===== */
.page-header { background: linear-gradient(135deg, var(--green) 0%, var(--green-mid) 100%); color: #fff; padding: 50px 0; }
.page-header h1 { font-size: 2rem; margin-bottom: 8px; }
.page-header .breadcrumb { font-size: 13px; opacity: .8; display: flex; gap: 8px; align-items: center; }
.page-header .breadcrumb a { color: rgba(255,255,255,.75); }
.page-header .breadcrumb a:hover { color: #fff; }

/* ===== PPDB FORM ===== */
.ppdb-form { background: var(--white); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.form-section { margin-bottom: 28px; border-top: 2px solid var(--green-light); padding-top: 20px; }
.form-section:first-child { border-top: none; padding-top: 0; }
.form-section h3 { font-size: 15px; font-weight: 800; color: var(--green); margin-bottom: 16px; font-family: 'Nunito', sans-serif; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 7px; padding: 10px 13px;
  font-size: 14px; font-family: 'Nunito', sans-serif; outline: none; transition: .2s; color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(27,107,58,.1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.required { color: var(--red); }
.btn-submit { background: var(--green); color: #fff; border: none; padding: 13px 32px; border-radius: 8px; font-size: 15px; font-weight: 800; cursor: pointer; font-family: 'Nunito', sans-serif; transition: .2s; width: 100%; margin-top: 8px; }
.btn-submit:hover { background: var(--green-mid); }

/* ===== DETAIL BERITA ===== */
.article-body { max-width: 780px; margin: 0 auto; }
.article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 24px; flex-wrap: wrap; }
.article-meta span { display: flex; align-items: center; gap: 6px; }
.article-content { font-size: 15px; line-height: 1.8; color: var(--text); }
.article-content h2, .article-content h3 { margin: 24px 0 12px; color: var(--dark); }
.article-content p { margin-bottom: 16px; }
.article-content img { border-radius: var(--radius); max-width: 100%; margin: 16px 0; }

/* ===== ALERT ===== */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; font-weight: 600; }
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid var(--green-accent); }
.alert-danger { background: #FFEBEE; color: var(--red); border: 1px solid #FFCDD2; }
.alert-info { background: #E3F2FD; color: #1565C0; border: 1px solid #BBDEFB; }

/* ===== CARD ===== */
.card { background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 800; font-size: 15px; color: var(--dark); background: var(--gray); }
.card-body { padding: 20px; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 7px; font-size: 13px; font-weight: 700; border: 1px solid var(--border); color: var(--text); transition: .2s; }
.pagination a:hover { background: var(--green-light); border-color: var(--green); color: var(--green); }
.pagination .active { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== FOOTER ===== */
.footer { background: var(--dark); color: rgba(255,255,255,.7); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 40px; }
.footer-col h3 { font-size: 15px; color: var(--white); margin-bottom: 12px; }
.footer-col h4 { font-size: 13px; color: var(--gold); margin-bottom: 14px; font-family: 'Nunito', sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.footer-col p { font-size: 13px; line-height: 1.8; }
.footer-contact p { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; margin-bottom: 8px; }
.footer-contact p i { color: var(--green-accent); margin-top: 2px; flex-shrink: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.6); transition: .2s; display: flex; align-items: center; gap: 6px; }
.footer-links a::before { content: '→'; font-size: 10px; color: var(--green-accent); }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a { width: 36px; height: 36px; border-radius: 8px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.65); font-size: 15px; transition: .2s; }
.footer-social a:hover { background: var(--green); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; text-align: center; font-size: 12px; color: rgba(255,255,255,.35); }

/* ===== ANIMATIONS ===== */
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp .5s ease forwards; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .gtk-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col:first-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero h1 { font-size: 1.8rem; }
  .hero-image { display: none; }
  .hero-btns { justify-content: center; }
  .hamburger { display: flex; }
  .nav-menu { display: none; position: fixed; inset: 0; top: 72px; background: var(--white); flex-direction: column; align-items: flex-start; padding: 20px; gap: 0; overflow-y: auto; z-index: 800; border-top: 1px solid var(--border); }
  .nav-menu.open { display: flex; }
  .nav-item > a { width: 100%; padding: 12px 16px; border-radius: 8px; font-size: 14px; }
  .dropdown { display: none; position: static; box-shadow: none; border: none; background: var(--gray); border-radius: 8px; margin: 4px 0 4px 16px; }
  .nav-item.has-dropdown.open .dropdown { display: block; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ql-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .prestasi-grid { grid-template-columns: 1fr; }
  .gtk-grid { grid-template-columns: repeat(2, 1fr); }
  .galeri-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .topbar-left { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .ql-grid, .news-grid { grid-template-columns: 1fr; }
  .gtk-grid { grid-template-columns: repeat(2, 1fr); }
  .galeri-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
