/*--------------------------------------------------------------
# Home Page Styles
  Dimuat khusus halaman depan (via @push('styles')).
  Selector tetap dipakai bersama layout yang sama dengan perilaku
  asli saat CSS ini masih inline di index.blade.php.
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# About Section (Home)
--------------------------------------------------------------*/
.about {
  padding: 30px 0 50px;
}

/* Paragraf rata kanan-kiri di semua ukuran layar (desktop & mobile),
   supaya blok teks tampil rapi dan profesional. */
.about-desc {
  text-align: justify;
  hyphens: auto;
  line-height: 1.7;
}

/*--------------------------------------------------------------
# Event Section (Home)
--------------------------------------------------------------*/
.event {
  padding: 40px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 20px;
}

.section-title h2 {
  font-size: 1.5rem;
  color: #333;
}

.event-slider-container {
  position: relative;
  max-width: 100%;
  padding: 10px 30px;
  overflow: hidden;
}

.event-slider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 10px 0;
}

.webinar-card {
  flex: 0 0 auto;
  width: 280px;
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  scroll-snap-align: start;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.webinar-image {
  width: 100%;
  height: 160px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
}

.webinar-title {
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  height: 60px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.webinar-description {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  height: 45px;
  overflow: hidden;
}

.register-btn {
  background: #006B98;
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  margin-top: auto;
}

.register-btn:hover {
  background-color: #005073;
  color: #ffffff;
}

/* Area konten kartu event → link ke halaman detail */
.webinar-link {
  display: block;
  text-decoration: none;
}

.webinar-link:hover .webinar-title {
  color: #006B98;
}

/* Badge status event (Akan Datang / Berlangsung / Berakhir) */
.webinar-badge {
  display: inline-block;
  margin: 0 auto 8px;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 20px;
  color: #fff;
}

/* Info ringkas tanggal & harga */
.webinar-date {
  margin-bottom: 5px;
  font-size: 0.82rem;
  color: #777;
}

.webinar-price {
  margin-bottom: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #006B98;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #333;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.left-btn {
  left: 0;
}

.right-btn {
  right: 0;
}

.left-btn:hover,
.right-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Responsif Event Slider */
@media (max-width: 768px) {
  .webinar-card {
    min-width: 40%;
    height: 60%;
  }
}

@media (max-width: 480px) {
  .webinar-card {
    min-width: 80%;
    height: 80%;
  }
}

.event-form-group {
  margin-bottom: 15px;
}

.event-form-group label {
  display: block;
  margin-bottom: 5px;
}

.event-form-group input {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
}

#event-date {
  font-size: 18px;
  margin: 0;
}

#event-title {
  font-size: 18px;
  margin: 0;
}

.btn-event-register {
  background-color: #006B98;
  color: #fff;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-top: 15px;
}

.btn-event-register:hover {
  background-color: #005073;
  border: 1px solid #005073;
  color: #ffffff;
}

.event-payment-section {
  margin-top: 20px;
}

.btn-event-close {
  background-color: #006B98;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-event-close:hover {
  background-color: #005073;
}

/*--------------------------------------------------------------
# Image Lightbox (Buku, Poster Event, Galeri)
--------------------------------------------------------------*/
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}

/* Gambar tampil penuh di layar: tidak lebih besar dari 92% lebar
   dan 85% tinggi viewport, proporsi dipertahankan (object-fit: contain),
   sehingga tidak perlu scroll di perangkat mana pun. */
.modal-content {
  margin: auto;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

@media (max-width: 768px) {
  .modal-content {
    max-width: 92vw;
    max-height: 80vh;
    padding: 0;
  }
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

.close:hover {
  color: #006B98;
}

/*--------------------------------------------------------------
# Section Buku (E-Book by Rama Sahid)
--------------------------------------------------------------*/
.book-content {
  font-family: 'Poppins', sans-serif;
  text-align: justify;
}

.book-buy-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  padding: 8px 20px;
}

.book-gallery img {
  cursor: zoom-in;
}

/*--------------------------------------------------------------
# Galeri (zoom-in cursor untuk foto)
--------------------------------------------------------------*/
.gallery-item img {
  cursor: zoom-in;
}

/*--------------------------------------------------------------
# Galeri grid (menggantikan layout lama yang bentrok: Bootstrap col
# + flex + calc + padding-bottom di main.css). Pakai CSS grid murni.
--------------------------------------------------------------*/
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.gallery-item {
  margin: 0;
  width: auto;
  height: 0;
  padding-bottom: 100%;
}

/* Gunakan aspect-ratio bila didukung (modern); fallback padding-bottom di atas */
@supports (aspect-ratio: 1 / 1) {
  .gallery-item {
    height: auto;
    padding-bottom: 0;
    aspect-ratio: 1 / 1;
  }
}

.gallery-item a {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
}

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: none;
}

/* Video thumbnail: rasio 16:9 dengan ikon play di tengah */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.video-grid .gallery-item.video-item {
  height: 0;
  padding-bottom: 56.25%;
}

@supports (aspect-ratio: 16 / 9) {
  .video-grid .gallery-item.video-item {
    height: auto;
    padding-bottom: 0;
    aspect-ratio: 16 / 9;
  }
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.video-item a:hover .play-icon {
  transform: translate(-50%, -50%) scale(1.15);
}

/* Responsif: 2 kolom di perangkat kecil */
@media (max-width: 768px) {
  .gallery-grid,
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/*--------------------------------------------------------------
# Mobile & Tablet Optimization (semua section)
  Target utama: smartphone (320-480px) & tablet (768px).
--------------------------------------------------------------*/

/* Hero: biarkan gambar menentukan tingginya di layar kecil
   (hindari area kosong akibat min-height 100vh yang tidak konsisten). */
@media (max-width: 767.98px) {
  .hero {
    min-height: 0;
    padding-top: 66px;
  }
}

/* Tablet: kembalikan ukuran gambar About ke proporsional
   (main.css membatasinya jadi 150px di rentang tablet). */
@media (min-width: 576px) and (max-width: 768px) {
  .about img {
    max-width: 100%;
  }
}

/* Judul section lebih proporsional di layar kecil. */
@media (max-width: 575.98px) {
  .section-title h2 {
    font-size: 24px;
  }
}

/* Services: kurangi padding berlebihan agar konten tidak berdesakan. */
@media (max-width: 575.98px) {
  .service-item {
    padding: 30px 18px;
  }
}

/* Event slider: ruang geser lebih lebar, tombol lebih kecil agar
   tidak menutupi isi kartu di layar sempit. */
@media (max-width: 575.98px) {
  .event-slider-container {
    padding: 10px 2px;
  }

  .slider-btn {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .webinar-card {
    min-width: 85%;
  }
}

/* Gallery: foto tetap 2 kolom, video dibuat 1 kolom agar
   thumbnail (rasio 16:9) tetap terbaca di smartphone. */
@media (max-width: 575.98px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery-grid {
    gap: 8px;
  }
}

/* Team: kurangi padding kartu di layar kecil. */
@media (max-width: 575.98px) {
  .team .team-member,
  .team-container .team-container__member {
    padding: 20px;
  }
}