/* style/style.css - Full CSS Revision */

/* --- Variabel Warna & Font --- */
:root {
  --color-primary: #151b4f; /* Biru Tua (Background utama) */
  --color-support: #ffc320; /* Kuning (Tombol, highlight) */
  --color-text-light: #fff;
  --color-text-dark: #333;
  --color-card-bg: #fff;
  --color-gray-soft: #f8f8f8;

  --font-primary: "Poppins", sans-serif;
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* --- General Styling & Reset --- */
body {
  font-family: var(--font-primary);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: var(--color-primary); /* Background body: Biru Tua */
  color: var(--color-text-light);
  line-height: 1.6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 0.5em;
  font-weight: 700;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
}

a {
  text-decoration: none;
  color: inherit;
}

/* --- Header --- */
header {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  background-color: var(--color-primary);
  box-shadow: var(--shadow-medium);
}

header img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.popup-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  display: flex;

  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

.popup-container.show {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 400px;
  text-align: center;
  width: 90%; 
  box-sizing: border-box; 
}

#closePopup {
  background-color: #ff5e57; /* merah cerah */
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 15px;
  transition: background 0.3s ease, transform 0.2s ease;
}

#closePopup:hover {
  background-color: #ff3b30; /* lebih gelap saat hover */
  transform: scale(1.05);    /* efek sedikit membesar */
}

#closePopup:active {
  transform: scale(0.95);    /* efek ditekan */
}



/* --- Main Content Wrapper --- */
.main-content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Section Titles --- */
.section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: var(--color-text-light);
  margin-bottom: 25px;
  text-align: left;
  padding-top: 40px;
}

.section-main-title {
  font-size: 2.8em;
  font-weight: 700;
  color: var(--color-text-light);
  margin-top: 50px;
  margin-bottom: 10px;
  text-align: left;
}

.section-subtitle {
  font-size: 1.2em;
  color: #b0b0b0;
  margin-bottom: 40px;
  text-align: left;
}

/* --- Gallery Section (Slick Carousel) --- */
.gallery-section {
  padding-bottom: 40px;
}

.gallery-slider {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
}

.gallery-slider img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 12px;
}

/* Slick Custom Styling */
.slick-list {
  border-radius: 12px;
}

/* Panah Navigasi - Fix Alignment */
.slick-prev,
.slick-next {
  position: absolute;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 10;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

/* .slick-prev:hover, .slick-next:hover {
    background-color: rgba(255, 255, 255, 0.4); 
} */

.slick-prev:before,
.slick-next:before {
  font-size: 30px !important;
  color: var(--color-support) !important;
  opacity: 1;
  line-height: 1;
}

/* Posisi Panah Horizontal */
.slick-prev {
  left: 20px !important;
}
.slick-next {
  right: 20px !important;
}

/* Dots Navigasi */
.slick-dots {
  bottom: -35px !important;
}

.slick-dots li button:before {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.5) !important;
  opacity: 1;
}

.slick-dots li.slick-active button:before {
  color: var(--color-support) !important;
}

/* --- Training Card Section --- */
.training-list-section {
  padding-bottom: 60px;
}

.training-card {
  display: flex;
  background-color: var(--color-card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  margin-bottom: 30px;
  padding: 25px;
  align-items: center;
  color: var(--color-text-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.training-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

/* Card Kolom 1: Icon */
.card-icon {
  flex: 0 0 150px;
  padding-right: 25px;
  text-align: center;
}
.card-icon img {
  width: 150px;
  height: 100px;
  margin: 0 auto;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

/* Card Kolom 2: Detail */
.card-details-wrapper {
  flex-grow: 1;
  padding-right: 25px;
}

.card-header {
  font-size: 1.5em;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 5px 0;
}

.card-topic {
  font-size: 1.1em;
  color: var(--color-support);
  margin: 0 0 15px 0;
  font-weight: 600;
}

.training-card .card-topic {
  color: var(--color-primary); /* Menggunakan variabel warna primary */
}

.training-card .card-topic strong {
  color: var(--color-primary);
}

.card-info p {
  margin: 5px 0;
  font-size: 0.95em;
  line-height: 1.4;
}
.card-info strong {
  color: var(--color-primary);
}

/* Card Kolom 3: Button/Link */
.card-action {
    flex: 0 0 220px; 
    text-align: center; /* ubah dari right ke center */
    display: flex;
    flex-direction: column; /* supaya tombol & teks vertikal */
    align-items: center; /* center horizontal */
}


.register-button {
  background-color: var(--color-support);
  color: var(--color-primary);
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.2s ease;
  width: 100%;
  box-shadow: 0 4px 10px rgba(255, 195, 32, 0.3);
  min-height: 48px;
  white-space: normal;
  line-height: 1.3;
}

/* Styling untuk Tautan Tombol (<a>) */
.register-button.register-link {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  color: var(--color-primary) !important;
}

/* Styling untuk Tautan Tombol yang Disabled */
.register-button.register-link.disabled,
.register-button[disabled] {
  pointer-events: none; /* Menonaktifkan klik pada tautan */
  cursor: not-allowed;
  background-color: #a0a0a0 !important;
  color: #606060 !important;
  opacity: 0.8;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.register-button:hover:not(.disabled):not([disabled]),
.register-button.register-link:hover:not(.disabled) {
  background-color: #e5b01c;
  transform: translateY(-2px);
}

/* --- Footer --- */
footer {
  background-color: transparent;
  color: var(--color-text-light);
  padding: 30px 0;
  text-align: center;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.footer-logo img {
  max-width: 180px;
  margin: 0 auto 20px;
}

.footer-social {
  margin-bottom: 20px;
}

.footer-social a {
  display: inline-block;
  margin: 0 10px;
}

.footer-social img {
  width: 32px;
  height: 32px;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.footer-social img:hover {
  filter: brightness(1) grayscale(0%);
  transform: scale(1.1);
}

.footer-copy p {
  font-size: 0.9em;
  color: #b0b0b0;
}

/* --- Pop-up Styling (Ditinggalkan, tapi dipertahankan untuk kompatibilitas jika dihidupkan) --- */
.popup-container {
  display: none;
}

.form-submit-button {
  position: relative;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  background-color: #4CAF50;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.form-submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

.slot-text {
    font-style: italic;
    margin-top: 5px;
    font-size: 0.9em;
    color: #555; /* bisa diganti sesuai tema */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}



/* --- Media Queries for Responsiveness --- */
@media (max-width: 992px) {
  .main-content-wrapper {
    padding: 0 15px;
  }
  .gallery-slider img {
    height: 400px;
  }
  .section-main-title {
    font-size: 2.2em;
  }
  .section-title {
    font-size: 2em;
  }
  .card-icon {
    flex: 0 0 120px;
    padding-right: 15px;
  }
  .card-icon img {
    width: 80px;
  }
  .card-header {
    font-size: 1.3em;
  }
  .card-topic {
    font-size: 1em;
  }
  .card-info p {
    font-size: 0.9em;
  }
  .register-button {
    padding: 10px 20px;
    font-size: 1em;
  }
  .training-list-section {
  padding-bottom: 30px;
}

}

/* --- Training Card Responsive Mobile Final --- */
@media (max-width: 768px) {
  .gallery-section{
      padding: 0px 20px !important;
  }
  
  .training-card {
    flex-direction: column;     
    align-items: center;    
    text-align: left;
   margin-top: 15px !important;
  }

  /* Icon */
  .card-icon {
    flex: none;
    width: 100%;
    padding: 0;
    margin-bottom: 20px !important;;         
    text-align: center;
  }

  .card-icon img {
    width: 200px;               
    height: auto;
    margin: 10px auto;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.15));
  }

  /* Detail */
  .card-details-wrapper {
    width: 100%;
    padding: 0;
    margin-bottom: 10px !important;
  }

  .card-header,
  .card-topic,
  .card-info p {
    text-align: left;
    margin: 0 0 5px 0;
  }

  .card-topic {
    font-size: 1em;
    margin-bottom: 10px;
  }

   .card-action {
    flex: none !important;   /* hentikan flex-basis 220px */
    width: 100% !important;
    height: auto !important; /* biar tinggi mengikuti isi */
    display: flex;
    flex-direction: column;
    justify-content: center; /* center vertical */
    align-items: center;
    padding-top: 20px;
  }

  .register-button {
    width: 80%;
    padding: 10px 0;
    font-size: 1em;
  }

  /* Slot Text */
  .slot-text {
    margin-top: 5px;
    margin-bottom: 0;            /* hapus spasi bawah */
    text-align: center;
    font-size: 0.9em;
    color: #555;
    font-style: italic;
  }
}


@media (max-width: 480px) {
  .main-content-wrapper {
    padding: 0 10px;
  }
  .gallery-slider img {
    height: 220px;
  }

  .slick-prev,
  .slick-next {
    width: 30px;
    height: 30px;
    top: 50% !important;
    left: 10px !important;
    right: 10px !important;
  }
  .slick-prev:before,
  .slick-next:before {
    font-size: 20px !important;
  }
  .slick-dots {
    bottom: -25px !important;
  }

  .section-main-title {
    font-size: 1.5em;
  }
  .section-title {
    font-size: 1.5em;
  }
  .section-subtitle {
    font-size: 1em;
  }

  #closePopup {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
  }
}
