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

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  background: #f9f9f9;
}

#group-photo-section {
  background: linear-gradient(120deg, #fbc531, #2e86de);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

#group-photo-section .group-photo {
  max-width: 80%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

header {
  background: #2e86de;
  color: white;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: auto;
  padding: 15px;
}

header nav a {
  color: white;
  margin-left: 15px;
  text-decoration: none;
  font-weight: 500;
}

header nav a:hover {
  text-decoration: underline;
}

#hero {
  background: linear-gradient(120deg, #2e86de, #fbc531);
  color: white;
  padding: 80px 20px;
  text-align: center;
}

.container {
  max-width: 1000px;
  margin: auto;
  padding: 40px 20px;
}

h2 {
  margin-bottom: 20px;
  color: #2e86de;
}

.section-title {
    margin-top: 40px;
    margin-bottom: 25px; 
    text-align: center; 
    color: #2e86de;
}

.group-title {
    text-align: left; 
    margin-top: 30px; 
    margin-bottom: 15px;
    color: #2e86de; 
    font-size: 1.2em;
    padding-left: 20px;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
  justify-items: center; 
  justify-content: center; 
}

.card {
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
  width: 100%; 
  max-width: 280px;
}

.grid .card {
  background: linear-gradient(135deg, #a8dadc, #457b9d); 
  color: white;
}

.card img {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 10px; 
}

.anggota-card img,
.wali-kelas-card img {
  border-radius: 50%;
  width: 100px;
  height: 100px;
  object-fit: cover; 
  display: block;
  margin: 0 auto 10px auto;
}

.card h3 {
  margin-top: 10px;
  margin-bottom: 5px;
  color: white; 
  font-size: 1em; 
}

.card p {
  font-size: 0.8em;
  color: #e0f2f7; 
  word-wrap: break-word; 
}

.wali-kelas-card {
  max-width: 300px;
  margin: 20px auto 40px auto;
  padding: 30px;
  background: linear-gradient(135deg, #2e86de, #a8dadc);
  color: white;
}

.wali-kelas-card img {
  width: 120px;
  height: 120px;
}

.wali-kelas-card h3 {
    font-size: 1.2em; 
    color: white;
}

.slider-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 30px; 
  margin-bottom: 20px;
}

.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out; 
}

.slider-item {
  min-width: 100%; 
  box-sizing: border-box; 
}

/* ====== PERBAIKAN UNTUK AGENDA & PRESTASI ====== */
.agenda-list, .prestasi-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    justify-items: center;
    margin-bottom: 30px;
    text-align: center;
}

.agenda-item, .prestasi-item {
    background: linear-gradient(135deg, #a8dadc, #457b9d);
    color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 250px;
}

.agenda-item h3, .prestasi-item h3 {
    margin-bottom: 10px;
    color: #fff;
}

.agenda-item p, .prestasi-item p {
    font-size: 0.9em;
    color: #e0f2f7;
    margin-bottom: 5px;
}

/* ====== PERBAIKAN UNTUK GALERI ====== */
.galeri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    justify-items: center;
    margin: 30px 0;
}

.galeri-item {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    text-align: center;
    width: 100%;
    max-width: 250px;
}

.galeri-item img {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 10px;
}

.galeri-item h4 {
    font-size: 1em;
    color: white;
}

@media (max-width: 600px) {
    .agenda-list, .prestasi-list, .galeri-grid {
        grid-template-columns: 1fr;
    }
}

.gold-link {
  color: gold;
  text-decoration: none; 
  font-weight: bold; 
}

.gold-link:hover {
  text-decoration: underline; 
}

#jadwal #jadwalHariIni {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  min-height: 100px; 
}

#agenda-prestasi-section {
  padding: 40px 20px;
  text-align: center; 
}

#jadwal-piket-section {
  background: #e0f2f7;
  padding: 40px 20px;
  text-align: center; 
}

.centered-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column; 
    width: 100%;
}

.centered-content table {
    width: 80%;
    max-width: 600px;
    margin: 20px auto; 
    border-collapse: collapse;
}

.centered-content th, .centered-content td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.centered-content th {
    background-color: #f2f2f2;
    color: #2e86de;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #007bff; 
    color: white;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
}

.hamburger-menu {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1000; 
}

.hamburger-menu .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.hamburger-menu .bar:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .nav-links {
        display: none; 
        flex-direction: column;
        width: 100%; 
        position: absolute;
        top: 60px;
        right: 0;
        left: unset;
        background-color: rgba(0, 123, 255, 0.9);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .nav-links.active {
        display: flex; 
    }

    .nav-links li {
        margin: 0;
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .hamburger-menu {
        display: block; 
    }
}

footer {
  background-color: #2e86de;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 40px;
  animation: fadeInUp 1s ease-out;
}

section {
  text-align: center;
}

.visi-misi-section {
    padding: 60px 20px;
    background-color: #f9f9f9; 
    text-align: center; 
    margin-top: 40px; 
}

.visi-misi-section .container {
    max-width: 960px; 
    margin: 0 auto;
}

.visi-misi-section h2 {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

.visi-misi-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

.visi-content,
.misi-content {
    background-color: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.visi-content h3,
.misi-content h3 {
    font-size: 1.8em;
    color: #007bff;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.visi-content p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #555;
}

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

.misi-content ul li {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
    margin-bottom: 10px;
    position: relative;
    padding-left: 30px;
}

.misi-content ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .visi-misi-section {
        padding: 40px 15px;
    }

    .visi-misi-section h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }

    .visi-content,
    .misi-content {
        padding: 20px;
        margin-bottom: 20px;
    }

    .visi-content h3,
    .misi-content h3 {
        font-size: 1.5em;
    }

    .visi-content p,
    .misi-content ul li {
        font-size: 1em;
    }
}

/* =========================================== */
/* KODE INI MEMASTIKAN LAYOUT 2 KOLOM DI MOBILE */
/* =========================================== */
@media (max-width: 768px) {
    /* Memaksa grid menjadi 2 kolom dan menimpa aturan minmax */
    .grid {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important; 
        padding: 0 10px; 
        /* BARIS BARU UNTUK MEMUSATKAN KONTEN GRID DI DALAM CONTAINER */
        justify-content: center !important; 
    }

    /* Memastikan card mengambil lebar penuh dari kolom yang tersedia (50% layar) */
    .card {
        width: 100% !important; 
        max-width: 100% !important; 
    }
    
    /* Sesuaikan ukuran foto agar pas di layout 2 kolom */
    .anggota-card img,
    .wali-kelas-card img {
      width: 80px; 
      height: 80px;
    }
}

@media (max-width: 450px) {
    /* Pertahankan 2 kolom untuk layar yang sangat sempit */
    .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
