/* GLOBAL STYLES
-------------------------------------------------- */
/* Padding below the footer and lighter body text */

body {
  padding-top: 3rem;
  color: rgb(var(--bs-tertiary-color-rgb));
  font-family: 'Poppins', sans-serif;
}




.bi {
  vertical-align: -0.125em;
  fill: currentColor;
}

.btn-bd-primary {
  --bd-violet-bg: #083684;
  --bd-violet-rgb: 8, 54, 132;
  --bs-btn-font-weight: 600;
  --bs-btn-color: var(--bs-white);
  --bs-btn-bg: var(--bd-violet-bg);
  --bs-btn-border-color: var(--bd-violet-bg);
  --bs-btn-hover-color: var(--bs-white);
  --bs-btn-hover-bg: #072b69;
  --bs-btn-hover-border-color: #072b69;
  --bs-btn-focus-shadow-rgb: var(--bd-violet-rgb);
  --bs-btn-active-color: var(--bs-btn-hover-color);
  --bs-btn-active-bg: #05204e;
  --bs-btn-active-border-color: #05204e;
}

.bd-mode-toggle {
  z-index: 1500;
}

.bd-mode-toggle .bi {
  width: 1em;
  height: 1em;
}

.bd-mode-toggle .dropdown-menu .active .bi {
  display: block !important;
}

/* Custom Navbar Color */
.custom-navbar {
  background: linear-gradient(to right, #1e4b85, #3a6fa9) !important;
  transition: all 0.3s ease-in-out;
}

.custom-navbar.navbar-scrolled {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Scrolled Navbar State (Desktop Only) */
@media (min-width: 768px) {
  .custom-navbar.navbar-scrolled {
    background-color: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    top: 20px;
    width: 90%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .custom-navbar.navbar-scrolled .navbar-brand,
  .custom-navbar.navbar-scrolled .nav-link {
    color: #ffffff !important;
  }

  .custom-navbar.navbar-scrolled .nav-link.active,
  .custom-navbar.navbar-scrolled .nav-link:hover {
    color: #ffffff !important;
  }

  .custom-navbar.navbar-scrolled .btn-primary {
    background-color: #ffffff !important;
    color: #fdfdfd !important;
    border-color: #ffffff !important;
  }

  .custom-navbar.navbar-scrolled .btn-primary:hover {
    background-color: #f8f9fa !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3) !important;
  }

}

.navbar-logo {
  background-color: #ffffff;
  padding: 3px;
  border-radius: 13px;
  /* Membuat bingkai kotak dengan sudut lengkung */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.custom-navbar .nav-link {
  font-weight: 600;
  color: #ffffff !important;
}

.custom-navbar .navbar-brand {
  font-weight: normal;
  color: #ffffff !important;
}

.custom-navbar .nav-link.active,
.custom-navbar .nav-link:hover {
  color: #ffffff !important;
}

/* Dropdown Hover Behavior (Desktop Only) */
@media (min-width: 768px) {
  .custom-navbar .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
  }

  .custom-navbar.navbar-scrolled .dropdown:hover .dropdown-menu {
    margin-top: 15px;
    /* Memberi jarak dari navbar melengkung saat di-scroll */
  }
}

/* Dropdown Menu Spacing */
.custom-navbar .dropdown-menu {
  padding: 0.5rem;
}

.custom-navbar .dropdown-item {
  padding: 0.5rem 1rem;
  margin-bottom: 0.25rem;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
  white-space: normal;
  /* Memastikan teks panjang turun ke baris bawah */
  word-wrap: break-word;
  line-height: 1.4;
}

.custom-navbar .dropdown-item:last-child {
  margin-bottom: 0;
}

/* Mobile Navbar Responsiveness */
@media (max-width: 767.98px) {
  .custom-navbar .navbar-collapse {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
  }

  .custom-navbar .nav-link {
    padding: 0.8rem 1rem !important;
    border-radius: 8px;
    margin-bottom: 0.25rem;
    white-space: normal;
    word-wrap: break-word;
    color: #1b1b1b !important;
  }

  .custom-navbar .nav-link:hover,
  .custom-navbar .nav-link.active {
    background-color: #f0f7ff;
    color: #204d87 !important;
  }

  .custom-navbar .dropdown-menu {
    background-color: #f8f9fa;
    border: none;
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
  }
}

/* Custom Primary Button */
.btn-primary {
  background-color: #083684;
  border-color: #083684;
  color: #ffffff;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease-in-out;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #0742a8 !important;
  /* Slightly darker blue on hover */
  border-color: #0742a8 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 12px rgba(11, 95, 239, 0.3);
  transform: translateY(-2px);
}

/* Header Text Shadow */
.header-text-shadow {
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
}

/* Extracted from inline styles */
.navbar-logo {
  object-fit: contain;
  transition: filter 0.3s ease-in-out;
}

.hero-header {
  height: 32rem;
  /* Keep tall on mobile */
}

.hero-img {
  object-fit: cover;
}

/* On Desktop: Let it expand to its full natural aspect ratio so nothing is cropped */
@media (min-width: 768px) {
  .hero-header {
    height: auto;
  }

  .hero-img {
    height: auto !important;
    /* Override Bootstrap h-100 to allow proportional height */
  }
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-content {
  z-index: 10;
}

.feature-icon-img {
  width: 94px;
  height: 94px;
  object-fit: contain;
  margin-bottom: 1rem;
}

.search-overlap {
  margin-top: -4.5rem;
  position: relative;
  z-index: 20;
}

.feature-card {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.grid-background {
  /* Warna dasar latar belakang sebagai fallback */
  background-color: #f2f9ff;

  /* Efek gradasi/glow (degradasi) putih radial dari tengah ke luar */
  background-image: radial-gradient(circle at center, #ffffff 0%, #f2f9ff 100%);
  background-size: 100% 100%;
  background-position: center center;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(118, 119, 122, 0.15) !important;
}

.search-form-container {
  max-width: 800px;
}

.section-title {
  color: #083684;
}

.section-subtitle {
  max-width: 700px;
}

.bg-light-grey {
  background-color: #f9fafb;
}

.side-image {
  object-fit: cover;
  width: 100%;
  height: 350px;
}

.text-hover-white {
  transition: color 0.3s ease;
}

.text-hover-white:hover {
  color: #ffffff !important;
}

.bg-footer-dark {
  background-image: linear-gradient(to right, #1e4b85, #4a82c3);
}

.footer-logo {
  height: 60px;
  object-fit: contain;
  /* Efek garis tepi (stroke) putih yang mengikuti bentuk/lekukan asli logo */
  filter: drop-shadow(1px 0 0 white) drop-shadow(-1px 0 0 white) drop-shadow(0 1px 0 white) drop-shadow(0 -1px 0 white);
  transition: transform 0.3s ease;
}

.footer-logo:hover {
  transform: scale(1.05);
}

.footer-logo-separator {
  width: 2px;
  height: 60px;
}

.copyright-strip {
  background-color: #1e4b85;
}

/* Typography Polishing */
h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: -0.5px;
}

.feature-card .card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1f2937;
}

.feature-card .card-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6b7280;
}

.footer-heading {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.footer-text,
.footer-text a {
  font-size: 0.9rem;
  line-height: 1.7;
}

.copyright-text {
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

/* Card Carousel Styles */
.news-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card .card-img-top {
  transition: transform 0.3s ease;
  height: 200px;
  object-fit: cover;
}

.news-card:hover .card-img-top {
  transform: scale(1.1);
}

.news-card .card-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
}

.news-card .card-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  box-orient: vertical;
  overflow: hidden;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.btn-outline-primary {
  border-color: #204d87;
  color: #204d87;
}

.btn-outline-primary:hover {
  background-color: #356ba9;
  border-color: #356ba9;
  color: #ffffff;
}

/* Carousel Side Buttons */
.carousel-side-btn {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
  visibility: hidden;
  background-color: #1e4b85 !important;
  border-color: #1e4b85 !important;
  transition: all 0.3s ease;
  z-index: 10;
}

#newsCarousel:hover .carousel-side-btn {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .carousel-side-btn {
    opacity: 1;
    visibility: visible;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}

#newsCarouselInner {
  overflow-x: hidden;
  /* Hide scrollbar, controlled by jQuery */
}

/* Calculate width so exactly 3 cards fit with 1.5rem gap (Bootstrap gap-4) */
#newsCarouselInner .news-card {
  width: calc((100% - 3rem) / 3);
}

@media (max-width: 768px) {
  #newsCarouselInner .news-card {
    width: 100%;
    /* 1 card per view on mobile */
  }
}

/* Profil Sekolah Styles */
.text-primary-dark {
  color: #083684;
}

.profil-banner-img {
  object-fit: cover;
  height: 350px;
}

.text-relaxed {
  line-height: 1.8;
}

.profil-kepsek-img {
  width: 180px;
  height: 250px;
  object-fit: cover;
}

.profil-sambutan-text {
  line-height: 1.8;
  font-size: 1.1rem;
}

/* Menghilangkan celah warna putih dari margin footer (khusus untuk halaman tertentu) */
.bg-footer-dark {
  margin-top: 0 !important;
}

/* Efek hover untuk card fasilitas */
.facility-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.facility-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.2) !important;
}

.facility-card .card-body {
  position: relative;
  background-color: white;
  z-index: 2;
}

.facility-card .card-text {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.3s ease-in-out;
  margin: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.facility-card:hover .card-text {
  opacity: 1;
  transform: translateY(0);
}

/* Sarana Prasarana Styles */
.facility-img {
  height: 200px;
  object-fit: cover;
}

/* Hover effect for carousel captions */
.carousel-caption-hover {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  transform: translateY(10px);
  left: 0;
  right: 0;
  bottom: 0;
  padding-bottom: 1rem;
}

.carousel-item:hover .carousel-caption-hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Slide Down Animation */
@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slide-down-animation {
  animation: slideDown 1s ease-out forwards;
  opacity: 0;
  /* Awalnya transparan */
}

/* Slide Up Animation */
@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slide-up-animation {
  animation: slideUp 1s ease-out forwards;
  opacity: 0;
  /* Awalnya transparan */
}