/* RESET & VARIABEL */
:root {
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --text: #263238;
  --bg: #f5f8fc;
  --white: #ffffff;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding-top: 80px;
}

/* HEADER & NAVBAR */
header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background: rgba(30, 58, 138, 0.9);
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  animation: fadeInDown 1s ease forwards;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 20px;
  font-weight: bold;
  color: var(--white);
}

/* navigation links */
.menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  font-size: 1.8rem;
  color: var(--white);
  cursor: pointer;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: var(--white);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-light);
}

/* HERO */
.hero {
  min-height: 90vh;
  background: url("pml_ikhlas.jpeg") center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  text-shadow: 2px 2px 4px #fafafa;
  color: var(--white);
  padding: 50px 20px;
  position: relative;
  animation: fadeInUp 1s ease forwards;
}

.hero h1 {
  font-size: 2.8rem;
  letter-spacing: 1.5px;
  margin-bottom: 15px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  padding: 12px 25px;
  background: var(--primary-light);
  color: var(--white);
  border-radius: 5px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn:hover {
  background: var(--primary);
}

/* ABOUT */
.about {
  max-width: 1100px;
  margin: 80px auto;
  padding: 0 20px;
  animation: fadeInUp 1s ease forwards;
}

.about h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--primary);
}

.about-container {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
}

.about-text p {
  font-size: 1rem;
  color: #444;
  margin-bottom: 15px;
  line-height: 1.8;
}

.about-img {
  flex: 1;
}

.about-img img {
  width: 100%;
  max-width: 450px;
  border-radius: 12px;
  transition: filter 0.4s ease;
}

.about-img img:hover {
  filter: saturate(300%);
}

/* Responsive */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    text-align: center;
  }

  .about-img {
    justify-content: center;
  }
}


/* LAYANAN */
.layanan {
  background: var(--white);
  padding: 80px 0;
  animation: fadeInUp 1s ease forwards;
}

.layanan h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 50px;
  color: var(--primary);
}

.layanan-list {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.layanan-item {
  flex: 1 1 250px;
  background: #f8faff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.layanan-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.layanan-link:hover h3 {
    text-decoration: underline;
}

/* styling saat hover link */
.layanan-item {
    cursor: pointer;
}

.layanan-item:hover {
  transform: translateY(-5px);
}

.layanan-item h3 {
  color: var(--primary-light);
  margin-bottom: 10px;
}

/* STRUKTUR */
.structure {
  padding: 80px 0;
  animation: fadeInUp 1s ease forwards;
}

.structure h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 50px;
  color: var(--primary);
}

.structure-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.structure-item {
  background: var(--white);
  padding: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  width: 260px;
  text-align: center;
  transition: transform 0.3s;
}

.structure-item:hover {
  transform: translateY(-5px);
}

.structure-item img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.jabatan {
  margin-top: 15px;
  font-weight: bold;
  color: #444;
  position: relative;
  cursor: pointer;
}

/* Tooltip */
.jabatan::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 17, 17, 0.9);
  color: #fff;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.jabatan:hover::after {
  opacity: 1;
}

/* Artikel Section */
.artikel {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: "Poppins", sans-serif;
}

.artikel h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 20px;
}

/* Flexbox container untuk artikel */
.artikel-flexbox {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hide radio buttons */
.artikel-flexbox input[type="radio"] {
  display: none;
}

/* Artikel Item */
.artikel-item {
  display: none;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 20px;
  transition: all 0.3s ease;
}

.artikel-item h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #222;
}

.artikel-item .abstrak {
  font-size: 0.95rem;
  color: #555;
}

/* Tampilkan artikel sesuai radio checked */
#art1:checked ~ .artikel-container #artikel1,
#art2:checked ~ .artikel-container #artikel2,
#art3:checked ~ .artikel-container #artikel3,
#art4:checked ~ .artikel-container #artikel4,
#art5:checked ~ .artikel-container #artikel5,
#art6:checked ~ .artikel-container #artikel6,
#art7:checked ~ .artikel-container #artikel7 {
  display: block;
}

/* Pagination Flexbox */
.artikel-pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.artikel-pagination .page-number,
.artikel-pagination .page-dots {
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  background: #f5f5f5;
  color: #333;
  transition: all 0.3s ease;
}

.artikel-pagination .page-number:hover,
.artikel-pagination .page-dots:hover {
  background: #3b82f6;
  color: white;
}

/* Highlight active number */
#art1:checked ~ .artikel-pagination label[for="art1"],
#art2:checked ~ .artikel-pagination label[for="art2"],
#art3:checked ~ .artikel-pagination label[for="art3"],
#art4:checked ~ .artikel-pagination label[for="art4"],
#art5:checked ~ .artikel-pagination label[for="art5"],
#art6:checked ~ .artikel-pagination label[for="art6"],
#art7:checked ~ .artikel-pagination label[for="art7"] {
  background: #3b82f6;
  color: #fff;
}

/*Gallery Section*/
.gallery {
  padding: 80px 20px;
  background: #fafafa;
  text-align: center;
}

.gallery h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: #333;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s, filter 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  filter: brightness(85%);
}

/*Lightbox*/
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  margin-bottom: 10px;
}

.lightbox:target {
  display: flex;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  text-decoration: none;
  color: #fff;
  transition: color 0.3s;
}

.lightbox .close:hover {
  color: #3b82f6;
}

.lightbox p {
  font-size: 1rem;
  color: #fff;
  text-align: center;
  margin-top: 5px;
  max-width: 80%;
}

/* Gabungan Video dan Contact */
.video-contact-section {
    padding: 80px 20px;
    background: var(--white);
}

.video-contact-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

.video-item {
    flex: 1 1 45%;
    min-width: 300px;
}


.video-contact-wrapper #contact {
    background: none; 
    padding: 0;
    box-shadow: none;
    text-align: left;
}

.video-contact-wrapper #contact form {
    max-width: none;
    width: 100%;
    padding: 30px 0;
    box-shadow: none;
}

/* Membuat video iframe responsif */
.video-container {
    width: 100%;
    aspect-ratio: 16 / 9; 
    height: auto;
    border-radius: 8px;
}

.contact {
background: #f5f5f5;
padding: 80px 20px;
text-align: center;
}

.contact h2 {
font-size: 2rem;
margin-bottom: 40px;
color: #3b82f6;
}

.contact form {
max-width: 500px;
margin: 0 auto;
background: #fff;
padding: 30px 25px;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
gap: 20px;
}

.contact label {
font-weight: 500;
color: #333;
display: flex;
flex-direction: column;
text-align: left;
font-size: 0.95rem;
}

.contact input,
.contact textarea {
margin-top: 8px;
padding: 12px 14px;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.3s, box-shadow 0.3s;
font-family: inherit;
}

.contact input:focus,
.contact textarea:focus {
border-color: #3b82f6;
box-shadow: 0 0 8px rgba(255,102,0,0.3);
outline: none;
}

.contact textarea {
min-height: 120px;
resize: vertical;
}

.contact button {
background: #3b82f6;
color: #fff;
border: none;
padding: 14px;
border-radius: 8px;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
transition: background 0.3s, transform 0.2s;
}

.contact button:hover {
background: #3b82f6;
transform: translateY(-2px);
}

/* Media Query untuk Mobile */
@media (max-width: 768px) {
    .video-contact-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    .video-item {
        min-width: 100%;
    }
    .video-contact-wrapper #contact {
        text-align: center;
    }
}

/* FOOTER */
footer {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: 25px 20px;
  animation: fadeInUp 1s ease forwards;
}

footer .ig-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

footer .ig-link img {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

footer .ig-link:hover {
  color: var(--primary-light);
}

/* ANIMASI */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    padding: 0;
  }
  .navbar {
    padding: 15px 20px;
  }

  .menu-icon {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    width: 60%;
    background: rgba(30, 58, 138, 0.95);
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    transform: translateX(100%);
    transition: transform 0.4s ease;
  }
  .menu-toggle:checked ~ .nav-links {
    transform: translateX(0);
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .structure-grid {
    flex-direction: column;
    align-items: center;
  }
}
