/* ============================================================
   RESET DASAR
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Segoe UI', sans-serif;
  background-color: #f5f7f4;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 180px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
  background: linear-gradient(rgba(0, 70, 32, 0.8), rgba(0, 70, 32, 0.8)),
              url('../image/backgroundsmk.jpeg') no-repeat center/cover;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border-bottom: 4px solid #00a651;
  padding: 20px 40px;
  backdrop-filter: blur(3px);
  animation: fadeIn 1s ease-in-out;
}

/* Logo MPK */
.header img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 50%;
  background: white;
  padding: 6px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Teks header */
.header-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 800px;
}

/* Judul utama */
.header-text h1 {
  font-size: 2rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
  line-height: 1.2;
}

/* Nama sekolah */
.header-text p {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffeb99;
  margin-top: 6px;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Alamat */
.header-text span {
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  margin-top: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  line-height: 1.4;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 180px;
  left: 0;
  width: 100%;
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(90deg, #00a651, #009245);
  padding: 14px 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  backdrop-filter: blur(4px);
}

.navbar ul {
  display: flex;
  gap: 40px;
  list-style: none;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Efek garis bawah animasi */
.navbar a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 3px;
  background: #ffcf33;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}

.navbar a:hover,
.navbar a.active {
  color: #ffcf33;
  transform: translateY(-2px);
}

/* Glow efek tambahan saat hover */
.navbar a:hover {
  text-shadow: 0 0 10px #ffcf33, 0 0 20px #ffcf33;
}

/* ============================================================
   MAIN CONTAINER
   ============================================================ */
.main-container {
  display: flex;
  flex: 1;
  align-items: flex-start; /* content tidak ikut tinggi sidebar */
  padding: 20px;
  background: #f4f4f4;
  margin-top: 260px; /* untuk menyesuaikan tinggi header */
  gap: 20px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: 240px;
  background: #e8f5e9;
  border-radius: 8px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
  border-right: 1px solid #c8e6c9;
  flex-shrink: 0; /* agar sidebar tidak mengecil */
  
  /* scroll sendiri */
  max-height: calc(100vh - 0px); /* tinggi maksimal sesuai layar */
  overflow-y: auto;

  /* scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 100, 100, 0.4) transparent;
}

/* Scrollbar Chrome/Edge */
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(100, 100, 100, 0.4);
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background-color: rgba(80, 80, 80, 0.7);
}

/* ====== Sidebar Content ====== */
.sidebar h3 {
  text-align: center; font-size: 1.3em; 
  font-weight: 700; 
  color: #1b5e20; 
  font-family: 'Poppins', sans-serif; 
  padding-top: 20px;
  margin-bottom: 10px; 
  letter-spacing: 1px; 
  text-transform: uppercase; 
  position: relative;
}

.sidebar h3::after {
  content: ''; 
  display: block; 
  width: 60%; 
  height: 3px; 
  margin: 8px auto 0; 
  background: linear-gradient(90deg, #66bb6a, #43a047); 
  border-radius: 10px; 
} 
 
 /* Efek glow pada hover */ 
 .sidebar h3:hover { 
  text-shadow: 0 0 8px rgba(76, 175, 80, 0.6); 
  transition: text-shadow 0.3s ease; 
}

.sidebar ul { 
  list-style: none; 
} 

.sidebar ul li a { 
  display: block; 
  padding: 10px 20px; 
  color: #2e2e2e; 
  text-decoration: none; 
  transition: 0.3s ease; 
  border-left: 4px solid transparent; 
} 

.sidebar ul li a:hover { 
  background: #a5d6a7; 
  color: #1b5e20; 
  border-left: 4px solid #1b5e20; 
} 

.sidebar ul li.active a { 
  background: #66bb6a; 
  color: white; 
  font-weight: 600;
  border-left: 5px solid #2e8b57;
  box-shadow: inset 3px 0 0 #2e7d32; /* efek garis hijau di kiri */ 
}

/* ============================================================
   CONTENT
   ============================================================ */
.content {
  flex: 1;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  padding: 30px;
  min-height: 400px;
}

.content button {
  background: linear-gradient(45deg, #2e7d32, #43a047);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.content button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(46,125,50,0.3);
}

/* ===== STYLE UNTUK HALAMAN MATERI ===== */
.materi-container {
    padding-top: 10px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Judul besar materi */
.materi-container h1 {
    color: #009245; /* hijau utama */
    font-size: 2.5em;
    font-weight: 800;
    margin-bottom: 20px;
    border-bottom: 3px solid #81c784; /* hijau muda */
    display: inline-block;
    padding-bottom: 5px;
}

/* Subjudul (misal waktu & tempat) */
.materi-container h3 {
    color: #555; /* hijau gelap */
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Paragraf isi materi */
.materi-container p {
    color: #555;
    line-height: 1.9;
    font-size: 1rem;
    text-align: justify;
    margin-top: 40px;
}

.materi-container ol li {
    color: #555;
    line-height: 1.9;
    font-size: 1rem;
    text-align: justify;
    margin-top: 5px;
    margin-left: 15px;
}

.materi-container dl dt dd {
    color: #555;
    line-height: 1.9;
    font-size: 1rem;
    text-align: justify;
    margin-top: 5px;
    margin-left: 15px;  
}


/* ============================================================
   HOME (LANDING PAGE MPK)
   ============================================================ */
.home-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ===== HERO SECTION ===== */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(120deg, #00a651 0%, #009245 100%);
  color: white;
  border-radius: 16px;
  padding: 60px 80px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.hero-content {
  flex: 1;
  max-width: 600px;
  animation: fadeInUp 1.2s ease;
}

.hero-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 15px;
}

.hero-content h1 span {
  background: linear-gradient(90deg, #ffeb3b, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.hero-image img {
  width: 350px;
  height: auto;
  animation: float 3s ease-in-out infinite;
}

/* Tombol utama */
.btn-primary {
  display: inline-block;
  background: #ffcf33;
  color: #064d26;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #ffe680;
  transform: translateY(-3px);
}

/* ===== VISI MISI ===== */
.visi-misi {
  text-align: center;
  padding: 40px 20px;
}

.visi-misi h2 {
  color: #1b5e20;
  font-size: 2rem;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.card-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  padding: 25px 30px;
  max-width: 400px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card h3 {
  color: #00a651;
  margin-bottom: 15px;
}

.card ul {
  list-style: disc;
  margin-left: 20px;
  color: #444;
}

/* ===== TENTANG MPK ===== */
.tentang {
  background: linear-gradient(135deg, #e8f5e9, #ffffff);
  padding: 60px 20px;
  text-align: center;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.tentang h2 {
  font-size: 2rem;
  color: #1b5e20;
  margin-bottom: 20px;
}

.tentang p {
  max-width: 800px;
  margin: 0 auto 25px;
  color: #333;
  line-height: 1.8;
}

.btn-secondary {
  display: inline-block;
  background: linear-gradient(90deg, #00a651, #009245);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #00c853;
  transform: translateY(-3px);
}

/* Animasi */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ABOUT SECTION 
   ============================================================ */

.about-section {
  color: #f4f4f4;
  padding: 30px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.about-section h2 {
  font-size: 2.2em;
  font-weight: 800;
  margin-bottom: 60px;
  color: white;
  letter-spacing: 1px;  
}

.about-section h2 span {
  background: linear-gradient(90deg, #119000, #00b4d8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Timeline container */
.timeline {
  position: relative;
  max-width: 900px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Garis vertikal di tengah */
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #119000, #00b4d8);
  transform: translateX(-50%);
}

/* Kartu kiri dan kanan */
.timeline-card {
  position: relative;
  background: #161625;
  border-radius: 15px;
  padding: 25px 30px;
  width: 45%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  animation: fadeInUp 1s ease;
}

.timeline-card.left {
  align-self: flex-start;
  margin-left: 0;
}

.timeline-card.right {
  align-self: flex-end;
  margin-right: 0;
}

/* Judul di kartu */
.timeline-card h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 5px;
}

.timeline-card p em {
  display: block;
  color: #a5b4fc;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.timeline-card p {
  color: #ccc;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: justify;
}

/* ============================================================
   OUR STORY PAGE (Cerita Perjalanan MPK)
   ============================================================ */

.our-story {
  padding: 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ===== TIMELINE CERITA ===== */
.story-timeline {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.story-timeline h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  color: #1b5e20;
  margin-bottom: -30px;
}

.story-item {
  display: flex;
  align-items: center;
  gap: 40px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  padding: 25px;
  transition: all 0.3s ease;
}

.story-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.story-item img {
  width: 45%;
  border-radius: 12px;
  object-fit: cover;
}

.story-item.reverse {
  flex-direction: row-reverse;
}

.story-text {
  flex: 1;
}

.story-text h3 {
  color: #00a651;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.story-text p {
  color: #444;
  line-height: 1.7;
}

/* ===== GALERI FOTO DENGAN JUDUL ===== */
.story-gallery {
  text-align: center;
}

.story-gallery h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #1b5e20;
  margin-bottom: 30px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
}

.gallery-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.gallery-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.gallery-card h4 {
  padding: 15px 10px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1b5e20;
  background: #f8fff9;
}

/* === FOOTER === */
.footer {
  position: relative;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85)),
              url("../image/fotolpj6bulan.jpg") center/cover no-repeat fixed;
  background-attachment: fixed;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
  padding: 50px 0 20px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 40px 80px;
  gap: 40px;
}

.footer-left { flex: 0 0 40%; }
.footer-center { flex: 0 0 30%; }
.footer-right { flex: 0 0 30%; }

.footer-left h3 {
  font-size: 25px ;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-left p {
  margin: 3px 0;
  font-size: 16px;
  line-height: 1.6;
}

/* Kolom Tengah */
.footer-center h4 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-center ul {
  list-style: none;
  padding: 0;
}

.footer-center ul li {
  margin-bottom: 5px;
}

.footer-center ul li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  transition: 0.3s;
}

.footer-center ul li a:hover {
  color: #00e676;
}

/* Kolom Kanan (Media Sosial) */
.footer-right h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.footer-social img {
  width: 28px;
  opacity: 0.95;
  transition: 0.3s ease;
  filter: none; /* pastikan filter dihapus agar warna asli muncul */
}

.footer-social img:hover {
  transform: scale(1.15);
  opacity: 1;
}

/* Copyright */
.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 15px 0 5px;
  font-size: 13px;
  opacity: 0.85;
}

/* Tombol Scroll ke Atas */
#scrollTopBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 42px;
  height: 42px;
  border: none;
  outline: none;
  background-color: #00e676;
  color: #fff;
  font-size: 20px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  display: none;
  z-index: 1000;
}

#scrollTopBtn:hover {
  background-color: #00c853;
  transform: translateY(-3px);
}

/* ============================================================
   RESPONSIVE TAMPILAN HP MODERN (MAX 768PX)
   ============================================================ */
@media (max-width: 768px) {

  /* ==== HEADER ==== */
  .header {
    position: relative; /* supaya navbar tidak menimpa */
    z-index: 10;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    height: auto;
    padding: 25px 15px;
    gap: 8px;
  }

  .header img {
    width: 70px;
    height: 70px;
  }

  .header-text {
    align-items: center;
    text-align: center;
    max-width: 100%;
  }

  .header-text h1 {
    font-size: 1.6rem;
  }

  .header-text p {
    font-size: 1rem;
    color: #ffeb99;
  }

  .header-text span {
    font-size: 0.9rem;
  }

  /* ==== NAVBAR ==== */
  .navbar {
    position: relative; /* ubah dari fixed agar tidak menimpa header */
    top: unset;
    z-index: 9;
    flex-direction: column;
    padding: 10px 0;
    gap: 8px;
    background: linear-gradient(90deg, #009245, #00a651);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .navbar ul {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    text-align: center;
    background: transparent;
    padding: 0;
  }

  .navbar a {
    font-size: 1rem;
    padding: 10px 0;
    display: block;
    color: white;
    font-weight: 600;
  }

  .navbar a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
  }

  /* ==== HERO ==== */
  .hero {
    display: flex;
    flex-direction: column-reverse; /* gambar pindah ke bawah teks */
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    padding: 25px 18px;
    border-radius: 15px;
    background: linear-gradient(180deg, #00a651, #009245);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .hero-content {
    width: 100%;
  }

  .hero-content h1 {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
  }

  .hero-content h1 span {
    color: #ffeb3b; /* kuning terang agar tetap konsisten */
  }

  .hero-content p {
    font-size: 1rem;
    color: #f7f7f7;
    margin-top: 10px;
    margin-bottom: 15px;
  }

  .hero-content .btn-primary {
    display: inline-block;
    background: #ffeb3b;
    color: #333;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: 0.3s ease;
    text-decoration: none;
  }

  .hero-content .btn-primary:hover {
    background: #ffee58;
    transform: translateY(-2px);
  }

  .hero-image {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .hero-image img {
    width: 60%;
    max-width: 220px;
    height: auto;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    object-fit: contain;
  }

  /* ==== MAIN CONTENT ==== */
  .main-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 15px;
    margin: 0 auto;
    gap: 15px;
    overflow: visible; /* supaya bisa scroll penuh */
  }

  /* ==== SIDEBAR ==== */
.sidebar {
  width: 100%;
  border-radius: 10px;
  background: linear-gradient(180deg, #e8f5e9, #f9fff9);
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);

  /* tambahkan ini supaya sidebar bisa di-scroll */
  max-height: 300px; /* atur tinggi sesuai kebutuhan */
  overflow-y: auto;
  scrollbar-width: thin; /* untuk Firefox */
  scrollbar-color: #00a651 #e8f5e9; /* warna scrollbar */
}

/* Scrollbar tampilan di Chrome, Edge, Safari */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #e8f5e9;
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: #00a651;
  border-radius: 10px;
}

/* Judul sidebar */
.sidebar h3 {
  background: linear-gradient(90deg, #00a651, #009245);
  color: white;
  font-size: 1.1rem;
  padding: 12px;
  text-align: center;
  margin: 0;
}

/* List sidebar */
.sidebar ul {
  padding: 10px 0;
  margin: 0;
}

.sidebar ul li a {
  font-size: 0.95rem;
  padding: 10px 15px;
  display: block;
  border-bottom: 1px solid rgba(0, 150, 70, 0.1);
}

.sidebar ul li a:hover {
  background: rgba(0, 150, 70, 0.1);
  color: #006400;
}

.sidebar ul li.active a {
  background: #00a651;
  color: #fff;
  font-weight: 700;
}

  /* ==== CONTENT ==== */
  .content {
    width: 100%;
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow-y: auto; /* aktifkan scroll di bagian materi */
    max-height: none; /* hilangkan batas tinggi agar bisa scroll */
  }

  .materi-container h1 {
    font-size: 1.7rem;
    border-bottom-width: 2px;
  }

  .materi-container p,
  .materi-container li {
    font-size: 0.95rem;
    line-height: 1.8;
  }
  
  /* === BAGIAN OUR STORY === */
  .our-story {
    width: 100%;
    padding: 20px 15px;
    box-sizing: border-box;
  }

  .story-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
  }

  .story-timeline h2 {
    font-size: 1.4rem;
    text-align: center;
    color: #007a33;
    margin-bottom: 15px;
  }

  /* --- CARD CERITA (WANKO, PDM, DLL) --- */
  .story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    padding: 15px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    overflow: hidden;             /* agar isi tidak keluar */
    word-wrap: break-word;        /* teks panjang tetap dalam card */
    overflow-wrap: break-word;
    box-sizing: border-box;
  }

  .story-item.reverse {
    flex-direction: column; /* hilangkan efek kiri-kanan di HP */
  }

  .story-item img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 12px;
  }

  .story-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: justify;
    width: 100%;
  }

  .story-text h3 {
    font-size: 1.1rem;
    color: #009245;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
  }

  .story-text p {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.7;
    margin: 0;
    word-break: break-word;
  }

  /* === GALERI === */
  .story-gallery {
    margin-top: 35px;
    text-align: center;
  }

  .story-gallery h2 {
    font-size: 1.3rem;
    color: #007a33;
    margin-bottom: 20px;
  }

  .gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* dua kolom di HP */
    gap: 15px;
    justify-items: center;
  }

  .gallery-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    padding: 10px;
    width: 100%;
    max-width: 200px;
    overflow: hidden;
    text-align: center;
  }

  .gallery-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .gallery-card h4 {
    font-size: 0.9rem;
    color: #007a33;
    font-weight: 600;
    margin: 0;
  }

  /* ==== FOOTER ==== */
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
  }

  /* Posisikan ulang agar tampilan tetap seimbang */
  .footer-left {
    order: 1;
  }

  .footer-center {
    order: 2;
    margin-bottom: 10px;
  }

  .footer-right {
    order: 3;
  }

  /* Supaya "Tautan Cepat" & "Ikuti Kami" tampak sejajar */
  .footer-center,
  .footer-right {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-right h4 {
    margin-bottom: 10px;
  }

  /* Jarak antar ikon lebih proporsional */
  .footer-social {
    justify-content: center;
    gap: 20px;
  }

  .footer-social a {
    font-size: 1.8rem;
  }

  /* Tulisan bawah tidak terlalu rapat */
  .footer-bottom {
    font-size: 0.85rem;
    margin-top: 20px;
  }

  #scrollTopBtn {
    width: 38px;
    height: 38px;
    bottom: 18px;
    right: 18px;
  }
}

/* ============================================================
   TAMPAK SUPER KECIL (MAX 480PX)
   ============================================================ */
@media (max-width: 480px) {
  .header-text h1 {
    font-size: 1.3rem;
  }

  .navbar a {
    font-size: 0.9rem;
  }

  .sidebar ul li a {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  .content {
    padding: 15px 12px;
  }

  .materi-container h1 {
    font-size: 1.4rem;
  }
  
  .hero {
    padding: 20px 12px;
    gap: 15px;
  }

  .hero-content h1 {
    font-size: 1.4rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }

  .hero-image img {
    width: 65%;
    max-width: 180px;
  }

  .hero-content .btn-primary {
    font-size: 0.9rem;
    padding: 9px 16px;
  }
}


