/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
}

/* Responsive */
@media (max-width: 992px) {
  .welcome {
    flex-direction: column-reverse;
    text-align: center;
    padding: 50px 5%;
  }

  .welcome-text h1 {
    font-size: 2rem;
  }

  .welcome-text p {
    font-size: 0.95rem;
  }

  .welcome-img img {
    max-width: 400px;
  }
}

/* Smartphone */
@media (max-width: 600px) {
  .welcome {
    padding: 40px 5%;
  }

  .welcome-text h1 {
    font-size: 1.6rem;
  }

  .welcome-text p {
    font-size: 0.9rem;
  }

  .welcome-buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .welcome .btn {
    width: 90%;
    font-size: 0.85rem;
    padding: 10px;
  }

  .welcome-img img {
    max-width: 320px;
  }
}

/* =================================
   KOLEKSI
================================= */

.laporan {
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px 8%;
  background: #fff;
  margin: 0 auto;
  gap: 40px;
}

.laporan-img {
  flex: 0.35;
  display: flex;
  justify-content: center;
  align-items: center;
}

.laporan-img img {
  max-width: 70%;
  height: auto;
  border-radius: 10px;
}

.laporan-text {
  flex: 0.65;
}

.laporan-text h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #003366;
  margin-bottom: 20px;
}

.laporan-text p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: #555;
  text-align: justify;
  margin-bottom: 25px;
}

.laporan-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: 0.3s ease;
}

.btn.lihat {
  background: linear-gradient(90deg, #056ad0, #014589);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 50%;
}

.btn.lihat:hover {
  background: linear-gradient(90deg, #023a72, #197bdc);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(255, 165, 0, 0.3);
}

.btn.tambah {
  background: linear-gradient(90deg, #ff7a00, #ffae42);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 50%;
}

.btn.tambah:hover {
  background: linear-gradient(90deg, #ffae42, #ffd580);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(255, 165, 0, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
  .laporan {
    flex-direction: column;
    text-align: center;
  }

  .laporan-img img {
    max-width: 60%;
  }

  .laporan-buttons {
    justify-content: center;
  }
}

/* ===================
  Dropdown
====================== */
/* Main Grid Container */
.main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 40px;
  margin-bottom: 50px;
  overflow: visible;
  padding-inline: 40px;
}

/* Card Styles */
.system-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 102, 0, 0.1);
  position: relative;
  overflow: visible;
}

.system-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
  transition: all 0.3s ease;
}

.system-card:hover::before {
  background: linear-gradient(90deg, #ff6600, #ff8533);
}

.system-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Card Header */
.card-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f3f4;
  overflow: visible;
}

.card-header img {
  width: 60px !important;
  height: 60px !important;
  border-radius: 15px;
  padding: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.card-title {
  flex: 1;
}

.card-title h3 {
  font-size: 1.4rem;
  color: #003366;
  font-weight: 600;
  margin-bottom: 5px;
}
.dropdown {
  position: relative;
  margin-left: auto;
}

.dropdown-toggle {
  background: rgba(0, 102, 255, 0.1);
  border: 2px solid rgba(0, 102, 255, 0.2);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dropdown-toggle::after {
  content: none !important;
  border: none !important;
}

.dropdown-toggle:hover {
  border: 2px solid rgba(255, 102, 0, 0.2);
  background: rgba(255, 102, 0, 0.2);
}

.dropdown-toggle i {
  transition: transform 0.3s ease;
}

.dropdown-toggle.active i {
  transform: rotate(180deg);
}

.dropdown-content {
  position: absolute;
  top: 55px;
  right: 0;
  background: white;
  min-width: 220px;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.dropdown-content.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  display: block;
  padding: 15px 20px;
  color: #495057;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background: linear-gradient(135deg, rgba(255, 102, 0, 0.1), rgba(255, 133, 51, 0.1));
  color: #ff6600;
  padding-left: 25px;
}

/* laporan brs */
.laporan-brs {
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 50px 8%;
  background: #fff;
  margin: 0 auto;
  gap: 40px;
}

.laporan-brs-img {
  flex: 0.45;
  display: flex;
  justify-content: center;
  align-items: center;
}

.laporan-brs-img img {
  max-width: 70%;
  height: auto;
  border-radius: 10px;
}

.laporan-brs-text {
  flex: 0.55;
}

.laporan-brs-text h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #003366;
  margin-bottom: 20px;
}

.laporan-brs-text p {
  font-size: 0.75rem;
  line-height: 1.6;
  color: #555;
  text-align: justify;
  margin-bottom: 25px;
}

.laporan-brs-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.laporan-brs.btn {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: 0.3s ease;
}

.laporan-brs.btn.lihat {
  background: linear-gradient(90deg, #056ad0, #014589);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 50%;
}

.laporan-brs.btn.lihat:hover {
  background: linear-gradient(90deg, #023a72, #197bdc);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(255, 165, 0, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
  .laporan-brs {
    flex-direction: column;
    text-align: center;
  }

  .laporan-brs-img img {
    max-width: 60%;
  }

  .laporan-brs-buttons {
    justify-content: center;
  }
}

/* ===================
  Card Slider
====================== */
/* Kontainer utama */
.cards-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 8%;
}

.cards-container h1 {
  font-size: 1.7rem;
  color: #003366;
  margin-bottom: 20px;
  font-weight: 700;
  text-align: center;
}

.cards-scroll {
  display: flex;
  gap: 25px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 15px 0;
  scroll-snap-type: x mandatory;
}

.cards-scroll::-webkit-scrollbar {
  height: 12px;
}

.cards-scroll::-webkit-scrollbar-thumb,
.cards-scroll::-webkit-scrollbar-track {
  border-radius: 92px;
}

.cards-scroll::-webkit-scrollbar-thumb {
  background: var(--darkorange);
}

.cards-scroll::-webkit-scrollbar-track {
  background: var(--thumb);
}
.card {
  flex: 0 0 264px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  text-align: center;
  padding: 30px 20px;
  transition: transform 0.3s ease, background 0.3s ease;
  scroll-snap-align: start;
}

.card:hover {
  transform: translateY(-5px);
  background: linear-gradient(135deg, #ff7a00, #ffb347);
  color: #fff;
  transition: all 0.3s ease;
}

/* Konten kartu */
.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Gambar besar */
.card-content img {
  width: auto;
  height: auto;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
  max-width: 40%;
}

.card:hover img {
  transform: scale(1.05);
}

/* Tombol */
.card-link {
  display: inline-block;
  background: var(--orange);
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.3s ease;
}

.card:hover .card-link {
  background: var(--darkorange);
}

.scroll-btn {
  background: linear-gradient(90deg, #ff7a00, #ffae42);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.scroll-btn:hover {
  background: linear-gradient(90deg, #ffae42, #ffd580);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(255, 165, 0, 0.3);
}

/* Responsif */
@media (max-width: 768px) {
  .card-content img {
    width: 180px;
  }
  
  /* Fix untuk system-card agar tidak terpotong di mobile */
  .produksi {
    padding: 20px 4% !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .produksi .container {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .main-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .system-card {
    padding: 22px 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    margin: 0 !important;
    background: white !important;
    position: relative !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    min-height: 140px !important;
  }
  
  .system-card::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 16px 16px 0 0 !important;
  }
  
  .card-header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    gap: 15px !important;
    border-bottom: none !important;
    align-items: flex-start !important;
    min-height: 85px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .card-header img {
    width: 55px !important;
    height: 55px !important;
    padding: 12px !important;
    border-radius: 14px !important;
    flex-shrink: 0 !important;
  }
  
  .card-title {
    flex-grow: 1 !important;
    min-width: 0 !important;
    text-align: left !important;
    min-height: 60px !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
  }
  
  .card-title h3 {
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 5px !important;
    word-wrap: break-word !important;
  }
  
  .dropdown {
    align-self: flex-start !important;
    flex-shrink: 0 !important;
  }
  
  .dropdown-toggle {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
  }
  
  .dropdown-content {
    top: 50px !important;
    right: 0 !important;
    left: unset !important;
    min-width: 220px !important;
    max-width: calc(100vw - 40px) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
  }
}

@media (max-width: 480px) {
  .card-content img {
    width: 150px;
  }
  
  /* Fix untuk system-card di layar sangat kecil */
  .produksi {
    padding: 20px 3% !important;
  }
  
  .system-card {
    padding: 20px 18px !important;
    border-radius: 14px !important;
    min-height: 130px !important;
  }
  
  .system-card::before {
    border-radius: 14px 14px 0 0 !important;
  }
  
  .card-header {
    gap: 12px !important;
    min-height: 80px !important;
  }
  
  .card-header img {
    width: 50px !important;
    height: 50px !important;
    padding: 10px !important;
    border-radius: 12px !important;
  }
  
  .card-title {
    min-height: 55px !important;
  }
  
  .card-title h3 {
    font-size: 0.95rem !important;
  }
  
  .dropdown-toggle {
    width: 38px !important;
    height: 38px !important;
  }
  
  .dropdown-content {
    max-width: calc(100vw - 30px) !important;
  }
}
/* Responsif */
@media (max-width: 699px) {
  .cards {
    grid-auto-columns: calc(100% / 2 - 15px); /* tablet: 2 card */
  }

  .card .card-content img {
    width: 80px; /* lebih kecil di tablet */
  }
}

@media (max-width: 499px) {
  .cards {
    grid-auto-columns: 100%; /* HP kecil: 1 card */
  }

  .card .card-content img {
    width: 70px; /* lebih kecil di HP */
  }
}

/* publikasi */
.publikasi-section {
  max-width: 950px;
  margin: 0 auto;
  padding: 30px 8%;
  text-align: center;
  max-height: fit-content;
}

.publikasi-title {
  font-size: 1.8rem;
  color: #003366;
  font-weight: 700;
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

.publikasi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.publikasi-item {
  background: white;
  padding: 20px;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  max-width: 280px;
  margin: 0 auto;
}

.publikasi-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.15);
}

.publikasi-item img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  transition: filter 0.3s ease;
}

.publikasi-item:hover img {
  filter: brightness(80%);
}

.publikasi-item h3 {
  /* padding: 10px 0 10px 0; */
  font-size: 1.15rem;
}

.publikasi-item p {
  color: #666;
  font-size: 0.9rem;
  margin: 10px 0 15px 0;
  /* text-align: justify; */
}

/* Responsive untuk Publikasi IPDS - 1 kolom di mobile */
@media (max-width: 768px) {
  .publikasi-section {
    padding: 30px 4%;
  }
  
  .publikasi-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  .publikasi-item {
    max-width: 100%;
    padding: 25px 20px;
  }
  
  .publikasi-item img {
    width: 100px;
    height: 100px;
  }
  
  .publikasi-item h3 {
    font-size: 1.1rem;
  }
  
  .publikasi-item p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .publikasi-section {
    padding: 30px 3%;
  }
  
  .publikasi-title {
    font-size: 1.5rem;
  }
  
  .publikasi-item {
    padding: 20px 15px;
  }
  
  .publikasi-item img {
    width: 90px;
    height: 90px;
  }
  
  .publikasi-item h3 {
    font-size: 1rem;
  }
  
  .publikasi-item p {
    font-size: 0.8rem;
  }
}

/* =================================
   ANIMATIONS
================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10%, -10%);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =================================
   RESPONSIVE DESIGN
================================= */
@media (max-width: 1024px) {
}

@media (max-width: 768px) {
  .laporan {
    display: flex;
  }

  .diseminasi-grid,
  .pengolahan-grid,
  .jaringan-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .laporan {
    display: flex;
  }

  .laporan-img {
    flex: 0.65;
  }

  .laporan-text {
    flex: 0.35;
  }
}

/* =================================
  RESPONSIVE DESIGN UNTUK LAYAR BESAR
================================= */

/* Layar Desktop Besar (1400px - 1599px) */
@media (min-width: 1400px) {
  .laporan {
    max-width: 1400px;
  }

  .laporan-text h1 {
    font-size: clamp(1.8rem, 2.2vw, 2.2rem);
  }

  .laporan-text p {
    font-size: clamp(0.75rem, 1.1vw, 1.1rem);
  }

  .laporan-img img {
    max-width: clamp(70%, 50vw, 80%);
  }

  .welcome-text h1 {
    font-size: clamp(2rem, 2.5vw, 2.5rem);
  }

  .welcome-text p {
    font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  }
}

/* Layar Desktop Sangat Besar (1600px - 1919px) */
@media (min-width: 1600px) {
  .laporan {
    max-width: 1600px;
  }

  .laporan-text h1 {
    font-size: clamp(2.2rem, 2.5vw, 2.5rem);
  }

  .welcome-text h1 {
    font-size: clamp(2.5rem, 3vw, 3rem);
  }
}

/* Layar Ultra Wide (1920px+) */
@media (min-width: 1920px) {
  .laporan {
    max-width: 1800px;
  }

  .laporan-text h1 {
    font-size: clamp(2.5rem, 2.8vw, 2.8rem);
  }

  .welcome-text h1 {
    font-size: clamp(3rem, 3.5vw, 3.5rem);
  }
}