.btn-primary {
  background: linear-gradient(135deg, #17ead9, #6078ea);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6078ea, #17ead9);
}

.card {
  border-color: #17ead9;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(23, 234, 217, 0.3);
}

.nav-link:hover {
  color: #17ead9 !important;
}

section {
  background-color: white;
}

section:nth-child(even) {
  background-color: rgba(23, 234, 217, 0.1);
}

.navbar {
  transition: background 0.3s ease-in-out;
  z-index: 1030;
}

.navbar.scrolled {
  background: linear-gradient(135deg, #17ead9, #6078ea);
}

#home {
  padding-top: 0 !important;
  margin-top: -56px;
}

.carousel-item img {
  height: 110vh !important;
  object-fit: cover;
  width: 100%;
  margin-top: -10px;
}

.carousel-caption {
  padding-top: 40px;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
}

.navbar-brand img {
  transition: all 0.3s ease-in-out;
}

.navbar.scrolled .navbar-brand img {
  filter: none;
}

/* Navbar links */
.navbar-nav .nav-link {
  color: white !important;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #17ead9 !important;
}

.navbar-brand {
  color: white !important;
  font-weight: 600;
}

.navbar-brand:hover {
  color: #17ead9 !important;
}

/* Mengubah warna icon hamburger */
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.carousel-caption {
    padding-top: 40px;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
}

.carousel-caption h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.carousel-caption p {
    font-size: 1.8rem;
    margin-bottom: 0.7rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 500;
    line-height: 1.3;
}

.carousel-caption p:last-of-type {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.carousel-caption .btn {
    border: 2px solid white;
    background: transparent;
    padding: 8px 30px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.carousel-caption .btn:hover {
    background: linear-gradient(135deg, #17ead9, #6078ea);
    border-color: transparent;
    transform: translateY(-3px);
}

.text-justify {
  text-align: justify;
}
/* Responsive text untuk mobile */
@media (max-width: 768px) {
    .carousel-caption h1 {
        font-size: 1.3rem;
        white-space: normal;
        max-width: 100%;
        line-height: 1.3;
    }
    
    .carousel-caption p {
        font-size: 1.2rem;
        white-space: normal;
        text-align: center;
        margin: 0 auto;
        max-width: 90%;
    }
    
    .carousel-caption p:last-of-type {
        font-size: 0.9rem;
    }
    
    .carousel-caption .btn {
        font-size: 0.9rem;
        padding: 8px 25px;
    }
    
    .news-card .card-title {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .news-card .card-text {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .org-structure-card .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.3rem;
    }
    
    .org-structure-card .card-text {
        font-size: 0.8rem;
        line-height: 1.2;
    }
}

/* Untuk perangkat Android (max-width: 412px) */
@media (max-width: 412px) {
    .carousel-caption h1 {
        font-size: 1.1rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
    }
    
    .carousel-caption p:last-of-type {
        font-size: 0.75rem;
    }
    
    .news-card .card-title {
        font-size: 0.9rem;
    }
    
    .news-card .card-text {
        font-size: 0.75rem;
    }
    
    .org-structure-card .card-title {
        font-size: 0.2rem;
    }
    
    .org-structure-card .card-text {
        font-size: 0.1rem;
    }
    
    /* Penyesuaian card struktur organisasi */
    .org-structure-card .card-body {
        padding: 0.5rem !important; /* Override Bootstrap padding */
    }
    
    .org-structure-card .card-title {
        font-size: 0.7rem;
        margin-bottom: 0.1rem;
        line-height: 1.1;
    }
    
    .org-structure-card .card-text {
        font-size: 0.65rem;
        margin-bottom: 0;
        line-height: 1.1;
    }
    
    /* Menyesuaikan tinggi gambar pada card */
    .org-structure-card div[style*="aspect-ratio"] {
        aspect-ratio: 3/3.5; /* Sedikit mengurangi tinggi foto */
    }
    
    /* Styling untuk masa kepemimpinan */
    .timeline-item h4 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .timeline-item td {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
}

/* Untuk layar sangat kecil */
@media (max-width: 576px) {
    .carousel-caption h1 {
        font-size: 1.2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .carousel-caption p:last-of-type {
        font-size: 0.8rem;
    }
    
    .carousel-caption .btn {
        font-size: 0.9rem;
        padding: 8px 25px;
    }
    
    .news-card .card-title {
        font-size: 0.5rem;
    }
    
    .news-card .card-text {
        font-size: 0.85rem;
    }
    
    .org-structure-card .card-title {
        font-size: 0.5rem;
    }
    
    .org-structure-card .card-text {
        font-size: 0.4rem;
    }
    
    /* Styling untuk masa kepemimpinan */
    .timeline-item h4 {
        font-size: 1rem;
    }
    
    .timeline-item td {
        font-size: 0.85rem;
    }
}

/* Default margin untuk desktop */
.mb-4 {
  margin-bottom: 1.5rem !important;
}

/* Media query untuk perangkat mobile */
@media screen and (max-width: 576px) {
  .mb-4 {
    margin-bottom: 0.75rem !important;
  }
}

/* Untuk device yang sangat kecil */
@media screen and (max-width: 375px) {
  .mb-4 {
    margin-bottom: 0.5rem !important;
  }
}

/* Tambahkan class baru untuk navbar mobile saat terbuka */
.navbar.mobile-open {
    background: linear-gradient(135deg, #17ead9, #6078ea);
}

/* Sesuaikan media query untuk mobile */
@media (max-width: 768px) {
    .navbar:not(.scrolled) {
        background: transparent;
    }
    
    .navbar.mobile-open {
        background: linear-gradient(135deg, #17ead9, #6078ea);
    }
}

body {
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}
:target::before {
  content: "";
  display: block;
  height: 80px;
  /* Sesuaikan dengan tinggi navbar */
  margin-top: -80px;
  visibility: hidden;
}

/* Tambahkan padding-top pada setiap section */
section {
  scroll-margin-top: 60px;
  /* Cara modern untuk scroll offset */
}

/* Styling untuk highlight navbar */
.navbar-nav .nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link.active {
    color: #17ead9 !important;
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #17ead9;
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

/* Animasi navbar mobile */
.navbar-collapse {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Tampilkan navbar desktop secara default */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Styling untuk navbar mobile */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none;
        opacity: 0;
        transform: translateY(-10px);
    }

    .navbar-collapse.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animasi hamburger icon */
.navbar-toggler {
    border: none;
    padding: 0;
    outline: none !important;
}

.navbar-toggler-icon {
    transition: transform 0.3s ease;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
  .news-card {
    max-width: 80%;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .org-structure-card {
    width: 70%;
    height: auto;
    aspect-ratio: 2/3;
    margin: 0.1rem auto;
  }
  
  .org-structure-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
  }
}