/* ======================================================== */
/* CUSTOM STYLES - PONDOK PESANTREN DARUSSALAM RAJAPOLAH TASIKMALAYA    */
/* Concept: Modern Islamic Education (Elegant, Premium)     */
/* ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Playfair+Display:ital,wght@0,500;0,600;1,400;1,500;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Primary - Hijau Muda Segar & Cerah (Fresh Young Islamic Green) */
  --deep-emerald: #22AD65;
  --dark-green: #17874D;

  /* Secondary */
  --soft-gold: #0284C7;
  --warm-gold: #BBF7D0;
  --teal: #109E78;

  /* Background */
  --warm-ivory: #F4FBF7;
  --pure-white: #FFFFFF;
  --light-sage: #E3F6EC;

  /* Typography */
  --charcoal-green: #163828;
  --muted-gray: #557063;

  /* UI Borders */
  --border-light: #CDECE0;
  --border-gold: #BBF7D0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--charcoal-green);
}

body {
  background-color: var(--pure-white);
  color: var(--charcoal-green);
  overflow-x: hidden;
}

/* Typography Helpers */
.font-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-body {
  font-family: 'Inter', sans-serif;
}

.font-editorial {
  font-family: 'Lora', serif;
}

.font-arabic {
  font-family: 'Amiri', serif;
}

.font-playfair {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Islamic Arch Dome Frame (Pimpinan & Highlight Elements) */
.arch-frame {
  position: relative;
  border-top-left-radius: 9999px;
  border-top-right-radius: 9999px;
  border-bottom-left-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
  overflow: hidden;
  border: 3px solid #A7F3D0;
  box-shadow: 0 10px 25px -5px rgba(23, 135, 77, 0.18);
  transition: all 0.3s ease;
}

.arch-frame:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(34, 173, 101, 0.25);
  border-color: #22AD65;
}

/* Hero Section Background & Pointed Islamic Mihrab Frame */
.hero-islamic-bg {
  background-color: #075C40;
  background-image: url('../images/hero-bg-islamic.png');
  background-image: -webkit-image-set(
    url('../images/hero-bg-islamic.webp') type('image/webp'),
    url('../images/hero-bg-islamic.png') type('image/png')
  );
  background-image: image-set(
    url('../images/hero-bg-islamic.webp') type('image/webp'),
    url('../images/hero-bg-islamic.png') type('image/png')
  );
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}

@media (min-width: 1024px) {

  #hero.hero-islamic-bg,
  .hero-islamic-bg {
    background-size: 100% 100%;
    background-position: center bottom;
    min-height: clamp(660px, 50vw, 920px);
  }
}

.hero-mihrab-wrapper {
  position: relative;
  filter: drop-shadow(0 20px 36px rgba(4, 42, 28, 0.42));
  transition: transform 0.4s ease, filter 0.4s ease;
}

.hero-mihrab-wrapper:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 26px 44px rgba(4, 42, 28, 0.5));
}

.hero-mihrab-clip {
  clip-path: url(#heroMihrabClip);
  -webkit-clip-path: url(#heroMihrabClip);
}

/* Sambutan Pimpinan & Video Profil Section Background */
.sambutan-islamic-bg {
  background-color: #F7F8F0;
  background-image: url('../images/sambutan-bg-islamic.jpg');
  background-image: -webkit-image-set(
    url('../images/sambutan-bg-islamic.webp') type('image/webp'),
    url('../images/sambutan-bg-islamic.jpg') type('image/jpeg')
  );
  background-image: image-set(
    url('../images/sambutan-bg-islamic.webp') type('image/webp'),
    url('../images/sambutan-bg-islamic.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 1024px) {
  .sambutan-islamic-bg {
    background-size: cover;
    background-position: center;
    min-height: clamp(680px, 50vw, 960px);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .sambutan-islamic-bg {
    background-size: cover;
    background-position: center top;
  }
}

@media (max-width: 767px) {
  .sambutan-islamic-bg {
    background-size: 180% auto;
    background-position: center top;
  }
}

/* Pimpinan Pesantren Unified Islamic Dome Arch & Integrated Nameplate */
.pimpinan-arch-unit {
  position: relative;
  filter: drop-shadow(0 14px 28px rgba(7, 92, 64, 0.18));
  transition: transform 0.35s ease, filter 0.35s ease;
}

.pimpinan-arch-unit:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 18px 34px rgba(7, 92, 64, 0.25));
}

.pimpinan-arch-frame {
  position: relative;
  border-top-left-radius: 9999px;
  border-top-right-radius: 9999px;
  overflow: hidden;
  border: 2.5px solid #F4C84A;
  border-bottom: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(21, 155, 104, 0.34) 0%, rgba(7, 92, 64, 0) 68%),
    linear-gradient(180deg, #096B4A 0%, #075C40 58%, #054730 100%);
  background-clip: padding-box;
}

.pimpinan-arch-frame::after {
  content: '';
  position: absolute;
  inset: 6px 6px 0 6px;
  border-radius: 9999px 9999px 0 0;
  border: 1px solid rgba(244, 200, 74, 0.26);
  border-bottom: 0;
  pointer-events: none;
  z-index: 20;
}

.pimpinan-arch-nameplate {
  position: relative;
  z-index: 20;
  background: linear-gradient(180deg, #065238 0%, #05422D 100%);
  border: 2.5px solid #F4C84A;
  border-top: 1.5px solid rgba(244, 200, 74, 0.85);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

/* Program Unggulan Card & Soft Mint Islamic Header */
.program-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F7F0 100%);
  border-radius: 22px;
  border: 1px solid rgba(7, 92, 64, 0.12);
  box-shadow: 0 12px 28px -8px rgba(7, 92, 64, 0.09);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.program-card:hover {
  transform: translateY(-6px);
  border-color: rgba(244, 200, 74, 0.75);
  box-shadow: 0 20px 38px -10px rgba(7, 92, 64, 0.16);
}

.program-mint-header {
  background-color: #EAF5ED;
  background-image: url("data:image/svg+xml,%3Csvg width='56' height='56' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23075C40' stroke-width='1' stroke-opacity='0.07'%3E%3Crect x='26' y='26' width='28' height='28' transform='rotate(0 40 40)'/%3E%3Crect x='26' y='26' width='28' height='28' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 56px;
  border-bottom-left-radius: 50% 20px;
  border-bottom-right-radius: 50% 20px;
}

/* Pendidikan Berkelanjutan Section Background & Glass Cards */
.lanjutan-islamic-bg {
  background-color: #EAF5ED;
  background-image: url('../images/lanjutan-bg-islamic.jpg');
  background-image: -webkit-image-set(
    url('../images/lanjutan-bg-islamic.webp') type('image/webp'),
    url('../images/lanjutan-bg-islamic.jpg') type('image/jpeg')
  );
  background-image: image-set(
    url('../images/lanjutan-bg-islamic.webp') type('image/webp'),
    url('../images/lanjutan-bg-islamic.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 767px) {
  .lanjutan-islamic-bg {
    background-position: 78% bottom;
  }
}

.lanjutan-card {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(7, 92, 64, 0.16);
  border-radius: 20px;
  box-shadow: 0 12px 28px -8px rgba(7, 92, 64, 0.10);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.lanjutan-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(244, 200, 74, 0.85);
  box-shadow: 0 18px 36px -10px rgba(7, 92, 64, 0.16);
}

/* Seputar Kegiatan & Berita Terkini Background & Portal Cards */
.berita-islamic-bg {
  background-color: #F8F7F0;
  background-image: url("data:image/svg+xml,%3Csvg width='72' height='72' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23075C40' stroke-width='1' stroke-opacity='0.04'%3E%3Crect x='26' y='26' width='28' height='28' transform='rotate(0 40 40)'/%3E%3Crect x='26' y='26' width='28' height='28' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
}

.berita-card {
  background-color: #FFFFFF;
  border-radius: 20px;
  border: 1px solid rgba(7, 92, 64, 0.11);
  box-shadow: 0 10px 26px -8px rgba(7, 92, 64, 0.08);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.berita-card:hover {
  transform: translateY(-5px);
  border-color: rgba(21, 155, 104, 0.45);
  box-shadow: 0 18px 36px -10px rgba(7, 92, 64, 0.15);
}

/* Galeri Kegiatan & Suasana Pembelajaran (Soft Blue Pastel + Emerald Overlay) */
.galeri-softblue-bg {
  background-color: #EAF4FC;
  background-image:
    url("data:image/svg+xml,%3Csvg width='76' height='76' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23075C40' stroke-width='1' stroke-opacity='0.038'%3E%3Crect x='26' y='26' width='28' height='28' transform='rotate(0 40 40)'/%3E%3Crect x='26' y='26' width='28' height='28' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='10'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.7) 0%, transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(205, 228, 246, 0.55) 0%, transparent 48%),
    linear-gradient(180deg, #EAF4FC 0%, #E3F0FA 52%, #DCECF8 100%);
  background-size: 76px 76px, 100% 100%, 100% 100%, 100% 100%;
}

.galeri-photo-overlay {
  background: linear-gradient(to top, rgba(7, 92, 64, 0.92) 0%, rgba(7, 92, 64, 0.52) 45%, rgba(7, 92, 64, 0) 100%);
}

/* Running Text (Infinite Marquee Ticker) */
@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  display: flex;
  width: max-content;
  animation: marquee-scroll 35s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

.ticker-track-mask {
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
}

/* Premium Card Styles */
.card-premium {
  background-color: var(--pure-white);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  box-shadow: 0 2px 8px -2px rgba(18, 63, 53, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-premium:hover {
  transform: translateY(-4px);
  border-color: var(--soft-gold);
  box-shadow: 0 14px 28px -6px rgba(18, 63, 53, 0.12);
}

/* Navigation Dropdown */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.group:hover .nav-dropdown,
.group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mobile Submenu */
.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-submenu.open {
  max-height: 350px;
}

/* Badges */
.badge-gold {
  background-color: #E0F2FE;
  color: #0369A1;
  border: 1px solid #BAE6FD;
}

.badge-emerald {
  background-color: #E3F6EC;
  color: #17874D;
  border: 1px solid #BBF7D0;
}

.badge-teal {
  background-color: #CCFBF1;
  color: #0F766E;
  border: 1px solid #99F6E4;
}

/* WhatsApp Floating Ping */
@keyframes wa-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(36, 143, 122, 0.6);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(36, 143, 122, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(36, 143, 122, 0);
  }
}

.wa-floating-btn {
  animation: wa-pulse 2.2s infinite;
}

/* Smooth Accordion Transition */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}

.accordion-content.open {
  max-height: 600px;
  opacity: 1;
}

/* Islamic Geometric Background Pattern SVG (Authentic 8-Point Star Girih - Crisp White/Mint) */
.bg-islamic-pattern {
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23FFFFFF' stroke-width='1' stroke-opacity='0.22'%3E%3Crect x='26' y='26' width='28' height='28' transform='rotate(0 40 40)'/%3E%3Crect x='26' y='26' width='28' height='28' transform='rotate(45 40 40)'/%3E%3Ccircle cx='40' cy='40' r='10' stroke-opacity='0.18'/%3E%3Cpath d='M0 40 L26 40 M54 40 L80 40 M40 0 L40 26 M40 54 L40 80' stroke-opacity='0.18'/%3E%3Cpath d='M0 0 L20 20 M80 0 L60 20 M0 80 L20 60 M80 80 L60 60' stroke-opacity='0.18'/%3E%3Crect x='-8' y='-8' width='16' height='16' transform='rotate(45 0 0)' stroke-opacity='0.22'/%3E%3Crect x='72' y='-8' width='16' height='16' transform='rotate(45 80 0)' stroke-opacity='0.22'/%3E%3Crect x='-8' y='72' width='16' height='16' transform='rotate(45 0 80)' stroke-opacity='0.22'/%3E%3Crect x='72' y='72' width='16' height='16' transform='rotate(45 80 80)' stroke-opacity='0.22'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px 80px;
}

.bg-islamic-motif {
  display: none;
}

/* PPDB Section Real Campus Building Photo Background & Soft Mint/Emerald Overlay */
.ppdb-campus-bg {
  background-color: #075C40;
  background-image: url('../images/ppdb-gedung-sekolah.jpg');
  background-image: -webkit-image-set(
    url('../images/ppdb-gedung-sekolah.webp') type('image/webp'),
    url('../images/ppdb-gedung-sekolah.jpg') type('image/jpeg')
  );
  background-image: image-set(
    url('../images/ppdb-gedung-sekolah.webp') type('image/webp'),
    url('../images/ppdb-gedung-sekolah.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center 36%;
  background-repeat: no-repeat;
}

@media (max-width: 767px) {
  .ppdb-campus-bg {
    background-position: center 38%;
  }
}

.ppdb-campus-overlay {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(234, 245, 237, 0.24) 0%, rgba(244, 200, 74, 0.08) 35%, transparent 70%),
    radial-gradient(ellipse 70% 65% at 50% 52%, rgba(6, 72, 50, 0.42) 0%, transparent 100%),
    linear-gradient(180deg, rgba(7, 92, 64, 0.56) 0%, rgba(7, 92, 64, 0.50) 48%, rgba(5, 68, 47, 0.72) 100%);
}

/* Footer Section Reference Background (Flush Top Connected to PPDB + Soft Mint/White + Corner Ornaments + Emerald Copyright) */
footer.footer-islamic-bg {
  background: linear-gradient(180deg, #D1F3E4 0%, #EAF9F2 35%, #F5FCFA 68%, #EAF9F2 100%);
  border-top: 2px solid rgba(244, 200, 74, 0.55);
  color: #334B3F;
}

.footer-bg-layer {
  top: 0;
  bottom: 58px;
  overflow: hidden;
  background-image: url('../images/footer-bg-islamic.jpg');
  background-image: -webkit-image-set(
    url('../images/footer-bg-islamic.webp') type('image/webp'),
    url('../images/footer-bg-islamic.jpg') type('image/jpeg')
  );
  background-image: image-set(
    url('../images/footer-bg-islamic.webp') type('image/webp'),
    url('../images/footer-bg-islamic.jpg') type('image/jpeg')
  );
  background-size: 100% 137%;
  background-position: center 51.1%;
  background-repeat: no-repeat;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-bg-layer {
    background-size: 132% 137%;
    background-position: center 51.1%;
  }
}

@media (max-width: 767px) {
  .footer-bg-layer {
    bottom: auto;
    height: 200px;
    background-size: 185% auto;
    background-position: center -36px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 84%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 68%, transparent 84%);
  }
}

/* Readable Contrast on Bright Mint-White Footer Area */
footer.footer-islamic-bg h3,
footer.footer-islamic-bg h4 {
  color: #064832 !important;
}

footer.footer-islamic-bg h4,
footer.footer-islamic-bg .border-b {
  border-color: rgba(7, 92, 64, 0.16) !important;
}

footer.footer-islamic-bg p,
footer.footer-islamic-bg ul,
footer.footer-islamic-bg li {
  color: #334B3F !important;
}

footer.footer-islamic-bg a {
  color: #254636 !important;
}

footer.footer-islamic-bg a:hover {
  color: #075C40 !important;
}

footer.footer-islamic-bg .text-warm-gold {
  color: #075C40 !important;
}

footer.footer-islamic-bg span.text-warm-gold {
  color: #C8961E !important;
}

footer.footer-islamic-bg .bg-deep-emerald {
  background-color: #075C40 !important;
  color: #FFFFFF !important;
  border-color: rgba(244, 200, 74, 0.55) !important;
}

footer.footer-islamic-bg a.bg-deep-emerald {
  color: #FFFFFF !important;
}

footer.footer-islamic-bg a.bg-deep-emerald:hover {
  background-color: #F4C84A !important;
  color: #064832 !important;
}

footer.footer-islamic-bg span.bg-deep-emerald {
  color: #F4C84A !important;
}

/* Dark Emerald Copyright Bar */
.footer-copyright-bar {
  position: relative;
  color: rgba(255, 255, 255, 0.92) !important;
}

.footer-copyright-bar::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -50vw;
  right: -50vw;
  background-color: #04663D;
  border-top: 1px solid rgba(244, 200, 74, 0.40);
  z-index: -1;
}

footer.footer-islamic-bg .footer-copyright-bar p,
footer.footer-islamic-bg .footer-copyright-bar strong {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* Clean Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--warm-ivory);
}

::-webkit-scrollbar-thumb {
  background: #c5d1c8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--teal);
}

/* CMS PROSE STYLES */
.cms-prose { color: #33413A; line-height: 1.8; font-size: 15.5px; }
.cms-prose h1, .cms-prose h2, .cms-prose h3, .cms-prose h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #064832; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.75rem; line-height: 1.35;
}
.cms-prose h2 { font-size: 1.35rem; }
.cms-prose h3 { font-size: 1.15rem; }
.cms-prose p { margin-bottom: 1rem; }
.cms-prose ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.cms-prose ol { list-style-type: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.cms-prose li { margin-bottom: 0.35rem; }
.cms-prose a { color: #075C40; font-weight: 600; text-decoration: underline; }
.cms-prose a:hover { color: #159B68; }
.cms-prose img { max-width: 100%; height: auto; border-radius: 14px; margin: 1rem auto; display: block; box-shadow: 0 8px 24px -6px rgba(7,92,64,0.12); }
.cms-prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 14px; overflow-x: auto; display: block; }
.cms-prose th, .cms-prose td { border: 1px solid #DCECE3; padding: 0.65rem 0.9rem; text-align: left; }
.cms-prose th { background-color: #EAF5ED; color: #064832; font-weight: 700; }
.cms-prose iframe, .cms-prose embed { max-width: 100%; border-radius: 14px; margin: 1rem 0; }
.cms-prose blockquote { border-left: 4px solid #F4C84A; background: #F8F7F0; padding: 1rem 1.25rem; border-radius: 0 12px 12px 0; margin: 1.25rem 0; font-style: italic; color: #163828; }
