/* =========================================
   HALAMAN: VIDEO PANDUAN
   ========================================= */
.latest-release {
  background-color: #008cba;
  color: white;
  padding: 10px 15px;
  font-size: 1.4rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.anime-list {
  list-style: none;
  padding: 0;
}
.anime-item {
  display: flex;
  background: #fff;
  margin: 30px 0;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  align-items: flex-start;
  flex-wrap: nowrap;
  border: 1px solid #eee;
}
.anime-details {
  line-height: 1.7;
  flex-grow: 1;
}
.anime-details strong {
  font-size: 1.3rem;
  display: block;
  margin-bottom: 10px;
  color: #0077a2;
}
.anime-details p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 5px;
}
.anime-item iframe {
  width: 60%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 5px;
  margin-right: 30px;
  flex-shrink: 0;
  border: none;
}

/* =========================================
   HALAMAN: MATERI (SKP & SSS)
   ========================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  width: 100%;
  padding: 0;
  margin-bottom: 3rem;
}
.gallery figure {
  margin: 0;
  text-align: center;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 15px;
  background-color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.gallery figure a:first-of-type {
  display: block;
  margin-bottom: 15px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  cursor: pointer;
  border: 1px solid #eee;
}
.gallery img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.gallery figcaption {
  font-size: 0.85rem;
  color: #555;
  text-align: left;
  margin-top: 8px;
  padding-top: 0;
  border-top: none;
  line-height: 1.5;
}
.judul-materi {
  font-size: 1.05rem;
  color: #333;
  font-weight: 600;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eee;
  line-height: 1.4;
}
.judul-materi a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}
.judul-materi a:hover {
  color: #047d78;
}

/* =========================================
   HALAMAN: FAQ
   ========================================= */
.main-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  margin-top: 20px;
  padding: 0;
  box-sizing: border-box;
  gap: 2rem;
}
.sidebar {
  width: 280px;
  background: #ffffff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-right: 0;
  flex-shrink: 0;
  align-self: flex-start;
  position: sticky;
  top: 90px;
}
.sidebar ul {
  list-style: none;
  padding: 0;
}
.faq-content-area {
  flex-grow: 1;
  min-width: 0;
}
.faq-container.active {
  display: block;
}
.faq-question {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}
.faq-question .arrow {
  width: 10px;
  height: 10px;
  margin-right: 15px;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  display: inline-block;
  transform: rotate(45deg);
  transition: transform 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-question .arrow {
  transform: rotate(-135deg);
  border-color: #047d78;
}
.faq-answer ol,
.faq-answer ul {
  padding-left: 25px;
  margin: 10px 0;
}
.faq-answer li {
  margin-bottom: 8px;
}
.search-bar {
  margin: 2rem auto 2rem auto;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 700px;
  padding: 0 20px;
  box-sizing: border-box;
}
.search-input {
  width: 100%;
  padding: 12px 18px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 50px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.search-input:focus {
  border-color: #047d78;
  box-shadow: 0 0 0 3px rgba(4, 125, 120, 0.15);
  outline: none;
}

/* PERBAIKAN STYLE FAQ (MODERN & CLEAN) */
.sidebar ul li {
  background: transparent;
  border: none;
  border-radius: 8px;
  margin-bottom: 5px;
  padding: 14px 18px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
  position: relative;
  border-left: 3px solid transparent;
}
.sidebar ul li.active,
.sidebar ul li:hover {
  background-color: #e0f2f1;
  color: #035f5b;
  font-weight: 700;
  border-left: 3px solid #047d78;
}
.faq-container {
  overflow: hidden;
  border: 1px solid #e9ecef;
  width: 100%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 20px;
  display: none;
}
.faq-item {
  background-color: transparent;
  border: none;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 0;
  border-radius: 0;
  overflow: visible;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-toggle-button {
  padding: 18px 20px;
  transition: background 0.2s ease;
  font: inherit;
  color: inherit;
  background-color: transparent;
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  cursor: pointer;
}
.faq-toggle-button:hover {
  background-color: #f8f9fa;
}
.faq-item.open .faq-toggle-button {
  background-color: #eef;
}
.faq-item.open .faq-question {
  color: #047d78;
}
.faq-answer {
  background: transparent;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.8;
  color: #444;
  padding: 0 20px 0 20px;
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}
.faq-item.open .faq-answer {
  padding: 5px 20px 25px 20px;
  display: block;
  max-height: 1000px;
}
.faq-page-main {
  margin-bottom: 3rem;
}

/* =========================================
   HALAMAN: REGULASI
   ========================================= */
.regulasi-section {
  background-color: #ffffff;
}

.regulasi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.regulasi-card a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 2.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: #2c3e50;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  height: 100%;
}

.regulasi-card a:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  border-color: #047d78;
}

.regulasi-card i {
  font-size: 3.5rem;
  color: #047d78;
  margin-bottom: 1.5rem;
}

.regulasi-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

/* =========================================
   HALAMAN: TABEL FASKES (faskessisdmk.html)
   ========================================= */

.table-responsive-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
}

.faskes-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1200px;
}

.faskes-table th,
.faskes-table td {
  padding: 12px 15px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
}

.faskes-table th {
  background-color: #047d78;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.faskes-table td {
  color: #333;
  line-height: 1.5;
}

.faskes-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.faskes-table tbody tr:hover {
  background-color: #e0f2f1;
}

.faskes-table th:first-child,
.faskes-table td:first-child {
  text-align: center;
  width: 50px;
}

.faskes-notes-container {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #f0f4f8;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
}

.faskes-notes-container p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 1rem;
}

.faskes-notes-container p:last-child {
  margin-bottom: 0;
}

.faskes-notes-container a {
  color: #047d78;
  font-weight: 600;
  text-decoration: underline;
}

.faskes-notes-container a:hover {
  color: #035f5b;
}

.loading-cell,
.error-cell {
  text-align: center;
  padding: 3rem 1rem !important;
  font-size: 1rem;
  color: #555;
  font-weight: 500;
}

.error-cell {
  color: #b30000;
}

.loading-cell .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #e0f2f1;
  border-top-color: #047d78;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 0.75rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.pagination-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #555;
}

.pagination-controls button {
  background-color: #047d78;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 8px 14px;
  margin: 0 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.pagination-controls button:hover:not(:disabled) {
  background-color: #035f5b;
  transform: translateY(-2px);
}

.pagination-controls button:disabled {
  background-color: #a7d7c5;
  cursor: not-allowed;
  opacity: 0.7;
}

.pagination-controls #page-info {
  font-weight: 600;
  color: #333;
}

.search-container {
  position: relative;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

#search-input {
  width: 100%;
  padding: 12px 20px 12px 45px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 50px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-appearance: none; /* Untuk browser lama (Safari, dll.) */
  appearance: none; /* Untuk browser modern (Standar W3C) */
}

#search-input:focus {
  border-color: #047d78;
  box-shadow: 0 0 0 3px rgba(4, 125, 120, 0.15);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 1rem;
}

mark {
  background-color: #a7d7c5;
  color: inherit;
  padding: 0.1em 0;
  border-radius: 3px;
}

.no-data-cell {
  text-align: center;
  padding: 3rem 1rem !important;
  font-size: 1rem;
  color: #555;
  font-style: italic;
  font-weight: 500;
}

.faskes-table thead .filter-row td {
  padding: 8px 10px;
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
}

.faskes-table thead .filter-row input {
  width: 100%;
  padding: 8px 10px;
  font-size: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

.faskes-table thead .filter-row input:focus {
  border-color: #047d78;
  box-shadow: 0 0 0 2px rgba(4, 125, 120, 0.15);
  outline: none;
}

.search-results-info {
  text-align: left;
  font-size: 0.9rem;
  color: #555;
  font-weight: 500;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  padding-left: 5px;
}

/* =========================================
   HALAMAN: INFO KOLEGIUM
   ========================================= */

.kolegium-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding-bottom: 2rem;
}

.kolegium-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
  border: 1px solid #eef0f2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-basis: 320px;
  flex-grow: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kolegium-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(4, 125, 120, 0.1);
}

.kolegium-image-wrapper {
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #f8f9fa;
}

.kolegium-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
  box-sizing: border-box;
}

.kolegium-content {
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.kolegium-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.4;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.kolegium-section-divider {
  width: 100%;
  padding: 2.5rem 0 1.5rem 0;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.kolegium-section-divider::before,
.kolegium-section-divider::after {
  content: "";
  flex-grow: 1;
  height: 2px;
  background-color: #e0f2f1;
}

.kolegium-section-divider h2 {
  margin: 0;
  padding: 0;
  font-size: 1.8rem;
  font-weight: 600;
  color: #047d78;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* =========================================
   HALAMAN: TABEL UNDUH FORMAT
   ========================================= */

.download-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
}

.download-table th,
.download-table td {
  padding: 15px 20px;
  text-align: left;
  font-size: 1rem;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

.download-table th {
  background-color: #047d78;
  color: #ffffff;
  font-weight: 600;
  white-space: nowrap;
}

.download-table th:last-child,
.download-table td:last-child {
  text-align: center;
  width: 180px;
}

.download-table tbody tr {
  transition: background-color 0.2s ease;
}

.download-table tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.download-table tbody tr:hover {
  background-color: #e0f2f1;
}

.download-table .service-link {
  padding: 8px 20px;
  font-size: 0.9rem;
  margin: 0;
}

.download-table .service-link i {
  margin-right: 8px;
  margin-left: 0;
}

.faskes-notes-container .service-link {
  color: #ffffff;
  text-decoration: none;
}

.faskes-notes-container .service-link i {
  color: #ffffff;
}

.faskes-notes-container .service-link:hover {
  color: #ffffff;
  background-color: #035f5b;
  text-decoration: none;
}

.soft-divider {
  border: 0;
  height: 1px;
  background-color: #e0e0e0;
  margin: 1.5rem 0;
}

.faskes-notes-container h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.definitions-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.definitions-list li {
  font-size: 0.95rem;
  color: #333;
  padding: 0.75rem 0;
  border-bottom: 1px dashed #e0e0e0;
}

.definitions-list li:last-child {
  border-bottom: none;
}

.definitions-list li strong {
  color: #047d78;
  font-weight: 700;
  margin-right: 0.5rem;
}

.notes-action-area {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

/* ================== */
/* == MEDIA QUERIES == */
/* ================== */

@media (max-width: 991.98px) {
  .main-content {
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
  }
  .sidebar {
    width: 100%;
    margin-bottom: 0;
    position: static;
    top: auto;
  }
}

@media (max-width: 768px) {
  .anime-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .anime-item iframe {
    width: 100%;
    max-width: 540px;
    margin-right: 0;
    margin-bottom: 15px;
  }
  .anime-details {
    width: 100%;
  }
  .latest-release {
    font-size: 1.2rem;
  }
  .anime-details strong {
    font-size: 1.1rem;
  }
  .anime-details p {
    font-size: 0.95rem;
  }
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }
  .judul-materi {
    font-size: 1rem;
  }
  .gallery figcaption {
    font-size: 0.8rem;
  }
  .faq-page-main .container {
    padding: 0 1rem;
  }
  .sidebar ul li {
    padding: 10px 12px;
    font-size: 0.95rem;
  }
  .faq-question {
    font-size: 1rem;
  }
  .faq-toggle-button {
    padding: 12px 15px;
  }
  .faq-answer {
    font-size: 0.9rem;
  }
  .search-input {
    font-size: 0.9rem;
    padding: 10px 15px;
  }
  .search-bar {
    margin: 1.5rem auto;
    padding: 0 10px;
  }
  #search-input {
    font-size: 0.9rem;
    padding: 10px 15px 10px 40px;
  }
  .search-icon {
    left: 15px;
    font-size: 0.9rem;
  }
  .search-container {
    margin-bottom: 1.5rem;
  }
  .kolegium-section-divider h2 {
    font-size: 1.4rem;
  }
  .kolegium-section-divider {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .anime-item {
    padding: 15px;
  }
  .latest-release {
    font-size: 1.2rem;
  }
  .anime-details strong {
    font-size: 1rem;
  }
  .anime-details p {
    font-size: 0.85rem;
  }
  .gallery {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .pagination-controls {
    justify-content: space-between;
  }
  .pagination-controls #page-info {
    margin: 0 5px;
    font-size: 0.85rem;
  }
  .pagination-controls button {
    padding: 7px 10px;
    font-size: 0.85rem;
  }
}

/* Tabel Unduh Format - Responsif */
@media (max-width: 768px) {
  .download-table.table-responsive-wrapper {
    overflow-x: hidden;
    border: none;
    box-shadow: none;
    background-color: transparent;
  }

  .download-table {
    min-width: 0;
  }

  .download-table thead {
    display: none;
  }

  .download-table tr {
    display: block;
    width: 100%;
    background-color: #ffffff;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    overflow: hidden;
  }

  .download-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-bottom: none;
    text-align: center;
  }

  .download-table td:first-child {
    font-weight: 600;
    color: #333;
    padding: 1.25rem 1rem 0.5rem 1rem;
    font-size: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
  }

  .download-table td:last-child {
    padding: 1rem;
    width: 100%;
    text-align: center;
  }

  .download-table .service-link {
    display: inline-block;
    width: auto;
  }

  .download-table tbody tr:nth-child(even) {
    background-color: #ffffff;
  }
}
