/* =========================
   BASE
========================= */
:root {
  --primary: rgb(12, 47, 112);
}

body {
  font-family: "Segoe UI", sans-serif;
  margin: 0;
  overflow-x: hidden;
}

/* =========================
   BUTTON LOGIN / LOGOUT
========================= */
.btn-login,
.navbar .btn-primary {
  background: linear-gradient(135deg, #0c2f70, #062661);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: 50px;
  padding: 10px 24px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(6, 38, 97, 0.25);
}

/* Hover */
.btn-login:hover,
.navbar .btn-primary:hover {
  background: linear-gradient(135deg, #0f3c8f, #0c2f70);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(6, 38, 97, 0.4);
}

/* Saat ditekan */
.btn-login:active,
.navbar .btn-primary:active {
  transform: scale(0.96);
}

/* Fokus */
.btn-login:focus,
.navbar .btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(12, 47, 112, 0.3);
}

.btn-logout {
  background: linear-gradient(135deg, #ffd54f, #ffc107);
  color: #062661;
  border: none;
  border-radius: 50px;
  padding: 10px 24px;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 193, 7, 0.35);
}

.btn-logout:hover {
  background: linear-gradient(135deg, #ffc107, #ffb300);
  color: #062661;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 193, 7, 0.5);
}

/* =========================
   NAVBAR
========================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;

  background: transparent !important;
  transition: all 0.3s ease;
}

/* Logo & Menu saat di Hero */
.navbar .nav-link,
.navbar small,
.navbar strong {
  color: #fff !important;
}

/* Saat Scroll */
.navbar.scrolled {
  background: #062661 !important;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Tetap putih saat scroll */
.navbar.scrolled .nav-link,
.navbar.scrolled small,
.navbar.scrolled strong {
  color: #fff !important;
}

/* =========================
   HERO
========================= */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 90px;

  background:
    linear-gradient(135deg, rgba(6, 38, 97, 0.85), rgba(13, 92, 209, 0.75)),
    url("../img/lapas1.jpeg") center/cover no-repeat;
}

.hero-section h1 {
  font-size: 42px;
  font-weight: 700;
}

.hero-section p {
  font-size: 16px;
  opacity: 0.9;
}

.hero-maskot {
  max-height: 450px;
  width: auto;
  animation: float 4s ease-in-out infinite;
}

/* TABLET */
@media (max-width: 991px) {
  .hero-maskot {
    max-height: 320px;
    margin-top: 30px;
    display: block;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .hero-maskot {
    max-height: 240px;
    width: auto;
    display: block;
    margin: 25px auto 0;
  }
}

/* =========================
   BUTTON MODERN ROUNDED
========================= */
.btn {
  border-radius: 50px !important;
  padding: 10px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Hover */
.btn:hover {
  transform: translateY(-2px);
}

.btn-layanan {
  background: linear-gradient(135deg, #ffd54f, #ffc107);
  border: none;
  border-radius: 50px; /* semakin besar semakin bulat */
  padding: 12px 30px;
  color: #062661;
  font-weight: 700;
  transition: all 0.3s ease;
}

.btn-layanan:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 193, 7, 0.4);
}

/* =========================
   BERITA MODERN
========================= */

.news-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 5px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.news-scroll::-webkit-scrollbar {
  display: none;
}

.news-item {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

.news-card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.news-card img {
  height: 220px;
  width: 100%;
  object-fit: cover;
}

.news-card .card-body {
  padding: 20px;
}

.news-title {
  font-size: 17px;
  font-weight: 700;
  color: #062661;
  line-height: 1.4;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: 48px;
}

.news-desc {
  font-size: 14px;
  color: #6c757d;
  line-height: 1.6;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;

  min-height: 70px;
}

.news-card .btn {
  border-radius: 50px;
  padding: 8px 18px;
  font-weight: 600;
}

/* MOBILE */
@media (max-width: 768px) {
  .news-item {
    flex: 0 0 280px;
  }

  .news-card img {
    height: 180px;
  }

  .news-title {
    font-size: 15px;
  }

  .news-desc {
    font-size: 13px;
  }
}

.sipintar-highlight {
  color: #ffc107;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 193, 7, 0.4);
}

/* =========================
   SECTION
========================= */
.section {
  padding: 60px 0;
  background: #f6f8fc;
}

.section-title {
  color: #062661;
  font-weight: 700;
  margin-bottom: 20px;
}

/* =========================
   SERVICE CARD
========================= */
.service-card {
  background: linear-gradient(135deg, #ffd54f, #ffc107);
  border: none;
  border-radius: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 100%;
  overflow: hidden;
}

.service-card h1,
.service-card h5 {
  color: #062661;
  transition: all 0.3s ease;
}

.service-card:hover {
  background: linear-gradient(135deg, #062661, #0c2f70);
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(6, 38, 97, 0.3);
}

.service-card:hover h1,
.service-card:hover h5 {
  color: #fff;
}

/* Saat card diklik */
.service-card:active {
  transform: scale(0.97);
}

.custom-modal {
  max-width: fit-content;
}

.custom-modal .modal-content {
  width: auto;
}

.custom-modal img {
  max-height: 80vh;
  width: auto;
  display: block;
}

/* =========================
   NEWS
========================= */
.news-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.news-scroll::-webkit-scrollbar {
  display: none;
}

.news-item {
  flex: 0 0 280px;
}

.news-card {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

/* =========================
   FOOTER
========================= */
.footer-premium {
  background: linear-gradient(135deg, #666b72, #041941);
  color: #fff;
  position: relative;
}

.footer-premium a {
  color: #fff;
  text-decoration: none;
  transition: 0.3s;
}

.footer-premium a:hover {
  color: #ffd54f;
}

/* SOCIAL */
.social-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: 0.3s;
}

.social-btn:hover {
  background: #fff;
  color: #0d47a1;
}

/* =========================
   HERO IMAGE
========================= */
.hero-img {
  max-height: 380px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
  100% {
    transform: translateY(0);
  }
}

/* =========================
   BUTTON LAYANAN
========================= */
.btn-layanan {
  background: linear-gradient(135deg, #ffd54f, #ffc107);
  border: none;
  font-weight: 700;
  color: #062661;
}

/* =========================
   MOBILE RESPONSIVE CLEAN
========================= */
@media (max-width: 991px) {
  .hero-section {
    text-align: center;
    padding: 80px 15px;
  }

  .hero-section h1 {
    font-size: 28px;
  }

  .hero-section p {
    font-size: 14px;
  }

  .hero-img {
    max-height: 240px;
    margin-top: 20px;
  }

  .navbar .container {
    flex-wrap: nowrap;
  }

  .section {
    padding: 40px 15px;
  }

  /* =========================
   MOBILE HERO
========================= */
  @media (max-width: 991px) {
    /* Hero tetap rapi */
    .hero-section {
      text-align: center;
      padding: 100px 20px 60px;
      min-height: auto;
    }

    /* Sembunyikan logo hero */
    .hero-img {
      display: none;
    }

    /* Perkecil judul */
    .hero-section h1 {
      font-size: 28px;
      line-height: 1.3;
    }

    /* Perkecil deskripsi */
    .hero-section p {
      font-size: 14px;
    }

    /* Tombol di tengah */
    .hero-section .d-flex {
      justify-content: center;
    }
  }

  @media (max-width: 768px) {
    .service-card {
      border-radius: 12px;
    }

    .service-card .card-body {
      padding: 15px 10px;
    }

    .service-card h1 {
      font-size: 32px;
      margin-bottom: 10px;
    }

    .service-card h5 {
      font-size: 13px;
      line-height: 1.3;
      margin: 0;
    }

    .section-title {
      font-size: 24px;
    }
  }

  /* =========================
   MOBILE NAVBAR IMPROVEMENT
========================= */

  @media (max-width: 991px) {
    /* tombol hamburger */
    .navbar-toggler {
      border: none;
      padding: 8px 10px;
      box-shadow: none !important;
    }

    .navbar-toggler:focus {
      box-shadow: none;
    }

    /* icon hamburger putih */
    .navbar-toggler-icon {
      filter: brightness(0) invert(1);
    }

    /* menu mobile */
    .navbar-collapse {
      margin-top: 15px;
      background: rgba(6, 38, 97, 0.98);
      border-radius: 15px;
      padding: 15px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    /* menu item */
    .navbar-nav .nav-link {
      padding: 12px 15px;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 500;
    }

    .navbar-nav .nav-link:hover {
      background: rgba(255, 255, 255, 0.12);
    }

    /* tombol logout */
    .navbar-nav .btn {
      width: 100%;
      margin-top: 10px;
    }

    /* logo navbar */
    .navbar-brand img {
      width: 40px;
      height: 40px;
    }

    /* teks instansi */
    .navbar-brand small {
      font-size: 8px !important;
      line-height: 1.2;
    }
  }

  @media (max-width: 991px) {
    .navbar:not(.scrolled) .navbar-collapse {
      background: rgba(6, 38, 97, 0.95);
    }
  }
}
