/* Al Huda Institute – colours from logo: green #47A027, #B2E043; maroon #8C0000 */
:root {
  --maroon: #8C0000;
  --maroon-dark: #6d0000;
  --green-dark: #47A027;
  --green-light: #B2E043;
  --mauve: #984167;
  --mauve-light: #f5e8ee;
  --dua-accent: #031566;
  --dua-bg: #eef5e8;
  --white: #fff;
  --text-dark: #2c2c2c;
  --text-muted: #555;
  --bg-cream: #f8f6f3;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text-dark);
  line-height: 1.5;
  background: var(--white);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Scroll targets: leave space for sticky header so nav links don’t hide section top */
#programs,
#courses,
#dua,
#about,
#contact {
  scroll-margin-top: 80px;
}

@media (max-width: 768px) {
  #programs,
  #courses,
  #dua,
  #about,
  #contact {
    scroll-margin-top: 48px;
  }
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.nav-bar {
  background: var(--maroon);
  padding: 0;
  position: relative;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px;
  margin: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px 20px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-bar a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  transition: background 0.2s;
}

.nav-bar a:hover {
  background: rgba(255,255,255,0.15);
}

/* Desktop: hide hamburger, always show horizontal menu */
@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }
  .nav-bar .nav-inner {
    display: flex !important;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .nav-bar {
    display: flex;
    flex-direction: column;
  }
  .nav-toggle {
    display: flex;
    align-self: flex-end;
    margin: 6px 12px 6px 0;
  }
  .nav-inner {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0 12px 12px;
  }
  .nav-bar.nav-open .nav-inner {
    display: flex;
    padding: 0 12px 12px;
  }
  .nav-bar a {
    display: block;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }
  .nav-bar a:last-child {
    border-bottom: none;
  }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: max(75vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Parallax background – image moves slower than scroll (fixed attachment) */
.hero-bg {
  position: absolute;
  inset: 0;
  background: #2a2a2a url("assets/image-1.jpg") center/cover no-repeat;
  background-attachment: fixed;
  background-size: 115%;
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .hero-bg {
    background-attachment: scroll;
    background-size: cover;
  }
}

/* Animated gradient overlay – the "moving opaque layer" (often called animated overlay or gradient overlay) */
.hero-overlay-moving {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(140, 0, 0, 0.42) 0%,
    rgba(71, 160, 39, 0.36) 40%,
    rgba(64, 90, 110, 0.45) 70%,
    rgba(140, 0, 0, 0.38) 100%
  );
  background-size: 200% 200%;
  animation: overlayMove 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes overlayMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 48px 24px;
  max-width: 720px;
}

.hero-logo {
  display: inline-block;
  margin-bottom: 24px;
  margin-left: -18px;
  text-decoration: none;
}

.hero-logo:hover {
  opacity: 0.95;
}

.hero-logo-img {
  height: 80px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.2));
}

.hero-pre {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--white);
  margin: 0 0 4px;
  letter-spacing: 0.06em;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  margin: 0 0 16px;
  line-height: 1.2;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.95);
  margin: 0;
  line-height: 1.6;
}

/* ----- Ramadhan Programs ----- */
.programs {
  padding: 56px 0 64px;
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.programs-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-dark);
  text-align: center;
  margin: 0 0 8px;
}

.programs-main-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--maroon);
  text-align: center;
  margin: 0 0 40px;
  line-height: 1.3;
}

/* ----- Dua Tool Section ----- */
.dua-section {
  padding: 56px 0 72px;
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(3, 21, 102, 0.08);
  border-bottom: 1px solid rgba(3, 21, 102, 0.06);
}

/* Parallax background – dua-background image (fixed attachment) */
.dua-section-bg {
  position: absolute;
  inset: 0;
  background: var(--dua-bg) url("assets/dua-background.jpg") center/cover no-repeat;
  background-attachment: fixed;
  background-size: 115%;
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .dua-section-bg {
    background-attachment: scroll;
    background-size: cover;
  }
}

@media (max-width: 768px) {
  .dua-section {
    padding: 32px 0 40px;
  }
  .dua-section-inner {
    padding: 0 20px;
    max-width: 100%;
  }
  .dua-section-label {
    font-size: 1.2rem;
    margin: 0 0 20px;
  }
  .dua-section-ayah {
    margin: 0 0 18px;
    width: 100%;
  }
  .dua-section-ayah-arabic {
    font-size: 1.2rem;
    line-height: 2;
    margin: 0 0 16px;
    max-width: 100%;
  }
  .dua-section-ayah-translation {
    font-size: 0.88rem;
    line-height: 1.8;
    text-align: center;
    max-width: 100%;
  }
  .dua-section-btn {
    padding: 12px 28px;
    font-size: 0.95rem;
    min-width: 0;
    width: auto;
  }
}

.dua-section-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  pointer-events: none;
}

.dua-section-inner {
  position: relative;
  z-index: 1;
  max-width: none;
  padding: 0 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dua-section-label {
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin: 0 0 44px;
}

.dua-section-ayah {
  text-align: center;
  margin: 0 0 20px;
}

.dua-section-ayah-arabic {
  font-family: 'Amiri', serif;
  font-size: 2.35rem;
  color: var(--white);
  margin: 0 0 24px;
  line-height: 2;
  direction: rtl;
}

.dua-section-ayah-translation {
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}

.dua-section-btn {
  display: inline-block;
  text-align: center;
  padding: 12px 32px;
  background: var(--white);
  color: #031566;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.dua-section-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #021044;
}

.dua-tool-card {
  display: block;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(3, 21, 102, 0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.dua-tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(3, 21, 102, 0.12), 0 0 0 1px rgba(3, 21, 102, 0.1);
}

.dua-tool-header {
  background: rgba(3, 21, 102, 0.82);
  padding: 16px 24px;
  text-align: center;
}

.dua-tool-arabic {
  font-family: 'Amiri', serif;
  font-size: 1.5rem;
  color: var(--white);
  margin: 0 0 8px;
  line-height: 1.6;
  direction: rtl;
}

.dua-tool-translation {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.dua-tool-body {
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.7);
}

.dua-tool-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dua-accent);
  margin: 0 0 8px;
}

.dua-tool-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

.dua-tool-link {
  font-weight: 600;
  color: var(--dua-accent);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.dua-tool-card:hover .dua-tool-link {
  color: #021044;
}

/* Ramadhan program cards – clean horizontal layout, pill-shaped images, overlapping green icons */
.program-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: stretch;
}

.program-card {
  display: block;
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  /* No border or strong shadow – cards defined by content on white */
}

.program-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.card-image-wrap {
  position: relative;
  padding-top: 72%;
  overflow: visible;
}

/* Rounded image: all four corners well rounded */
.card-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 80px;
  margin: 6%;
  background-color: var(--green-dark);
}

.card-image-1 {
  background: var(--green-dark) url("assets/dua.jpeg") center/cover no-repeat;
}

.card-image-2 {
  background: var(--green-dark) url("assets/memorization.jpeg") center/cover no-repeat;
}

.card-image-3 {
  background: var(--green-dark) url("assets/livng-through-verses.jpeg") center/cover no-repeat;
}

.card-image-course-1 {
  background: var(--green-dark) url("assets/Course-1.jpg") center/cover no-repeat;
}

.card-image-course-2 {
  background: var(--green-dark) url("assets/Course-2.jpg") center/cover no-repeat;
}

/* Maroon circle icon – overlaps bottom-left of image, aligned with title (same shade as header) */
.card-icon {
  position: absolute;
  left: 20px;
  bottom: 12px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(140, 0, 0, 0.35);
  z-index: 1;
}

.card-icon::after {
  content: '';
  width: 32px;
  height: 32px;
  background: var(--white);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 2L15 8L22 9L17 14L18 21L12 18L6 21L7 14L2 9L9 8L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 2L15 8L22 9L17 14L18 21L12 18L6 21L7 14L2 9L9 8L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.card-icon-2::after {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.card-icon-3::after {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Title below image, text moved up */
.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 4px 24px 6px 24px;
  line-height: 1.3;
  min-height: 1.3em;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 24px 16px;
  line-height: 1.5;
}

/* ----- About Us (redesigned) ----- */
.about-section {
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}

.about-section-bg {
  position: absolute;
  inset: 0;
  background: #2a2a2a url("assets/image-2.jpg") center/cover no-repeat;
  background-attachment: fixed;
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .about-section-bg {
    background-attachment: scroll;
  }
}

.about-section-overlay {
  position: absolute;
  inset: 0;
  background: rgba(40, 40, 40, 0.78);
  pointer-events: none;
}

.about-section .container.about-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  margin: 0 0 12px;
}

.about-main-heading {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  margin: 0 0 20px;
  line-height: 1.3;
}

.about-intro-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.88);
  text-align: center;
  margin: 0 0 40px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Large Quran ayah – on top, overlaps Vision/Mission below */
.about-ayah-centre {
  background: var(--maroon);
  padding: 40px 36px;
  border-radius: 12px;
  text-align: center;
  margin-bottom: -60px;
  margin-left: auto;
  margin-right: auto;
  max-width: 720px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.about-ayah-centre .about-arabic {
  font-family: 'Amiri', serif;
  font-size: 2.2rem;
  color: var(--white);
  margin: 0 0 20px;
  line-height: 2;
  direction: rtl;
}

.about-ayah-centre .about-translation {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 12px;
  font-style: normal;
  line-height: 1.6;
}

.about-ayah-centre .about-ref {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* Values box – dark green with 7 items, under Vision/Mission */
.about-values-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  background: var(--maroon);
  padding: 32px 40px;
  border-radius: 12px;
}

.about-value-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.value-icon {
  color: #A8D7AA;
  font-size: 1.5rem;
}

/* Vision | Mission – two columns joined, line in between, under ayah */
.about-vision-mission {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin-bottom: 32px;
  padding-top: 80px;
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.about-vm-col {
  padding: 40px 40px;
}

.about-vm-divider {
  width: 1px;
  background: rgba(0, 0, 0, 0.12);
  margin: 28px 0;
}

.about-vm-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vm-icon {
  color: var(--green-dark);
  font-size: 1.2rem;
}

.about-vm-col p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
}

@media (max-width: 768px) {
  .about-vision-mission {
    grid-template-columns: 1fr;
  }
  .about-vm-divider {
    width: calc(100% - 56px);
    height: 1px;
    margin: 0 28px;
    justify-self: center;
  }
  .about-values-box {
    gap: 24px;
  }
  .about-ayah-centre .about-arabic {
    font-size: 1.75rem;
  }
}

.contact-section {
  background: var(--white);
}

.contact-map-wrap {
  position: relative;
  overflow: hidden;
  min-height: 380px;
}

.contact-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 40px 24px;
  background: var(--white);
  z-index: 2;
  text-align: center;
}

.contact-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-dark);
  margin: 0 0 8px;
}

.contact-banner-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.contact-map {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

.contact-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 800px;
  margin: 48px auto 56px;
}

.contact-col-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 12px;
}

.contact-address {
  margin: 0 0 12px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1rem;
}

.contact-link {
  color: var(--maroon);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.95rem;
}

.contact-link:hover {
  text-decoration: underline;
}

.contact-social {
  display: flex;
  gap: 16px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--white);
  border-radius: 8px;
  transition: opacity 0.2s;
}

.social-icon:hover {
  opacity: 0.85;
}

.social-icon-fb {
  background: #1877f2;
}

.social-icon-ig {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

@media (max-width: 768px) {
  .contact-map-wrap {
    min-height: 280px;
  }
  .contact-map {
    height: 280px;
  }
  .contact-details {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.site-footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 24px;
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 768px) {
  .hero-logo-img {
    height: 64px;
  }
  .program-cards {
    grid-template-columns: 1fr;
  }
}
