/* ==========================================================================
   Dar-us-Salam Blog
   Built on the Dus26 theme tokens. No new colours are invented here: every
   value below resolves to a :root variable the theme already defines.

   The one deliberate flourish is the "jadwal" rule — the brand-yellow keyline
   that marks the start edge of each text column, echoing the ruled frame that
   borders a page of classical manuscript. Everything else stays quiet so that
   rule is the thing you remember.
   ========================================================================== */

/* Blog — local scale, derived from the theme's own tokens */
.dus-blog {
  --dbg-rule: var(--primary-color, #fad505);
  --dbg-ink: var(--secondary-color, #111111);
  --dbg-muted: #6a6a6a;
  --dbg-hairline: #e2e2e2;
  --dbg-surface: var(--box-bodybkg-color, #F0F0F0);
  --dbg-radius: var(--border-radius, 5px);
  --dbg-gap: 28px;
  /* Reading width for long-form body copy only. Headers, intros and
     panels run the full column. */
  --dbg-measure: 82ch;

  font-family: var(--body-font-family, Heebo), sans-serif;
  color: var(--dbg-ink);
}

/* Blog — intro copy under a category heading */
.dus-blog__intro {
  margin: 0 0 36px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--dbg-muted);
}

/* Blog — empty state */
.dus-blog__empty {
  padding: 32px 0;
  font-size: 16px;
  color: var(--dbg-muted);
}

/* ==========================================================================
   Listing
   ========================================================================== */

/* Blog listing — reset the list chrome */
.dus-blog__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Blog listing — separator between entries */
.dus-blog__item + .dus-blog__item {
  margin-top: var(--dbg-gap);
  padding-top: var(--dbg-gap);
  border-top: 1px solid var(--dbg-hairline);
}

/* Blog listing — the row: image beside text, text drops below when the
   remaining space falls under the 320px basis */
.dus-blog-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px;
}

/* Blog listing — image column, fixed 250x250 regardless of source ratio */
.dus-blog-card__figure {
  flex: 0 0 250px;
  width: 250px;
  height: 250px;
  overflow: hidden;
  border-radius: var(--dbg-radius);
  background: var(--dbg-surface);
  display: block;
}

/* Blog listing — fill the square without distortion */
.dus-blog-card__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .4s ease;
}

.dus-blog-card__figure:hover img {
  transform: scale(1.04);
}

/* Blog listing — text column carrying the jadwal rule */
.dus-blog-card__body {
  flex: 1 1 320px;
  min-width: 0;
  border-inline-start: 3px solid var(--dbg-rule);
  padding-inline-start: 20px;
}

/* Blog listing — headline */
.dus-blog-card__title {
  margin: 0 0 10px;
  font-family: var(--title-font-family, Heebo), sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.dus-blog-card__title a {
  color: var(--dbg-ink);
  text-decoration: none;
}

.dus-blog-card__title a:hover,
.dus-blog-card__title a:focus-visible {
  color: var(--link-hover-color, #0961b3);
}

/* Blog listing — excerpt */
.dus-blog-card__excerpt {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.65;
  color: #444;
  overflow-wrap: break-word;
}

.dus-blog-card__excerpt p {
  margin: 0;
}

/* Blog listing — read-more affordance; the arrow is the only motion */
.dus-blog-card__more {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--dbg-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--dbg-rule);
  padding-bottom: 2px;
}

.dus-blog-card__more span {
  display: inline-block;
  transition: transform .2s ease;
}

.dus-blog-card__more:hover span,
.dus-blog-card__more:focus-visible span {
  transform: translateX(4px);
}

/* Blog listing — pagination */
.dus-blog__pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--dbg-hairline);
  font-size: 14px;
}

.dus-blog__pager-status {
  color: var(--dbg-muted);
}

.dus-blog__pager-link {
  color: var(--dbg-ink);
  font-weight: 600;
  text-decoration: none;
}

.dus-blog__pager-link:hover {
  color: var(--link-hover-color, #0961b3);
}

/* Blog listing — section index at the bottom of the blog home */
.dus-blog__sections {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--dbg-hairline);
}

.dus-blog__sections-title {
  margin: 0 0 12px;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dbg-muted);
}

.dus-blog__sections ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dus-blog__sections a {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--dbg-hairline);
  border-radius: 999px;
  font-size: 14px;
  color: var(--dbg-ink);
  text-decoration: none;
}

.dus-blog__sections a:hover {
  border-color: var(--dbg-rule);
  background: var(--dbg-rule);
}

/* ==========================================================================
   Single post
   ========================================================================== */

/* Blog post — header block */
.dus-blog-single__header {
  margin-bottom: 28px;
  border-inline-start: 3px solid var(--dbg-rule);
  padding-inline-start: 20px;
}

/* Blog post — category eyebrow */
.dus-blog-single__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dbg-muted);
  text-decoration: none;
}

.dus-blog-single__eyebrow:hover {
  color: var(--dbg-ink);
}

/* Blog post — headline */
.dus-blog-single__title {
  margin: 0 0 10px;
  font-family: var(--title-font-family, Heebo), sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

/* Blog post — byline */
.dus-blog-single__meta {
  margin: 0;
  font-size: 14px;
  color: var(--dbg-muted);
}

/* Blog post — header image */
.dus-blog-single__figure {
  margin: 0 0 32px;
}

/* Blog post — header image, capped to match the category banner */
.dus-blog-single__figure img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  display: block;
  border-radius: var(--dbg-radius);
}

/* Blog post — body copy, held to a readable measure */
.dus-blog-single__body {
  max-width: var(--dbg-measure);
  font-size: 17px;
  line-height: 1.75;
}

.dus-blog-single__body h2,
.dus-blog-single__body h3 {
  font-family: var(--title-font-family, Heebo), sans-serif;
  font-weight: 700;
  line-height: 1.3;
  margin: 32px 0 12px;
}

.dus-blog-single__body h2 { font-size: 24px; }
.dus-blog-single__body h3 { font-size: 19px; }

.dus-blog-single__body p {
  margin: 0 0 18px;
}

.dus-blog-single__body a {
  color: var(--link-hover-color, #0961b3);
}

.dus-blog-single__body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--dbg-radius);
}

/* Blog post — pull quotes take the jadwal rule rather than a grey box */
.dus-blog-single__body blockquote {
  margin: 24px 0;
  padding-inline-start: 20px;
  border-inline-start: 3px solid var(--dbg-rule);
  font-size: 18px;
  font-style: normal;
  color: #333;
}

/* ==========================================================================
   Listen — browser text-to-speech, shown only when the engine exists
   ========================================================================== */

/* Blog listen — panel above the article body */
.dus-blog-listen {
  margin: 0 0 28px;
  padding: 16px 18px;
  background: var(--dbg-surface);
  border-radius: var(--dbg-radius);
  border-inline-start: 3px solid var(--dbg-rule);
  max-width: var(--dbg-measure);
}

/* Blog listen — label above the controls */
.dus-blog-audio__label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dbg-muted);
}

.dus-blog-listen__controls {
  display: flex;
  gap: 10px;
}

/* Blog listen — primary control in the brand yellow */
.dus-blog-listen__btn {
  padding: 8px 20px;
  border: none;
  border-radius: var(--dbg-radius);
  background: var(--dbg-rule);
  color: var(--dbg-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.dus-blog-listen__btn:hover {
  filter: brightness(.95);
}

/* Blog listen — stop control, quieter than the toggle */
.dus-blog-listen__btn--quiet {
  background: transparent;
  border: 1px solid var(--dbg-hairline);
  font-weight: 600;
}

.dus-blog-listen__btn--quiet:hover {
  filter: none;
  border-color: var(--dbg-muted);
}

/* ==========================================================================
   Related posts
   ========================================================================== */

/* Blog related — footer strip under the article */
.dus-blog-related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--dbg-hairline);
}

.dus-blog-related__title {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dbg-muted);
}

/* Blog related — tracks are capped so a single item stays card-sized
   instead of stretching its square thumbnail across the whole row */
.dus-blog-related__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 210px));
  justify-content: start;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dus-blog-related__list a {
  display: block;
  color: var(--dbg-ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.dus-blog-related__list img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--dbg-radius);
  margin-bottom: 8px;
  display: block;
}

.dus-blog-related__list a:hover {
  color: var(--link-hover-color, #0961b3);
}

/* ==========================================================================
   Blog index — category tiles
   ========================================================================== */

/* Blog index — tile grid, collapses on its own */
.dus-blog-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Blog index — a tile: square image, then title, blurb and count */
.dus-blog-tile {
  display: block;
  height: 100%;
  color: var(--dbg-ink);
  text-decoration: none;
  border: 1px solid var(--dbg-hairline);
  border-radius: var(--dbg-radius);
  overflow: hidden;
  background: #fff;
  transition: border-color .2s ease;
}

.dus-blog-tile:hover {
  border-color: var(--dbg-rule);
}

/* Blog index — tile image area, holds its shape when empty */
.dus-blog-tile__figure {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--dbg-surface);
  overflow: hidden;
}

.dus-blog-tile__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Blog index — tile text, carrying the jadwal rule */
.dus-blog-tile__body {
  display: block;
  padding: 16px 18px 18px;
  border-inline-start: 3px solid var(--dbg-rule);
}

.dus-blog-tile__title {
  display: block;
  font-family: var(--title-font-family, Heebo), sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.dus-blog-tile__desc {
  display: block;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dbg-muted);
  margin-bottom: 10px;
}

/* Blog index — item count doubles as the call to action */
.dus-blog-tile__count {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dus-blog-tile__count span {
  display: inline-block;
  transition: transform .2s ease;
}

.dus-blog-tile:hover .dus-blog-tile__count span {
  transform: translateX(4px);
}

/* Blog index — recent posts strip below the tiles */
.dus-blog-index__latest {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--dbg-hairline);
}

.dus-blog-index__latest-title {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dbg-muted);
}

/* ==========================================================================
   Category banner
   ========================================================================== */

/* Blog — wide header image at the top of a category page.
   Capped at 1000px so a large upload does not stretch across a wide viewport. */
.dus-blog__banner {
  margin: 0 0 28px;
}

.dus-blog__banner img {
  width: 100%;
  max-width: 1000px;
  height: auto;
  display: block;
  border-radius: var(--dbg-radius);
}

/* ==========================================================================
   Links — grid and list layouts share one markup
   ========================================================================== */

/* Blog links — image box, 150x150 in both layouts */
.dus-blog-links__figure {
  flex: 0 0 150px;
  width: 150px;
  height: 150px;
  overflow: hidden;
  border-radius: var(--dbg-radius);
  background: var(--dbg-surface);
  display: block;
}

.dus-blog-links__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Blog links — grid layout: tiles, image above the text */
.dus-blog--links-grid .dus-blog-links__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dus-blog--links-grid .dus-blog-links__item {
  padding: 0;
  border: 0;
}

.dus-blog--links-grid .dus-blog-links__link {
  display: block;
  text-decoration: none;
}

.dus-blog--links-grid .dus-blog-links__figure {
  width: 150px;
  margin-bottom: 10px;
}

.dus-blog--links-grid .dus-blog-links__name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--dbg-ink);
}

.dus-blog--links-grid .dus-blog-links__desc {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--dbg-muted);
}

/* Blog links — list layout: image beside the text, wraps when tight */
.dus-blog--links-list .dus-blog-links__link {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px;
  text-decoration: none;
}

.dus-blog--links-list .dus-blog-links__text {
  flex: 1 1 240px;
  min-width: 0;
}

.dus-blog--links-list .dus-blog-links__name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--dbg-ink);
}

.dus-blog--links-list .dus-blog-links__desc {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--dbg-muted);
}

/* Blog links — hover treatment shared by both layouts */
.dus-blog-links__link:hover .dus-blog-links__name {
  color: var(--link-hover-color, #0961b3);
}

/* Blog links — phones: shrink the image box so two fit per row */
@media (max-width: 575px) {
  .dus-blog-links__figure {
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
  }
  .dus-blog--links-grid .dus-blog-links__figure {
    width: 100%;
    max-width: 150px;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}

/* ==========================================================================
   Column widget
   ========================================================================== */

/* Blog widget — latest articles in the sidebar */
.dus-blog-widget__title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.dus-blog-widget__title a {
  color: inherit;
  text-decoration: none;
}

.dus-blog-widget__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dus-blog-widget__item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color, #e2e2e2);
}

.dus-blog-widget__item a {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #111;
  text-decoration: none;
}

/* Blog widget — thumbnail, sized to carry the title beside it */
.dus-blog-widget__thumb {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--border-radius, 5px);
}

.dus-blog-widget__headline {
  flex: 1 1 auto;
  min-width: 0;
  align-self: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.dus-blog-widget__item a:hover .dus-blog-widget__headline {
  color: var(--link-hover-color, #0961b3);
}

/* Blog widget — section links under the list */
.dus-blog-widget__sections {
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 2px solid var(--primary-color, #fad505);
  list-style: none;
}

.dus-blog-widget__sections li + li {
  margin-top: 6px;
}

.dus-blog-widget__sections a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
}

.dus-blog-widget__sections a span {
  transition: transform .2s ease;
}

.dus-blog-widget__sections a:hover {
  color: var(--link-hover-color, #0961b3);
}

.dus-blog-widget__sections a:hover span {
  transform: translateX(3px);
}

/* Blog home — the section title is a link now */
.dus-blog-home__title a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Home page block
   ========================================================================== */

/* Blog home — section header. The inner .container centres the block to the
   theme's page width; position:relative anchors the carousel arrows. */
.dus-blog-home {
  margin: 40px 0;
}

.dus-blog-home > .container {
  position: relative;
}

.dus-blog-home__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color, #fad505);
}

.dus-blog-home__title {
  margin: 0;
  font-family: var(--title-font-family, Heebo), sans-serif;
  font-size: 22px;
  font-weight: 700;
}

/* Blog home — section links beside "All articles" in the header row */
.dus-blog-home__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 18px;
}

.dus-blog-home__nav a {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  text-decoration: none;
  white-space: nowrap;
}

.dus-blog-home__nav a:hover {
  color: var(--link-hover-color, #0961b3);
}

/* Blog home — one row. Owl takes over when present; without it this flex
   row scrolls sideways rather than wrapping. */
.dus-blog-home__carousel:not(.owl-loaded) {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.dus-blog-home__carousel:not(.owl-loaded) .dus-blog-home__cell {
  flex: 0 0 auto;
}

.dus-blog-home__card {
  display: block;
  color: #111;
  text-decoration: none;
}

/* Blog home — thumbnails capped at 250x250 in and out of the carousel */
.dus-blog-home__card img {
  width: 100%;
  max-width: 250px;
  aspect-ratio: 1 / 1;
  max-height: 250px;
  object-fit: cover;
  border-radius: var(--border-radius, 5px);
  margin: 0 auto 10px;
  display: block;
}

.dus-blog-home__card-title {
  display: block;
  max-width: 250px;
  margin: 0 auto;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.dus-blog-home__card:hover .dus-blog-home__card-title {
  color: var(--link-hover-color, #0961b3);
}

/* Blog home — carousel arrows. Selectors cover both Owl generations
   (v2: .owl-nav > button, v1: .owl-buttons > div) and undo any theme rule
   that hides the nav wrapper. */
.dus-blog-home__carousel .owl-nav,
.dus-blog-home__carousel .owl-buttons {
  display: block;
}

.dus-blog-home__carousel .owl-nav .owl-prev,
.dus-blog-home__carousel .owl-nav .owl-next,
.dus-blog-home__carousel .owl-buttons .owl-prev,
.dus-blog-home__carousel .owl-buttons .owl-next {
  position: absolute;
  top: 105px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e2e2e2;
  color: #111;
  font-size: 16px;
  line-height: 1;
  opacity: 1;
  cursor: pointer;
  z-index: 2;
}

.dus-blog-home__carousel .owl-nav .owl-prev,
.dus-blog-home__carousel .owl-buttons .owl-prev { left: -16px; }
.dus-blog-home__carousel .owl-nav .owl-next,
.dus-blog-home__carousel .owl-buttons .owl-next { right: -16px; }

.dus-blog-home__carousel .owl-nav .owl-prev:hover,
.dus-blog-home__carousel .owl-nav .owl-next:hover,
.dus-blog-home__carousel .owl-buttons .owl-prev:hover,
.dus-blog-home__carousel .owl-buttons .owl-next:hover {
  background: var(--primary-color, #fad505);
  border-color: var(--primary-color, #fad505);
}

/* ==========================================================================
   Responsive + accessibility floor
   ========================================================================== */

/* Blog — phones: the image goes full width and the text follows underneath */
@media (max-width: 575px) {
  .dus-blog-card {
    gap: 16px;
  }
  .dus-blog-card__figure {
    flex: 0 0 100%;
    width: 100%;
    max-width: 250px;
  }
  .dus-blog-single__title {
    font-size: 26px;
  }
  .dus-blog__pager {
    flex-wrap: wrap;
  }
}

/* Blog — keyboard focus stays visible everywhere */
.dus-blog a:focus-visible,
.dus-blog-widget a:focus-visible,
.dus-blog-home a:focus-visible {
  outline: 2px solid var(--link-hover-color, #0961b3);
  outline-offset: 2px;
}

/* Blog — honour reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .dus-blog-card__figure img,
  .dus-blog-card__more span {
    transition: none;
  }
  .dus-blog-card__figure:hover img {
    transform: none;
  }
}
