/* ======= Google Font ======= */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

html, body {
  overflow-x: hidden; /* Tambahan anti scroll horizontal */
}

* {
  box-sizing: border-box; /* Pastikan padding & border tidak bikin overflow */
}

body {
  padding-top: 3rem;
  font-family: 'Space Grotesk', sans-serif;
  background: #f2f3f5;
  color: #202020;
}
/* ======= Google Font ======= */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.navbar {
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar-brand {
  font-weight: 600;
}

.nav-link {
  font-weight: 500;
}

.nav-link.active {
    font-weight: 600;
    color: #3d7f7f !important;
    border-bottom: 2px solid #b5d5f2;
  }

.btn-primary {
  background: #3d7f7f;
  border: none;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #fff;
  color:#3d7f7f;
}

.card-harga {
  background:#202020;
  border: none;
  border-radius: 12px;
}



.table-success {
  background-color: #c9f158 !important;
  color: #202020;
}

.table-hover tbody tr:hover {
  background-color: #e8f9c8;
}

.table thead th {
  border: none;
}

.table td, .table th {
  vertical-align: middle;
  padding: 0.5rem 0.75rem;
}

.section-pricelist,
.section-tutorial,
.section-edukasi,
.section-info {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

.tutorial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tutorial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
.step-icon {
  font-weight: bold;
  box-shadow: none;
}

.tutorial-step-card {
  background-color: #f9f9f9;
  border-left: 5px solid #3d7f7f;
  border-radius: 12px;
  transition: transform 0.2s ease;
}

.tutorial-step-card:hover {
  transform: translateX(5px);
  box-shadow: none;
}

.step-icon .circle-number {
  background-color: #3d7f7f;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.step-description p {
  font-size: 1rem;
  margin: 0;
}


/* Buat carousel tetap proporsional & stabil */
.carousel-inner {
  aspect-ratio: 16 / 9; /* Atau 4/3, bebas sesuai kebutuhan */
  overflow: hidden;
}

.carousel-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Zoom crop gambar agar selalu penuh */
  object-position: center;
}

/* ======= TABEL GALERI ======= */
.table-darkk {
  background: none;
  color: #f1f1f1;
}

.table-dark thead th {
  border-bottom: 2px solid #3d7f7f;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 0.4rem; /* Lebih rapat */
}

.table-dark tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease;
}

.table-dark tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.table-dark td {
  vertical-align: middle;
  padding: 0.5rem 0.4rem; /* Lebih rapat */
}

.table-dark th, 
.table-dark td {
  border: none;
}

.table-dark {
  border-radius: 0.75rem;
}

.table-responsive {
  border-radius: 0.75rem;
  overflow: hidden;
  height: 100%; /* Kunci agar tabel penuh */
}

.table {
  margin-bottom: 0;
  height: 100%;
}

.table tbody {
  height: 100%;
}

.table tbody tr:last-child {
  border-bottom: none;
}

/* Scrollbar halus */
.table-responsive::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #888;
}



.news-item {
  background: #f2f3f5;
  border: none;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.card-title {
  font-weight: bold;
}

.card-text {
  font-size: 1rem;
}

img {
  border-radius: 8px;
  max-width: 100%;
  height: auto;
}

/* Aspect ratio khusus card di mobile landscape */
@media (max-width: 768px) and (orientation: landscape) {
  .card,
  .news-item,
  .card .card-body,
  .card .card-img-top {
    aspect-ratio: 18 / 6;
    overflow: hidden;
  }

  .card img,
  .news-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .card .card-body,
  .news-item .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* Card Info Cuaca & Udara 2 Konten dalam 1 Card */
.info-card {
  background:linear-gradient(135deg, #c3f4e1, #b5d5f2);
  border:none;
  border-radius: 1,9rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
}

.info-card h4 {
  color: #202020;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.info-card p {
  color: #555;
  margin: 0;
  font-size: 0.9rem;
}

.info-block {
  text-align: center;
  flex: 1;
}

@media (max-width: 768px) {
  .info-card {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .info-block {
    min-width: 50%;
  }

  .info-card h4 {
    font-size: 0.95rem;
  }

  .info-card p {
    font-size: 0.8rem;
  }
}

/* Footer rapat */
footer {
  background: #202020;
  color: #ffffff;
  margin-top: 2rem;
  padding: 1rem 0;
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem !important;
}

.mt-5 {
  margin-top: 2rem !important;
}

.pt-5 {
  padding-top: 2rem !important;
}

.my-5 {
  margin-top: 2rem !important;
  margin-bottom: 2rem !important;
}

@media (max-width: 768px) {
  .section-pricelist,
  .section-tutorial,
  .section-edukasi,
  .section-info {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
  }
}

/* edukasi */
.edukasi-card {
  background: #fff; /* putih bersih */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  min-height: 200px;
  
}

 @media (max-width: 768px) {
    .edukasi-card {
      min-height: auto;
      max-height: calc(100vw * 0.33); /* 3:1 landscape ratio */
      overflow: hidden;
    }

    .edukasi-card-img img {
      height: 100%;
      object-fit: cover;
    }
  }


.edukasi-card-body {
  padding: 20px;
}

.object-fit-cover {
  object-fit: cover;
  height: 100%;
}


.card.flex-row {
  display: flex;
  flex-direction: row;
}

/* Multiline clamp biar potong rapi */
.text-truncate-multiline {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

.truncate-wrap {
  overflow: hidden;
  max-height: 100%;
}

 .w-md-40 {
    flex: 0 0 40%;
  }

  @media (max-width: 768px) {
    .modal-body .d-flex {
      flex-direction: column;
    }
    .modal-left {
      flex: 0 0 auto;
      max-height: 40vh;
    }
    .modal-right {
      flex: 1 0 auto;
      max-height: 60vh;
    }
  }
 /* === BACKDROP MODERN BLUR === */
.modal-backdrop.show {
  background-color: rgb(0, 0, 0); /* Lebih gelap biar fokus */
}

/* --- Modal scroll & responsive fix --- */
.modal-dialog {
  max-width: 100%;
  width: auto;
  margin: 1rem auto;
}

.modal-content {
  max-height: 90vh;
  overflow: hidden;
  border-radius: 20px;
  background: rgb(255, 255, 255);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.modal-body {
  padding: 0;
  overflow-y: auto;
}

/* Modal content layout */
.modal-body .d-flex {
  flex-direction: column; /* default column (mobile first) */
}

.modal-left img {
  object-fit: cover;
  height: 250px;
  width: 100%;
}

.modal-right {
  padding: 1rem;
  overflow-y: auto;
}

/* Responsive (ubah flex-direction untuk desktop) */
@media (min-width: 768px) {
  .modal-body .d-flex {
    flex-direction: row;
  }

  .modal-left {
    width: 40%;
    height: auto;
  }

  .modal-right {
    width: 60%;
    max-height: 90vh;
  }

  .modal-left img {
    height: 100%;
  }
}

/* Hindari konten meluber */
.modal-body * {
  max-width: 100%;
  word-wrap: break-word;
}



/* Pinterest Grid ala Masonry: 3 kolom mobile, 5 desktop */
.pinterest-grid {
  column-count: 3;
  column-gap: 12px;
}

@media (min-width: 992px) {
  .pinterest-grid {
    column-count: 5;
  }
}

.pinterest-grid .grid-item {
  break-inside: avoid;
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
}

.pinterest-grid .grid-item img {
  width: 100%;
  height: auto; /* biar proporsi asli terjaga */
  display: block;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.pinterest-grid .grid-item:hover img {
  transform: scale(1.05);
}


/* Modal Foto */
.modal-photo img {
  width: 100%;
  height: auto;
  object-fit:cover;
  display: block;
  max-height: 60vh; 
}

.modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
}

.modal-info {
  background: #fff;
}

.btn-close {
  z-index: 10;
}

/* chart */
  .chart-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Menengahkan isi kartu chart */
    gap: 30px; /* Jarak antara chart dan legend */
    padding: 0;
    background: none;
    border-radius: 1rem;
    overflow: hidden;
    max-width: 100%;
    flex-wrap: wrap; /* Agar responsif di mobile */
  }

  .chart-wrapper {
    width: 100%;
    max-width: 400px;
    height: 300px;
    position: relative;
  }

  .chart-legend {
    min-width: 150px;
    text-align: left;
  }

  @media (max-width: 768px) {
    .chart-card {
      flex-direction: column;
      align-items: center;
    }

    .chart-wrapper {
      max-width: 100%;
      height: 250px;
    }

    .chart-legend {
      text-align: center;
    }
  }



.custom-shape-divider-top-1754028999 svg {
  display: block;
  position: relative;
  width: 100%;
  height: 40px;
  margin: 0;
  padding: 0;
}


.custom-shape-divider-top-1754028999 {
  fill:#f2f3f5;
  margin-top: -3px;
}

.footer-cstm {
  background-color:#b5d5f2;
    margin-top: -1px;
  
}