/* ==================================== */
/* 1. VARIABEL & RESET DASAR            */
/* ==================================== */
:root {
  --primary-color: #3498db;
  --accent-color: #e74c3c;
  --light-bg: #f7f7f7;
  --dark-footer: #34495e;
  --text-dark: #2c3e50;
  --text-light: #ffffff;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Poppins", sans-serif, Arial;
  color: var(--text-dark);
  background-color: var(--light-bg);
  line-height: 1.6;

  /* SOLUSI KUAT 1: JAMINAN CONTENT TIDAK TERTUTUP HEADER */
  padding-top: 75px !important;
}
a {
  text-decoration: none;
  color: var(--primary-color);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.section-spacing {
  padding: 60px 0;
}
.card {
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.alert {
  padding: 15px;
  border-radius: 5px;
}
.alert-info {
  background-color: #d9edf7;
  color: #31708f;
  border: 1px solid #bce8f1;
}
.alert-warning {
  background-color: #fcf8e3;
  color: #8a6d3b;
  border: 1px solid #faebcc;
}

/* ==================================== */
/* 2. HEADER NAVIGASI MELAYANG          */
/* ==================================== */

/* SOLUSI KUAT 2: JAMINAN FIXED POSITION UNTUK NAVBAR (TOMBOL FITUR) */
.app-fixed-header {
  position: fixed !important; /* Paling kuat */
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1050 !important; /* Di atas segalanya */

  /* Styling Awal dan Transisi */
  padding-top: 15px;
  padding-bottom: 15px;
  transition: all 0.3s ease-in-out;
}

/* Efek Navbar Saat Scroll (dipicu oleh JS: navbar.classList.add("navbar-scrolled")) */
#mainNavbar.navbar-scrolled {
  padding-top: 8px;
  padding-bottom: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

/* ==================================== */
/* 3. TOMBOL BACK TO TOP                */
/* ==================================== */
#backToTopBtn {
  position: fixed; /* Jaminan melayang di layar */
  bottom: 20px;
  right: 20px;
  z-index: 999;
  border: none;
  outline: none;
  background-color: var(--primary-color, #3498db);
  color: white;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 50%;
  font-size: 1.2em;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s,
    visibility 0.5s,
    transform 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
#backToTopBtn.show {
  opacity: 1;
  visibility: visible;
}
#backToTopBtn:hover {
  background-color: var(--accent-color, #e74c3c);
  transform: scale(1.05);
}

/* ==================================== */
/* 4. STYLE LAINNYA (DIRAPIKAN)         */
/* ==================================== */

/* --- STYLE KHUSUS BANNER --- */
.page-hero-banner {
  height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}
.overlay-dark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}
.custom-caption {
  z-index: 2;
  bottom: 0 !important;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
}
.banner-sapaan {
  font-family: "Brush Script MT", "Brush Script Std", cursive;
  font-size: 3.5rem;
  font-weight: normal;
  color: #ffffff;
  margin-bottom: 5px;
  line-height: 1.2;
}
.banner-intro {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 5px;
  color: #f0f0f0;
}
.banner-judul {
  font-family: "Poppins", sans-serif;
  font-size: 3rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #f1c40f;
  margin-bottom: 15px;
}
.banner-alamat {
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 5px 15px;
  border-radius: 20px;
  color: #ddd;
  margin-top: 10px;
}
@media (max-width: 768px) {
  .banner-sapaan {
    font-size: 2.5rem;
  }
  .banner-intro {
    font-size: 1rem;
  }
  .banner-judul {
    font-size: 1.8rem;
  }
  .banner-alamat {
    font-size: 0.75rem;
  }
  #menu-intro,
  #profil-intro,
  #layanan-intro {
    margin-top: -60px !important;
  }
}

/* --- STYLE SECTION UTAMA & ANIMASI --- */
.profile-section,
.layanan-list,
.program-content {
  margin-top: 30px;
  padding: 40px;
  border-radius: 10px;
  background-color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}
.animate-slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.profile-section.bg-light {
  background-color: var(--light-bg);
}
.section-heading-left {
  font-size: 1.8em;
  border-left: 5px solid var(--primary-color);
  padding-left: 15px;
  margin-bottom: 30px;
}
.profile-page-content {
  padding-top: 0 !important;
  padding-bottom: 80px;
}
.page-title {
  font-size: 2.5em;
  margin-bottom: 5px;
  color: var(--text-dark);
}
.page-subtitle {
  font-size: 1.1em;
  color: #7f8c8d;
  margin-bottom: 30px;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- STYLE PROFIL TAB NAVIGASI --- */
#menu-intro,
#profil-intro,
#layanan-intro {
  z-index: 10;
  position: relative;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.profile-nav-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 50px;
  padding: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
}
.profile-nav-tabs .nav-tab {
  white-space: nowrap;
  padding: 8px 15px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s;
  border: 1px solid transparent;
  color: var(--text-dark);
}
.profile-nav-tabs .nav-tab:hover,
.profile-nav-tabs .nav-tab.active {
  background-color: var(--primary-color, #3498db);
  color: white;
  border-color: var(--primary-color, #3498db);
}
.nav-tab {
  padding: 10px 20px;
  border-radius: 20px;
  background-color: var(--light-bg);
  color: var(--text-dark);
  font-weight: 600;
  transition:
    background-color 0.3s,
    color 0.3s,
    transform 0.2s;
}
.nav-tab:hover,
.nav-tab.active {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.5);
}

/* --- STYLE DETAIL PROFIL --- */
.info-detail-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 15px 20px;
  border-left: 3px solid #eee;
  padding-left: 20px;
}
.info-detail-grid div strong {
  color: var(--primary-color);
}
.visi-text {
  font-style: italic;
  font-size: 1.1em;
  padding: 15px;
  border-left: 5px solid var(--accent-color);
  margin-bottom: 25px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.misi-list {
  list-style: none;
  padding: 0;
}
.misi-list li {
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}
.misi-list li i.bi-check-circle-fill {
  color: #27ae60;
  margin-right: 10px;
  font-size: 1.1em;
}
.pejabat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}
.pejabat-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}
.pejabat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.pejabat-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s;
}
.pejabat-card:hover .pejabat-photo {
  filter: grayscale(0%);
}
.pejabat-info h4 {
  font-size: 1.1em;
  margin-bottom: 5px;
  color: var(--primary-color);
}
.pejabat-info .jabatan {
  font-size: 0.9em;
  color: #7f8c8d;
}
.prestasi-list {
  display: grid;
  gap: 20px;
}
.prestasi-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px dashed #eee;
  transition: background-color 0.3s;
}
.prestasi-tahun {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--accent-color);
  padding: 10px 15px;
  border-radius: 4px;
  background-color: #fcebeb;
  margin-right: 20px;
  flex-shrink: 0;
}

/* --- STYLE PORTAL APLIKASI --- */
.app-portal-item {
  display: block;
  text-decoration: none;
  color: var(--text-dark);
  transition: transform 0.3s;
  padding: 10px;
}
.app-portal-item:hover {
  transform: translateY(-5px);
  color: var(--primary-color);
}
.app-icon {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  transition: box-shadow 0.3s;
}
.app-portal-item:hover .app-icon {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.app-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 5px;
}
.btn-outline-custom {
  border: 1px solid #ccc;
  color: #333;
  background: white;
  padding: 10px 40px;
  border-radius: 5px;
  font-weight: 500;
  transition: 0.3s;
}
.btn-outline-custom:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}
.menu-card:hover {
  transform: scale(1.05);
}
.teal-bg {
  background-color: #16a085;
}
.red-bg {
  background-color: #e74c3c;
}
.orange-bg {
  background-color: #f39c12;
}
.purple-bg {
  background-color: #8e44ad;
}
.news-card {
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.news-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
