﻿:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --primary: #3d6df0;
  --primary-soft: #d6e4ff;
  --text: #1f2937;
  --muted: #64748b;
  --border: #e2e8f0;
}

body.dark-mode {
  --bg: #0f172a;
  --surface: #1e293b;
  --primary: #60a5fa;
  --primary-soft: #1e3a8a;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  background: linear-gradient(135deg, #3d6df0 0%, #5fa2ff 100%);
  color: white;
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-size: 2.5rem;
  margin-right: 0.5rem;
}

.site-header h1,
.site-header p {
  margin: 0;
}

.site-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.theme-toggle {
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.25);
}

.theme-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

.site-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
}

.site-nav a.active,
.site-nav a:hover {
  background: rgba(255,255,255,0.18);
}

.hero {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.hero h2 {
  margin-top: 0;
  font-size: clamp(2rem, 2.5vw, 2.7rem);
}

.hero p {
  max-width: 720px;
  margin: 1rem 0 1.5rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.card,
.info,
.list-section,
.cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
}

.card h3,
.list-section h3,
.cta-card h3 {
  margin-top: 0;
}

.info {
  margin-top: 2rem;
}

.structure-hierarchy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.wali-kelas {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 300px;
  width: 100%;
}

.wali-kelas h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
}

.wali-kelas p {
  margin: 0;
  font-weight: 500;
}

.lower-positions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
  max-width: 600px;
}

.position-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.0rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 1rem;
}

.position-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.position-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
}

.position-card p {
  margin: 0;
  font-weight: 400;
}

.site-footer {
  text-align: center;
  padding: 1.5rem 0 2rem;
  color: #000000;
}

body.dark-mode .site-footer {
  color: #f1f5f9;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(61,109,240,0.18);
}

.button.secondary {
  background: #e2e8f0;
  color: var(--text);
}

body.dark-mode .button.secondary {
  color: #000000;
}

ul,
ol {
  margin: 0;
  padding-left: 1.25rem;
}

.member-gallery {
  margin: 2rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gallery-header h3 {
  margin: 0 0 0.3rem;
}

.gallery-header p {
  margin: 0;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-weight: 700;
}

.member-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
}

.member-row::-webkit-scrollbar {
  height: 10px;
}

.member-row::-webkit-scrollbar-track {
  background: transparent;
}

.member-row::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.35);
  border-radius: 999px;
}

.member-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1rem;
  text-align: center;
}

.member-card h4 {
  margin: 0.75rem 0 0.25rem;
  font-size: 1rem;
}

.member-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #3d6df0, #5fa2ff);
}

.member-guru .avatar {
  background: linear-gradient(135deg, #ff8a5b, #ffb27f);
}

body.dark-mode .member-card h4 {
  color: #000000;
}

@media (max-width: 700px) {
  .hero,
  .card,
  .info,
  .list-section,
  .cta-card,
  .member-gallery {
    border-radius: 18px;
  }

  .member-card {
    flex: 0 0 150px;
  }

    .modal {
   display: none;
    position: fixed;
    z-index: 999;
    padding-top: 60px;
   left: 0;
    top: 0;
    width: 100%;
    height: 100%;
   background: rgba(0,0,0,0.9);
  }

  .modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 12px;
  }

  .close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: rgb(119, 119, 119);
    font-size: 40px;
    cursor: pointer;
  }

  .gallery-item {
   cursor: pointer;
    transition: transform 0.2s ease;
  }

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