/* =========================================================
   Dawah appeal (post 14431) – theme-side fixes.
   Selectors start with .entry-content so they win over the
   WPBakery custom CSS that is printed later in <head>.
   ========================================================= */

/* One consistent font. The page CSS asked for "Poppins", which is not
   loaded, so most of the Dawah text was falling back to Arial. */
.entry-content .tr-dawah-page .vc_column_text,
.entry-content .tr-dawah-page h2,
.entry-content .tr-dawah-page h3,
.entry-content .tr-dawah-support-row,
.entry-content .tr-dawah-support-row h2,
.entry-content .tr-dawah-support-row h3,
.entry-content .tr-dawah-gallery-row,
.entry-content .tr-dawah-gallery-row h2 {
  font-family: "TR Quran Poppins", Arial, sans-serif !important;
}

/* Hadith quote */
.entry-content .tr-dawah-page blockquote.tr-dawah-hadith {
  position: relative;
  margin: 22px 0 20px;
  padding: 20px 22px 18px;
  background: #edf7f0;
  border: 0;
  border-left: 4px solid #0ba33e;
  border-radius: 0 12px 12px 0;
  font-style: normal;
  quotes: none;
}

.entry-content .tr-dawah-page blockquote.tr-dawah-hadith::before,
.entry-content .tr-dawah-page blockquote.tr-dawah-hadith::after {
  display: none;
  content: none;
}

.entry-content .tr-dawah-page blockquote.tr-dawah-hadith p {
  margin: 0;
  color: #103653;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(16px, 1.4vw, 18px);
  font-style: italic;
  line-height: 1.6;
}

.entry-content .tr-dawah-page blockquote.tr-dawah-hadith cite {
  display: block;
  margin-top: 10px;
  color: #087b32;
  font-family: "TR Quran Poppins", Arial, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entry-content .tr-dawah-page blockquote.tr-dawah-hadith cite::before {
  content: "— ";
}

/* First photo (beside "Supporting Learning"): fill its card, no grey gap. */
.entry-content .tr-dawah-page .tr-qt-learning {
  align-items: stretch;
}

.entry-content .tr-dawah-page .tr-qt-photo {
  position: relative;
  height: 100%;
  min-height: 340px;
  overflow: hidden;
  border-radius: 14px;
}

.entry-content .tr-dawah-page .tr-qt-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: 50% 30%;
}

.entry-content .tr-dawah-page .tr-qt-learning > .wpb_column:last-child .vc_column-inner {
  padding-left: clamp(8px, 1.5vw, 22px);
}

/* =========================================================
   Photo and video slider
   ========================================================= */
.vc_row.tr-dawah-gallery-row {
  padding-top: 4px;
  padding-bottom: 24px;
}

.entry-content .tr-dawah-gallery-row .wpb_content_element {
  margin-bottom: 0;
}

.tr-dawah-carousel {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  min-width: 0;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 34px);
  background: #fff;
  border: 1px solid #e5edf1;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 45, 65, 0.06);
}

.tr-dawah-carousel *,
.tr-dawah-carousel *::before,
.tr-dawah-carousel *::after {
  box-sizing: border-box;
}

.tr-dawah-carousel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.entry-content .tr-dawah-carousel .tr-qt-eyebrow {
  margin: 0 0 8px;
  color: #087b32;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.entry-content .tr-dawah-carousel .tr-qt-eyebrow::before {
  display: inline-block;
  width: 34px;
  height: 2px;
  margin-right: 7px;
  background: #288448;
  vertical-align: middle;
  content: "";
}

.entry-content .tr-dawah-carousel h2 {
  margin: 0 !important;
  color: #102f4e !important;
  font-size: clamp(25px, 3vw, 36px) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em;
  text-transform: none;
}

.tr-dawah-carousel-nav {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.entry-content .tr-dawah-carousel-btn {
  display: inline-grid;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0 0 3px;
  place-items: center;
  color: #102f4e;
  background: #fff;
  border: 1px solid #d5e0e6;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(15, 45, 65, 0.08);
  font-family: Arial, sans-serif;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}

.entry-content .tr-dawah-carousel-btn:hover:not(:disabled),
.entry-content .tr-dawah-carousel-btn:focus-visible {
  color: #fff;
  background: #0ba33e;
  border-color: #0ba33e;
}

.entry-content .tr-dawah-carousel-btn:focus-visible {
  outline: 3px solid #0ba33e;
  outline-offset: 3px;
}

.entry-content .tr-dawah-carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Hide arrows until the script runs (plain swipe still works without JS). */
.tr-dawah-carousel:not(.is-ready) .tr-dawah-carousel-nav {
  visibility: hidden;
}

.tr-dawah-carousel-viewport {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
}

.tr-dawah-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.tr-dawah-carousel-viewport:focus-visible {
  outline: 3px solid #0ba33e;
  outline-offset: 4px;
}

.entry-content ul.tr-dawah-carousel-track {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-content .tr-dawah-carousel-slide {
  flex: 0 0 calc((100% - 28px) / 3);
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  scroll-snap-align: start;
}

.entry-content .tr-dawah-carousel-slide::before,
.entry-content .tr-dawah-carousel-slide::marker {
  content: none;
}

.tr-dawah-carousel-slide figure {
  position: relative;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #10202c;
  border-radius: 12px;
}

.entry-content .tr-dawah-carousel-slide img,
.entry-content .tr-dawah-carousel-slide video {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 0;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform 0.4s ease;
}

.entry-content .tr-dawah-carousel-slide video {
  object-fit: contain;
  background: #10202c;
}

.tr-dawah-carousel-slide:hover img {
  transform: scale(1.03);
}

.tr-dawah-carousel-slide figcaption {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  color: #fff;
  background: rgba(16, 32, 44, 0.72);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
}

.tr-dawah-carousel-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.tr-dawah-carousel-progress {
  flex: 1 1 auto;
  height: 4px;
  overflow: hidden;
  background: #e7eef2;
  border-radius: 999px;
}

.tr-dawah-carousel-progress span {
  display: block;
  width: 33%;
  height: 100%;
  background: #0ba33e;
  border-radius: inherit;
  transition: width 0.2s ease;
}

.entry-content .tr-dawah-carousel-count {
  flex: 0 0 auto;
  margin: 0;
  color: #718292;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Tablet: two slides */
@media (max-width: 991px) {
  .entry-content .tr-dawah-carousel-slide {
    flex-basis: calc((100% - 14px) / 2);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .entry-content .tr-dawah-page .tr-qt-photo {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .entry-content .tr-dawah-page .tr-qt-learning > .wpb_column:last-child .vc_column-inner {
    padding-left: 15px;
  }

  .tr-dawah-carousel {
    padding: 20px 16px;
  }

  .tr-dawah-carousel-head {
    align-items: center;
  }

  .entry-content .tr-dawah-carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 26px;
  }

  .entry-content ul.tr-dawah-carousel-track {
    gap: 10px;
  }

  .entry-content .tr-dawah-carousel-slide {
    flex-basis: 86%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tr-dawah-carousel-viewport {
    scroll-behavior: auto;
  }

  .tr-dawah-carousel *,
  .tr-dawah-carousel-slide:hover img {
    transform: none !important;
    transition: none !important;
  }
}

/* =========================================================
   Section rhythm and layout fixes
   ========================================================= */

/* Even spacing between the Dawah sections (was 28-90px of stray gaps). */
.site-main:has(.tr-dawah-page) .vc_row.tr-dawah-page {
  padding-bottom: 0;
}

/* Full content width, lined up with the intro text and donation card. */
.site-main:has(.tr-dawah-page) .vc_row.tr-dawah-support-row,
.site-main:has(.tr-dawah-page) .vc_row.tr-dawah-gallery-row {
  margin: 0;
  padding: 32px 0 0;
}

/* Cards span the full content width, aligned with the legacy panel. */
.site-main:has(.tr-dawah-page) .tr-dawah-support-row > .wpb_column > .vc_column-inner,
.site-main:has(.tr-dawah-page) .tr-dawah-gallery-row > .wpb_column > .vc_column-inner {
  padding-right: 0;
  padding-left: 0;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-section,
.site-main:has(.tr-dawah-page) .tr-dawah-carousel {
  max-width: none;
  padding: clamp(24px, 3.4vw, 40px);
  border-color: #e5edf1;
  border-radius: 18px;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-section .tr-qt-eyebrow {
  margin: 0 0 8px;
  color: #087b32;
  font-size: 12px;
  font-weight: 700;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-section .tr-qt-eyebrow::before {
  display: inline-block;
  width: 34px;
  height: 2px;
  margin-right: 7px;
  background: #288448;
  vertical-align: middle;
  content: "";
}

.site-main:has(.tr-dawah-page) .entry-content .tr-dawah-support-section h2 {
  margin: 0 0 22px;
  color: #092746;
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-list li {
  margin: 0;
  padding: 14px 16px 14px 46px;
  background: #f8fafb;
  border: 1px solid #edf2f5;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-list li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-list li::before {
  top: 14px;
  left: 14px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  background: #0ba33e;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

/* Call-to-action: copy on the left, button on the right (it was a flex
   row, which squeezed the text into columns and stacked the button). */
.site-main:has(.tr-dawah-page) .tr-dawah-support-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 36px;
  margin-top: 28px;
  padding: clamp(22px, 3vw, 34px);
  background: linear-gradient(120deg, #eef8f1, #e6f4fb);
  border: 1px solid #dcefe3;
  border-radius: 14px;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-cta > * {
  grid-column: 1;
  max-width: 760px;
}

.site-main:has(.tr-dawah-page) .entry-content .tr-dawah-support-cta h3 {
  margin: 0 0 12px;
  color: #092746;
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.25;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-cta p {
  margin: 0 0 10px;
  font-size: 15px;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-cta > p:nth-last-child(2) {
  margin-bottom: 0;
  color: #092746;
  font-weight: 700;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-cta > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 4;
  margin: 0;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  margin: 0;
  padding: 16px 28px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(201, 0, 0, 0.18);
  font-size: 16px;
  white-space: nowrap;
}

.site-main:has(.tr-dawah-page) .tr-dawah-support-button::after {
  margin-left: 10px;
  content: "\203A";
  font-size: 22px;
  line-height: 0.8;
}

@media (max-width: 767px) {
  .site-main:has(.tr-dawah-page) .vc_row.tr-dawah-support-row,
  .site-main:has(.tr-dawah-page) .vc_row.tr-dawah-gallery-row {
    padding: 24px 0 0;
  }

  .site-main:has(.tr-dawah-page) .tr-dawah-support-section,
  .site-main:has(.tr-dawah-page) .tr-dawah-carousel {
    padding: 22px 16px;
  }

  .site-main:has(.tr-dawah-page) .tr-dawah-support-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .site-main:has(.tr-dawah-page) .tr-dawah-support-list li {
    padding: 12px 12px 12px 42px;
  }

  .site-main:has(.tr-dawah-page) .tr-dawah-support-list li::before {
    top: 13px;
    left: 12px;
  }

  .site-main:has(.tr-dawah-page) .tr-dawah-support-cta {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-main:has(.tr-dawah-page) .tr-dawah-support-cta > p:last-child {
    grid-column: 1;
    grid-row: auto;
    margin-top: 18px;
  }

  .site-main:has(.tr-dawah-page) .tr-dawah-support-button {
    width: 100%;
  }
}

/* =========================================================
   "Dawah in Action" mosaic and the two photo sliders
   ========================================================= */

.site-main:has(.tr-dawah-page) .tr-dawah-gallery-row .wpb_wrapper > * + .tr-dawah-carousel,
.site-main:has(.tr-dawah-page) .tr-dawah-gallery-row .tr-dawah-action + .tr-dawah-carousel {
  margin-top: 32px;
}

.entry-content .tr-dawah-carousel-head > div {
  min-width: 0;
}

.entry-content .tr-dawah-carousel .tr-dawah-carousel-intro {
  max-width: 620px;
  margin: 8px 0 0;
  color: #5b6574;
  font-size: 15px;
  line-height: 1.6;
}

.tr-dawah-action {
  box-sizing: border-box;
  padding: clamp(24px, 3.4vw, 40px);
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(11, 163, 62, 0.22), transparent 42%),
    linear-gradient(135deg, #0c2a44, #103a5a);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(12, 42, 68, 0.18);
}

.tr-dawah-action *,
.tr-dawah-action *::before,
.tr-dawah-action *::after {
  box-sizing: border-box;
}

.tr-dawah-action-head {
  max-width: 720px;
  margin-bottom: 26px;
}

.entry-content .tr-dawah-action .tr-qt-eyebrow {
  margin: 0 0 8px;
  color: #7fe0a1;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.entry-content .tr-dawah-action .tr-qt-eyebrow::before {
  display: inline-block;
  width: 34px;
  height: 2px;
  margin-right: 7px;
  background: #3cc46b;
  vertical-align: middle;
  content: "";
}

.entry-content .tr-dawah-action h2 {
  margin: 0 0 10px !important;
  color: #fff !important;
  font-family: "TR Quran Poppins", Arial, sans-serif;
  font-size: clamp(25px, 3vw, 36px) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em;
  text-transform: none;
}

.entry-content .tr-dawah-action-head > p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.65;
}

.entry-content ul.tr-dawah-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 220px;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-content .tr-dawah-action-tile {
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry-content .tr-dawah-action-tile::before,
.entry-content .tr-dawah-action-tile::marker {
  content: none;
}

.entry-content .tr-dawah-action-tile:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.tr-dawah-action-tile figure {
  position: relative;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #081d30;
  border-radius: 12px;
}

.entry-content .tr-dawah-action-tile img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border-radius: 0;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tr-dawah-action-tile:hover img {
  transform: scale(1.04);
}

.tr-dawah-action-tile figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 44px 16px 14px;
  background: linear-gradient(to top, rgba(6, 22, 36, 0.92), rgba(6, 22, 36, 0.55) 55%, transparent);
  pointer-events: none;
}

.tr-dawah-action-tile figcaption strong {
  display: block;
  color: #fff;
  font-family: "TR Quran Poppins", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.tr-dawah-action-tile figcaption span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  line-height: 1.45;
}

.tr-dawah-action-tile:first-child figcaption {
  padding: 70px 24px 22px;
}

.tr-dawah-action-tile:first-child figcaption strong {
  font-size: 22px;
}

.tr-dawah-action-tile:first-child figcaption span {
  max-width: 440px;
  font-size: 14px;
}

@media (max-width: 991px) {
  .entry-content ul.tr-dawah-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 300px;
    grid-auto-rows: 200px;
  }

  .entry-content .tr-dawah-action-tile:first-child {
    grid-row: span 1;
  }
}

@media (max-width: 767px) {
  .tr-dawah-action {
    padding: 22px 16px;
  }

  .entry-content ul.tr-dawah-action-grid {
    grid-template-rows: 230px;
    grid-auto-rows: 160px;
    gap: 10px;
  }

  .tr-dawah-action-tile figcaption,
  .tr-dawah-action-tile:first-child figcaption {
    padding: 36px 12px 10px;
  }

  .tr-dawah-action-tile figcaption strong {
    font-size: 14px;
  }

  .tr-dawah-action-tile:first-child figcaption strong {
    font-size: 18px;
  }

  /* Small tiles keep just the title on phones. */
  .tr-dawah-action-tile:not(:first-child) figcaption span {
    display: none;
  }

  .site-main:has(.tr-dawah-page) .tr-dawah-gallery-row .tr-dawah-action + .tr-dawah-carousel,
  .site-main:has(.tr-dawah-page) .tr-dawah-gallery-row .wpb_wrapper > * + .tr-dawah-carousel {
    margin-top: 24px;
  }

  .entry-content .tr-dawah-carousel .tr-dawah-carousel-intro {
    font-size: 14px;
  }

  /* Phones swipe (the next photo peeks in), so the arrows would only take
     a row of their own under the longer headings. */
  .tr-dawah-carousel .tr-dawah-carousel-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tr-dawah-action-tile img {
    transition: none !important;
  }

  .tr-dawah-action-tile:hover img {
    transform: none !important;
  }
}

/* Location label on each slide ("Ghana", "UK"). */
.tr-dawah-carousel-slide figcaption.tr-dawah-place {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px 5px 9px;
  background: rgba(9, 39, 70, 0.78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  letter-spacing: 0.02em;
}

.tr-dawah-carousel-slide figcaption.tr-dawah-place svg {
  flex: 0 0 auto;
  color: #5fd68a;
}
