/* Reset dasar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #4f46e5, #3b82f6);
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Navbar */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0px 6px 14px rgba(0,0,0,0.15);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo + Nama */
.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.school-name {
  font-size: 22px;
  font-weight: 700;
  color: #1e40af;
}

/* Menu Desktop */
.nav-menu {
  display: flex;
  gap: 25px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu .nav-item a {
  text-decoration: none;
  color: #1e40af;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.nav-menu .nav-item a:hover {
  background-color: #4338ca;
  color: #fff;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  z-index: 10001;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #1e40af;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Hamburger aktif = animasi X */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    z-index: 10010; /* di atas navbar */
  }

  .nav-menu {
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 70px 20px 20px; /* space untuk navbar */
    gap: 20px;
    z-index: 10005; /* di atas navbar tapi di bawah hamburger */
    
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none; /* agar tidak bisa diklik saat hidden */
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }

  .nav-menu.active {
    max-height: 100vh;
    opacity: 1;
    pointer-events: auto; /* enable klik saat active */
  }

  /* overlay untuk mencegah scroll background */
  body.menu-open {
    overflow: hidden;
  }

  .nav-menu a {
    position: relative;
    z-index: 10006; /* pastikan link di atas background menu */
  }
}




/* 🔹 Hero Section */
.hero {
  text-align: center;
  padding: 70px 20px 40px; /* lebih tinggi */
  color: white;
}

.hero h2 {
  font-size: 36px; /* lebih besar */
  font-weight: 800;
  margin-bottom: 15px;
}

.hero h2 span {
  color: #ffdd57;   /* kuning */
  font-weight: 900;  /* bold */
}

.hero p {
  font-size: 18px; /* lebih besar */
  opacity: 0.95;
}



/* 🔹 Container (Card Pencarian) */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
}

.container {
  background: white;
  padding: 40px 35px;
  border-radius: 20px;
  box-shadow: 0px 12px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 500px; /* biar lega */
  width: 100%;
}


/* Input & Select & Button */
input, button, select {
  padding: 16px; /* lebih nyaman */
  margin: 12px 0;
  width: 100%;
  border-radius: 10px;
  font-size: 16px;
}

input {
  border: 1px solid #ccc;
  text-align: center;
}
button {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: white;
  border: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}
button:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #1e40af, #2563eb);
}
select {
  border: 1px solid #ccc;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 16px;
}

/* 🔹 Popup (Card Hasil Pencarian) */
/* Popup overlay */
.popup {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0; 
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000; /* lebih tinggi dari navbar */
  overflow-y: auto; /* biar scroll bisa di mobile */
  padding: 20px; /* jarak dari pinggir layar */
}

.popup.active {
  opacity: 1; 
  visibility: visible;
}

/* Popup Card */
.popup-content {
  background: #fff;
  padding: 25px 30px;
  border-radius: 15px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  animation: fadeInUp 0.4s ease;
  z-index: 10001; /* memastikan content di atas overlay */
}

/* Header */
.popup-header {
  text-align: center;
  margin-bottom: 20px;
}

.popup-header h3 {
  margin: 0;
  font-size: 20px;
  color: #1e40af;
}

.watermark {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

/* Body */
.popup-body p {
  margin: 10px 0;
  font-size: 15px;
  color: #333;
  display: flex;
  align-items: center;
}

.popup-body i {
  margin-right: 8px;
  color: #1e40af;
}

/* Status khusus */
.status-line span {
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 6px;
}

.status-line span.red { background: #fee2e2; color: #b91c1c; }
.status-line span.blue { background: #dbeafe; color: #1e40af; }
.status-line span.gray { background: #f3f4f6; color: #374151; }

/* Tombol close */
.close-btn {
  position: absolute;
  top: 12px; 
  right: 15px;
  font-size: 20px;
  color: #888;
  cursor: pointer;
  transition: 0.3s;
}

.close-btn:hover {
  color: #1e40af;
}

/* Animasi */
@keyframes fadeInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Body pakai tabel */
.popup-body table {
  width: 100%;
  border-collapse: collapse;
}

.popup-body th,
.popup-body td {
  text-align: left;
  padding: 8px 10px;
  font-size: 15px;
}

.popup-body th {
  width: 35%;
  color: #1f2937;
  font-weight: 600;
}

.popup-body td {
  color: #374151;
}

/* Garis pemisah */
.popup-body tr:not(:last-child) td,
.popup-body tr:not(:last-child) th {
  border-bottom: 1px solid #f1f5f9;
}

/* Efek hover baris */
.popup-body tr:hover {
  background: #f9fafb;
}





.loading {
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.loading.show {
  display: flex;
  opacity: 1;
}
.bounce {
  width: 12px;
  height: 12px;
  margin: 5px;
  background-color: #2563eb;
  border-radius: 50%;
  animation: bounce 1.5s infinite ease-in-out both;
}
.bounce:nth-child(1) { animation-delay: -0.3s; }
.bounce:nth-child(2) { animation-delay: -0.15s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}


/* 🔹 Watermark */
.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 45px;
  color: rgba(0, 0, 0, 0.08);
  font-weight: bold;
  pointer-events: none;
}

/* 🔹 Footer */
.footer {
  text-align: center;
  padding: 15px;
  font-size: 13px;
  background: rgba(255,255,255,0.9);
  color: #333;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}


.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 45px;
  color: rgba(0, 0, 0, 0.08);
  font-weight: bold;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  text-align: center;
}
.popup > *:not(.watermark) {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  body {
    height: auto;
    padding: 10px;
  }
  .container { width: 90%; padding: 15px; }
  .popup { width: 90%; }
}

/* 🔹 Berita Section */
.berita {
  padding: 30px 20px;
  background: #f9fafb;
  text-align: center;
}

.berita h2 {
  color: #1e40af;  /* warna utama */
  font-size: 24px;
  margin-bottom: 20px;
  display: inline-block;
}

.berita-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.berita-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: 0.3s;
}

.berita-card:hover {
  transform: translateY(-6px);
}

.berita-card img {
  width: 100%;
  aspect-ratio: 1 / 1; 
  object-fit: cover;
}

.berita-card .tanggal {
  padding: 8px 12px;
  font-size: 12px;
  color: #555;
  background: #f0f0f0;
  text-align: left;
}

.berita-card .judul {
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1e40af;  /* warna utama */
  text-align: left;
}

.berita-card .deskripsi {
  padding: 0 12px 12px;
  font-size: 14px;
  color: #444; /* sedikit lebih gelap dari sebelumnya */
  text-align: left;
  line-height: 1.5;
}
/* Efek shake input */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.4s;
  border: 2px solid red; /* optional, biar kelihatan error */
}
.typing-text {
  font-size: 16px;
  font-weight: 600;
  color: #fbfbfc;
  white-space: nowrap;  /* default desktop */
  border-right: 2px solid #1e40af;
  padding-right: 5px;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  letter-spacing: 0.5px;
  display: inline-block;
  animation: blink-cursor 0.75s step-end infinite;
}

/* Animasi kursor berkedip */
@keyframes blink-cursor {
  from { border-color: #1e40af; }
  to { border-color: transparent; }
}

/* Responsif untuk layar kecil (mobile) */
@media (max-width: 768px) {
  .typing-text {
    font-size: 14px;
    padding-right: 3px;
    white-space: normal;  /* memungkinkan pindah baris */
  }
}

@media (max-width: 480px) {
  .typing-text {
    font-size: 12px;
    padding-right: 2px;
    white-space: normal;  /* pindah baris otomatis */
  }
}
.main-area {
  position: relative;
  min-height: 400px; /* biar ada tinggi default */
  padding: 40px 20px;
  overflow: hidden;
}

.lottie-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* di belakang */
  pointer-events: none; /* biar nggak ganggu klik */
}

.container {
  position: relative;
  z-index: 1; /* biar muncul di atas lottie */
  background: rgba(255, 255, 255, 0.85); /* semi transparan biar teks jelas */
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


/* 🔹 Undangan Section */
.undangan {
  padding: 30px 20px;
  background: #f9fafb; /* sama kayak berita */
  text-align: center; /* 🔹 biar kontennya rata tengah */
}

.undangan h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 1rem;

  /* 🔹 bikin ikon + teks sejajar & center */
  display: inline-flex;  
  align-items: center;
  justify-content: center;
  gap: 8px;
}


.undangan .form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1rem;
}

.undangan select,
.undangan input {
  padding: 10px 12px;
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 8px;
  flex: 1 1 250px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.undangan select:focus,
.undangan input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
  outline: none;
}

.undangan button {
  background: #4f46e5; /* indigo-600 */
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  flex: 0 0 auto;
  transition: background 0.25s, transform 0.2s;
}

.undangan button:hover {
  background: #4338ca; /* indigo-700 */
  transform: translateY(-2px);
}


/* 🔹 Hasil Undangan (Table) */
.undangan-result {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  overflow-x: auto; /* scroll horizontal kalau perlu */
}

.undangan-result table {
  width: 100%;
  max-width: 900px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.undangan-result thead {
  background: #4f46e5; /* Indigo */
  color: #fff;
}

.undangan-result th,
.undangan-result td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #e5e7eb; /* gray-200 */
}

.undangan-result tbody tr:hover {
  background: #f9fafb;
  transition: background 0.2s;
}

.undangan-result th:first-child,
.undangan-result td:first-child {
  border-left: none;
}

.undangan-result td a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4f46e5;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
}

.undangan-result td a:hover {
  background: #4338ca;
}

/* 🔹 Responsif untuk HP (stacked cards) */
@media (max-width: 640px) {
  .undangan-result table,
  .undangan-result thead,
  .undangan-result tbody,
  .undangan-result th,
  .undangan-result td,
  .undangan-result tr {
    display: block;
    width: 100%;
  }

  .undangan-result thead {
    display: none; /* sembunyikan header */
  }

  .undangan-result tr {
    margin-bottom: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 10px;
  }

  .undangan-result td {
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
  }

  .undangan-result td:last-child {
    border-bottom: none;
  }

  .undangan-result td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #374151; /* gray-700 */
    flex: 1;
    text-align: left;
  }

  .undangan-result td a {
    margin-top: 4px;
    font-size: 12px;
    padding: 5px 10px;
  }
}

/* 🔹 Modal Background */
.modal-undangan {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* 🔹 Saat aktif */
.modal-undangan.active {
  opacity: 1;
  pointer-events: auto;
}

/* 🔹 Box utama */
.modal-content {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 1.5rem;
  width: 95%;
  max-width: 600px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: slideUp 0.35s ease;
  position: relative;
  padding: 2rem 2.5rem;
}

/* 🔹 Tombol close elegan */
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: all 0.25s ease;
  z-index: 10;
}

.modal-close:hover {
  background: #6366f1;
  color: #fff;
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}


/* 🔹 Animasi muncul */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 🔹 Isi undangan */
.modal-undangan h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
}

.modal-undangan .detail {
  background: #f9fafb;
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.2rem;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.03);
}

.modal-undangan .detail p {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  color: #374151;
}

.modal-undangan .btn-unduh {
  background: #4f46e5;
  color: white;
  font-weight: 500;
  border-radius: 1rem;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.25s ease;
}
.modal-undangan .btn-unduh:hover {
  background: #4338ca;
}



/* 🔹 Sembunyikan default */
.undangan-hidden {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}


.fade-in {
    transition: opacity 0.3s ease, transform 0.3s ease;
  }


/* Warna default */
#layananSelect {
  color: #374151; /* text-gray-700 */
}
