:root {
  --primary-color: #4a90e2;
  --secondary-color: #50e3c2;
  --background-light: #f8f9fa;
  --background-dark: #121212;
  --text-light: #212529;
  --text-dark: #e0e0e0;
  --card-bg-light: #ffffff;
  --card-bg-dark: #1e1e1e;
}

/* Fix navbar-brand image size */
.navbar-brand img {
  max-height: 50px;
  height: auto;
  width: auto;
  transition: max-height 0.3s ease;
}

/* Shrink navbar-brand image on scroll */
.navbar.shrink .navbar-brand img {
  max-height: 40px;
}

body {
  color: var(--text-light);
  transition: background-color 0.3s, color 0.3s;
  padding-top: 56px;
  padding-bottom: 3.5rem; /* Height of the footer */
}

body.dark-mode {
  background-color: var(--background-dark);
  color: var(--text-dark);
}

.navbar {
  background-color: var(--background-light);
}

.navbar.dark-mode {
  background-color: #222;
}

.btn-theme-toggle {
  cursor: pointer;
  color: #000;
  font-size: 1.2rem;
}

.hero-section {
  padding: 5rem 1rem;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.hero-section h1 {
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero-section p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.carousel-caption {
  position: absolute;
  right: 1%;
  bottom: 2%;
  left: 45%;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  color: #fff;
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 1rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .features {
    padding: 2rem 1rem;
    max-width: 100%;
    margin: 0 1rem;
  }

  .feature-card {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
}

.countdown-section {
    flex-wrap: nowrap !important;
    gap: 1rem !important;
  }

.countdown-section {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap !important;
  justify-content: center;
  gap: 1rem !important;
  overflow-x: hidden;
  padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

.countdown-section::-webkit-scrollbar {
  height: 8px;
}

.countdown-section::-webkit-scrollbar-track {
  background: transparent;
}

.countdown-section::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}

.countdown-item {
  flex: 1 1 80px;
  min-width: 80px;
  max-width: 100px;
  padding: 0.5rem 0.5rem;
  font-size: 1rem;
  background: transparent;
  color: var(--text-light);
  border-radius: 20px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  user-select: none;
  backdrop-filter: blur(8px);
  border: 1px solid var(--text-light);
}

body.dark-mode .countdown-item {
  color: var(--text-dark);
  border-color: var(--text-dark);
}

.countdown-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.5);
  border-color: var(--primary-color);
}

.countdown-number {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  display: block;
  line-height: 1;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-shadow: none;
}

.countdown-label {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  margin-top: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  text-shadow: none;
}

  .countdown-section a img {
    max-height: 80px !important;
  }

  #heroCarousel {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  footer {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  /* Hide footer on mobile */
  footer {
    display: none;
  }

  /* Show bottom navbar on mobile */
  .bottom-navbar {
    display: flex;
  }

.features {
  padding: 1rem 1rem;
  margin: 0 auto;
}

.feature-card {
  background-color: var(--card-bg-light);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode .feature-card {
  background-color: var(--card-bg-dark);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
  color: var(--text-dark);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

body.dark-mode .feature-icon {
  color: var(--secondary-color);
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  background-color: var(--background-light);
  color: white;
  z-index: 1100;
  display: block;
}

footer.dark-mode {
  background-color: #222;
}

/* Override carousel-item to show 3 cards side by side on medium and larger screens */
#produkCarouselLarge .carousel-item .col-md-4 {
  padding: 0 5px;
}

/* Remove horizontal padding on small screens for full width cards */
#produkCarouselSmall .carousel-item .col-12 {
  padding: 0;
}

/* FAQ Section Custom Styles */
#faq-section {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.faq-item {
  border: none;
  background-color: var(--bs-light);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
}

.faq-item:hover {
  background-color: var(--bs-primary-bg-subtle);
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.faq-button {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--bs-primary);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: none !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.faq-button.collapsed {
  background-color: var(--bs-light);
  color: var(--bs-primary);
}

.faq-button:not(.collapsed) {
  background-color: var(--bs-primary);
  color: white;
}

.faq-button:hover {
  background-color: var(--bs-primary);
  color: white;
}

.faq-icon {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.faq-button.collapsed .faq-icon {
  transform: rotate(0deg);
}

.faq-button:not(.collapsed) .faq-icon {
  transform: rotate(45deg);
}

.faq-body {
  font-size: 1rem;
  color: var(--bs-body-color);
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--bs-border-color);
  background-color: var(--bs-light);
  border-radius: 0 0 12px 12px;
}

/* Dark mode support */
body.dark-mode #faq-section .faq-item {
  background-color: #1a1a1a;
  color: #ddd;
}

body.dark-mode #faq-section .faq-item:hover {
  background-color: #2a2a2a;
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.5);
}

body.dark-mode #faq-section .faq-button.collapsed {
  background-color: #1a1a1a;
  color: #4a90e2;
}

body.dark-mode #faq-section .faq-button:not(.collapsed) {
  background-color: #4a90e2;
  color: white;
}

body.dark-mode #faq-section .faq-body {
  background-color: #1a1a1a;
  color: #ddd;
  border-top: 1px solid #4a90e2;
}

/* Testimonial Alumni Custom Styles */
.testimonial-card {
  max-width: 600px;
  border-radius: 15px;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
  margin: 0 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.testimonial-photo {
  border: none !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.testimonial-photo:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.custom-footer {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.custom-footer a.social-icon {
  transition: color 0.3s ease, transform 0.3s ease;
}

.custom-footer a.social-icon:hover {
  color: #ffdd57 !important;
  transform: scale(1.2);
}

.custom-footer h5 {
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.custom-footer p,
.custom-footer small {
  color: #ddd;
}

@media (max-width: 767.98px) {
  .custom-footer .col-md-3 {
    text-align: center !important;
  }

  .custom-footer .d-flex.justify-content-md-start {
    justify-content: center !important;
  }
}

/* Bottom navbar styles */
.bottom-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--background-light);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1050;
  display: none; /* Hidden on desktop */
}

.bottom-navbar a {
  color: black;
  text-align: center;
  font-size: 0.75rem;
  text-decoration: none;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0;
  transition: background-color 0.3s;
}

.bottom-navbar a:hover,
.bottom-navbar a.active {
  background-color: var(--secondary-color);
  color: white;
  border-radius: 0.5rem 0.5rem 0 0;
}

.bottom-navbar a i,
.bottom-navbar a img {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  width: 24px;
  height: 24px;
}

.bottom-navbar a img {
  object-fit: contain;
}

/* Responsive rules for mobile */
@media (max-width: 768px) {
  /* Hide footer on mobile */
  footer {
    display: none;
  }

  /* Show bottom navbar on mobile */
  .bottom-navbar {
    display: flex;
  }
}

/* Responsive smaller image for school photo on small screens */
@media (max-width: 575.98px) {
  #informasi-sekolah .school-photo {
    max-width: 150px !important;
    height: auto !important;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
}
