/* Pondok Pesantren Darussalam Rajapolah - Master Stylesheet */
@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 {
  --deep-emerald: #075C40;
  --dark-green: #05422D;
  --soft-gold: #8A6008;
  --warm-gold: #F4C84A;
  --crimson-accent: #C81E2B;
  --teal: #075C40;
  --warm-ivory: #F4FBF7;
  --pure-white: #FFFFFF;
  --light-sage: #E3F6EC;
  --charcoal-green: #163828;
  --muted-gray: #46534C;
  --border-light: #CDECE0;
}

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;
}

/* Base interactive cursor & accessible focus ring (R-32, R-39) */
a[href],
button:not(:disabled),
summary,
select:not(:disabled),
label[for],
[role="button"] {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

:focus-visible {
  outline: 2.5px solid #F4C84A;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(7, 92, 64, 0.35);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #075C40;
  color: #FFFFFF;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border-radius: 0 0 0.75rem 0;
  border: 2px solid #F4C84A;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.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; }

.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(7, 92, 64, 0.16);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.arch-frame:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(7, 92, 64, 0.24);
  border-color: #075C40;
}

.hero-islamic-bg {
  background-color: #075C40;
  background-image:
    radial-gradient(circle at 82% 18%, rgba(244, 200, 74, 0.18) 0%, rgba(244, 200, 74, 0) 48%),
    radial-gradient(circle at 14% 78%, rgba(200, 30, 43, 0.14) 0%, rgba(200, 30, 43, 0) 44%),
    linear-gradient(160deg, rgba(4, 62, 42, 0.7) 0%, rgba(7, 92, 64, 0.5) 55%, rgba(4, 52, 35, 0.78) 100%),
    url('../images/hero-bg-islamic.png');
  background-image:
    radial-gradient(circle at 82% 18%, rgba(244, 200, 74, 0.18) 0%, rgba(244, 200, 74, 0) 48%),
    radial-gradient(circle at 14% 78%, rgba(200, 30, 43, 0.14) 0%, rgba(200, 30, 43, 0) 44%),
    linear-gradient(160deg, rgba(4, 62, 42, 0.7) 0%, rgba(7, 92, 64, 0.5) 55%, rgba(4, 52, 35, 0.78) 100%),
    image-set(
      url('../images/hero-bg-islamic.webp') type('image/webp'),
      url('../images/hero-bg-islamic.png') type('image/png')
    );
  background-size: cover, cover, cover, auto 105%;
  background-position: center, center, center, 12% bottom;
  background-repeat: no-repeat;
}

.hero-mobile-photo {
  background-image: url('../images/hero-2.jpg');
  background-image: image-set(
    url('../images/hero-2-800w.webp') type('image/webp'),
    url('../images/hero-2.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center;
}

.hero-islamic-lattice {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23F4C84A' stroke-opacity='0.14' stroke-width='1'%3E%3Cpath d='M32 4 L40 24 L60 32 L40 40 L32 60 L24 40 L4 32 L24 24 Z'/%3E%3Crect x='14' y='14' width='36' height='36' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='6' stroke='%23FFFFFF' stroke-opacity='0.12'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 64px 64px;
}

@media (min-width: 1024px) {
  #hero.hero-islamic-bg,
  .hero-islamic-bg {
    background-image:
      radial-gradient(ellipse 46% 38% at 22% 44%, rgba(4, 52, 35, 0.42) 0%, rgba(4, 52, 35, 0) 100%),
      image-set(
        url('../images/hero-bg-islamic.webp') type('image/webp'),
        url('../images/hero-bg-islamic.png') type('image/png')
      );
    background-size: cover, 100% 100%;
    background-position: center, center bottom;
    min-height: clamp(640px, 48vw, 880px);
  }

  #hero.hero-islamic-bg::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: linear-gradient(to bottom, rgba(230, 215, 195, 0) 0%, #E6D7C3 100%);
    pointer-events: none;
    z-index: 5;
  }

  #hero.hero-islamic-bg.hero-custom-bg::after {
    display: none;
  }
}

/* Custom uploaded Hero Background */
#hero.hero-islamic-bg.hero-custom-bg {
  background-image:
    linear-gradient(160deg, rgba(4, 62, 42, 0.58) 0%, rgba(7, 92, 64, 0.36) 55%, rgba(4, 52, 35, 0.62) 100%),
    var(--hero-custom-bg);
  background-size: cover, cover;
  background-position: center, center bottom;
  background-repeat: no-repeat;
}

#hero.hero-islamic-bg.hero-custom-bg.hero-overlay-dark {
  background-image:
    linear-gradient(160deg, rgba(4, 52, 35, 0.82) 0%, rgba(7, 92, 64, 0.68) 55%, rgba(4, 42, 28, 0.86) 100%),
    var(--hero-custom-bg);
}

#hero.hero-islamic-bg.hero-custom-bg.hero-overlay-none {
  background-image: var(--hero-custom-bg);
  background-size: cover;
  background-position: center bottom;
}

@media (min-width: 1024px) {
  #hero.hero-islamic-bg.hero-custom-bg {
    background-image:
      radial-gradient(ellipse 46% 38% at 22% 44%, rgba(4, 52, 35, 0.42) 0%, rgba(4, 52, 35, 0) 100%),
      var(--hero-custom-bg);
    background-size: cover, cover;
    background-position: center, center bottom;
  }

  #hero.hero-islamic-bg.hero-custom-bg.hero-overlay-dark {
    background-image:
      linear-gradient(110deg, rgba(4, 48, 32, 0.82) 0%, rgba(7, 92, 64, 0.58) 55%, rgba(4, 42, 28, 0.78) 100%),
      var(--hero-custom-bg);
  }

  #hero.hero-islamic-bg.hero-custom-bg.hero-overlay-none {
    background-image: var(--hero-custom-bg);
    background-size: cover;
    background-position: center bottom;
  }
}

/* Video Background for Hero Section */
#hero.hero-islamic-bg.hero-has-video {
  background: linear-gradient(180deg, #05422D 0%, #075C40 52%, #043A26 100%);
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
}

@media (max-width: 1023px) {
  .hero-video-wrapper {
    inset: 0;
  }

  .hero-bg-video {
    object-position: 90% 25%;
  }

  .hero-bg-yt-iframe {
    width: 100%;
    height: 100%;
    min-width: 178%;
    min-height: 100%;
  }

  .hero-video-overlay-soft {
    background:
      linear-gradient(to top, rgba(4, 58, 38, 0.92) 0%, rgba(4, 58, 38, 0.45) 18%, rgba(4, 58, 38, 0) 38%),
      linear-gradient(180deg, rgba(4, 52, 35, 0.56) 0%, rgba(7, 92, 64, 0.42) 55%, rgba(4, 52, 35, 0.65) 100%);
  }
}

@media (min-width: 1024px) {
  #hero.hero-islamic-bg.hero-has-video {
    background-image: none;
  }

  #hero.hero-islamic-bg.hero-has-video::after {
    display: none;
  }
}

.hero-bg-yt-iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-height: 100%;
  min-width: 177.78vh;
  transform: translate(-50%, -50%) scale(1.18);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-bg-yt-iframe.hero-yt-ready {
  opacity: 1;
}

.hero-video-overlay-soft {
  background: linear-gradient(115deg, rgba(4, 52, 35, 0.62) 0%, rgba(7, 92, 64, 0.34) 56%, rgba(4, 42, 28, 0.48) 100%);
}

.hero-video-overlay-dark {
  background: linear-gradient(115deg, rgba(4, 42, 28, 0.84) 0%, rgba(7, 92, 64, 0.68) 56%, rgba(4, 42, 28, 0.8) 100%);
}

/* Running Text / Marquee below Hero */
.hero-ticker-viewport {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 3%, #000 97%, transparent 100%);
}

.hero-ticker-track {
  display: inline-flex;
  align-items: center;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: heroTickerScroll var(--ticker-duration, 24s) linear infinite;
}

.hero-ticker-track.is-js-marquee {
  animation: none !important;
}

@keyframes heroTickerScroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

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

.hero-mihrab-wrapper:hover {
  transform: translateY(-4px);
}

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

.sambutan-islamic-bg {
  background: #F7F8F0;
}

.sambutan-bg-layer {
  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 top;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0px, rgba(0, 0, 0, 0.22) 64px, rgba(0, 0, 0, 0.72) 132px, #000 210px);
  mask-image: linear-gradient(to bottom, transparent 0px, rgba(0, 0, 0, 0.22) 64px, rgba(0, 0, 0, 0.72) 132px, #000 210px);
}

@media (min-width: 1024px) {
  .sambutan-islamic-bg {
    background: linear-gradient(180deg, #E6D7C3 0px, #EDE4D6 32px, #F3F0E7 82px, #F7F8F0 175px);
  }

  .sambutan-islamic-bg.sambutan-after-custom-hero {
    background: #F7F8F0;
  }
}

@media (max-width: 767px) {
  .sambutan-bg-layer {
    background-size: 180% auto;
    background-position: center 20px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0px, rgba(0, 0, 0, 0.35) 56px, #000 130px);
    mask-image: linear-gradient(to bottom, transparent 0px, rgba(0, 0, 0, 0.35) 56px, #000 130px);
  }
}

.pimpinan-arch-unit {
  position: relative;
  filter: drop-shadow(0 12px 24px rgba(7, 92, 64, 0.16));
  transition: transform 0.3s ease;
}

.pimpinan-arch-unit:hover {
  transform: translateY(-3px);
}

.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: linear-gradient(180deg, #096B4A 0%, #075C40 58%, #054730 100%);
  background-clip: padding-box;
}

.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-card {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid rgba(7, 92, 64, 0.14);
  box-shadow: 0 8px 20px -8px rgba(7, 92, 64, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.program-card:hover {
  transform: translateY(-4px);
  border-color: #F4C84A;
  box-shadow: 0 16px 32px -10px rgba(7, 92, 64, 0.14);
}

.program-mint-header {
  background-color: #EAF5ED;
  border-bottom-left-radius: 50% 20px;
  border-bottom-right-radius: 50% 20px;
}

.lanjutan-islamic-bg {
  background-color: #EAF5ED;
  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: #FFFFFF;
  border: 1px solid rgba(7, 92, 64, 0.16);
  border-radius: 16px;
  box-shadow: 0 8px 20px -8px rgba(7, 92, 64, 0.09);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.lanjutan-card:hover {
  transform: translateY(-4px);
  border-color: #F4C84A;
  box-shadow: 0 16px 30px -10px rgba(7, 92, 64, 0.15);
}

.berita-islamic-bg {
  background-color: #F8F7F0;
}

.berita-card {
  background-color: #FFFFFF;
  border-radius: 16px;
  border: 1px solid rgba(7, 92, 64, 0.12);
  box-shadow: 0 6px 18px -8px rgba(7, 92, 64, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.berita-card:hover {
  transform: translateY(-4px);
  border-color: #075C40;
  box-shadow: 0 14px 28px -10px rgba(7, 92, 64, 0.14);
}

.galeri-softblue-bg {
  background-color: #EAF4FC;
  background-image: linear-gradient(180deg, #EAF4FC 0%, #E3F0FA 55%, #DCECF8 100%);
}

.galeri-photo-overlay {
  background: linear-gradient(to top, rgba(4, 52, 35, 0.94) 0%, rgba(7, 92, 64, 0.62) 48%, rgba(7, 92, 64, 0) 100%);
}

@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;
}

.card-premium {
  background-color: var(--pure-white);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  box-shadow: 0 2px 8px -2px rgba(7, 92, 64, 0.06);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-premium:hover {
  transform: translateY(-3px);
  border-color: #075C40;
  box-shadow: 0 12px 24px -8px rgba(7, 92, 64, 0.12);
}

.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,
.nav-item-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.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: 400px;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  opacity: 0;
}

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

.faq-button[aria-expanded="true"] .faq-lead-icon {
  background-color: #075C40;
  color: #F4C84A;
  border-color: #075C40;
}

.faq-button[aria-expanded="true"] .faq-chevron-wrap {
  background-color: #EAF5ED;
  border-color: #075C40;
  color: #075C40;
}

.brosur-popup-tab {
  background-color: #FFFFFF;
  color: #064832;
  border: 1px solid #CDECE0;
}

.brosur-popup-tab:hover {
  border-color: #075C40;
}

.brosur-popup-tab[aria-pressed="true"] {
  background-color: #075C40;
  color: #FFFFFF;
  border-color: #075C40;
}

.ppdb-campus-bg {
  background-color: #075C40;
  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;
  background-repeat: no-repeat;
}

.ppdb-campus-overlay {
  background: linear-gradient(135deg, rgba(4, 62, 42, 0.88) 0%, rgba(7, 92, 64, 0.82) 55%, rgba(4, 48, 32, 0.90) 100%);
}

.footer-islamic-bg {
  background-color: #F4F9F5;
  border-top: 2px solid #F4C84A;
}

.footer-bg-layer {
  top: 0;
  bottom: 58px;
  overflow: hidden;
  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 (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%);
  }
}

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: #2C4035 !important;
}

footer.footer-islamic-bg a {
  color: #163828 !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: #8A6008 !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;
}

.footer-copyright-bar {
  position: relative;
  color: rgba(255, 255, 255, 0.96) !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.45);
  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.96) !important;
}

.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: #05422D; }
.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; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
