/* ================================== */
/* GAYA GLOBAL & DASAR                */
/* ================================== */
:root {
  --primary-color: #2a7854;
  --secondary-color: #d9eee1;
  --background-color: #f0f4f2;
  --text-color: #333333;
  --subtle-text-color: #888;
  --white-color: #ffffff;
  --trend-up-color: #28a745;
  --trend-down-color: #dc3545;
  --border-color: #e0e0e0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #e9ecef; /* Latar belakang luar kontainer */
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  overflow: hidden;
    
}

a {
  text-decoration: none;
  color: inherit;
}

/* ================================== */
/* LAYOUT UTAMA                     */
/* ================================== */
.mobile-container {
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  background-color: var(--background-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.main-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  /* 90px untuk nav-bottom + ruang aman di bawahnya */
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* ================================== */
/* GAYA HALAMAN DALAM (BUDIDAYA, DLL) */
/* ================================== */

/* Background khusus untuk halaman dalam */
.inner-page-bg {
  background-color: var(--background-color);
}

.inner-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.5rem 0 1.5rem; /* Padding disesuaikan */
  color: var(--text-color);
}

.inner-header .back-button {
  font-size: 1.8rem;
  color: var(--text-color);
}

.inner-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Judul Sub di bawah header */
.page-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding: 0 1.5rem; /* Padding agar sejajar dengan konten */
}

/* Menyesuaikan padding konten utama di halaman dalam */
.inner-page-bg .main-content {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

/* ================================== */
/* DAFTAR TAHAP BUDIDAYA            */
/* ================================== */
.tahap-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1.5rem; /* Padding agar sejajar dengan konten */
}

.tahap-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--secondary-color);
  padding: 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tahap-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tahap-card img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0; /* Mencegah gambar menyusut */
}

.tahap-info {
  flex-grow: 1;
}

.tahap-info h3 {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.tahap-info h3 b {
  font-weight: 600;
}

.tahap-info p {
  font-size: 0.85rem;
  color: var(--subtle-text-color);
}

.tahap-card iconify-icon {
  font-size: 1.8rem;
  color: var(--subtle-text-color);
}

/* ================================== */
/* HALAMAN TAHAP AWAL         */
/* ================================== */

.inner-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  padding-bottom: 0.5rem;
}

.inner-header .back-button {
  font-size: 1.8rem;
}

.inner-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ================================== */
/* NAVIGASI TAB                     */
/* ================================== */
.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 0.75rem 0;
  font-weight: 500;
  color: var(--subtle-text-color);
  position: relative;
  transition: color 0.3s ease;
}

.tab-item.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Garis bawah untuk tab aktif */
.tab-item.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

/* ================================== */
/* BAR PENCARIAN                    */
/* ================================== */
.search-bar {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-bar iconify-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--subtle-text-color);
}

.search-bar input {
  width: 100%;
  padding: 14px 14px 14px 50px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-size: 1rem;
  background-color: var(--white-color);
}
.search-bar input::placeholder {
  color: var(--subtle-text-color);
}

/* ================================== */
/* DAFTAR ARTIKEL                   */
/* ================================== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.article-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background-color: var(--secondary-color);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.article-info {
  flex: 1;
}

.category-tag {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.article-info h2 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-color);
}

.article-card img {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
}

/* ================================== */
/* GAYA FLOATING ACTION BUTTON (FAB)  */
/* ================================== */
.fab {
  position: absolute;
  bottom: 2rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 0.75rem 1.25rem;
  border-radius: 2rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(42, 120, 84, 0.4);
  z-index: 10;
  opacity: 0;
  transform: translateY(20px) scale(0.9);
  pointer-events: none; /* Tombol tidak bisa diklik saat tersembunyi */
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.mobile-container.video-tab-active .fab {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto; /* Tombol bisa diklik lagi */
}

.fab:hover {
  transform: scale(1.05);
}

.fab iconify-icon {
  font-size: 1.4rem;
}

/* ================================== */
/* GAYA HALAMAN KALKULATOR TANI       */
/* ================================== */
.calculator-menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem; /* Memberi sedikit jarak dari header */
}

.calculator-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--white-color);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--secondary-color);
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calculator-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
  border-color: var(--primary-color);
}

.calc-icon-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background-color: var(--secondary-color);
  border-radius: 12px;
}

.calc-icon-wrapper iconify-icon {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.calculator-item span {
  flex-grow: 1;
}

.calculator-item .chevron {
  font-size: 1.8rem;
  color: var(--border-color);
}

/* ================================== */
/* GAYA HALAMAN FORM KALKULATOR       */
/* ================================== */
.calculator-form {
  background-color: var(--white-color);
  padding: 1.5rem;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef2f0;
}

.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.form-group:last-of-type {
  margin-bottom: 2rem; /* Jarak lebih besar sebelum tombol */
}

.form-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

/* Penampung untuk select agar bisa diberi custom arrow */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6l1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none; /* Agar bisa klik select di bawahnya */
}

.calculator-form input[type="number"],
.calculator-form select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  font-family: "Poppins", sans-serif;
  background-color: var(--white-color);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none; /* Menghilangkan arrow default */
}

.calculator-form input[type="number"]::placeholder {
  color: var(--subtle-text-color);
}

.calculator-form select {
  color: var(--text-color);
}

/* Memberi warna abu-abu untuk placeholder select */
.calculator-form select:required:invalid {
  color: var(--subtle-text-color);
}

.input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.input-group input {
  flex-grow: 1; /* Input angka mengambil sisa ruang */
}

.input-group .unit-selector {
  flex-shrink: 0;
  width: 90px; /* Lebar tetap untuk unit */
}

.btn-calculate {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-calculate:hover {
  background-color: #226345; /* Warna sedikit lebih gelap saat hover */
  transform: translateY(-2px);
}

/* ================================== */
/* GAYA HASIL KALKULATOR              */
/* ================================== */
.calculation-result {
  background-color: var(--white-color);
  padding: 1.5rem;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid #eef2f0;
  margin-top: 2rem; /* Jarak dari form di atas */
}

.calculation-result h2 {
  text-align: center;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.result-group {
  margin-bottom: 1.5rem;
}

.result-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  display: block;
}

.result-display-group {
  display: flex;
  gap: 0.75rem;
}

.result-value {
  flex-grow: 1;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  background-color: var(--background-color);
  text-align: left;
  color: var(--text-color);
  outline: none;
}

.result-unit {
  flex-shrink: 0;
  width: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background-color: var(--white-color);
  font-weight: 500;
  font-size: 1rem;
}

.result-recommendations h3,
.result-tips p b {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.result-recommendations ul {
  list-style-position: inside;
  padding-left: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.result-tips {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--subtle-text-color);
  line-height: 1.6;
}

.result-tips p {
  margin: 0;
}

.result-tips p:first-child {
  margin-bottom: 0.25rem;
}

/* Kelas utilitas untuk menyembunyikan elemen */
.hidden {
  display: none;
}

/* ================================== */
/* GAYA HALAMAN KEMITRAAN             */
/* ================================== */

.partnership-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1.5rem; /* Menyamakan padding dengan page-subtitle */
}

.partnership-card {
  background-color: var(--secondary-color);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.card-category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-color);
}

.card-category iconify-icon {
  font-size: 1.4rem;
}

.card-timestamp {
  font-size: 0.8rem;
  color: var(--subtle-text-color);
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.card-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.card-image-container {
  margin-bottom: 1rem;
}

.card-image-container img {
  width: 100%;
  border-radius: 12px;
  display: block;
  object-fit: cover;
}

.card-caption {
  font-size: 0.85rem;
  color: var(--subtle-text-color);
  text-align: center;
  padding: 0.75rem 0.25rem 0 0.25rem;
  line-height: 1.5;
}

.card-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(42, 120, 84, 0.2);
  padding-top: 1rem;
}

.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
  padding: 0.75rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.action-button:active {
  transform: scale(0.95);
}

.action-button iconify-icon {
  font-size: 1.25rem;
}

.like-btn {
  background-color: var(--white-color);
  border: 1px solid var(--border-color);
  color: var(--text-color);
}

.remind-btn {
  background-color: #e9ecef; /* Abu-abu terang dari body */
  color: var(--text-color);
  border: 1px solid transparent;
}

.form-kemitraan {
  padding: 0 1.5rem 2rem 1.5rem;
}

.form-kemitraan .form-group {
  margin-bottom: 1rem;
}

.form-kemitraan label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

.form-kemitraan input,
.form-kemitraan textarea {
  width: 100%;
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
}

.fab {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.reminded {
  background-color: #e9ecef;
  color: var(--subtle-text-color);
}

.delete-btn {
  background-color: #fff1f2;
  color: #dc3545;
  border: 1px solid #f8d7da;
}
