/* ============================================================
   index.css — khusus halaman index.php
   Berisi: search form, grid galeri, kartu, dan footer
============================================================ */

/* ============================================================
   HEADER HALAMAN / SEARCH
============================================================ */
.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.search-form {
  max-width: 620px;
  margin: 0 auto 18px;
}

.search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #1e5fa8;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(30, 95, 168, 0.15);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.search-box:focus-within {
  box-shadow: 0 6px 20px rgba(30, 95, 168, 0.35);
  transform: translateY(-2px);
}

.search-icon {
  padding: 0 14px;
  font-size: 18px;
  color: #1e5fa8;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 10px;
  font-size: 15px;
  background: transparent;
  color: #222;
  font-family: inherit;
}

.search-input::placeholder { color: #9aa0a8; }

.search-btn {
  border: none;
  background: #1e5fa8;
  color: #fff;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease;
  font-family: inherit;
}

.search-btn:hover { background: #14457a; }

@media (max-width: 560px) {
  .search-btn { padding: 14px 18px; font-size: 14px; }
  .search-input { font-size: 14px; padding: 12px 6px; }
}

/* ============================================================
   GRID GALERI (index.php)
============================================================ */
.gallery {
  display: grid;
  /* auto-fill: kolom kosong tetap dipertahankan agar card tidak melebar */
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto 1rem;
  /* Pastikan card tidak melebar berlebihan jika hanya 1 item */
  align-items: start;
}

.card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 25px -8px rgba(0, 20, 40, 0.15);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  border: 1px solid #e3ebf5;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 30px -12px rgba(0, 30, 60, 0.25);
}

.image-wrapper {
  padding: 1.2rem 1.2rem 0.5rem;
  background: #e8f0fe;
  position: relative;
}

/* Ganti dari ".image-wrapper img" menjadi: */
.image-wrapper > img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

/* ============================================================
   HOVER SLIDESHOW PREVIEW
============================================================ */
.hover-slideshow {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  background: #dbe7f7;
}

.hover-slideshow img.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
  border-radius: 0;
  box-shadow: none;
}

.hover-slideshow img.slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Zoom halus saat kartu di-hover */
.card:hover .hover-slideshow img.slide.active {
  transform: scale(1.05);
}

/* Dot indikator */
.slide-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
  pointer-events: none;
}

.card:hover .slide-dots {
  opacity: 1;
}

.slide-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.25s ease, transform 0.25s ease;
}

.slide-dots .dot.active {
  background: #fff;
  transform: scale(1.4);
}

/* Badge count tetap di atas slideshow */
.image-wrapper .badge-count {
  z-index: 4;
}

@media (max-width: 560px) {
  .hover-slideshow { height: 180px; border-radius: 14px; }
  .slide-dots { bottom: 6px; gap: 4px; padding: 3px 7px; }
}

/* Badge jumlah gambar di card */
.badge-count {
  position: absolute;
  bottom: 18px;
  right: 22px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.info h2 {
  font-size: 1.4rem;
  color: #0f1c2e;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  font-size: 0.88rem;
  color: #3e5a7a;
  background: #f0f6ff;
  padding: 0.6rem 0.9rem;
  border-radius: 40px;
  border: 1px solid #d2e0f0;
}

.meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta i {
  font-style: normal;
  color: #1f4a7a;
}

.description {
  color: #2b3e58;
  line-height: 1.55;
  font-size: 0.95rem;
  border-left: 4px solid #9bb9e0;
  background: #f9fcff;
  padding: 0.8rem 1rem;
  border-radius: 0 10px 10px 0;
}

.btn-detail {
  display: inline-block;
  margin-top: auto;
  padding: 0.65rem 1.2rem;
  background: #1e5fa8;
  color: #fff;
  text-decoration: none;
  border-radius: 40px;
  font-weight: 500;
  text-align: center;
  transition: background 0.2s;
}

.btn-detail:hover { background: #14457a; }

/* Info uploader di card */
.uploader {
  font-size: 0.83rem;
  color: #4b5b73;
  background: #f9fcff;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 1px dashed #c2d6ed;
  display: inline-block;
}

.uploader strong { color: #1e5fa8; }

/* ============================================================
   FOOTER (khusus index.php)
============================================================ */
.site-footer {
  width: auto;
  display: block;
  background: #111418;
  background-image: linear-gradient(180deg, #16191f 0%, #0c0e12 100%);
  color: #c9cdd4;
  margin-top: 60px;
  border-top: 3px solid #1e5fa8;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  box-sizing: border-box;
  /* keluar dari padding body */
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  margin-bottom: -2rem;
}

.footer-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 55px 40px 35px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.3fr;
  gap: 45px;
  box-sizing: border-box;
}

.footer-col h3 {
  color: #fff;
  font-size: 23px;
  margin: 0 0 15px;
  letter-spacing: 0.5px;
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  margin: 0 0 18px;
  position: relative;
  padding-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  background: #1e5fa8;
  border-radius: 2px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  color: #9aa0a8;
  margin: 0 0 18px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
  font-size: 14px;
}

.footer-col ul li a {
  color: #9aa0a8;
  text-decoration: none;
  transition: all 0.25s ease;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: #1e5fa8;
  transform: translateX(4px);
}

.footer-contact li {
  color: #9aa0a8;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #1e222a;
  border-radius: 50%;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #2a2f38;
}

.footer-social a:hover {
  background: #1e5fa8;
  border-color: #1e5fa8;
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(30, 95, 168, 0.4);
}

.footer-bottom {
  width: 100%;
  border-top: 1px solid #22262e;
  background: #0a0c0f;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 20px 40px;
  font-size: 13px;
  color: #7d838c;
}

.footer-bottom p { margin: 0; }
.footer-bottom strong { color: #fff; }

.footer-tagline {
  color: #1e5fa8;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Responsive footer */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 45px 25px 25px;
  }
  .footer-bottom { padding: 18px 25px; }
}

@media (max-width: 560px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 20px 20px;
  }
  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .footer-social { justify-content: center; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 18px 20px;
  }
}