/*
================================================================================
   PUBLIC PAGES CSS - COMPLETE
   Stylesheet khusus untuk halaman di folder public/
================================================================================
*/

/* ============================================
   1. BREADCRUMB & PAGE HEADER (SAMA PERSIS DI SEMUA HALAMAN)
   ============================================ */

/* Global style untuk semua breadcrumb banner area */
.breadcrumb-banner-area {
  position: relative;
  padding: 150px 0 100px 0;
  min-height: 600px;
  display: flex;
  align-items: center;
  margin-bottom: 60px;
}

/* Khusus untuk halaman dengan class public-page */
.breadcrumb-banner-area.public-page {
  position: relative;
  padding: 150px 0 100px 0;
  min-height: 600px;
  display: flex;
  align-items: center;
  margin-bottom: 60px;
}

.breadcrumb-banner-area.public-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.2) 100%);
  z-index: 0;
}

.breadcrumb-banner-area.public-page .breadcrumb-text {
  position: relative;
  z-index: 2;
}

.breadcrumb-banner-area.public-page .page-title-animate {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards 0.3s;
}

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

/* Breadcrumb Bar - SAMA PERSIS seperti Kontak */
.breadcrumb-banner-area.public-page .breadcrumb-bar {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: auto;
  max-width: 90%;
  display: flex;
  justify-content: center;
}

.breadcrumb-banner-area.public-page .breadcrumb {
  background: #fff;
  border-radius: 22px;
  padding: 14px 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  list-style: none;
  overflow: visible;
  gap: 0;
}

/* Section padding setelah breadcrumb - TIDAK perlu tambahan karena breadcrumb banner sudah punya margin-bottom */

.breadcrumb-banner-area.public-page .breadcrumb > li {
  color: #1bb4b9;
  font-size: 14px;
  display: inline-block;
  white-space: nowrap;
  line-height: 1.5;
  padding: 0;
  margin: 0;
}

.breadcrumb-banner-area.public-page .breadcrumb > li a {
  color: #333;
  text-decoration: none;
  display: inline-block;
  padding: 0;
  margin: 0;
  line-height: 1.5;
}

.breadcrumb-banner-area.public-page .breadcrumb > li a:hover {
  color: #1bb4b9;
}

/* Separator styling */
.breadcrumb-banner-area.public-page .breadcrumb > li + li:before {
  content: '•';
  color: #1bb4b9;
  margin: 0 12px;
  padding: 0;
  font-size: 14px;
  display: inline-block;
  vertical-align: middle;
}

/* ============================================
   2. SECTION TITLE
   ============================================ */
.section-title-wrapper {
  margin-bottom: 50px;
  position: relative;
  padding-top: 20px;
  overflow: visible;
}

.section-title-wrapper .section-title {
  text-align: center;
  position: relative;
  overflow: visible;
  padding-bottom: 30px;
}

.section-title-wrapper .section-title h3 {
  color: #1bb4b9;
  font-weight: 700;
  font-size: 36px;
  font-family: 'Poppins', sans-serif;
  margin: 0 0 20px 0;
  position: relative;
  display: block;
  z-index: 2;
}

/* Garis dekoratif menggunakan ::after pada container, bukan pada h3 */
.section-title-wrapper .section-title::after {
  content: '';
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #1bb4b9, #f5b120);
  border-radius: 3px;
  z-index: 1;
}

.section-title-wrapper .section-title p {
  color: #666;
  font-size: 16px;
  margin: 0;
  position: relative;
  display: block;
  z-index: 2;
}

/* ============================================
   3. CARD STYLES
   ============================================ */

/* Guru Cards - Sama dengan Galeri & Berita */
.guru-card {
  background: #fff;
  border-radius: 16px; /* Ubah ke 16px - lebih rounded seperti galeri */
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Fixed height for guru cards in carousel - Sama dengan galeri/berita */
.teacher-carousel .guru-card {
  min-height: 380px;
}

.guru-card:hover {
  box-shadow: 0 12px 35px rgba(27, 180, 185, 0.2);
  border-color: rgba(27, 180, 185, 0.2);
  /* Hapus translateY - menyebabkan terpotong di overflow container */
  /* transform: translateY(-2px); */
  z-index: 10;
  position: relative;
}

.guru-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f8f9fa;
  position: relative;
}

/* Overlay effect untuk guru card - DIHAPUS agar konsisten dengan galeri */

.guru-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.guru-card:hover .guru-card-image img {
  transform: scale(1.05);
}

.guru-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: center;
  min-height: 0; /* Prevent flex overflow */
}

.guru-name {
  color: #333;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guru-badge {
  display: inline-block;
  background: linear-gradient(135deg, #1bb4b9, #ffb74d);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}

.guru-jabatan {
  display: inline-block;
  background: rgba(27, 180, 185, 0.1);
  color: #1bb4b9;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 500;
  margin-bottom: 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guru-description {
  color: #666;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  flex-grow: 0;
  /* Limit to 2 lines with ellipsis for consistent card heights */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 42px; /* Fallback: ~2 lines at 13px font with 1.6 line-height */
}

/* ============================================
   BLOG CARDS - Card Berita Seragam
   ============================================ */

/* Container untuk card berita - Bersih & Modern */
.blog-two .single-blog-item {
  background: #fff;
  border-radius: 16px; /* Ubah ke 16px - lebih rounded dan modern */
  overflow: visible;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 480px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 30px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  min-width: 0; /* TRIK PENTING: Mencegah flex items melebar berdasarkan konten */
  width: 100%;
  max-width: 100%;
}

.blog-two .single-blog-item:hover {
  box-shadow: 0 12px 35px rgba(27, 180, 185, 0.2);
  border-color: rgba(27, 180, 185, 0.2);
  /* Hapus translateY - menyebabkan terpotong di overflow container */
  /* transform: translateY(-2px); */
  z-index: 10;
  position: relative;
}

/* Gambar - fixed height */
.blog-two .single-blog-image {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: #f5f5f5;
}

.blog-two .single-blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.blog-two .single-blog-item:hover .single-blog-image img {
  transform: scale(1.1);
}

/* Overlay Effect untuk Berita - DIMATIKAN agar bersih seperti guru */
.blog-two .single-blog-image::before {
  display: none;
}

.blog-two .single-blog-image::after {
  display: none;
}

/* Text area */
.blog-two .single-blog-text {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0; /* TRIK PENTING */
}

/* Judul - max 2 baris */
.blog-two .single-blog-text h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 10px 0;
  line-height: 1.3;
  color: #2c3e50;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 50px;
}

.blog-two .single-blog-text h4 a {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.3s ease;
  font-family: 'Poppins', sans-serif;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.blog-two .single-blog-text h4 a:hover {
  color: #1bb4b9;
}

/* Tanggal */
.blog-two .blog-date {
  margin-bottom: 10px;
  font-size: 12px;
  color: #999;
}

.blog-two .blog-date span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Deskripsi - max 3 baris */
.blog-two .single-blog-text p {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  min-height: 60px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Link */
.blog-two .single-blog-text a {
  color: #1bb4b9;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: color 0.3s ease;
}

.blog-two .single-blog-text a:hover {
  color: #17a2a8;
}

/* ============================================
   TANGGL BADGE - Selalu Center Saat Hover
   ============================================ */

/* Override class-date untuk blog-two */
.blog-two .single-blog-item .class-date {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) scale(0) !important;
  -webkit-transform: translate(-50%, -50%) scale(0) !important;
  -ms-transform: translate(-50%, -50%) scale(0) !important;
  opacity: 0 !important;
  z-index: 3 !important;
  transition: all 0.3s ease !important;
  -webkit-transition: all 0.3s ease !important;
}

.blog-two .single-blog-item:hover .class-date {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
  -webkit-transform: translate(-50%, -50%) scale(1) !important;
  -ms-transform: translate(-50%, -50%) scale(1) !important;
}

/* Pagination */
.blog-pagination-wrapper,
.berita-pagination {
  margin-top: 15px;
  margin-bottom: 30px;
  text-align: center;
}

.blog-pagination,
.pagination {
  display: inline-flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-pagination li,
.pagination li {
  display: inline-block;
}

.blog-pagination li a,
.blog-pagination li span,
.pagination li a,
.pagination li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f8f9fa;
  color: #555;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.blog-pagination li a:hover,
.blog-pagination li.active a,
.pagination li a:hover,
.pagination li.active span {
  background: linear-gradient(135deg, #1bb4b9, #17a2a8);
  color: #fff;
  transform: scale(1.1);
}

/* Search Box */
.berita-search-box {
  margin-bottom: 30px;
}

.berita-search-box form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  gap: 10px;
}

.berita-search-box input[type="search"] {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e9ecef;
  border-radius: 25px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
}

.berita-search-box input[type="search"]:focus {
  outline: none;
  border-color: #1bb4b9;
  box-shadow: 0 0 0 4px rgba(27, 180, 185, 0.1);
}

.berita-search-box button {
  padding: 12px 30px;
  background: linear-gradient(135deg, #1bb4b9, #17a2a8);
  color: #fff;
  border: none;
  border-radius: 25px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.berita-search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(27, 180, 185, 0.3);
}

/* Filter & Berita styles - DIHAPUS, pakai style.css asli */

/* Gallery Cards - Bersih & Modern */
.single-items {
  background: #fff;
  border-radius: 16px; /* Ubah ke 16px - lebih rounded dan modern */
  overflow: visible;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.single-items:hover {
  box-shadow: 0 12px 35px rgba(27, 180, 185, 0.2);
  border-color: rgba(27, 180, 185, 0.2);
  /* Hapus translateY - menyebabkan terpotong di overflow container */
  /* transform: translateY(-2px); */
  z-index: 10;
  position: relative;
}

.single-items img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

/* Overlay effect - DIHAPUS, pakai style.css asli */

.gallery-hover-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
  pointer-events: none;
}

.overlay-effect:hover .gallery-hover-effect {
  opacity: 1;
}

.gallery-icon {
  display: inline-block;
}

.gallery-icon a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
  color: #1bb4b9;
  font-size: 20px;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.gallery-icon a:hover {
  background: #f5b120;
  color: #fff;
}

.gallery-text {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
}

/* Class Cards */
.single-class {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.single-class:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(27, 180, 185, 0.3);
}

.single-class-image {
  position: relative;
  overflow: hidden;
  background: #f8f9fa;
  height: 240px;
  flex-shrink: 0;
}

.single-class-image a {
  display: block;
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.single-class-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.single-class:hover .single-class-image img {
  transform: scale(1.08);
}

.single-class-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.class-des {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.class-des h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.class-des h4 a {
  color: #2c3e50;
  text-decoration: none;
}

.class-des h4 a:hover {
  color: #1bb4b9;
}

.class-des p {
  font-size: 13px;
  color: #6c757d;
  line-height: 1.6;
  flex: 1;
}

.class-schedule {
  padding: 15px 20px;
  background: #fff;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.class-schedule span {
  font-size: 12px;
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, #1bb4b9, #17a2a8);
  padding: 8px 14px;
  border-radius: 8px;
}

.class-schedule .arrow a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1bb4b9, #17a2a8);
  color: #fff;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.class-schedule .arrow a:hover {
  background: linear-gradient(135deg, #f5b120, #f0a020);
  transform: scale(1.1);
}

/* ============================================
   4. REMOVE GRAY BACKGROUNDS (homepage only sections)
   ============================================ */
.teachers-large-carousel-area,
.blog-area,
.testimonial-carousel-area {
  background: #fff !important;
}

/* ============================================
   5. OWL CAROUSEL NAVIGATION & SMOOTH SCROLL
   ============================================ */

/* GPU acceleration untuk carousel - HANYA saat animasi */
.owl-carousel .owl-stage,
.owl-carousel .owl-item {
  /* Force GPU layer hanya saat perlu */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* PERBAIKAN UTAMA: Ubah overflow hidden menjadi visible untuk owl-stage-outer
   Agar card yang di-hover tidak terpotong saat timbul */
.galeri-carousel .owl-stage-outer,
.berita-carousel .owl-stage-outer,
.teacher-carousel .owl-stage-outer,
.testimonial-carousel .owl-stage-outer {
  overflow: visible !important;
}

/* ============================================
   CAROUSEL CONTAINER STYLE (HANYA untuk Beranda)
   Wrapper dengan shadow dan rounded corners
   ============================================ */

/* HANYA untuk carousel di beranda (index.php) */
body:has(.banner-slideshow-container) .teacher-wrapper,
body:has(.banner-slideshow-container) .testimonial-wrapper,
body:has(.banner-slideshow-container) .gallery-wrapper,
body:has(.banner-slideshow-container) .berita-wrapper {
  background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
  border-radius: 20px;
  padding: 50px 30px; /* TAMBAH padding - ruang untuk hover effect */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden; /* HIDDEN agar card TIDAK keluar dari container */
  margin: 25px 0;
  border: 1px solid rgba(27, 180, 185, 0.1);
  transition: all 0.3s ease;
}

/* Hover effect pada container - HANYA di beranda */
body:has(.banner-slideshow-container) .teacher-wrapper:hover,
body:has(.banner-slideshow-container) .testimonial-wrapper:hover,
body:has(.banner-slideshow-container) .gallery-wrapper:hover,
body:has(.banner-slideshow-container) .berita-wrapper:hover {
  box-shadow: 0 8px 35px rgba(27, 180, 185, 0.15);
  border-color: rgba(27, 180, 185, 0.2);
  transform: translateY(-2px);
}

/* Untuk halaman Galeri, Berita, Ulasan (bukan beranda) - TANPA container wrapper */
.gallery-wrapper,
.berita-wrapper {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: static;
  overflow: visible;
  margin: 0;
  border: none;
  transition: none;
}

/* HAPUS padding dan margin negatif - menyebabkan layout tidak rapi */
/* .galeri-carousel,
.berita-carousel,
.teacher-carousel {
  padding: 15px 0;
  margin: -15px 0;
} */

/* ============================================
   PERBAIKAN HORIZONTAL SCROLL - Owl Nav Positioning
   ============================================ */

/* Override owl-nav positioning yang menyebabkan horizontal scroll */
.teacher-carousel.carousel-style-one.owl-carousel .owl-nav div,
.testimonial-carousel.carousel-style-one.owl-carousel .owl-nav div,
.gallery-carousel.carousel-style-one.owl-carousel .owl-nav div,
.berita-carousel.carousel-style-one.owl-carousel .owl-nav div {
  left: 10px !important;
  right: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.teacher-carousel.carousel-style-one.owl-carousel .owl-nav div.owl-next,
.testimonial-carousel.carousel-style-one.owl-carousel .owl-nav div.owl-next,
.gallery-carousel.carousel-style-one.owl-carousel .owl-nav div.owl-next,
.berita-carousel.carousel-style-one.owl-carousel .owl-nav div.owl-next {
  left: auto !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* Mencegah text selection saat drag */
.owl-carousel .owl-item {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Matikan animasi FADE/SCALE untuk carousel items - MENCEGAH GETAR */
/* Tapi biarkan hover effects (translateY, box-shadow) tetap jalan */
.owl-carousel .guru-card,
.owl-carousel .single-blog-item,
.owl-carousel .single-items,
.owl-carousel .single-testimonial-carousel {
  /* Hapus ini agar hover effect jalan */
  /* opacity: 1 !important; */
  /* transform: none !important; */
  /* transition: none !important; */
}

/* Biarkan hover state untuk carousel items */
.owl-carousel .guru-card:hover,
.owl-carousel .single-blog-item:hover,
.owl-carousel .single-items:hover,
.owl-carousel .single-testimonial-carousel:hover {
  z-index: 10; /* Agar card yang di-hover muncul di depan */
  position: relative;
}

/* Carousel navigation buttons - LEBIH RAPI */
.owl-carousel .owl-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  margin-top: 0 !important;
  pointer-events: none; /* Allow click through */
}

.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
  background: linear-gradient(135deg, #1bb4b9, #17a2a8) !important;
  color: #fff !important;
  width: 45px;
  height: 45px;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  pointer-events: auto; /* Enable click on buttons */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.owl-carousel .owl-nav button.owl-prev {
  left: -20px;
}

.owl-carousel .owl-nav button.owl-next {
  right: -20px;
}

.owl-carousel .owl-nav button.owl-prev:hover,
.owl-carousel .owl-nav button.owl-next:hover {
  background: linear-gradient(135deg, #f5b120, #f0a020) !important;
  transform: translateY(-50%) scale(1.1);
}

/* Responsive positioning untuk mobile */
@media (max-width: 1199px) {
  .owl-carousel .owl-nav button.owl-prev {
    left: -10px;
  }

  .owl-carousel .owl-nav button.owl-next {
    right: -10px;
  }
}

@media (max-width: 767px) {
  .owl-carousel .owl-nav {
    display: none; /* Sembunyikan di mobile untuk lebih rapi */
  }
}

/* ============================================
   PERBAIKAN TAMBAHAN - SMOOTH CAROUSEL
   ============================================ */

/* Matikan semua animasi carousel untuk mencegah glitch */
.berita-carousel,
.galeri-carousel,
.teacher-carousel,
.testimonial-carousel {
  position: relative;
}

/* Matikan fade animations */
.berita-carousel .owl-item .fadeIn,
.galeri-carousel .owl-item .fadeIn,
.teacher-carousel .owl-item .fadeIn,
.testimonial-carousel .owl-item .fadeIn,
.berita-carousel .owl-item .fadeOut,
.galeri-carousel .owl-item .fadeOut,
.teacher-carousel .owl-item .fadeOut,
.testimonial-carousel .owl-item .fadeOut {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Pastikan carousel items tidak ada animasi */
.berita-carousel .owl-item,
.galeri-carousel .owl-item,
.teacher-carousel .owl-item,
.testimonial-carousel .owl-item {
  transition: none !important;
  transform: none !important;
}

/* Pastikan stage tidak ada animasi */
.berita-carousel .owl-stage,
.galeri-carousel .owl-stage,
.teacher-carousel .owl-stage,
.testimonial-carousel .owl-stage {
  transition: none !important;
}

/* ============================================
   6. TINGKAT MAIN PHOTO
   ============================================ */
.tingkat-main-photo {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(27, 180, 185, 0.35);
  transition: all 0.4s ease;
  width: 100%;
  max-width: 100%;
  height: 700px;
  background: #f8f9fa;
}

.tingkat-main-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.tingkat-main-photo:hover {
  box-shadow: 0 15px 50px rgba(27, 180, 185, 0.5);
  transform: translateY(-5px);
}

/* ============================================
   7. TINGKAT INFO LIST
   ============================================ */
.tingkat-info-list {
  background: linear-gradient(135deg, rgba(27, 180, 185, 0.08), rgba(255, 183, 77, 0.08));
  border-radius: 8px;
  padding: 20px;
  margin: 0 auto 25px auto;
}

.info-list-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.info-list-item:last-child {
  margin-bottom: 0;
}

.info-item-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #1bb4b9, #17a2a8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  flex-shrink: 0;
}

.info-item-icon i {
  color: #fff;
  font-size: 20px;
}

.info-item-text {
  flex: 1;
}

.info-item-label {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 2px;
}

.info-item-value {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

.tingkat-description {
  margin: 0 auto 25px auto;
  line-height: 1.8;
  color: #555;
}

/* Facilities */
.facilities-details {
  margin-top: 30px;
}

.single-facilities {
  margin-bottom: 30px;
}

.single-facilities p {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin: 0;
}

/* ============================================
   8. CLASS AREA & GENERAL LAYOUT
   ============================================ */
.class-area,
.teacher-fullwidth-area,
.contact-area,
.facilities-area,
.section-padding {
  position: relative;
  background: #fff;
  overflow: visible;
}

/* Halaman Berita, Galeri, Ulasan - tanpa background section */
.blog-fullwidth-area,
.gallery-fullwidth-area,
.testimonial-area {
  background: transparent !important;
}

/* Pastikan section carousel juga overflow visible */
.teachers-large-carousel-area {
  overflow: visible !important;
}

.class-details-area {
  position: relative;
  overflow: visible;
}

.class-details-top {
  display: flex;
  gap: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tingkat-main-photo-wrapper {
  flex: 1;
  min-width: 300px;
}

.class-details-text {
  flex: 1;
  min-width: 300px;
}

@media (max-width: 768px) {
  .class-details-top {
    flex-direction: column;
  }
}

/* ============================================
   9. TINGKAT GALLERY GRID
   ============================================ */
.tingkat-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.tingkat-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  aspect-ratio: 4/3;
}

.tingkat-gallery-image {
  position: relative;
  width: 100%;
  height: 100%;
}

.tingkat-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.tingkat-gallery-item:hover .tingkat-gallery-image img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(27, 180, 185, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.tingkat-gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  color: #fff;
  font-size: 32px;
}

/* ============================================
   10. TINGKAT GALLERY MODAL
   ============================================ */
.tingkat-gallery-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.tingkat-gallery-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.tingkat-gallery-carousel {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tingkat-gallery-image-container {
  width: 80vw;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tingkat-gallery-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.tingkat-gallery-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 24px;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s ease;
  z-index: 10;
}

.tingkat-gallery-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.tingkat-gallery-prev {
  left: 20px;
}

.tingkat-gallery-next {
  right: 20px;
}

.tingkat-gallery-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.tingkat-gallery-close:hover {
  color: #1bb4b9;
}

.tingkat-gallery-counter {
  text-align: center;
  color: #fff;
  font-size: 16px;
  margin-top: 15px;
}

/* ============================================
   11. CLASS MODAL
   ============================================ */
.class-modal {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.class-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.class-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.class-modal-carousel {
  display: flex;
  align-items: center;
  gap: 20px;
}

.carousel-image-container {
  width: 70vw;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.carousel-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 24px;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s ease;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

.carousel-counter {
  text-align: center;
  color: #fff;
  font-size: 16px;
  margin-top: 15px;
}

.class-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.class-modal-close:hover {
  color: #1bb4b9;
}

.class-modal-teacher {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  background: rgba(255, 255, 255, 0.1);
  padding: 20px 30px;
  border-radius: 12px;
}

.teacher-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.teacher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-info {
  color: #fff;
}

.teacher-info h4 {
  font-size: 20px;
  margin-bottom: 5px;
}

.teacher-info p {
  font-size: 14px;
  opacity: 0.9;
}

/* ============================================
   12. FADE IN ANIMATION
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   13. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .section-title-wrapper {
    padding-top: 10px;
  }

  .section-title-wrapper .section-title {
    padding-bottom: 25px;
  }

  .section-title-wrapper .section-title h3 {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .section-title-wrapper .section-title::after {
    bottom: 10px;
  }

  .tingkat-main-photo {
    height: 500px;
  }

  .tingkat-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .tingkat-gallery-image-container,
  .carousel-image-container {
    width: 90vw;
    height: 60vh;
  }

  .class-modal-teacher {
    flex-direction: column;
    text-align: center;
  }

  /* Blog Cards Responsive */
  .blog-two .single-blog-image {
    height: 250px;
  }

  .blog-two .single-blog-text h4 {
    font-size: 16px;
    min-height: 45px;
  }

  .blog-two .single-blog-text h4 a {
    font-size: 16px;
  }

  .blog-two .single-blog-text p {
    font-size: 12px;
    min-height: 54px;
  }

  /* Guru Cards Responsive */
  .teacher-carousel .guru-card {
    height: 420px;
  }

  .guru-card-image {
    height: 250px;
  }

  .guru-name {
    font-size: 16px;
  }

  .guru-description {
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .section-title-wrapper .section-title h3 {
    font-size: 24px;
  }

  .tingkat-main-photo {
    height: 350px;
    border-radius: 12px;
  }

  .tingkat-gallery-btn,
  .carousel-btn {
    font-size: 18px;
    padding: 10px 15px;
  }

  .tingkat-gallery-prev,
  .carousel-prev {
    left: 10px;
  }

  .tingkat-gallery-next,
  .carousel-next {
    right: 10px;
  }

  .class-modal-teacher {
    padding: 15px 20px;
  }

  .teacher-avatar {
    width: 60px;
    height: 60px;
  }

  /* Blog Cards Small Mobile */
  .blog-two .single-blog-image {
    height: 200px;
  }

  .blog-two .single-blog-text h4 {
    font-size: 15px;
  }

  .blog-two .single-blog-text h4 a {
    font-size: 15px;
  }

  /* Guru Cards Small Mobile */
  .teacher-carousel .guru-card {
    height: 400px;
  }

  .guru-card-image {
    height: 200px;
  }

  .guru-name {
    font-size: 15px;
  }
}

/* ============================================
   14. DETAIL BERITA PAGE - Fix Long Text Overflow
   ============================================ */

/* Blog Details Content - Prevent horizontal overflow */
.blog-details-content {
  max-width: 100% !important;
  overflow: hidden !important;
}

.blog-details-content .blog-content {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Fix for ringkasan box */
.blog-details-content .berita-ringkasan {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Fix for all content inside blog-content */
.blog-details-content .blog-content * {
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  word-break: break-word !important;
  max-width: 100% !important;
}

/* Images and videos should not overflow */
.blog-details-content .blog-content img,
.blog-details-content .blog-content video,
.blog-details-content .blog-content iframe {
  max-width: 100% !important;
  height: auto !important;
}

/* ============================================
   ULASAN CARDS - Fixed Height & Uniform Layout
   ============================================ */
.single-testimonial-item {
  transition: all 0.3s ease;
}

.single-testimonial-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}

/* Ensure uniform height in row */
@media (min-width: 992px) {
  .row > .col-lg-4:nth-child(3n+1) .single-testimonial-item {
    height: 320px;
  }
  .row > .col-lg-4:nth-child(3n+2) .single-testimonial-item {
    height: 320px;
  }
  .row > .col-lg-4:nth-child(3n+3) .single-testimonial-item {
    height: 320px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .row > .col-md-6:nth-child(2n+1) .single-testimonial-item {
    height: 320px;
  }
  .row > .col-md-6:nth-child(2n+2) .single-testimonial-item {
    height: 320px;
  }
}

@media (max-width: 767px) {
  .single-testimonial-item {
    min-height: auto !important;
  }
}

/* ============================================
   TESTIMONIAL CAROUSEL (Beranda)
   ============================================ */
.testimonial-carousel.owl-carousel .owl-item {
  display: flex;
  align-items: stretch;
}

.testimonial-carousel.owl-carousel .owl-item > div {
  width: 100%;
  display: flex;
  align-items: stretch;
}

/* Fixed height for testimonial carousel items */
.testimonial-carousel .single-testimonial-carousel {
  min-height: 320px;
}

@media (max-width: 767px) {
  .testimonial-carousel .single-testimonial-carousel {
    min-height: auto;
  }
}
