/* =========================================================
   1. ROOT / DESIGN SYSTEM
========================================================= */
:root {
  --primary: rgb(21, 128, 61);
  --primary-hover: rgb(16, 100, 45);
  --primary-soft: rgb(187, 247, 208);

  --secondary: rgb(0, 0, 0);

  --bg: rgb(229, 229, 229);
  --white: #ffffff;

  --text-dark: #222222;
  --text-light: #ffffff;

  --border: #dddddd;

  --radius: 0.5rem;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* =========================================================
   2. RESET
========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* =========================================================
   3. BASE
========================================================= */
body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  padding: 67px 0 0; 
}

h1 {
  font-size: 2.2rem;
  font-weight: 600;
}

h2 {
  font-size: 1.8rem;
  font-weight: 600;
}

h3 {
  font-size: 1.2rem;
  font-weight: 500;
}

p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =========================================================
   4. LAYOUT
========================================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3.5rem 0;
}

/* =========================================================
   5. BUTTON
========================================================= */
.button {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  background-color: var(--primary);
  color: var(--text-light);
  border-radius: var(--radius);
  transition: all 0.25s ease;
  font-size: 1.1rem;
}

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

.button:active {
  transform: translateY(0);
}

/* =========================================================
   6. NAVBAR
========================================================= */
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background-color: var(--white);
  border-bottom: 4px solid var(--primary);
  box-shadow: var(--shadow);
}

.navbar-logo img {
  height: 35px;
}

.navbar-menu {
  display: flex;
  gap: 1.5rem;
}

.navbar-menu a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  transition: ease-in-out 0.3s;
  padding: 0.3rem;
}

.navbar-menu a:hover {
  color: var(--primary);
}

.navbar-menu a.active {
  color: var(--primary);
}

/* underline effect */
.navbar-menu a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--primary);
  transition: ease-in-out 0.3s;
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 100%;
}

.navbar-extra {
  display: none;
}

/* =========================================================
   7. HERO
========================================================= */
.beranda-hero {
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url("/assets/img/beranda/hero-beranda.jpg");
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  text-align: center;
  padding: 10rem 1.5rem;
}

.tentang-hero,
.kegiatan-hero,
.hubungi-hero,
.psb-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--text-light);
  text-align: center;
  padding: 4rem 1.5rem;
}

.beranda-hero-title,
.tentang-hero-title,
.kegiatan-hero-title,
.hubungi-hero-title,
.psb-hero-title {
  margin-bottom: 1rem;
}

/* =========================================================
   8. CONTENT
========================================================= */
.kegiatan-title,
.hubungi-title,
.psb-title {
  margin-bottom: 1rem;
}

.kegiatan-desc,
.hubungi-desc,
.psb-desc {
  margin-bottom: 1.5rem;
  max-width: 600px;
}

/* =========================================================
   9. IMAGE CATEGORIES
========================================================= */

/* PROFILE - Kecil, Dibatasi */
.profile,
.profile img {
  width: 350px;
  height: 350px;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  margin: 0 auto;
}

/* GALLERY - Grid, Seragam */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
}

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

/* CARD - Grid + Info */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.card {
  background-color: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-info {
  padding: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #666;
}

/* HERO - Bebas/Full */
.psb-brosur-preview, {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Legacy Gallery Support */
.kegiatan-gallery,
.beranda-kegiatan-gallery,
.tentang-komplek-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.kegiatan-image,
.beranda-kegiatan-gallery img,
.tentang-komplek-gallery img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* =========================================================
   10. LIST
========================================================= */
.kegiatan-item, .tentang-visi-item {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  margin-left: 1rem;
}

/* =========================================================
   11. FOOTER
========================================================= */
.footer {
  background-color: var(--white);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1rem;
}

.footer-text {
  font-size: 0.85rem;
}

/* =========================================================
   12. RESPONSIVE
========================================================= */

/* Tablet */
@media (min-width: 768px) {
  h1 {
    font-size: 2.8rem;
  }

  .gallery,
  .card-grid,
  .kegiatan-gallery,
  .beranda-kegiatan-gallery,
  .tentang-komplek-gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-image {
    height: 400px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .navbar-menu {
    display: none;
  }

  .navbar-extra {
    display: block;
  }

  .navbar-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 65px;
    right: 1.5rem;
    width: 200px;
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    gap: 1rem;
  }

  .profile,
  .profile img {
    width: 100px;
    height: 100px;
  }

  .gallery,
  .card-grid,
  .kegiatan-gallery,
  .beranda-kegiatan-gallery,
  .tentang-komplek-gallery {
    grid-template-columns: repeat(1, 1fr);
  }

  .card img {
    height: 150px;
  }

  .hero-image {
    height: 250px;
  }
}
