/* =====================================================
   FONT: Poppins
===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* =====================================================
   RESET DASAR
===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f7fa;
  padding-top: 40px; /* agar konten tidak ketimpa header */
}

/* =====================================================
   HEADER
===================================================== */
header {
  background: #006d77;
  color: white;
  padding: 0.4rem 0;
  text-align: center;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
}

header .tagline {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.3px;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  font-family: "Arial Black", sans-serif;
}

/* =====================================================
   NAVIGASI DESKTOP
===================================================== */
nav {
  display: flex;
  justify-content: center;
  gap: 40px;
  background: #004f54;
  padding: 0.5rem 0;
  width: 100vw;
  margin-top: 8px;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

/* =====================================================
   HERO SECTION
===================================================== */
.hero {
  position: relative;
  text-align: center;
  padding: 4rem 2rem;
  color: white;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)),
              url("images/fotohalaman.jpg") center/cover no-repeat;
  transition: background-image 1s ease-in-out;
}

.hero img {
  width: 120px;
  margin-bottom: 6px;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.2s;
}

.hero h4 {
  font-size: 1.8rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.5);
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.6s;
}

.hero h2 {
  margin-top: 10px;
  font-size: 3.2rem;
  font-weight: 900;
  font-family: "Poppins", sans-serif;
  text-shadow: 3px 3px 8px rgba(0,0,0,0.6);
  letter-spacing: 1px;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 1s;
}

/* Animasi Fade In Up */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Tombol Login di Hero */
.hero-login {
  position: absolute;
  top: 20px; right: 30px;
  z-index: 10;
}

.hero-login a {
  background: #F5F3ED;
  color: #004f54;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.95rem;
  text-decoration: none;
  transition: 0.3s;
}

.hero-login a:hover {
  background: #ffb703;
  color: white;
}

/* Subjudul di hero dengan animasi sama (fadeInUp) */
.hero .hero-sub {
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 1.2s; /* setelah h2 */
  text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}

/* Tombol PPDB: bg putih transparan, teks hijau tosca */
.cta-ppdb {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: .3px;
  text-decoration: none;
  background: rgba(2, 253, 111, 0.69);   /* putih transparan */
  color: #f5faf8;                       /* hijau tosca senada tema */
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
  backdrop-filter: blur(2px);
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 1.6s; /* setelah subjudul */
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.cta-ppdb:hover {
  transform: translateY(-2px);
  background: #f0c90a;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* Responsive tweak */
@media (max-width: 768px) {
  .hero .hero-sub { font-size: .95rem; }
  .cta-ppdb { padding: 8px 14px; font-size: .9rem; }
}


/* =====================================================
   CARD GRID UMUM
===================================================== */
.container {
  max-width: 1000px;
  margin: auto;
  padding: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3rem;
}

/* =====================================================
   BERITA
===================================================== */
#berita .card .read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: #004f54;
  text-decoration: none;
  transition: color 0.3s;
}

#berita .card .read-more:hover {
  text-decoration: underline;
}

/* =====================================================
   GALERI - HP
===================================================== */
@media (max-width: 600px) {
  #galeri .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
  }
  #galeri .card { padding: 6px; }
  #galeri .card img {
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin: 0;
  }
}

/* =====================================================
   BERITA - HP
===================================================== */
@media (max-width: 600px) {
  #berita .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  #berita .card { padding: 0.5rem; }
  #berita .card img {
    height: 80px;
    margin-bottom: 4px;
    border-radius: 6px;
    object-fit: cover;
  }
  #berita .card h3 {
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 4px;
  }
  #berita .card p { display: none; }
  #berita .card .read-more {
    font-size: 0.75rem;
    font-weight: 500;
    color: #004f54;
  }
  /* tampilkan hanya 2 berita terbaru di HP */
  #berita .card:nth-child(n+3) { display: none; }
}

/* =====================================================
   PROGRAM / PONPES / PPDB
===================================================== */
#program-ponpes-ppdb .single-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 2rem 1rem;
}

#program-ponpes-ppdb .single-card i {
  color: #006d77;
  background: #ffd166;
  padding: 20px;
  border-radius: 50%;
  transition: 0.3s;
}

#program-ponpes-ppdb .single-card:hover i {
  background: #ffb703;
  color: white;
  transform: scale(1.2);
}

#program-ponpes-ppdb .single-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

#program-ponpes-ppdb .single-card p {
  font-size: 0.95rem;
  color: #555;
  min-height: 3rem;
}

/* Program - HP */
@media (max-width: 600px) {
  #program-ponpes-ppdb .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  #program-ponpes-ppdb .single-card {
    padding: 1rem;
    gap: 8px;
  }
  #program-ponpes-ppdb .single-card i {
    font-size: 1.5rem;
    padding: 12px;
  }
  #program-ponpes-ppdb .single-card h3 { font-size: 1rem; }
  #program-ponpes-ppdb .single-card p { display: none; }
}

/* =====================================================
   FOOTER
===================================================== */
footer {
  width: 100%;
  background: #004f54;
  color: #fff;
  text-align: center;
  padding: 1.5rem 1rem;
  margin: 0;
  border-top: 3px solid #006d77;
}

footer .footer-content {
  max-width: 1200px;
  margin: auto;
}

footer p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

footer .credit {
  font-size: 0.8rem;
  color: #cce7e8;
}

/* =====================================================
   TOMBOL CHAT WHATSAPP - RESPONSIVE & ELEGAN
===================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 60px;
  right: 20px;
  background: #25D366; /* warna khas WhatsApp */
  color: #fff;
  padding: 10px 18px;
  border-radius: 40px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, background 0.3s ease;
  z-index: 2000;
}

.whatsapp-float i {
  font-size: 1.6rem;
  line-height: 1;
}

.whatsapp-float span {
  font-size: 1rem;
  letter-spacing: 0.3px;
}

/* Hover efek */
.whatsapp-float:hover {
  background: #1ebe5b;
  transform: scale(1.05);
}

/* =========================
   Versi HP (≤600px)
========================= */
@media (max-width: 600px) {
  .whatsapp-float {
    right: 15px;
    bottom: 15px;
    padding: 10px 14px;
    gap: 6px;
    border-radius: 35px;
    font-size: 0.9rem;
    background: #25D366e0; /* sedikit transparan agar elegan */
    backdrop-filter: blur(2px);
  }

  .whatsapp-float i {
    font-size: 1.4rem;
  }

  .whatsapp-float span {
    display: inline;
    font-size: 0.9rem;
    font-weight: 500;
  }
}


/* =====================================================
   RESPONSIVE HP 
===================================================== */
@media (max-width: 768px) {
  .hero {
    aspect-ratio: 3/5;
    padding: 3rem 1rem;
  }
  .hero img { width: 100px; }
  .hero h4 { font-size: 1.1rem; }
  .hero h2 { font-size: 2.2rem; letter-spacing: 0.2px; }
  .hero-login { top: 10px; right: 15px; }
  .hero-login a { padding: 5px 10px; font-size: 0.75rem; }

  nav {
    gap: 10px;
    padding: 0.5rem;
  }
  nav a { font-size: 0.7rem; }
  header h1 { font-size: 1.2rem; }
  header .tagline { font-size: 0.7rem; }
}

/* =====================================================
   HAMBURGER MENU
===================================================== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 20px;
  height: 15px;
  cursor: pointer;
  position: fixed;
  top: 15px; right: 15px;
  z-index: 1002;
}

.hamburger span {
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 2px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -2px);
}

/* =====================================================
   NAVIGASI MOBILE (≤768px)
===================================================== */
@media (max-width: 768px) {
  .hamburger { display: flex; top: 9px; left: 20px; }

  nav {
    position: fixed;
    top: 2rem; right: -100%;
    width: 100%; height: 100%;
    background: #004f54;
    flex-direction: column;
    align-items: flex-start;
    padding: 0rem 1.5rem 13rem; /* jarak seluruh teks menu */
    gap: 1.5rem;
    transition: right 0.3s ease;
    z-index: 1001;
  }

  nav a {
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }

  nav.show { right: 0; }

  .nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
  }

  .nav-overlay.show { display: block; }
}


/* NAVIGASI DESKTOP - menu kiri & sosmed kanan */
@media (min-width: 769px) {
  nav {
    display: flex;
    justify-content: space-between; /* menu kiri, sosmed kanan */
    align-items: center;
    padding: 0.5rem 2rem;
    background: #004f54;
  
  }

  /* Menu utama kiri */
  nav .menu-utama {
    display: flex;
    gap: 20px;
  }

  nav .menu-utama a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
  }

  nav .menu-utama a:hover {
    color: #ffd166;
  }

  /* Sosmed kanan */
  .nav-sosmed {
    display: flex;
    gap: 20px;
    align-items: center;
  }

  .nav-sosmed a {
    color: white;
    font-size: 1rem;
    transition: 0.3s;
  }

  .nav-sosmed a:hover {
    color: #ffd166;
  }
}

/* =====================================================
   SOSMED (Mobile Hamburger Menu)
===================================================== */
/* ============================
   Sosmed Navigation
============================ */

@media (max-width: 768px) {
  /* Container nav di mobile */
  nav {
    display: flex;
    flex-direction: column;
    align-items: center; /* center horizontal semua isi */
    padding: 0rem 1.5rem 13rem;
    gap: 1.5rem;
  }
.nav-sosmed {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.nav-sosmed a {
  color: #fff;
  font-size: 1.1rem; /* besar di HP */
  transition: 0.3s;
  margin-left: 10px;
}

.nav-sosmed a:hover {
  color: #ffd166;
}


