html,
body {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

html {
  scroll-behavior: smooth;
}

#loader {
    transition: opacity 0.3s ease;
}


.loading-text {
    margin-left: 10px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #316D77;
}


[data-aos] {
  max-width: 100%;
}

.mycolor {
  color: #316D77;
}
.bg-mycolor {
  background-color: #316D77;
}

.bg-mycolor:hover {
  background-color: #49a1b1;
  color: #020202;
}

/* FIXED: Hero section styling - Hapus gap navbar */
.hero-section {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: -56px;
  padding-top: 56px;
}

/* FIXED: Carousel item styling - Full responsive */
.carousel-item {
  height: 100vh;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Overlay untuk meningkatkan keterbacaan teks */
.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

/* Container untuk teks yang diposisikan di atas gambar */
.hero-text-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  width: 100%;
  text-align: center;
  padding: 0 15px;
}

/* FIXED: Styling untuk teks - Better mobile responsive */
.hero-title {
  font-size: clamp(1.8rem, 8vw, 3.5rem);
  font-weight: 700;
  margin-bottom: clamp(0.5rem, 2vw, 1rem);
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
  animation: fadeIn 1.5s ease-in-out;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 4vw, 1.5rem);
  margin-bottom: clamp(1rem, 3vw, 2rem);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.9);
  animation: slideUp 1.5s ease-in-out;
  line-height: 1.3;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

/* FIXED: Container tombol - Better mobile layout */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1rem);
  flex-wrap: wrap;
  margin-top: clamp(1rem, 3vw, 2rem);
}

/* FIXED: Tombol CTA - Mobile optimized */
.hero-btn {
  padding: clamp(8px, 2vw, 12px) clamp(16px, 4vw, 30px);
  font-size: clamp(0.8rem, 2.5vw, 1.1rem);
  border-radius: 30px;
  animation: fadeIn 2s ease-in-out;
  transition: all 0.3s ease;
  min-width: clamp(120px, 30vw, 180px);
  white-space: nowrap;
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.hero-btn i {
  margin-right: 0.5rem;
}

/* Animasi */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FIXED: Responsive adjustments - Tablet */
@media (max-width: 991px) {
  .hero-section {
    margin-top: -56px;
    padding-top: 56px;
  }

  .carousel-item {
    height: 90vh;
    min-height: 400px;
  }

  .hero-text-container {
    padding: 0 20px;
  }
}

/* FIXED: Responsive adjustments - Mobile Portrait */
@media (max-width: 768px) {
  .hero-section {
    margin-top: -56px;
    padding-top: 56px;
  }

  .carousel-item {
    height: 100vh;
    min-height: 400px;
  }

  .hero-text-container {
    padding: 0 15px;
  }

  .hero-title {
    font-size: clamp(1.5rem, 10vw, 2.5rem);
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: clamp(0.8rem, 5vw, 1.2rem);
    max-width: 95%;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
  }

  .hero-btn {
    width: 85%;
    max-width: 280px;
    min-width: auto;
    padding: 12px 20px;
    font-size: 1rem;
  }
}

.active-hero-btn {
  background-color: #316D77;
}

/* FIXED: Responsive adjustments - Small Mobile */
@media (max-width: 576px) {
  .carousel-item {
    height: 100vh;
    min-height: 350px;
  }

  .hero-text-container {
    padding: 0 10px;
  }

  .hero-title {
    font-size: clamp(1.3rem, 12vw, 2rem);
    margin-bottom: 0.5rem;
  }

  .hero-subtitle {
    font-size: clamp(0.75rem, 6vw, 1rem);
    margin-bottom: 1rem;
    max-width: 98%;
  }

  .hero-btn {
    width: 80%;
    max-width: 240px;
    padding: 10px 16px;
    font-size: 0.9rem;
  }
}

/* FIXED: Extra Small Mobile */
@media (max-width: 400px) {
  .carousel-item {
    height: 100vh;
    min-height: 320px;
  }

  .hero-title {
    font-size: clamp(1.1rem, 15vw, 1.6rem);
    margin-bottom: 0.4rem;
  }

  .hero-subtitle {
    font-size: clamp(0.65rem, 8vw, 0.85rem);
    margin-bottom: 0.8rem;
  }

  .hero-btn {
    width: 75%;
    max-width: 200px;
    padding: 8px 12px;
    font-size: 0.8rem;
  }
}

/* FIXED: Landscape mobile handling */
@media (max-height: 500px) and (orientation: landscape) {
  .carousel-item {
    height: 100vh;
    min-height: 100vh;
  }

  .hero-title {
    font-size: clamp(1rem, 6vw, 1.6rem);
    margin-bottom: 0.2rem;
  }

  .hero-subtitle {
    font-size: clamp(0.6rem, 3vw, 0.9rem);
    margin-bottom: 0.5rem;
  }

  .hero-buttons {
    gap: 0.4rem;
    margin-top: 0.5rem;
  }

  .hero-btn {
    padding: 6px 12px;
    font-size: 0.7rem;
    min-width: 100px;
  }
}

/* Navbar styling */
.navbar {
  backdrop-filter: blur(10px);
  background-color: #316D77 !important;
}

.navbar-brand img {
  filter: brightness(1.1);
}

.navbar .nav-link {
  color: #ffffff; 
  transition: color 0.3s, background-color 0.3s;
}

.navbar .nav-link:hover {
  color: #d1ecf1; 
}

.navbar .nav-link.active {
  color: #49a1b1 !important; 
  font-weight: bold;       
}

.brand-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.navbar-brand:hover .brand-text {
    color: #49a1b1 !important;
    transform: scale(1.05);
    transition: 0.3s;
}



/* Additional content styling */
.fade-right {
  animation: fadeInRight 1s ease-in-out;
}

.fade-left {
  animation: fadeInLeft 1s ease-in-out;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.card {
  transition: transform 0.3s, box-shadow 0.3s;
  border-radius: 15px;
  overflow: hidden;
  height: 100%;
  border: none;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15) !important;
}
.card-img-top {
  height: 250px;
  object-fit: contain;
  border-bottom: 3px solid #316D77;
}
.card-title {
  color: #316D77;
  font-weight: 600;
}


.struktur-section {
  padding: 80px 0;
  background-color: #f9fafb;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px auto;
  color: #6b7280;
}

.struktur-image-wrapper {
  display: flex;
  justify-content: center;
  overflow-x: auto; 
}

.struktur-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.rata-kiri-kanan {
    text-align: justify;
}


.typing-cursor::after {
  content: "|";
  display: inline-block;
  margin-left: 4px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}



footer {
  background-color: #316D77;
}



.music-float-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: none;
  background: #316D77;
  color: white;
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s ease;
}

.music-float-btn:hover {
  transform: scale(1.08);
}

.music-float-btn.playing {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
