/* ============================================
   MASJID RAYA TANJUNG ALAI — style.css
   Covers: index, kajian, pantri, kegiatan,
   berita_singkat, pengumuman, tempat_ibadah,
   detail, login
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;600;700;800&display=swap");

/* ===== VARIABLES ===== */
:root {
  --emerald-dark: #042f2e;
  --emerald: #065f46;
  --emerald-mid: #059669;
  --gold: #fbbf24;
  --gold-light: #fde68a;
  --bg: #f8fafc;
  --text: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --radius-lg: 20px;
  --radius-xl: 35px;
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== RESET & GLOBAL ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  text-decoration: none;
}
img {
  max-width: 100%;
}

/* ===== NAVBAR ===== */
.custom-navbar {
  background: rgba(4, 47, 46, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
  padding: 14px 0;
  transition: var(--transition);
}

.custom-navbar .navbar-brand {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--gold) !important;
  letter-spacing: -0.5px;
}

.custom-navbar .nav-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85) !important;
  margin: 0 2px;
  padding: 8px 12px !important;
  border-radius: 8px;
  transition: var(--transition);
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
  color: var(--gold) !important;
  background: rgba(255, 255, 255, 0.07);
}

.navbar-toggler {
  border: none !important;
}
.navbar-toggler:focus {
  box-shadow: none;
}
.navbar-toggler-icon {
  filter: invert(1);
}

.custom-navbar .dropdown-menu {
  background: var(--emerald-dark);
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  padding: 8px;
  margin-top: 8px;
}

.custom-navbar .dropdown-item {
  color: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: 0.2s;
}

.custom-navbar .dropdown-item:hover {
  background: var(--gold);
  color: var(--emerald-dark);
  font-weight: 700;
}

.custom-navbar .dropdown-item:active,
.custom-navbar .dropdown-item.active {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
}

/* ===== BUTTONS ===== */
.btn-gold {
  background: var(--gold);
  color: var(--emerald-dark) !important;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  transition: var(--transition);
}

.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.35);
}

.btn-emerald {
  background: var(--emerald);
  color: var(--white) !important;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  transition: var(--transition);
}

.btn-emerald:hover {
  background: var(--emerald-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 95, 70, 0.3);
}

/* ===== HERO — index.php ===== */
.hero-section {
  height: 100vh;
  min-height: 600px;
  background:
    linear-gradient(rgba(4, 47, 46, 0.72), rgba(4, 47, 46, 0.55)),
    url("../img/hero.jpeg") center/cover no-repeat;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
}

.hero-sub {
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2.8rem, 9vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  opacity: 0.8;
  font-weight: 300;
}

/* ===== HERO — halaman dalam (kajian, pantri, dll) ===== */
.hero-section-fix {
  padding: 160px 0 80px;
  background:
    linear-gradient(rgba(4, 47, 46, 0.82), rgba(4, 47, 46, 0.75)),
    url("../img/hero.jpeg") center/cover no-repeat;
  background-attachment: fixed;
  text-align: center;
  color: var(--white);
}

.hero-content-box {
  max-width: 700px;
  margin: 0 auto;
}

/* ===== HERO — kajian.php ===== */
.hero-kajian {
  padding: 160px 0 80px;
  background:
    linear-gradient(rgba(4, 47, 46, 0.82), rgba(4, 47, 46, 0.75)),
    url("../img/hero.jpeg") center/cover no-repeat;
  background-attachment: fixed;
  text-align: center;
  color: var(--white);
}

/* ===== HERO — kegiatan.php ===== */
.hero-section-kegiatan {
  padding: 160px 0 80px;
  background:
    linear-gradient(rgba(4, 47, 46, 0.82), rgba(4, 47, 46, 0.75)),
    url("../img/hero.jpeg") center/cover no-repeat;
  background-attachment: fixed;
  text-align: center;
  color: var(--white);
}

/* ===== JADWAL SHOLAT ===== */
.jadwal-section {
  padding: 0 0 60px;
  margin-top: -70px;
  position: relative;
  z-index: 10;
}

.jadwal-container {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.jadwal-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--emerald-mid);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.jadwal-box {
  background: linear-gradient(145deg, #ffffff, #f0fdf4);
  border-radius: 20px;
  padding: 24px 16px;
  border: 1px solid rgba(6, 95, 70, 0.07);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
  transition: var(--transition);
}

.jadwal-box:hover {
  transform: translateY(-10px);
  background: linear-gradient(145deg, var(--emerald), #047857);
  box-shadow: 0 20px 40px rgba(6, 95, 70, 0.2);
}

.jadwal-box h5 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #64748b;
  margin-bottom: 8px;
  transition: 0.3s;
}

.jadwal-box h4 {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--emerald-dark);
  margin: 0;
  transition: 0.3s;
}

.jadwal-box:hover h5 {
  color: rgba(255, 255, 255, 0.75);
}
.jadwal-box:hover h4 {
  color: var(--gold);
}

/* ===== SECTION BERITA (index) ===== */
.section-berita {
  padding: 80px 0;
  background: var(--bg);
}

.text-accent {
  color: var(--emerald-mid);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--emerald-dark);
  line-height: 1.2;
}

.text-gold {
  color: var(--gold) !important;
}
.text-emerald {
  color: var(--emerald-mid) !important;
}
.text-emerald-dark {
  color: var(--emerald-dark) !important;
}

.text-muted-custom {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== NEWS CARD (index) ===== */
.card-news {
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-news:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(6, 95, 70, 0.12);
  border-color: var(--emerald-mid);
}

.card-img-wrapper {
  position: relative;
  height: 210px;
  overflow: hidden;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.6s ease;
}

.card-news:hover .card-img-wrapper img {
  transform: scale(1.08);
}

.date-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.95);
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-body-custom {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.category-tag {
  color: var(--emerald-mid);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: block;
}

.news-title {
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.45;
  margin-bottom: 10px;
  transition: 0.3s;
}

.card-news:hover .news-title {
  color: var(--emerald);
}

.news-excerpt {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 16px;
}

.read-more {
  color: var(--emerald);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: 0.3s;
}

.card-news:hover .read-more {
  gap: 10px;
  color: var(--gold);
}

/* ===== PAGINATION ===== */
.pagination-container {
  background: var(--white);
  padding: 10px;
  border-radius: 16px;
  gap: 4px;
}

.page-link-custom {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  transition: 0.3s;
}

.page-link-custom.active {
  background: var(--gold);
  color: var(--emerald-dark);
  box-shadow: 0 5px 15px rgba(251, 191, 36, 0.35);
}

.page-link-custom:hover:not(.active) {
  background: var(--emerald-dark);
  color: var(--white);
}

/* ===== TENTANG (index) ===== */
.tentang-section {
  background: var(--white);
}

.tentang-img {
  border-radius: 40px;
  object-fit: cover;
  max-height: 420px;
  box-shadow: 20px 20px 0 var(--emerald);
  transition: var(--transition);
}

.tentang-img:hover {
  transform: translate(6px, 6px);
}

/* ===== KONTAK (index) ===== */
.contact-section {
  background: linear-gradient(180deg, #f8fafc, #e8f4f0);
}

.contact-card {
  background: var(--white);
  padding: 50px 40px;
  border-radius: 40px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.06);
}

.contact-card .form-control {
  background: #f1f5f9;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: 0.3s;
  font-family: "Plus Jakarta Sans", sans-serif;
}

.contact-card .form-control::placeholder {
  color: #94a3b8;
}

.contact-card .form-control:focus {
  background: var(--white);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
  outline: none;
}

.btn-contact {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-mid));
  color: var(--white) !important;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  box-shadow: 0 10px 25px rgba(6, 95, 70, 0.25);
}

.btn-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(6, 95, 70, 0.35);
  background: var(--gold);
  color: var(--emerald-dark) !important;
}

/* ===== FOOTER ===== */
.footer-dark {
  background: var(--emerald-dark);
  border-top: 4px solid var(--gold);
  color: var(--white);
}

/* ===== SHARED: section title & garis (halaman dalam) ===== */
.section-title-dark {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--emerald-dark);
}

.title-line {
  width: 60px;
  height: 4px;
  background: var(--gold);
  border-radius: 10px;
  margin-top: 14px;
}

.text-muted-dark {
  color: #475569;
  line-height: 1.8;
  font-size: 1rem;
}

/* ===== SHARED: card umum (berita_singkat, pengumuman) ===== */
.custom-card-global {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid #f1f5f9;
}

.custom-card-global:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(6, 95, 70, 0.1) !important;
}

.card-img-box {
  height: 200px;
  overflow: hidden;
}

.card-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s;
}

.custom-card-global:hover .card-img-box img {
  transform: scale(1.06);
}

/* ===== KAJIAN ===== */
.kajian-detail {
  background: var(--bg);
}

.kajian-frame {
  position: relative;
}

.rounded-custom {
  border-radius: 40px;
  width: 100%;
  object-fit: cover;
}

.frame-decoration {
  position: absolute;
  top: -18px;
  left: -18px;
  width: 90px;
  height: 90px;
  background: var(--gold);
  border-radius: 24px;
  z-index: -1;
  opacity: 0.45;
}

.kajian-info-box {
  padding-left: 4px;
}

.list-kajian {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.list-kajian li {
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--emerald-dark);
  font-size: 0.95rem;
}

/* ===== KEGIATAN ===== */
.kegiatan-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  transition: var(--transition);
}

.kegiatan-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(6, 95, 70, 0.12) !important;
}

.kegiatan-img-box {
  height: 200px;
  overflow: hidden;
}

.kegiatan-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.6s;
}

.kegiatan-card:hover .kegiatan-img-box img {
  transform: scale(1.08);
}

.kegiatan-content {
  padding: 20px;
}

/* ===== PANTRI & TEMPAT IBADAH ===== */
.pantri-frame img,
.tentang-img-inner {
  border-radius: 24px;
  width: 100%;
  object-fit: cover;
}

.feature-card {
  background: #f8fafc;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  transition: var(--transition);
  height: 100%;
}

.feature-card:hover {
  background: var(--white);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transform: translateY(-4px);
}

.feature-card .bi {
  color: var(--emerald-mid);
}

/* ===== DETAIL BERITA ===== */
.detail-container {
  margin: 110px auto 60px;
  max-width: 820px;
  background: var(--white);
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

.detail-back {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  transition: 0.2s;
}

.detail-back:hover {
  color: var(--emerald);
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.detail-category {
  background: rgba(5, 150, 105, 0.1);
  color: var(--emerald-mid);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 50px;
}

.detail-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.detail-title {
  font-weight: 800;
  color: var(--emerald-dark);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  line-height: 1.3;
  margin-bottom: 16px;
}

.detail-divider {
  border-color: #e2e8f0;
  margin: 20px 0;
}

.detail-img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid var(--gold);
  margin-bottom: 28px;
  display: block;
}

.detail-text {
  text-align: justify;
  line-height: 1.9;
  color: #475569;
  font-size: 1rem;
  margin-bottom: 32px;
}

.detail-footer-nav {
  padding-top: 24px;
  border-top: 1px solid #f1f5f9;
}

/* Responsive detail */
@media (max-width: 768px) {
  .detail-container {
    margin: 80px 12px 40px;
    padding: 24px 18px;
    border-radius: 16px;
  }
  .detail-img {
    border-radius: 12px;
    max-height: 260px;
  }
}

/* ===== LOGIN ===== */
.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--emerald-dark), var(--emerald));
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-card {
  background: var(--white);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 20px 20px 0 0;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--emerald-dark);
  margin-bottom: 28px;
}

.login-card input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  font-size: 0.95rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text);
  background: #f8fafc;
  transition: 0.2s;
}

.login-card input:focus {
  border-color: var(--emerald);
  background: var(--white);
  outline: none;
  box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.1);
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--emerald-dark);
  color: var(--white);
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: "Plus Jakarta Sans", sans-serif;
}

.login-btn:hover {
  background: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 95, 70, 0.25);
}

.back-btn {
  display: block;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: 0.2s;
}

.back-btn:hover {
  color: var(--emerald);
}

.login-footer {
  margin-top: 20px;
  font-size: 12px;
  color: #94a3b8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .hero-title {
    letter-spacing: -1px;
  }
  .jadwal-container {
    padding: 28px 20px;
  }
  .contact-card {
    padding: 36px 28px;
  }
}

@media (max-width: 768px) {
  /* fix: background-attachment fixed tidak bekerja di iOS */
  .hero-section,
  .hero-section-fix,
  .hero-kajian,
  .hero-section-kegiatan {
    background-attachment: scroll;
  }

  .hero-section-fix,
  .hero-kajian,
  .hero-section-kegiatan {
    padding: 130px 0 60px;
  }

  .jadwal-section {
    margin-top: -40px;
  }
  .jadwal-container {
    padding: 24px 16px;
    border-radius: 20px;
  }
  .jadwal-box {
    padding: 18px 10px;
    border-radius: 14px;
  }
  .jadwal-box h4 {
    font-size: 1.4rem;
  }
  .jadwal-box h5 {
    font-size: 0.7rem;
  }

  .section-berita {
    padding: 60px 0;
  }

  .tentang-img {
    border-radius: 24px;
    box-shadow: 12px 12px 0 var(--emerald);
    max-height: 260px;
    width: 100%;
  }

  .contact-card {
    padding: 28px 18px;
    border-radius: 24px;
  }

  .detail-container {
    margin: 80px 16px 40px;
    padding: 24px 18px;
  }

  .frame-decoration {
    display: none;
  }

  .rounded-custom {
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    letter-spacing: -0.5px;
  }

  /* jadwal 2 kolom di HP kecil */
  #jadwalSholat > div {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .card-img-wrapper {
    height: 180px;
  }
  .card-img-box {
    height: 170px;
  }
  .kegiatan-img-box {
    height: 170px;
  }

  .contact-card {
    padding: 20px 14px;
  }

  .login-card {
    padding: 32px 20px;
  }
}
