/* ================================
   FONT GLOBAL
================================ */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1; /* Bagian utama isi halaman */
}


body {
  font-family: 'Poppins', sans-serif;
}

/* ================================
   HERO SECTION
   (Bagian header besar dengan gambar latar pertanian)
================================ */
.hero {
  background: url('../img/pertanian.jpg') no-repeat center center/cover;
  color: #fff;
  height: 100vh; 
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

/* Overlay gelap agar teks lebih mudah dibaca */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 80, 0, 0.45);
}

/* Agar teks di atas layer overlay */
.hero .container {
  position: relative;
  z-index: 2;
}

/* Judul dan deskripsi hero */
.hero h1 {
  font-size: 3rem;
  font-weight: bold;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.25rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

/* ================================
   ANIMASI FADE-IN (Efek muncul halus)
================================ */
.fade-in {
  animation: fadeInUp 1s ease-in-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================
   GALERI (Efek hover gambar)
================================ */
.galeri-img {
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}

.galeri-img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Ukuran gambar carousel galeri */
.galeri-slide-img {
  max-height: 350px;
  object-fit: cover;
  border-radius: 10px;
}

/* Helper Class for Carousel in Home */
.carousel-hero-img {
  height: 450px; 
  object-fit: cover; 
  border-radius: 10px;
}

/* ================================
   CHAT ASSISTANT
   (Tombol & kotak chat mengambang di kanan bawah)
================================ */
#chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

/* Tombol lingkaran buka chat */
#chat-toggle {
  background-color: #198754;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Kotak utama chat */
#chat-box {
  display: flex;
  flex-direction: column;
  width: 320px;
  height: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  margin-top: 10px;
  overflow: hidden;
}

/* Header chat */
#chat-header {
  background-color: #198754;
  color: #fff;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

/* Isi chat */
#chat-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
}

/* Input area */
#chat-input-area {
  display: flex;
  border-top: 1px solid #ddd;
}

/* Kolom input teks */
#chat-input {
  flex: 1;
  border: none;
  padding: 10px;
  outline: none;
}

/* Tombol kirim */
#chat-send {
  background-color: #198754;
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
}

/* Tombol hapus chat */
#clear-chat {
  background-color: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
}

.kontak-wrapper {
  min-height: 70vh; /* mendorong footer ke bawah */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kontak-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-berita-img {
    width: 100%;
    max-width: 350px;   /* atur lebar gambar */
    height: auto;
    max-height: 250px;  /* atur tinggi gambar */
    object-fit: contain;
    display: block;
    margin: 0 auto 20px auto; /* center + jarak bawah */
}

.card-img-top {
    height: 180px;        /* bisa disesuaikan 150–220px */
    object-fit: contain;  /* menjaga proporsi gambar */
    padding: 10px;        /* memberi jarak */
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0px 10px 25px rgba(0,0,0,0.15);
    transition: 0.3s ease;
}

/* ================================
   RESPONSIVE MEDIA QUERIES
================================ */

/* Tablet & Mobile (Max width 768px) */
@media (max-width: 768px) {
  /* Hero Section Adjustment */
  .hero h1 {
    font-size: 2rem; /* Smaller Font */
  }
  
  .hero p {
    font-size: 1rem;
    padding: 0 20px;
  }

  /* Carousel Image Height */
  .carousel-hero-img {
    height: 250px;
  }
}

/* Mobile Small (Max width 576px) */
@media (max-width: 576px) {
  /* Detail Berita Image */
  .detail-berita-img {
    max-width: 100%;
  }

  /* Chat Box Responsiveness */
  #chat-box {
    width: 90vw; /* Almost full width */
    height: 60vh;
    position: fixed;
    bottom: 80px;
    right: 5vw;
  }
  
  #chat-container {
    right: 15px;
    bottom: 15px;
  }

  /* Navbar Brand Text Adjustment if needed */
  .navbar-brand {
    font-size: 0.9rem;
  }
}
/* ================================
   ANIMASI TAMBAHAN (Professional)
   ================================ */

@keyframes fadeInUpPro {
  from {
    opacity: 0;
    transform: translate3d(0, 40px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-up {
  animation: fadeInUpPro 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

/* Stagger delay classes */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* Enhanced Card Styling */
.card-pro {
  border: none;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
}

.card-pro:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Gradient Buttons */
.btn-gradient-success {
  background: linear-gradient(135deg, #198754 0%, #20c997 100%);
  border: none;
  color: white;
  transition: opacity 0.3s ease;
}

.btn-gradient-success:hover {
  opacity: 0.9;
  color: white;
}

/* Custom Table Styling */
.table-pro thead th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 600;
  border-bottom: 2px solid #e2e8f0;
} 
