/* =========================================================
   RESET & BASE
========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Poppins", sans-serif;
  background: #fafafa;
  color: #333;
  line-height: 1.6;
}

/* =========================================================
   LAYOUT WIDTH / CONTAINER
========================================================= */
:root { --content-max: 1280px; }
@media (min-width: 1440px){ :root { --content-max: 1280px; } }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================================================
   HEADER
========================================================= */
.header { background: linear-gradient(90deg, #0b7f3f, #1da65c); color: #fff; }
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.5rem 0;
}
.header-left { display: flex; align-items: center; gap: 1rem; }
.logo-left { height: 70px; }
.title-text h1 { font-size: 1.2rem; margin-bottom: .2rem; }
.title-text p { font-size: .9rem; opacity: .9; }

.header-right a img {
  height: 42px; margin-left: 1rem; transition: transform .3s;
}
.header-right a img:hover { transform: scale(1.1); }

/* =========================================================
   MAIN
========================================================= */
.main-content { padding: 2rem 0; min-height: 70vh; }

/* =========================================================
   HERO
========================================================= */
.hero {
  text-align: center; padding: 2rem 1rem; background: #f1fff6;
  border-radius: 10px; margin-bottom: 2rem;
}
.hero h2 { color: #0b7f3f; margin-bottom: .5rem; }

/* =========================================================
   GRID (DESKTOP 3 KOLOM)
========================================================= */
.grid-container {
  display: grid;
  padding-top: 1rem;
  gap: 1.2rem;
  grid-template-columns: repeat(3, minmax(0,1fr)); /* desktop: 3 kolom */
}
.grid-item {
  background: #fff; border-radius: 12px; padding: 1.2rem; text-align: center;
  text-decoration: none; color: #333;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  transition: all .3s ease;
}
.grid-item:hover { transform: translateY(-5px); box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.grid-logo { max-height: 70px; margin-bottom: .8rem; }

/* =========================================================
   PAGE CARD
========================================================= */
.page-section {
  background: #fff; padding: 2rem; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.page-header h2 { color: #0b7f3f; margin-bottom: 1rem; }
.page-content { line-height: 1.8; }

/* =========================================================
   FOOTER (FULL WIDTH / FULL-BLEED)
========================================================= */
.footer{
  position: relative;              /* penting untuk pseudo-element */
  color: #fff;
  text-align: center;
  padding: 0.5rem 0;
  margin-top: 2rem;
  /* warna sama seperti header */
  background: linear-gradient(90deg, #0b7f3f, #1da65c);
  /* width normal saja; full-bleed kita render di ::before */
  overflow: visible;
}

/* Membuat background-nya melebar ke seluruh viewport,
   walaupun footer berada di dalam .container */
.footer::before{
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;                        /* top/right/bottom/left = 0 relatif ke footer */
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;                    /* penuhi 1 viewport width */
  background: inherit;             /* pakai gradient yang sama */
}

.footer-inner{
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 16px;
}
.footer-inner p{ margin: .3rem 0; }


/* =========================================================
   ANIMASI SCROLL – LEBIH LAMBAT & BISA TOGGLE
========================================================= */
.fade-in-up,
.fade-in-down,
.slide-up {
  opacity: 0;
  will-change: opacity, transform;
}

.fade-in-up {
  transform: translateY(28px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.fade-in-down {
  transform: translateY(-28px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.slide-up {
  transform: translateY(46px);
  transition: opacity 1.35s ease, transform 1.35s ease;
}

/* Ketika terlihat di viewport */
.inview {
  opacity: 1;
  transform: translateY(0);
}

/* Hormati user yang memilih reduce motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in-up, .fade-in-down, .slide-up { transition: none; opacity: 1; transform: none; }
}

@keyframes fadeInUp { 0%{opacity:0;transform:translateY(20px)} 100%{opacity:1;transform:translateY(0)} }
@keyframes fadeInDown { 0%{opacity:0;transform:translateY(-20px)} 100%{opacity:1;transform:translateY(0)} }
@keyframes slideUp { 0%{opacity:0;transform:translateY(40px)} 100%{opacity:1;transform:translateY(0)} }

/* =========================================================
   TOMBOL AKSESIBILITAS & WA
========================================================= */
.accessibility-btn{
  position: fixed; left: 1rem; bottom: 1rem; background: #0b7f3f; color: #fff;
  font-size: 1.5rem; border-radius: 50%; width: 50px; height: 50px;
  display: grid; place-items: center; cursor: pointer; z-index: 999;
}
.accessibility-menu{
  position: fixed; left: 1rem; bottom: 4.5rem; background: #fff; border: 1px solid #ccc;
  border-radius: 10px; padding: .6rem; display: none; flex-direction: column; gap: .4rem; z-index: 999;
}
.accessibility-menu button{
  background: #0b7f3f; color: #fff; border: none; border-radius: 6px; padding: .4rem; cursor: pointer; font-size: .9rem;
}
.accessibility-menu button:hover{ background: #128d49; }

.whatsapp-btn{
  position: fixed; right: 1rem; bottom: 1rem; background: #25D366; color: #fff;
  border-radius: 50%; width: 55px; height: 55px; display: grid; place-items: center;
  font-size: 1.8rem; text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,.3); z-index: 999;
}
.whatsapp-btn:hover{ background: #1ebe5a; }

/* default: sembunyikan */
.accessibility-menu { display: none; }

/* saat dibuka oleh JS */
.accessibility-menu.open { display: flex; }

/* =========================================================
   AKSESIBILITAS MODES
========================================================= */
body.monochrome { filter: grayscale(1); }
body.bold-text * { font-weight: bold !important; }
body.large-text { font-size: 1.2em; }
body.highlight-links a { background: yellow; color: #000 !important; }

.sr-only{
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
========================================================= */
/* Tablet (≤992px): grid jadi 2 kolom */
@media (max-width: 992px){
  .grid-container{ grid-template-columns: repeat(2, 1fr); }
}

/* Mobile (≤768px): sembunyikan logo kanan, center kiri */
@media (max-width: 768px){
  .header-right{ display: none; }
  .header-inner{ flex-direction: column; text-align: center; }
  .header-left{ justify-content: center; }
  .title-text h1{ font-size: 1rem; }
}

/* HP kecil (≤576px): grid 1 kolom */
@media (max-width: 576px){
  .grid-container{ grid-template-columns: 1fr; }
}

/* =========================================================
   TEMA MALAM
========================================================= */
body.night-mode { background: #0b2e1f; color: #e6e6e6; }
body.night-mode .header { background: linear-gradient(90deg, #062012, #0b4d2a); }
body.night-mode .footer { background: #062012; }
body.night-mode .grid-item { background: #153b2a; color: #e6e6e6; }
body.night-mode .page-section { background: #153b2a; color: #e6e6e6; }
body.night-mode a { color: #9fffa5; }

.btn-website {
  display: inline-block;
  margin-top: 0.5rem;
  background: #0b7f3f;
  color: #fff;
  padding: 0.3rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 300;
  transition: background 0.3s ease, transform 0.2s;
}
.btn-website:hover {
  background: #128d49;
  transform: translateY(-2px);
}

/* Teks judul & deskripsi grid rata kiri */
.title-left {
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  margin-top: 0.5rem;
  margin-bottom: 0.2rem;
}

.desc-text {
  text-align: left;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
}
