/* Page-specific styles for Ustadha Wafa's profile. Shared site styling remains in ../styles.css. */
.wafa-profile-page .wafa-intro-card {
  margin-top: 20px;
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 32px);
}

.wafa-profile-page .wafa-book-icon {
  width: 180px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  box-sizing: border-box;
  border-radius: 16px;
  background: linear-gradient(145deg, #0b2239, #174b5b);
  color: #f2c879;
  text-align: center;
  margin-inline: auto;
}

.wafa-profile-page .wafa-book-icon svg {
  width: 104px;
  height: 104px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.wafa-profile-page .wafa-book-icon span {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.wafa-profile-page .teacher-meta {
  margin-top: 16px;
  line-height: 1.8;
}

.wafa-profile-page .checklist li {
  margin-block: 8px;
  line-height: 1.7;
}

.wafa-profile-page #teacher-faq h3 {
  margin-top: 22px;
}

.wafa-profile-page #teacher-faq h3:first-of-type {
  margin-top: 16px;
}

.wafa-profile-page .wafa-cta-section {
  text-align: center;
}

.wafa-profile-page .wafa-cta-button {
  margin-top: 20px;
}

@media (max-width: 680px) {
  .wafa-profile-page .wafa-intro-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .wafa-profile-page .wafa-book-icon {
    width: 150px;
    min-height: 150px;
  }

  .wafa-profile-page .wafa-book-icon svg {
    width: 86px;
    height: 86px;
  }
}

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

/* Responsive introduction video for mobile, tablet and desktop */
.wafa-profile-page .wafa-video-section {
  padding: clamp(36px, 6vw, 68px) 0;
  background: #f4f7fa;
}
.wafa-profile-page .wafa-video-container {
  max-width: 1040px;
}
.wafa-profile-page .wafa-video-section .section-head {
  text-align: center;
  margin: 0 auto 24px;
  max-width: 760px;
}
.wafa-profile-page .wafa-video-frame {
  width: 100%;
  overflow: hidden;
  border-radius: clamp(12px, 2vw, 20px);
  background: #071827;
  box-shadow: 0 16px 42px rgba(5, 24, 40, .18);
  aspect-ratio: 16 / 9;
}
.wafa-profile-page .wafa-intro-video {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #071827;
}
@media (max-width: 680px) {
  .wafa-profile-page .wafa-video-section {
    padding: 32px 0;
  }
  .wafa-profile-page .wafa-video-section .section-head {
    margin-bottom: 18px;
    padding-inline: 4px;
  }
  .wafa-profile-page .wafa-video-frame {
    border-radius: 12px;
  }
}


/* Contrast repair: make all profile content readable, including checklist items and Ijazah lines. */
.wafa-profile-page main > section:not(.page-hero) { color: #243447; }
.wafa-profile-page main > section:not(.page-hero) h2,
.wafa-profile-page main > section:not(.page-hero) h3,
.wafa-profile-page main > section:not(.page-hero) h4 { color: #0b2239 !important; }
.wafa-profile-page main > section:not(.page-hero) p,
.wafa-profile-page main > section:not(.page-hero) li,
.wafa-profile-page main > section:not(.page-hero) .teacher-meta,
.wafa-profile-page main > section:not(.page-hero) label { color: #243447 !important; }
.wafa-profile-page main > section:not(.page-hero) strong { color: #102f49 !important; }
.wafa-profile-page main > section:not(.page-hero) a:not(.btn) { color: #075985; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.wafa-profile-page .wafa-video-section .eyebrow { color: #8a5b0a !important; }
.wafa-profile-page .wafa-video-frame { position: relative; }
.wafa-profile-page .wafa-intro-video { object-fit: contain; }

/* Ensure every text-bearing element in profile sections has readable contrast,
   including spans, emphasized text, definition lists, captions and nested text. */
.wafa-profile-page main > section:not(.page-hero) :is(p, li, span, small, em, i, b, strong, label, summary, blockquote, cite, dt, dd, figcaption, td, th) {
  color: #243447 !important;
}
.wafa-profile-page main > section:not(.page-hero) :is(h1, h2, h3, h4, h5, h6) {
  color: #0b2239 !important;
}
.wafa-profile-page main > section:not(.page-hero) a:not(.btn) {
  color: #075985 !important;
}
/* Preserve the gold accent on the video section eyebrow for legibility. */
.wafa-profile-page .wafa-video-section .eyebrow { color: #8a5b0a !important; }

/* ===== Tighter vertical spacing (paragraphs, headings, sections) ===== */
.wafa-profile-page main > section.section,
.wafa-profile-page main > section.content-section {
  padding-block: clamp(24px, 3.5vw, 36px);
}
.wafa-profile-page .wafa-video-section {
  padding-block: clamp(24px, 4vw, 40px);
}
.wafa-profile-page main > section:not(.page-hero) h2 {
  margin: 0 0 10px;
}
.wafa-profile-page main > section:not(.page-hero) .section-head {
  margin-bottom: 14px;
}
.wafa-profile-page main > section:not(.page-hero) .section-head p {
  margin-bottom: 0;
}
.wafa-profile-page main > section:not(.page-hero) p {
  margin: 0 0 10px;
  line-height: 1.65;
}
.wafa-profile-page main > section:not(.page-hero) p:last-child {
  margin-bottom: 0;
}
.wafa-profile-page .wafa-intro-card {
  margin-top: 12px;
}
.wafa-profile-page .wafa-intro-card p {
  margin-bottom: 10px;
}
.wafa-profile-page .teacher-meta {
  margin-top: 10px;
}
.wafa-profile-page .checklist {
  margin-block: 0;
}
.wafa-profile-page .checklist li {
  margin-block: 4px;
  line-height: 1.6;
}
.wafa-profile-page #teacher-faq h3 {
  margin: 14px 0 4px;
}
.wafa-profile-page #teacher-faq h3:first-of-type {
  margin-top: 6px;
}
.wafa-profile-page .wafa-cta-button {
  margin-top: 12px;
}
.wafa-profile-page .page-hero {
  padding-block: clamp(32px, 5vw, 52px);
}
.wafa-profile-page .page-hero p {
  margin-bottom: 8px;
}
.wafa-profile-page .related-links-v12 {
  padding-block: clamp(24px, 3.5vw, 36px);
}

/* ===== Video: fallback message ===== */
.wafa-profile-page .wafa-video-frame {
  position: relative;
}
.wafa-profile-page .wafa-video-fallback {
  position: absolute;
  inset: auto 12px 12px 12px;
  margin: 0 !important;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(7, 24, 39, .92);
  text-align: center;
  font-size: .9rem;
}
.wafa-profile-page .wafa-video-fallback[hidden] {
  display: none;
}
.wafa-profile-page main > section:not(.page-hero) p.wafa-video-fallback,
.wafa-profile-page main > section:not(.page-hero) p.wafa-video-fallback a {
  color: #fff !important;
}
