@import url("https://fonts.googleapis.com/css2?family=Paprika&display=swap");
:root {
  --color-primary: #0c519b;
  --color-warning: #ffc107;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: "Inter", sans-serif;
  scroll-behavior: smooth;
  color: #333;
}

/* ==================================== */
/* HERO SECTION & OVERLAYS */
/* ==================================== */
.hero-background {
  background: url("../img/hero.jpg") no-repeat center center / cover;
  min-height: 100vh;
  position: relative;
}

.hero-overlay {
  background-color: rgba(0, 0, 0, 0.45);
  position: absolute;
  inset: 0;
  z-index: 10;
}

.font-poppins {
  font-family: "Poppins", sans-serif;
}

.text-shadow {
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* ==================================== */
/* HERO CONTENT WITH CARD CAROUSEL */
/* ==================================== */
.hero-content-wrapper {
  position: absolute;
  top: 60%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 20;
  padding: 0 15px;
}

.hero-main-text {
  padding-right: 2rem;
}

/* Hero Cards Carousel */
.hero-card {
  position: relative;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.hero-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-card:hover .hero-card-img {
  transform: scale(1.1);
}

.hero-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 1.5rem 1.2rem;
  display: flex;
  align-items: flex-end;
}

.hero-card-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Carousel Controls */
.hero-carousel-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-warning);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.hero-carousel-btn:hover {
  background-color: #ffb300;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(255, 193, 7, 0.4);
}

.hero-carousel-btn i {
  width: 24px;
  height: 24px;
  color: #333;
}

/* Hide default carousel controls */
#heroCardCarousel .carousel-control-prev,
#heroCardCarousel .carousel-control-next {
  display: none;
}

/* ==================================== */
/* NAVBAR & HEADER (Base/Shared Style) */
/* ==================================== */

/* Mengurangi padding vertikal di container navigasi */
.container.position-relative.py-3 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* Penyesuaian untuk Navbar agar logo dan menu sebaris */
.navbar {
  padding: 0 !important; /* Hapus padding default navbar Bootstrap */
}

/* Penyesuaian Link Navigasi */
.nav-link {
  position: relative;
  transition: color 0.18s ease-in-out;
  /* Padding vertikal link navigasi dikurangi agar lebih ringkas */
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  font-family: "Poppins", sans-serif;
  color: inherit;
  display: inline-block;
  margin: 0 !important; /* Hapus margin default */
}

.nav-link,
.dropdown-toggle {
  background: transparent !important;
  -webkit-tap-highlight-color: transparent;
}
.nav-link:focus,
.nav-link:active,
.nav-link:focus-visible,
.dropdown-toggle:focus,
.dropdown-toggle:active,
.dropdown-toggle:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.nav-link .nav-text {
  position: relative;
  display: inline-block;
}
.nav-link .nav-text::after {
  content: "";
  position: absolute;
  left: 50%;
  /* Posisikan garis bawah di bawah teks */
  bottom: 0px;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background-color: #fff;
  transform-origin: center;
  opacity: 0;
  border-radius: 1px;
}
.nav-link:hover .nav-text::after,
.nav-link.active .nav-text::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.4rem;
  vertical-align: middle;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #fff;
  transition: transform 0.25s ease;
}

.show > .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  left: 50%;
  min-width: 20px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  padding: 0.35rem 0;
}

.dropdown.show .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Dropdown item */
.dropdown-menu .dropdown-item {
  padding: 10px 16px;
  font-size: 14px;
  color: #333;
  transition: background 0.18s;
  color: 0.18s;
  border-radius: 6px;
}

.dropdown-menu .dropdown-item:hover {
  background: #f8f9fa;
  color: var(--color-primary);
}

/* Hover card animasi */
.news-card,
.card.shadow-sm {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.25s ease;
}
.news-card:hover,
.card.shadow-sm:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
}

/* Tombol utama */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #0a3f78;
  border-color: #0a3f78;
}

.btn-warning {
  background-color: var(--color-warning);
  border-color: var(--color-warning);
  color: #333;
}

.btn-warning:hover,
.btn-warning:focus {
  background-color: #ffb300;
  border-color: #ffb300;
  color: #333;
}

footer {
  background-color: var(--color-warning);
  color: #fff;
}

footer a {
  color: #fff;
}

.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  height: 100vh;
  z-index: 20;
}

.hero-section .container {
  text-align: center;
  position: relative;
  z-index: 15;
}

.hero-section .display-5 {
  color: #fff;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-align: center;
}
.hero-section p {
  color: #fff;
  opacity: 0.95;
}

.hero-section .btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  padding: 0.9rem 1.8rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(12, 81, 155, 0.15);
  transition: all 0.25s ease;
}
.hero-section .btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(12, 81, 155, 0.3);
}

/* ==================================== */
/* HAMBURGER MENU STYLES (for Mobile/Tablet) */
/* ==================================== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background-color: #fff;
  color: #333;
  padding: 20px;
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 3000;
  overflow-y: auto;
}

.mobile-menu.show {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.mobile-nav-link {
  display: block;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link:hover {
  color: var(--color-primary);
  background-color: #f8f8f8;
}

.mobile-dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-left: 15px;
}

.mobile-dropdown-menu.open {
  max-height: 300px;
}

.mobile-dropdown-item {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: #555;
  text-decoration: none;
}

.mobile-dropdown-item:hover {
  color: var(--color-primary);
}

.no-scroll {
  overflow: hidden;
}
.rotate-180 {
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

/* ==================================== */
/* MEDIA QUERY: DESKTOP (Min-width 992px) */
/* ==================================== */
@media (min-width: 996px) {
  .container.position-relative.py-3 {
    display: block;
    padding-top: 0.1rem !important;
    padding-bottom: 0.2rem !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* HEADER BLOCK (LOGO + TEXT): Rata Kiri dengan margin khusus */
  #navbar-header {
    margin-left: 12rem !important;
    margin-top: 1rem !important;
    /* Memastikan logo dan teks rata kiri */
    justify-content: flex-start !important;
    transform: none !important;
    width: 100%;
  }

  /* NAVIGASI UTAMA: Rata Tengah di bawah header */
  #main-navigation {
    margin-top: 0.2rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
  }

  /* Ukuran font link navigasi dikecilkan */
  .nav-link {
    font-size: 0.95rem;
  }

  /* Jarak antar item menu dibuat lebih rapat */
  .nav-link.px-3 {
    padding-left: 0.8rem !important;
    padding-right: 0.8rem !important;
  }

  /* Ukuran teks logo di desktop dikecilkan */
  .d-flex.flex-column.ms-1 span {
    font-size: 0.9rem;
    line-height: 1.1;
  }

  /* Ukuran logo di desktop dikecilkan */
  .d-flex.align-items-center.text-white.text-decoration-none img {
    height: 38px !important;
  }

  /* Dropdown agar pas di bawah menu utama */
  .dropdown-menu {
    transform: translateX(-50%) translateY(8px);
    min-width: 180px;
    font-size: 0.95rem;
  }

  /* Card tampilan sejajar rapi */
  .card {
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease-in-out;
  }

  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }

  /* Footer tampak proporsional di layar besar */
  footer {
    padding: 60px 80px;
    font-size: 1rem;
  }

  /* Container lebar maksimum */
  .container {
    max-width: 1300px;
  }

  /* Hero Cards - 3 columns on desktop */
  .hero-card {
    height: 320px;
  }

  /* Menghapus aturan lama yang tidak diperlukan lagi atau bentrok */
  #main-header-nav {
    margin-left: initial;
  }
}

/* ==================================== */
/* MEDIA QUERY: TABLET (768px - 991px) */
/* ==================================== */
@media (min-width: 768px) and (max-width: 995px) {
  /* PERBAIKAN: Tambahkan padding untuk menjamin jarak antar tombol dan tepi layar */
  #navbar-header {
    padding: 0 1rem;
    margin-top: 0.5rem;
  }

  /* Pastikan Logo terlihat jelas di kanan */
  a.d-flex.align-items-center {
    padding-left: 0.5rem;
    padding-right: 0;
  }

  /* Warna icon hamburger */
  .navbar-toggler i {
    color: #fff !important;
    font-size: 1.5rem;
  }

  /* Memastikan tombol toggler sendiri juga terlihat */
  .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.25rem 0.5rem;
    border-radius: 0.4rem;
  }

  /* Hero content stacked vertically */
  .hero-content-wrapper {
    padding: 0 2rem;
  }

  .hero-main-text {
    text-align: center;
    padding-right: 0;
    margin-bottom: 3rem;
  }

  /* Hero Cards - 2 columns on tablet */
  .hero-card {
    height: 240px;
  }

  /* Show only 2 cards, hide the third */
  #heroCardCarousel .col-md-4:nth-child(3) {
    display: none;
  }

  #heroCardCarousel .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .hero-carousel-controls {
    margin-top: 1.5rem;
  }

  .hero-carousel-btn {
    width: 44px;
    height: 44px;
  }
}

/* ==================================== */
/* MEDIA QUERY: MOBILE (max-width: 767px) */
/* ==================================== */
@media (max-width: 767px) {
  /* PERBAIKAN: Tambahkan padding untuk menjamin jarak antar tombol dan tepi layar */
  #navbar-header {
    padding: 0 1rem;
    margin-top: 0.5rem;
  }

  /* Kecilkan logo di HP dan pastikan tata letak flex-nya benar */
  a.d-flex.align-items-center {
    flex-shrink: 0;
    padding-left: 0.5rem;
    padding-right: 0;
  }

  /* Kecilkan gambar logo di HP */
  a.d-flex.align-items-center img {
    height: 32px !important;
  }

  /* Kecilkan teks di bawah logo */
  .d-flex.flex-column.ms-1 span {
    font-size: 0.75rem !important;
    line-height: 1.1;
  }

  /* Warna icon hamburger */
  .navbar-toggler i {
    color: #fff !important;
    font-size: 1.4rem;
  }

  /* Memastikan tombol toggler sendiri juga terlihat */
  .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.2rem 0.4rem;
    border-radius: 0.3rem;
  }

  /* Hero content stacked vertically */
  .hero-content-wrapper {
    padding: 0 1rem;
  }

  .hero-main-text {
    text-align: center;
    padding-right: 0;
    margin-bottom: 2rem;
  }

  .hero-main-text h1 {
    font-size: 2.5rem;
  }

  .hero-main-text p.fs-5 {
    font-size: 1rem !important;
  }

  /* Hero Cards - 1 column on mobile, show only 1 card */
  #heroCardCarousel .col-md-4:not(:first-child) {
    display: none;
  }

  #heroCardCarousel .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .hero-card {
    height: 280px;
  }

  .hero-carousel-controls {
    margin-top: 1.5rem;
  }

  .hero-carousel-btn {
    width: 40px;
    height: 40px;
  }

  .hero-carousel-btn i {
    width: 20px;
    height: 20px;
  }

  /* Sesuaikan card di mobile */
  .card img {
    height: 10rem !important;
  }

  /* Footer di mobile */
  .footer-modern {
    padding: 3rem 0 1.5rem;
  }

  .footer-logo {
    height: 40px;
  }

  .footer-social {
    justify-content: center;
  }

  .social-icon {
    width: 38px;
    height: 38px;
  }
}
