/* ==========================================================================
   SD NEGERI 3 BUNGU - Website Publik (Tema Hijau Konservasi Lingkungan)
   Modern, Clean, Responsive, Mobile-Friendly, Glassmorphism & Micro-animations
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #15803d;         /* Green Forest */
  --primary-dark: #0f5132;    /* Deep Forest */
  --primary-light: #22c55e;   /* Bright Green */
  --accent: #10b981;          /* Emerald */
  --accent-soft: #ecfdf5;     /* Soft Mint Background */
  --cta-bg: #d97706;          /* Amber / Gold CTA for contrast */
  --cta-hover: #b45309;
  --text-main: #1e293b;       /* Slate 800 */
  --text-muted: #64748b;      /* Slate 500 */
  --bg-body: #f8fafc;         /* Slate 50 */
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

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

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

/* ==========================================================================
   TOP BAR & HEADER
   ========================================================================== */
.top-bar {
  background: var(--primary-dark);
  color: #e2e8f0;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-info {
  display: flex;
  gap: 20px;
  align-items: center;
}

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

.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.school-logo-img {
  height: 48px;
  width: auto;
  max-width: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  transition: transform var(--transition);
}

.brand-logo:hover .school-logo-img {
  transform: scale(1.04);
}

.brand-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.3);
}

.brand-text h1 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  white-space: nowrap;
}

.brand-text p {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 3px 0 0 0;
  line-height: 1.1;
  white-space: nowrap;
}

/* Navigasi Utama */
.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap !important;
  display: inline-block;
  line-height: 1.3;
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--accent-soft);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--accent-soft);
  font-weight: 700;
}

/* Tombol CTA Login SIM Sekolah Menonjol */
.nav-item-cta {
  margin-left: 8px;
  flex-shrink: 0;
}

.btn-cta-sim {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  padding: 9px 18px !important;
  border-radius: 50px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
  transition: var(--transition);
  white-space: nowrap !important;
}

.btn-cta-sim:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.45);
}

.btn-cta-sim svg {
  width: 18px;
  height: 18px;
}

/* Tombol Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 6px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #0f5132 0%, #15803d 50%, #10b981 100%);
  color: white;
  padding: 80px 0 100px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  pointer-events: none;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #f0fdf4;
  margin-bottom: 30px;
  font-weight: 400;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  color: var(--primary);
}

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

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  transform: translateY(-2px);
}

.hero-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  padding: 30px;
  box-shadow: var(--shadow-xl);
}

.hero-card h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
  font-weight: 700;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.15);
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fef08a;
  display: block;
}

.stat-label {
  font-size: 0.8rem;
  color: #e2e8f0;
  margin-top: 4px;
}

/* ==========================================================================
   SECTIONS COMMON STYLES
   ========================================================================== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: #f1f5f9;
}

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

.section-tag {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 8px;
  background: var(--accent-soft);
  padding: 4px 14px;
  border-radius: 50px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.25;
  margin-bottom: 14px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Cards Grid */
.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

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

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(21, 128, 61, 0.3);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-soft);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ==========================================================================
   SAMBUTAN KEPALA SEKOLAH SECTION
   ========================================================================== */
.welcome-box {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  border: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: center;
}

.kepsek-photo-frame {
  position: relative;
  text-align: center;
}

.kepsek-photo-wrapper {
  width: 240px;
  height: 280px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--primary-light);
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kepsek-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kepsek-info {
  margin-top: 14px;
}

.kepsek-name {
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.kepsek-role {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.welcome-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 18px;
}

.welcome-content p {
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
  white-space: pre-line;
}

/* ==========================================================================
   BERITA & AGENDA
   ========================================================================== */
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.article-thumb {
  height: 200px;
  position: relative;
  background: #cbd5e1;
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .article-thumb img {
  transform: scale(1.05);
}

.article-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 81, 50, 0.85);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
}

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

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  gap: 14px;
}

.article-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
  color: var(--text-main);
}

.article-title a {
  color: var(--text-main);
}

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

.article-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

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

.read-more:hover {
  gap: 10px;
}

/* ==========================================================================
   GALERI & PRESTASI
   ========================================================================== */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.tab-btn {
  background: white;
  border: 1px solid var(--border-color);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.25);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  position: relative;
  height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 81, 50, 0.9) 0%, rgba(15, 81, 50, 0.2) 60%, transparent 100%);
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.gallery-overlay p {
  font-size: 0.8rem;
  color: #e2e8f0;
}

/* ==========================================================================
   SPMB INFO CARD
   ========================================================================== */
.spmb-card {
  background: linear-gradient(135deg, #ffffff, #f0fdf4);
  border: 2px solid #bbf7d0;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.spmb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.spmb-box {
  background: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.spmb-box h4 {
  color: var(--primary-dark);
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #064e3b;
  color: #cbd5e1;
  padding: 70px 0 20px;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand h3 {
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.footer-heading {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94a3b8;
}

.footer-links a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile Friendly)
   ========================================================================== */
@media (max-width: 1280px) and (min-width: 1081px) {
  .nav-menu {
    gap: 2px;
  }
  .nav-link {
    font-size: 0.81rem;
    padding: 6px 8px;
  }
  .brand-text h1 {
    font-size: 1.05rem;
  }
  .brand-text p {
    font-size: 0.68rem;
  }
  .btn-cta-sim {
    padding: 8px 14px !important;
    font-size: 0.82rem !important;
  }
  .school-logo-img {
    height: 42px;
  }
}

@media (max-width: 1080px) {
  .mobile-toggle {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 82%;
    max-width: 340px;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 8px;
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    overflow-y: auto;
    z-index: 999;
  }
  .nav-menu.open {
    left: 0;
  }
  .nav-link {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
  }
  .nav-item-cta {
    margin-left: 0;
    margin-top: 12px;
    width: 100%;
  }
  .btn-cta-sim {
    width: 100%;
    justify-content: center;
  }
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 36px;
  }
  .hero-actions {
    justify-content: center;
  }
  .welcome-box {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .cards-grid-3, .cards-grid-4, .spmb-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .cards-grid-3, .cards-grid-4, .spmb-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 50px 0;
  }
}
