:root{
  --main-green:#0c809b;
  --secondary-green:#0c809b;
  --man4bantul-blue:#085669;
  --man4bantul-gold:#e6c513;

  /* tinggi komponen */
  --topbar-h:90px;   /* header lebih besar */
  --navbar-h:60px;   /* tinggi kira-kira navbar */
}

/* konten tidak ketiban header */
/* konten tidak ketiban header */
body{
  font-family:"Segoe UI",sans-serif;
  margin:0;
   padding-top: calc(var(--topbar-h) + var(--navbar-h));
}


.whatsapp-float {
  position: fixed;
  width: 55px;
  height: 55px;
  bottom: 20px;
  right: 20px;
  background-color: #0c9b4e;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}





/* ================= Topbar ================= */
.topbar{
  background:linear-gradient(90deg, var(--main-green), var(--secondary-green));
  color:#ffffff;
  height:var(--topbar-h);
  z-index:1060;
  padding:0;
  border-bottom:1px solid rgba(0,0,0,.1);
}
.topbar .container{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-left: 8px !important;
  padding-right: 8px !important;
  max-width: 100%
}

/* kiri: logo + nama sekolah */
.topbar img{
  max-height:calc(var(--topbar-h) - 30px);
  width:auto;
  margin-right:14px;
}
.school-name{ 
  font-weight:700; 
  font-size:24px; 
  line-height:1.2; 
  color:#ffffff;
}
.school-sub1{ 
  font-weight:700; 
  font-size:20px; 
  line-height:1.2; 
  color:#e6c513; 
}
.school-sub2{ 
  font-family: "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight:700; 
  font-size:20px; 
  line-height:1.2; 
  color:#ffffff; 
}


.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px; /* jarak antar ikon */
}

/* Style ikon sosmed */
.topbar-right a {
  color: #ffffff;        /* warna putih */
  font-size: 25px;       /* ukuran ikon */
  text-decoration: none;
  transition: color 0.3s;
}

.topbar-right a:hover {
  color: #e6c513;        /* warna emas saat hover */
}

/* Garis pembatas */
.topbar-right .border-end {
  border-right: 1px solid #ffffff;
  height: 20px;
}

/* Search form */
.topbar .search-form {
  display: flex;
  align-items: center;
  background: #d3e1de;
  padding: 2px 4px;
  border-radius: 4px;
  margin-top: 8px;
}

.topbar .search-form input {
  height: 26px;
  padding: 2px 8px;
  font-size: 13px;
  border: none;
  outline: none;
  border-radius: 4px 0 0 4px;
}

.topbar .search-form button {
  height: 26px;
  border: none;
  background: none;
  color: #000;
  cursor: pointer;
  padding: 0 8px;
}

/* ========== SEARCH BAR STYLE ========== */ 
.search-container {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 2px 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: fit-content;
}

.search-container input {
  border: none;
  outline: none;
  padding: 2px 6px;
  font-size: 15px;
  width: 150px;
}

.search-container button {
  background: #ffffff;
  color: #000000;
  border: none;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  cursor: pointer;
}
.search-container button:hover {
  background: #333;
}

/*SIDEBAR SEARCH*/
/* Sidebar search full screen */
.search-sidebar {
  height: 100%;
  width: 0; /* awalnya tertutup */
  position: fixed;
  top: 0; right: 0;
  background-color: #085669;
  overflow-x: hidden;
  transition: 0.5s ease;
  z-index: 9999;
  padding-top: 100px;
}

/* Tombol close */
.search-sidebar .closebtn {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 50px;
  color: #fff;
  cursor: pointer;
}

/* Konten tengah */
.search-sidebar-content {
  text-align: center;
  margin-top: 60px;
}
.search-sidebar-content input[type=text] {
  padding: 15px 20px;
  width: 60%;
  font-size: 22px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #ffffff;
  outline: none;
}
.search-sidebar-content button {
  padding: 15px 20px;
  background: transparent;
  border: none;
  font-size: 22px;
  color: #ffffff;
  cursor: pointer;
}

/* Footer logo */
.footer-brand {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}
.footer-brand hr {
  display: inline-block;
  width: 120px;
  border: 1px solid #e6c513;
  margin: 0 20px;
  vertical-align: middle;
}
.footer-brand img {
  height: 80px;
  vertical-align: middle;
}

.search-sidebar-content input[type=text]::placeholder {
  color: #ffffff;        /* putih */
  opacity: 0.8;          /* sedikit transparan biar elegan */
}

.logo {
  width: 80px; /* atur sesuai kebutuhan */
  height: auto; /* biar proporsional */
  object-fit: contain; /* mencegah gepeng */
  display: block;
  margin: 0 auto; /* tengah */
}


/* Sidebar search full screen */
.search-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 0; /* tertutup awal */
  background: #085669;
  backdrop-filter: blur(8px);
  transition: width 0.5s ease;
  z-index: 9999;

  /* flex biar konten di tengah */
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertikal tengah */
  align-items: center;     /* horizontal tengah */
  
}

/* Konten tengah */
.search-sidebar-content {
  text-align: center;
  width: 100%;
  max-width: 1200px; /* bisa kamu ubah jadi 1000px, 1200px, bahkan 100% */
  padding: 0 20px;
  transform: translateY(-60px);
}

/* Input search */
.search-sidebar-content input[type=text] {
  width: 90%;            /* memenuhi hampir seluruh layar */
  padding: 18px 24px;    /* lebih besar */
  font-size: 24px;       /* lebih besar */
  color: #ffffff;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  outline: none;
  transition: all 0.3s ease;
}
.search-sidebar-content input[type=text]:focus {
  background: rgba(255,255,255,0.2);
  border-color: #0c809b;
  box-shadow: 0 0 20px rgba(12,128,155,0.6);
}

/* Tombol search */
.search-sidebar-content button {
  margin-left: 14px;
  padding: 18px 22px;   /* lebih besar */
  font-size: 24px;
  color: #fff;
  background: #0c809b;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}
.search-sidebar-content button:hover {
  background: #0a6a7f;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(12,128,155,0.6);
}


/* ==== TOMBOL MENU ==== */
.menu-toggle {
  display: none;
}
.menu-toggle {
  font-size: 35px;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
}

/* ==== SIDEBAR ==== */
.sidebar {
  height: 100%;
  width: 0;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--man4bantul-blue, #0c809b);
  overflow-y: auto;
  transition: width 0.4s ease-in-out, box-shadow 0.3s;
  z-index: 1200;
  color: #fff;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  text-align: left;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.4) transparent;
}

/* Saat terbuka (dari JS = width:100%) → benar-benar full layar */
.sidebar[style*="width: 100%"] {
  width: 100% !important;
  max-width: 100% !important;
}

.sidebar-header {
  display: flex;
  align-items: center; /* Biar logo dan teks sejajar vertikal */
  justify-content: flex-start; /* Semua ke kiri */
  padding: 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  position: relative;
  text-align: left !important;
}

.sidebar-header img.logo {
  height: 80px;
  margin: 0 10px 0 0;
  flex-shrink: 0;
}

.sidebar-header .school-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  margin: 0;
}

.sidebar-header .school-name {
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  color: #fff;
}

.sidebar-header .school-sub1 {
  color: var(--man4bantul-gold, #e6c513);
  font-size: 14px;
  margin-top: 3px;
}

.sidebar-header .school-sub2 {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 1px;
  font-style: italic;
}

/* Tombol X */
.sidebar .closebtn {
  font-size: 28px;
  cursor: pointer;
  margin-left: auto;
  align-self: center; /* biar sejajar tengah dengan logo dan teks */
  transition: color 0.3s;
  position: absolute;
  right: 20px;
}
.sidebar .closebtn:hover {
  color: var(--man4bantul-gold, #e6c513);
}


/* ==== SEARCH ==== */
.sidebar-search {
  display: flex;
  margin: 15px 20px;
  background: #fff;
  border-radius: 25px;
  padding: 6px 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  width: calc(100% - 40px);
  box-sizing: border-box;
}

.sidebar-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 25px;
}

.sidebar-search button {
  background: none;
  border: none;
  cursor: pointer;
}

.sidebar-search i {
  font-size: 18px;
  color: #000;
}

/* ==== NAVIGATION ==== */
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 10px 0 40px 0;
  width: 100%;
}

.sidebar-nav li {
  width: 100%;
}

.sidebar-nav a {
  color: #fff;
  text-decoration: none;
  display: block;
  padding: 10px 20px;
  border-radius: 6px;
  transition: all 0.3s;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.15);
  color: var(--man4bantul-gold, #e6c513);
}

/* ==== DROPDOWN ==== */
.sidebar-nav .dropdown-menu {
  display: none;
  list-style: none;
  padding: 5px 0;
  background: #085669;
  margin: 5px 0 0 0;
  width: 100%;
  border-radius: 0 0 6px 6px;
}

.sidebar-nav .dropdown.active > .dropdown-menu {
  display: block;
  animation: slideDown 0.3s ease;
}

.sidebar-nav .dropdown-menu li a {
  padding: 8px 30px;
  font-size: 15px;
}

.sidebar-nav .dropdown-menu li a:hover {
  background: rgba(255,255,255,0.15);
  color: var(--man4bantul-gold, #e6c513);
}

/* Animasi buka dropdown */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==== SEGITIGA DROPDOWN ==== */
.sidebar-nav .dropdown > a::after {
  content: '';
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
  transition: transform 0.3s;
}

.sidebar-nav .dropdown.active > a::after {
  transform: rotate(180deg);
  border-color: transparent transparent #fff transparent;
}




/* ================= Navbar ================= */
.navbar-man4bantul{
  position:fixed;
  top:var(--topbar-h);
  left:0; right:0;
  width:100%;
  background:var(--man4bantul-blue);
  z-index:1050;
  border-top: 3px solid var(--man4bantul-gold);
}

.navbar-man4bantul .nav-link{
  color:#ffffff !important;
  font-weight:400;
  font-family: "Poppins", sans-serif;
  font-size:20px;       /* menu sedikit lebih kecil */
  padding:6px 12px;     /* ramping */
}

.navbar-man4bantul .nav-item {
  margin-right: 15px; 
}

.navbar-man4bantul .nav-link:hover{ color:var(--man4bantul-gold) !important; }

.nav-item {
  position: relative; /* biar dropdown nempel ke item induknya */
}

/* ====== Dropdown Menu ====== */
.navbar .dropdown-menu {
  width: auto;
  background: #085669;           
  border: none;                  /* hilangin border default bootstrap */
  border-radius: 6px;            /* rounded */
  padding: 8px 0;
  box-shadow: 0 4px 12px rgba(0,0,1,1); /* shadow lembut */

  /* animasi */
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all .25s ease-in-out;
}

.nav-item.dropdown:hover .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-link .dropdown-toggle::after {
  transition: transform 0.25s ease;
}

.nav-item.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* ====== Dropdown Item ====== */
.dropdown-menu a {
  color: #ffffff;                /* ungu gelap */
  font-size: 18px;
  font-weight: 500;
  padding: 10px 16px;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: rgba(90, 45, 130, 0.05); /* hover tipis */
  color: var(--man4bantul-gold, #ffffff);
}



/* ================= Mobile Menu ================= */
@media (max-width: 992px) {
  /* Hilangkan navbar di mobile */
  .navbar-man4bantul {
    display: none !important;
  }

  /* Hamburger icon MUNCUL di topbar mobile */
  .mobile-menu-toggle {
    background: none;
    border: none;
    padding: 5px 10px;
    margin-right: 10px;
    color: #ffffff !important;
    font-size: 28px !important;
    z-index: 1100 !important;
    position: relative !important;
    transition: color 0.3s ease;
  }

  .mobile-menu-toggle:hover {
    color: var(--man4bantul-gold) !important;
  }

  /* Icon putih */
  .mobile-menu-toggle i {
    color: #ffffff !important;
  }

  .mobile-menu-toggle i:hover {
    color: var(--man4bantul-gold) !important;
  }

  /* Mobile Sidebar Offcanvas Styling */
  .mobile-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1200 !important;
    height: 100vh !important;
  }

  .mobile-sidebar.offcanvas {
    background: linear-gradient(90deg, var(--main-green), var(--secondary-green)) !important;
  }

  .mobile-sidebar .offcanvas-header {
    background: linear-gradient(90deg, var(--main-green), var(--secondary-green));
    border-bottom: 3px solid var(--man4bantul-gold);
    padding: 15px 20px;
    min-height: 70px;
    display: flex;
    align-items: center;
  }

  .mobile-sidebar .offcanvas-title {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff !important;
    margin: 0;
  }

  /* Tombol close - PUTIH dan BESAR */
  .mobile-sidebar .btn-close,
  .mobile-sidebar .btn-close-white {
    filter: invert(1) brightness(1.2) !important;
    width: 32px;
    height: 32px;
    opacity: 1 !important;
  }

  .mobile-sidebar .btn-close:focus,
  .mobile-sidebar .btn-close-white:focus {
    box-shadow: 0 0 0 0.25rem rgba(230, 197, 19, 0.25) !important;
    opacity: 1 !important;
  }

  .mobile-sidebar .offcanvas-body {
    background: linear-gradient(90deg, var(--main-green), var(--secondary-green)) !important;
    padding: 0 !important;
    overflow-y: auto;
    max-height: calc(100vh - 70px);
  }

  /* Menu items - putih dengan hover gold */
  .mobile-sidebar .nav-link {
    color: #ffffff !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-sidebar .nav-link:hover {
    color: var(--man4bantul-gold) !important;
    background-color: rgba(0, 0, 0, 0.1);
  }

  .mobile-sidebar .nav-link.dropdown-toggle {
    padding-right: 20px !important;
  }

  /* Dropdown menu mobile */
  .mobile-sidebar .dropdown-menu {
    background: rgba(0, 0, 0, 0.2) !important;
    border: none;
    margin-top: 5px;
  }

  .mobile-sidebar .dropdown-item {
    color: #ffffff !important;
    padding: 10px 30px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .mobile-sidebar .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: var(--man4bantul-gold) !important;
  }

  /* Social media icons - PUTIH DAN BESAR */
  .sosialmedia-mobile {
    color: #ffffff !important;
    font-size: 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
  }

  .sosialmedia-mobile:hover {
    color: var(--man4bantul-gold) !important;
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
  }

  .sosialmedia-mobile i {
    color: #ffffff !important;
  }

  .sosialmedia-mobile:hover i {
    color: var(--man4bantul-gold) !important;
  }

  /* SEARCH MODAL STYLING */
  .search-modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  .search-modal-content .modal-header {
    background: linear-gradient(90deg, var(--main-green), var(--secondary-green));
    border-radius: 12px 12px 0 0;
    color: white;
  }

  .search-modal-content .modal-title {
    font-weight: 600;
    letter-spacing: 0.5px;
  }

  .search-modal-content .btn-close {
    filter: brightness(0) invert(1);
  }

  .search-modal-content .form-control {
    border: 2px solid var(--main-green);
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 6px 0 0 6px;
  }

  .search-modal-content .form-control:focus {
    border-color: var(--man4bantul-gold);
    box-shadow: 0 0 0 0.2rem rgba(12, 128, 155, 0.15);
  }

  .search-modal-content .btn-primary {
    background: var(--main-green);
    border-color: var(--main-green);
    padding: 12px 20px;
    border-radius: 0 6px 6px 0;
  }

  .search-modal-content .btn-primary:hover {
    background: var(--secondary-green);
    border-color: var(--secondary-green);
  }

  /* Search Icon hover effect */
  .topbar .search-icon {
    transition: all 0.3s ease;
  }

  .topbar .search-icon:hover {
    color: var(--man4bantul-gold) !important;
    transform: scale(1.15);
  }

  /* Backdrop/overlay */
  .offcanvas-backdrop.show {
    background: rgba(0, 0, 0, 0.6);
    z-index: 1199 !important;
  }

  /* Search container di sidebar */
  .mobile-sidebar .offcanvas-body > div:first-child {
    background: linear-gradient(90deg, var(--main-green), var(--secondary-green));
    border-bottom: 3px solid var(--man4bantul-gold);
    padding: 15px 20px !important;
  }

  /* Search bar di sidebar */
  .mobile-sidebar .form-control {
    border: 2px solid var(--man4bantul-gold);
    border-radius: 6px;
    padding: 10px 15px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .mobile-sidebar .form-control:focus {
    border-color: var(--man4bantul-gold);
    background: #ffffff;
    box-shadow: 0 0 0 0.3rem rgba(230, 197, 19, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15);
    outline: none;
  }

  .mobile-sidebar .form-control::placeholder {
    color: #aaa;
  }

  /* Menu items di sidebar */
  .mobile-sidebar .navbar-nav {
    padding: 10px 0;
  }

  .mobile-sidebar .nav-link {
    color: #ffffff !important;
    font-size: 15px !important;
    padding: 14px 25px !important;
    border-left: 4px solid transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
  }

  .mobile-sidebar .nav-link:hover,
  .mobile-sidebar .nav-link:focus {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--man4bantul-gold);
    color: var(--man4bantul-gold) !important;
  }

  .mobile-sidebar .dropdown-toggle::after {
    float: right;
    border-color: #ffffff transparent transparent transparent;
  }

  /* Social media di bottom offcanvas */
  .mobile-sidebar .p-3.border-top {
    background: rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--man4bantul-gold) !important;
    padding: 20px 20px !important;
  }

  .mobile-sidebar .sosialmedia {
    color: #ffffff;
    font-size: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
  }

  .mobile-sidebar .sosialmedia:hover {
    color: var(--man4bantul-gold);
    transform: scale(1.15);
  }

  .mobile-sidebar .dropdown-menu {
    background: rgba(0, 0, 0, 0.15) !important;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .mobile-sidebar .dropdown-item {
    padding: 12px 25px 12px 50px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
  }

  .mobile-sidebar .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--man4bantul-gold) !important;
    padding-left: 55px !important;
  }

  /* Socmed icons di bawah sidebar */
  .mobile-sidebar .sosialmedia {
    color: var(--man4bantul-blue);
    font-size: 18px;
    transition: color 0.3s;
  }

  .mobile-sidebar .sosialmedia:hover {
    color: var(--man4bantul-gold);
  }

  /* Topbar styling di mobile */
  .topbar {
    top: 0;
  }

  .topbar img{
    max-height:calc(var(--topbar-h) - 20px);
    width:auto;
    margin-right:8px;
  }

  .school-name {
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    color: #ffffff;
  }

  .school-sub1{ 
    font-weight:700; 
    font-size:15px; 
    line-height:1.2; 
    color:#e6c513; 
  }

  .school-sub2{ 
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-weight:700; 
    font-size:15px; 
    line-height:1.2; 
    color:#ffffff; 
  }

  .topbar-right {
    display: flex !important;
    gap: 0;
  }

  .sosialmedia {
    color: #ffffff;
    font-size: 14px;
  }

  /* Padding untuk konten di bawah topbar */
  body {
    padding-top: var(--topbar-h);
  }
}



/* ==== Geser slider lebih ke atas ==== */
.container-fluid.mt-4 {
  margin-top: 0; /* atur sesuai tinggi jarak navbar */
}

/* Galeri Slide Foto MAN 4 Bantul */
.container-fluid.mt-4 {
  padding-left: 0;   /* hapus padding biar full kanan kiri */
  padding-right: 0;
  margin-top: 120px !important;     /* hilangkan jarak atas */
}

/* Buat slider full width di desktop */
#carouselExample,
.carousel-inner {
  border-radius: 0;             /* hilangkan radius agar rata kanan kiri */
  overflow: hidden;
  box-shadow: none;             /* opsional: hilangkan shadow jika mau full rata */
  margin: 0;
  background: none;
  width: 100vw;                 /* penuh 1 viewport width */
  max-width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Gambar slider */
.carousel-item img {
  width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  object-fit: cover;
  display: block;
}

/* Caption */
.carousel-caption-custom {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(8, 86, 105, 0.5);
  color: #fff;
  padding: 16px 14px;
  text-align: left;
}

.carousel-caption-custom .label {
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 215, 0, 0.15);
  color: #e6c513;
}

.carousel-caption-custom h5 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.carousel-caption-custom p {
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}

/* Tombol Navigasi */
.carousel-control-prev,
.carousel-control-next {
  width: 40px;
  height: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border-radius: 0;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(100%);
  width: 28px;
  height: 28px;
}

/* =========================
   📱 Responsif untuk HP
   ========================= */
@media (max-width: 768px) {
  

  /* Buat slider menempel ke topbar dan full kanan kiri */
  .container-fluid.mt-4 {
    margin-top: 90px !important;
    padding-left: 0;
    padding-right: 0;
  }

  #carouselExample,
  .carousel-inner {
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    margin: 0;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
  }

  /* Gambar Slider */
  .carousel-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
  }

  .carousel-caption-custom {
    bottom: 0;
    padding: 4px 6px;
  }

  .carousel-caption-custom .label {
    font-size: 10px;
    font-weight: 400;
    margin-bottom: 6px;
    padding: 3px 6px;
  }

  .carousel-caption-custom h5 {
    font-size: 9px;
    margin-bottom: 0;
  }

  .carousel-caption-custom p {
    font-size: 8px;
    margin-bottom: 0;
  }
}



/* ===== Kabar Madrasah ===== */
.kabar-madrasah {
  margin: 60px 0;
}

/* Header judul + tombol */
.kabar-madrasah .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}

.kabar-madrasah h2 {
  font-size: 24px;
  font-weight: 700;
  color: #085669;
  position: relative;
}

/* Garis kuning kecil di bawah judul */
.kabar-madrasah h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: #e6c513;
  border-radius: 2px;
}

.btn-arsip {
  display: inline-block;
  margin: 16px 0 28px 0;
  font-size: 15px;
  color: #085669;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  background-color: rgba(25, 135, 84, 0.1);
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn-arsip:hover {
  color: #085669;
  text-decoration: none;
  background-color: rgba(13,110,253,0.15);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-arsip:active {
  transform: scale(0.92);
  box-shadow: 0 0 12px #085669;
}

/* Label kategori */
.label {
  display: inline-block;
  background: #ffffff;
  color: #085669;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  max-width: fit-content;
  white-space: nowrap;
}

/* Grid Card */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch; /* 🔥 semua kolom tinggi sama */
}

/* Card Style */
.card {
  background: #ffffff;
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  height: 100%; /* 🔥 wajib untuk seragam tinggi */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  animation: fadeInUp 0.6s forwards;
  cursor: pointer;
  position: relative;
}

.card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 12px 25px rgba(0,0,0,0.22);
}

.card:active {
  transform: scale(0.96);
  box-shadow: 0 0 15px rgba(25,135,84,0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Gambar Card */
.card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.3s ease;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.card img:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
}

.card img:active {
  transform: scale(0.95);
  filter: brightness(0.9);
  transition: transform 0.2s ease, filter 0.2s ease;
}

/* Ripple effect */
.card img::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
  top: 50%;
  left: 50%;
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.card img:active::after {
  transform: scale(15);
  opacity: 1;
  transition: transform 0.5s ease, opacity 0.8s ease;
}

/* Isi Card */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* 🔥 isi fleksibel */
}

.card-body h3 {
  font-size: 20px;
  margin: 12px 0;
  font-weight: 600;
  line-height: 1.4;
  color: #222;
}

.card-body p {
  font-size: 16px;
  color: #555;
  line-height: 1.5;
  flex-grow: 1; /* 🔥 dorong footer ke bawah */
}

/* Footer Card */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 20px -20px -20px -20px;
  padding: 14px 20px;
  border-radius: 0 0 14px 14px;
  box-sizing: border-box;
}

.footer .date {
  color: #777;
}

.footer a {
  color: #085669;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
}
.footer a:hover {
  color: #085669;
  text-decoration: underline;
  transform: translateX(3px);
}

/* Card Link */
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover .card {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 12px 25px rgba(0,0,0,0.22);
}

.card-link h3,
.card-link p,
.card-link span {
  text-decoration: none !important;
}

/* Responsive */
@media (max-width: 900px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch; /* tetap rata tinggi */
  }
}
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* Animasi Fade In */
@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


/* Info Madrasah */
.info-madrasah {
  position: relative;
  background: url("../img/InfoMadrasah.JPG") center center;
  background-size: cover;
  color: #ffffff;
  min-height: 400px;
  overflow: hidden;
  background-attachment: fixed; 
}

.info-madrasah .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,5,5.100);
  backdrop-filter: blur(1px);
  z-index: 1;
}

.info-madrasah .container {
  position: relative;
  z-index: 2;
}

/* animasi */
@keyframes bgMove {
  0%   { background-position: center top; }
  50%  { background-position: center center; }
  100% { background-position: center bottom; }
}


/* Judul section → putih lembut */
.info-madrasah .section-title {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 40px;
  color: #ffffff; 
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Kotak informasi */
.info-box {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  padding: 25px 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* Ikon diperbesar dan warnanya custom */
.info-box .icon {
  font-size: 42px;
  margin-bottom: 15px;
  display: block;
}

/* Warna ikon beda-beda (gak ungu semua) */
.icon.siswa,
.icon.guru,
.icon.alumni,
.icon.penghargaan {
  color: #085669;
}

/* Teks kotak */
.info-box h3 {
  font-size: 32px;
  font-weight: bold;
  color: #222;
  margin: 0;
}

.info-box p {
  margin-top: 5px;
  font-size: 20px;
  color: #555;
}

/* Pastikan link jadi lapisan paling atas */
.info-link {
  position: relative;
  z-index: 99;
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Hapus kemungkinan overlay yang nangkep klik */
.info-box,
.info-box * {
  pointer-events: none; /* semua elemen dalam box nggak nyangkut klik */
}

.info-link:hover .info-box {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Aktifkan klik hanya pada link */
.info-link {
  pointer-events: auto;
}


.info-link .info-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-link:hover .info-box {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}




/* ===== GALERI MADRASAH ===== */
.galeri-madrasah {
  margin-top: 50px;
}

.galeri-madrasah .header-galeri {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.galeri-madrasah h2 {
  font-size: 24px;
  font-weight: 700;
  color: #085669;
  position: relative;
}

.galeri-madrasah h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: #e6c513;
  border-radius: 2px;
}

.galeri-madrasah .subtitle {
  font-size: 18px;
  color: #085669;
  margin-top: 2px;
  margin-bottom: 25px;
}

.galeri-madrasah .lihat-semua {
  display: inline-block;
  margin: 16px 0 28px 0;  /* jarak atas 16px, bawah 28px */
  font-size: 15px;         /* sedikit lebih besar untuk keterbacaan */
  color: #085669;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;       /* area klik lebih nyaman */
  border-radius: 10px;      /* sudut lebih halus */
  background-color: rgba(25, 135, 84, 0.1); /* latar lembut */
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* efek ringan */
}

.galeri-madrasah .lihat-semua:hover {
  color: #085669;
  text-decoration: none;
  background-color: rgba(13,110,253,0.15); /* hover lebih jelas */
  transform: translateY(-2px); /* efek naik ringan */
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.galeri-madrasah .lihat-semua:active {
  transform: scale(0.92);
  box-shadow: 0 0 12px #085669;
}


/* Grid Galeri */
.galeri-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* Item Galeri */
.galeri-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid #ffffff; /* border tipis abu-abu */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* shadow lembut */
  transition: box-shadow 0.3s ease, border-color 0.3s;
}

.galeri-item:hover {
  border-color: #085669; /* hijau saat hover */
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.galeri-item img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  transition: transform 0.4s ease, filter 0.3s ease;
}

/* Hover efek zoom */
.galeri-item:hover img {
  transform: scale(1.08);
  filter: brightness(0.85);
}

/* Overlay teks */
.galeri-item .overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 6px 14px;
  background: #085669;
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  opacity: 1; /* langsung terlihat */
  transform: translateY(0); /* tidak bergeser */
  transition: none; /* hilangkan efek hover */
}

/* Responsive */
@media (max-width: 992px) {
  .galeri-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .galeri-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== PROFIL & SOSIAL MEDIA ===== */
.profil-sosmed {
  position: relative;
  background: url("../img/profil.jpg") center center;
  background-size: cover;
  color: #ffffff;
  min-height: 400px;
  overflow: hidden;
  background-attachment: fixed; /* biar sama dengan profil-sosmed */
}

.profil-sosmed .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,5,0.5);
  backdrop-filter: blur(2px);
  z-index: 2;
}

.profil-sosmed .container {
  position: relative;
  z-index: 2;
}

/* animasi */
@keyframes bgMove {
  0%   { background-position: center top; }
  50%  { background-position: center center; }
  100% { background-position: center bottom; }
}

.foto-kamad {
  padding: 20px 20px;   /* tambah ruang dalam section */
  margin: 30px 0;   
  display: flex;
  justify-content: center; /* pindah ke tengah kolom */
  align-items: center;
}

.foto-kamad img {
  width: 100%;          /* penuhi lebar section */
  max-width: 800px;     /* batasi biar ga terlalu lebar */
  height: auto;
  display: block;         /* jangan batasi tinggi */
  object-fit: contain;
  transform: translateX(-90px) translateY(-30px); /* geser ke kiri */
}

/* Video Card */
.video-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
   transform: translateX(-4px);
}
.video-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.video-card:hover {
  transform: translateX(-40px) translateY(-6px) scale(1.03);
  box-shadow: 0 12px 25px rgba(0,0,0,0.25);
}
.video-card .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.55); /* hitam transparan */
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  color: #ffffff; /* putih biar kontras */
  transition: all 0.3s ease;
}

.video-card:hover .play-btn {
  background: rgba(217, 48, 37, 0.9); /* merah khas YouTube saat hover */
  color: #ffffff;
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 0 20px rgba(217,48,37,0.6);
}


.video-card iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  aspect-ratio: 16 / 9; /* Biar rasio video selalu pas */
  border-radius: 12px;
}

/* ====== RESPONSIVE MOBILE ====== */
@media (max-width: 768px) {

  .foto-kamad img {
    transform: none; /* hilangkan geseran ke kiri */
    max-width: 90%;
    margin: 0 auto;
  }

  .foto-kamad {
    padding: 10px;
    justify-content: center;
    align-items: center;
  }

  .video-card {
    transform: none; /* hilangkan efek geser */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }

  .video-card:hover {
    transform: none; /* nonaktifkan animasi hover */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }

  .video-card .play-btn {
    width: 60px;
    height: 60px;
    font-size: 30px;
  }
}


/*====layanan====*/
.layanan-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  color: #ffffff;
}

.layanan-card img {
  width: 100%;
  height: 170px; /* tingginya seragam */
  object-fit: cover; /* biar gambar proporsional & terpotong rapi */
  display: block;
  border-radius: 12px;
}

.layanan-card .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
  z-index: 1;
  transition: 0.3s ease-in-out;
}

.layanan-card .content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  color: #ffffff;
}

.layanan-card i {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
  color: var(--man4bantul-gold, #e6c513);
}

.layanan-card h5 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.layanan-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* HP lebar (>=576px) → 2 card per baris */
@media (min-width: 576px) {
  .layanan.card {
    flex: 1 1 calc(50% - 16px); /* 2 kolom */
  }
}

/* Tablet / Desktop (>=768px) → 3 card per baris */
@media (min-width: 768px) {
  .layanan.card {
    flex: 1 1 calc(33.333% - 16px); /* 3 kolom */
  }
}





/* ======= Footer ======= */
.footer-m4b {
  background-color: #0c809b;
  padding: 40px 20px;
  color: #ffffff;
  font-size: 16px;
  text-align: center;
  margin: 0;
  padding: 0;
}

.footer-m4b img {
  height: auto;
  width: auto;
}

.footer-m4b h5 {
  color: #ffffff;
  margin-bottom: 8px;
}

.footer-m4b p,
.footer-m4b .small {
  font-size: 14px;
  line-height: 1.6;
  color: #ffffff;
  margin-bottom: 6px;
}

.footer-m4b a {
  color: #ffffff;
  font-size: 18px;
  text-decoration: none;
  transition: 0.3s;
}

.footer-m4b a:hover {
  color: #e6c513; /* gold saat hover */
}

/* Sosial Media */
.footer-m4b .fa {
  margin: 0 6px;
}
/* Sosial Media */
.footer-m4b .sosialmedia i {
  font-size: 28px;     /* ubah sesuai kebutuhan, misal 32px kalau mau lebih besar */
  margin: 0 10px;
  color: #ffffff;      /* sesuaikan warna */
  transition: transform 0.2s ease, color 0.3s ease;
}

.footer-m4b .sosialmedia i:hover {
  color: #e6c513;      /* efek hover warna kuning */
  transform: scale(1.2); /* sedikit membesar saat hover */
}


.footer-illustration {
  margin: 0;
  padding: 0;
  width: 100%;
}

.footer-illustration .footer-img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

/* === Geser Slider Melekat ke Navbar (tanpa ganggu elemen lain) === */
body {
  margin: 0;
  padding: 0;
}

/* Fokus hanya pada slider di halaman utama */
body.home section.slider,
body.home .container-fluid.slider,
body.home #carouselExample {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Navbar tetap rapat tanpa jarak bawah */
.navbar {
  margin-bottom: 0 !important;
}
