/* =========================================================
   PANDUAN CEPAT
   - Semua WARNA diatur di ":root" di bawah ini
   - Ganti kode HEX di sini, otomatis berubah di SELURUH web
========================================================= */

:root {
  --color-primary: #1B7A3E;
  --color-primary-dark: #145C2E;
  --color-accent: #A9D318;      /* hijau kekuningan aksen, seperti di company profile */
  --color-secondary: #F5F5F5;
  --color-dark: #1A1A1A;
  --color-light: #FFFFFF;
  --color-muted: #6B7280;
  --font-utama: 'Segoe UI', Arial, sans-serif;
  --radius: 12px;
  --container-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body { font-family: var(--font-utama); color: var(--color-dark); line-height: 1.6; background: var(--color-light); }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.section { padding: 70px 0; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 10px; color: var(--color-dark); }
.section-subtitle { text-align: center; color: var(--color-muted); margin-bottom: 40px; }

/* ===================== TOMBOL ===================== */
.btn { display: inline-block; padding: 14px 32px; border-radius: 50px; font-weight: 600; transition: 0.3s ease; border: none; cursor: pointer; font-size: 1rem; font-family: inherit; }
.btn-primary { background: var(--color-primary); color: var(--color-light); }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline { border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: var(--color-light); }
.btn-sm { padding: 10px 22px; font-size: 0.9rem; }

/* ===================== ANIMASI ===================== */

/* --- Transisi pindah halaman (fade in/out) --- */
body {
  opacity: 0;
  animation: pageFadeIn 0.5s ease forwards;
}
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
body.page-leaving {
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* --- Animasi muncul saat discroll ---
   Elemen dengan class "reveal" akan otomatis diberi class ini
   lewat common.js. Anda tidak perlu menambahkannya manual. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Supaya kartu-kartu dalam 1 grid muncul bergantian, bukan bersamaan */
.grid .reveal:nth-child(1) { transition-delay: 0s; }
.grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.grid .reveal:nth-child(5) { transition-delay: 0.32s; }

/* Hormati orang yang mematikan animasi di pengaturan HP/komputernya */
@media (prefers-reduced-motion: reduce) {
  body { animation: none; opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===================== HEADER / NAVBAR ===================== */
.site-header { position: sticky; top: 0; background: var(--color-light); box-shadow: 0 2px 10px rgba(0,0,0,0.06); z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 20px; }
.logo img { height: 48px; }
.main-nav ul { display: flex; gap: 26px; align-items: center; }
.main-nav a { font-weight: 600; }
.main-nav a:hover, .main-nav a.active { color: var(--color-primary); }
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; }
.menu-toggle span { width: 26px; height: 3px; background: var(--color-dark); border-radius: 2px; }

/* --- Kotak Pencarian --- */
.search-box { position: relative; }
.search-box input {
  border: 1px solid #ddd;
  border-radius: 50px;
  padding: 9px 16px;
  font-size: 0.9rem;
  width: 180px;
  font-family: inherit;
}
.search-box input:focus { outline: none; border-color: var(--color-primary); }
.search-results {
  position: absolute;
  top: 110%;
  right: 0;
  width: 260px;
  background: var(--color-light);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  display: none;
  z-index: 300;
}
.search-results.show { display: block; }
.search-results a { display: block; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 0.9rem; }
.search-results a:hover { background: var(--color-secondary); }
.search-results .no-result { padding: 12px 16px; color: var(--color-muted); font-size: 0.9rem; }

/* ===================== HERO SECTION ===================== */
.hero { position: relative; min-height: 520px; overflow: hidden; display: flex; align-items: center; color: var(--color-light); }

/* --- Foto latar hero: dipisah dari teks supaya bisa dianimasikan sendiri --- */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
}

.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.65), rgba(0,0,0,0.25)); }
.hero-content { position: relative; max-width: 620px; }
.hero-content h1 { font-size: 2.6rem; margin-bottom: 18px; }
.hero-content p { margin-bottom: 26px; font-size: 1.1rem; }

/* ===================== GRID SERBAGUNA ===================== */
.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); align-items: center; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* ===================== BANNER JUDUL HALAMAN ===================== */
.page-banner { background: var(--color-secondary); text-align: center; padding: 60px 0; }
.page-banner h1 { font-size: 2.2rem; margin-bottom: 10px; }
.page-banner p { color: var(--color-muted); }
.breadcrumb { font-size: 0.9rem; color: var(--color-muted); margin-top: 10px; }
.breadcrumb a:hover { color: var(--color-primary); }

/* ===================== KARTU KATEGORI PRODUK (produk.html) ===================== */
.kategori-card {
  background: var(--color-primary);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: transform 0.3s ease;
}
.kategori-card:hover { transform: translateY(-6px); }
.kategori-card img { width: 100%; height: 160px; object-fit: cover; }
.kategori-card h3 { padding: 16px 16px 6px; font-size: 1.05rem; }
.kategori-card p { padding: 0 16px 18px; color: var(--color-muted); font-size: 0.88rem; }

/* ===================== KARTU PRODUK (di halaman list per kategori) ===================== */
.produk-item {
  background: var(--color-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  padding-bottom: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}
.produk-item:hover { transform: translateY(-6px); }
.produk-item img { width: 100%; height: 180px; object-fit: cover; margin-bottom: 16px; }
.produk-item h3 { padding: 0 16px; margin-bottom: 8px; }
.produk-item p { padding: 0 16px; color: var(--color-muted); font-size: 0.92rem; margin-bottom: 14px; }

/* ===================== HALAMAN DETAIL PRODUK ===================== */
.detail-produk { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: start; }
.detail-produk .foto img { width: 100%; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.detail-produk .info h1 { font-size: 1.9rem; margin-bottom: 16px; }
.detail-produk .info p { color: var(--color-muted); margin-bottom: 16px; }
.detail-produk .info ul { margin: 16px 0; }
.detail-produk .info ul li { padding-left: 26px; position: relative; margin-bottom: 10px; color: var(--color-dark); }
.detail-produk .info ul li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--color-primary); font-weight: bold;
}
.detail-produk .info h4 { margin: 24px 0 10px; font-size: 1.05rem; }

/* ===================== HALAMAN PROYEK ===================== */
.klien-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 40px; }
.klien-logos img { height: 55px; width: auto; filter: grayscale(100%); opacity: 0.7; transition: 0.3s ease; }
.klien-logos img:hover { filter: none; opacity: 1; }

.proyek-card { border-radius: var(--radius); overflow: hidden; background: var(--color-secondary); }
.proyek-card img { width: 100%; height: 160px; object-fit: cover; }
.proyek-card .proyek-info { padding: 18px; }
.proyek-card h4 { margin-bottom: 6px; }
.proyek-card p { color: var(--color-muted); font-size: 0.9rem; }
.proyek-card .zak { color: var(--color-primary); font-weight: 700; }

/* ===================== HALAMAN TENTANG KAMI ===================== */
.tentang-section p { color: var(--color-muted); margin-bottom: 14px; }
.visi-misi { background: var(--color-secondary); border-radius: var(--radius); padding: 36px; }
.visi-misi h3 { color: var(--color-primary); margin-bottom: 12px; }
.visi-misi ul li { padding-left: 26px; position: relative; margin-bottom: 12px; }
.visi-misi ul li::before { content: "✓"; position: absolute; left: 0; color: var(--color-primary); font-weight: bold; }

.katalog-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 20px; }
.katalog-card {
  background: var(--color-light);
  border: 1px solid #eee;
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}
.katalog-card:hover { transform: translateY(-6px); }
.katalog-card .ikon { font-size: 2.2rem; margin-bottom: 12px; }
.katalog-card h4 { margin-bottom: 8px; }
.katalog-card p { color: var(--color-muted); font-size: 0.88rem; margin-bottom: 16px; }

/* ===================== HALAMAN KONTAK ===================== */
.kontak-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.kontak-form label { display: block; font-weight: 600; margin-bottom: 6px; margin-top: 16px; }
.kontak-form label:first-child { margin-top: 0; }
.kontak-form input, .kontak-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}
.kontak-form input:focus, .kontak-form textarea:focus { outline: none; border-color: var(--color-primary); }
.kontak-form button { margin-top: 22px; }

.kontak-info-box { background: var(--color-secondary); border-radius: var(--radius); padding: 30px; }
.kontak-info-box h4 { margin-bottom: 14px; }
.kontak-info-box p { color: var(--color-muted); margin-bottom: 8px; }

.wa-admin-list { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.wa-admin-list a {
  display: flex; align-items: center; gap: 10px;
  background: var(--color-light);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #eee;
  font-weight: 600;
}
.wa-admin-list a:hover { border-color: #25D366; color: #128C4A; }

.sosmed-icons { display: flex; gap: 14px; margin-top: 20px; }
.sosmed-icons a {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.sosmed-icons a:hover { background: var(--color-primary-dark); }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--color-dark); color: #cccccc; padding: 60px 0 20px; }
.footer-logo { height: 40px; margin-bottom: 14px; }
.site-footer h4 { color: var(--color-light); margin-bottom: 16px; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul li a:hover { color: var(--color-light); }
.sosmed { display: flex; gap: 14px; margin-top: 14px; }
.footer-bottom { border-top: 1px solid #333; margin-top: 40px; padding-top: 20px; text-align: center; font-size: 0.9rem; }

/* ===================== TOMBOL WHATSAPP MELAYANG ===================== */
.wa-float {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px; background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25); z-index: 200;
  color: var(--color-light); font-size: 1.6rem;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .kontak-grid, .detail-produk, .katalog-list { grid-template-columns: 1fr; }
  .search-box input { width: 130px; }
}
@media (max-width: 700px) {
  .main-nav {
    position: fixed; top: 74px; left: 0; right: 0;
    background: var(--color-light); flex-direction: column;
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
  }
  .main-nav.open { max-height: 600px; }
  .main-nav ul { flex-direction: column; padding: 20px; gap: 16px; align-items: flex-start; }
  .search-box { width: 100%; }
  .search-box input { width: 100%; }
  .menu-toggle { display: flex; }
  .grid-4, .grid-5 { grid-template-columns: 1fr 1fr; }
  .hero-content h1 { font-size: 1.9rem; }
}
