/*
 Theme Name:   Asmaneh Theme
 Theme URI:    https://asmaneh.com
 Description:  Customized GeneratePress child theme
 Template:     generatepress
 Text Domain:  asmaneh
 Version:      0.1
*/
:root {
  /* Brand colours */
  --color-primary: #1c39bb;
  --color-teal-dark: #048790;
  --color-teal: #53d2d1;
  --color-lavender: #f4ecff;
  --color-green-pale: #d5e9e2;
  --color-writer-hero: #d8d3f4;

  /* Bootstrap compatibility */
  --bs-primary-rgb: 28, 57, 187;
  --bs-primary: var(--color-primary);

  --bs-light-rgb: 244, 236, 255;
  --bs-light: var(--color-lavender);
  --bs-light-bg-subtle: var(--color-primary);
  --bs-light-text-emphasis: var(--color-primary);

  --bs-success-rgb: 4, 135, 144;
  --bs-success: var(--color-teal-dark);
  --bs-secondary-bg-subtle: #ceebee;
  --bs-success-text-emphasis: #ceebee;
}

@font-face {
  font-family: "Farhang";
  src: url("inc/FarhangVariable.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Sahel FD;
  src: url("inc/Sahel-FD.eot");
  src:
    url("inc/Sahel-FD.eot?#iefix") format("embedded-opentype"),
    url("inc/Sahel-FD.woff2") format("woff2"),
    url("inc/Sahel-FD.woff") format("woff"),
    url("inc/Sahel-FD.ttf") format("truetype");
  font-weight: normal;
}
.fd {
  font-family: Sahel FD !important;
}
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Farhang", sans-serif;
  overflow-x: hidden;
}
/* ==================================================
   AUTOMATIC RTL / LTR CONTENT
================================================== */

/*
 * The Asmaneh interface is RTL, but editorial content
 * may contain Persian and LTR languages such as English
 * in the same page.
 *
 * Each textual block determines its own base direction.
 */
:is(.entry-content, .asmaneh-static-page-content)
  :is(
    p,
    li,
    dt,
    dd,
    blockquote,
    figcaption,
    caption,
    th,
    td,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6
  ) {
  unicode-bidi: plaintext;
  text-align: start;
}

/* Standalone dynamic elements explicitly using dir="auto" */
[dir="auto"] {
  text-align: start;
}

a {
  display: inline-block;
  position: relative;
  text-decoration: none;
}
/* Justify editorial paragraphs */

.entry-content p,
.asmaneh-static-page-content p {
  text-align: justify;
}
/* Persian static pages */

.asmaneh-static-page,
.asmaneh-static-page-content {
  direction: rtl;
  text-align: right;
}

blockquote {
  border-right: 5px solid rgba(0, 0, 0, 0.05);
  border-left: 0;
}
pre {
  direction: ltr;
}

/* ------------------------------------------------
   Asmaneh homepage introduction
------------------------------------------------ */

.asmaneh-home-header {
  height: 36vh;
  min-height: 300px;
}

.asmaneh-home-header .header-tools {
  display: flex;
  justify-content: flex-end;
  padding-top: 2rem;
  font-size: 1.35rem;
}

.asmaneh-home-header .asmaneh-logo {
  position: absolute;
  top: 2rem;
  left: 0;
  margin: 0;
  width: auto;
  display: flex;
  justify-content: flex-start;
  text-align: left;
}
.asmaneh-home-header .container {
  position: relative;
}

.asmaneh-home-header .asmaneh-logo .custom-logo-link {
  margin-left: 0;
  margin-right: auto;
}

.asmaneh-home-header .front-logo img {
  width: 150px;
  max-width: 20vw;
  height: auto;
}

/* Homepage index */

.asmaneh-home-nav {
  direction: rtl;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.45rem 1.5rem;
  max-width: 900px;
  margin: 6rem auto 0;
  line-height: 1.5;
}

.asmaneh-home-nav a {
  position: relative;
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
}

/* Lime marker used in the UX design */

.asmaneh-home-nav a::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 14px;
  margin: 0 0 0 0.4rem;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44.05 38.01'%3E%3Cpath fill='%2353D2D1' d='M0 31.23C7.85 20.51 14.94 10.7 22.23 1.03c4.19-4.1 14.85 5.21 19.5 7.1 9.3 5.2-12.18 22.33-15.63 28.12-5.74 5.44-18.08-3.39-26.1-5.03Z'/%3E%3C/svg%3E");
  flex: 0 0 auto;
}

.asmaneh-home-nav a:hover,
.asmaneh-home-nav a:focus {
  color: var(--color-teal);
}

body.admin-bar .asmaneh-home-header {
  height: calc((100vh - 32px) * 0.4);
  min-height: 330px;
}

body.admin-bar .asmaneh-featured-row {
  height: calc((100vh - 32px) * 0.6);
  min-height: 420px;
}
.asmaneh-home-section {
  margin-block: 2rem;
}

/* ==================================================
   HOMEPAGE RESPONSIVE HEADER
================================================== */

/* Laptop / tablet */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .asmaneh-home-header,
  body.admin-bar .asmaneh-home-header {
    height: auto;
    min-height: 300px;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }

  .asmaneh-home-header .header-tools {
    padding-top: 1rem;
  }

  .asmaneh-home-header .asmaneh-logo {
    top: 1rem;
  }

  .asmaneh-home-header .front-logo img {
    width: 120px;
    max-width: none;
    height: auto;
  }

  .asmaneh-home-nav {
    max-width: 760px;
    margin: 9rem auto 0;
    padding: 0 1rem;
    gap: 0.4rem 1rem;
  }

  .asmaneh-home-nav a {
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: nowrap;
  }

  .asmaneh-home-nav a::before {
    width: 15px;
    height: 12px;
    margin-left: 0.3rem;
  }

  .asmaneh-featured-row,
  body.admin-bar .asmaneh-featured-row {
    height: 430px;
    min-height: 430px;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  .asmaneh-home-header,
  body.admin-bar .asmaneh-home-header {
    height: auto;
    min-height: 0;
    padding: 1rem 0 1.5rem;
  }

  .asmaneh-home-header .header-tools {
    padding-top: 0.5rem;
  }

  .asmaneh-home-header .asmaneh-logo {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin: 0 0 1.5rem;
  }

  .asmaneh-home-header .front-logo img {
    width: 85px;
    max-width: none;
    height: auto;
  }

  .asmaneh-home-nav {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    gap: 0.4rem 0.75rem;
  }

  .asmaneh-home-nav a {
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: normal;
  }

  .asmaneh-home-nav a::before {
    width: 13px;
    height: 10px;
    margin-left: 0.25rem;
  }

  /* Mobile featured carousel */

  .asmaneh-featured-row,
  body.admin-bar .asmaneh-featured-row {
    height: 420px;
    min-height: 420px;
  }

  .asmaneh-featured-row .carousel-caption {
    right: 3rem;
    left: 3rem;
    bottom: 3rem;
    padding: 0;
  }
  .asmaneh-featured-row .carousel-caption h1,
  .asmaneh-featured-row .carousel-caption h2,
  .asmaneh-featured-row .carousel-caption .display-3 {
    font-size: 1.75rem !important;
    line-height: 1.55;
    margin-bottom: 0.75rem;
  }

  .asmaneh-featured-row .carousel-control-prev,
  .asmaneh-featured-row .carousel-control-next {
    width: 12%;
  }

  .asmaneh-featured-row .carousel-indicators {
    margin-bottom: 0.75rem;
  }
}

/* =========================================================
   COMPACT HEADER — INTERNAL PAGES
   ========================================================= */

.asmaneh-header:not(.asmaneh-home-header) {
  height: 280px;
  min-height: 280px;
  padding: 0;
  position: relative;
}

.asmaneh-header:not(.asmaneh-home-header) .container {
  position: relative;
}

/* Home + search — top right */
.asmaneh-header:not(.asmaneh-home-header) .header-tools {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  left: auto;
  padding: 0;

  display: flex;
  align-items: center;
  gap: 1rem;

  z-index: 5;
}

.asmaneh-header:not(.asmaneh-home-header) .header-tools a {
  font-size: 1.15rem;
  line-height: 1;
}

/* Logo — top left */
.asmaneh-header:not(.asmaneh-home-header) .page-logo {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  right: auto;
  margin: 0;
}

.asmaneh-header:not(.asmaneh-home-header) .page-logo img {
  width: 65px;
  height: auto;
  max-width: none;
}

/* Navigation */
.asmaneh-header:not(.asmaneh-home-header) .asmaneh-internal-nav {
  max-width: 1100px;
  position: absolute;
  left: 50%;
  bottom: 4rem;
  transform: translateX(-50%);
  width: 100%;
  margin: 0;
  padding: 0 1rem;
  gap: 0.3rem 1rem;
}

/* =========================================================
   RESPONSIVE INTERNAL HEADER
   ========================================================= */

/* Tablet / small laptop */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .asmaneh-header:not(.asmaneh-home-header) {
    height: 260px;
    min-height: 260px;
  }

  .asmaneh-header:not(.asmaneh-home-header) .page-logo {
    top: 1.25rem;
    left: 1.25rem;
  }

  .asmaneh-header:not(.asmaneh-home-header) .page-logo img {
    width: 58px;
  }

  .asmaneh-header:not(.asmaneh-home-header) .header-tools {
    top: 1.25rem;
    right: 1.25rem;
  }

  .asmaneh-header:not(.asmaneh-home-header) .asmaneh-internal-nav {
    bottom: 3rem;
    max-width: 900px;
    padding: 0 1.5rem;
    gap: 0.35rem 0.8rem;
  }

  .asmaneh-header:not(.asmaneh-home-header) .asmaneh-internal-nav a {
    font-size: 0.85rem;
    line-height: 1.5;
  }
}
/* Mobile */
@media (max-width: 767.98px) {
  .asmaneh-header:not(.asmaneh-home-header) {
    height: auto;
    min-height: 0;
    padding: 1rem 1rem 1.5rem;
  }

  /* Top row */
  .asmaneh-header:not(.asmaneh-home-header) .page-logo {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin: 0 0 1.5rem;
    text-align: left;
  }

  .asmaneh-header:not(.asmaneh-home-header) .page-logo img {
    width: 52px;
  }

  .asmaneh-header:not(.asmaneh-home-header) .header-tools {
    top: 1.25rem;
    right: 1.25rem;
    left: auto;
  }

  /* Navigation becomes part of normal flow */
  .asmaneh-header:not(.asmaneh-home-header) .asmaneh-internal-nav {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;

    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;

    gap: 0.4rem 0.75rem;
  }
  .asmaneh-header:not(.asmaneh-home-header) .asmaneh-internal-nav a {
    font-size: 0.85rem;
    line-height: 1.5;
    white-space: normal;
  }

  .asmaneh-header:not(.asmaneh-home-header) .asmaneh-internal-nav a::before {
    width: 13px;
    height: 10px;
    margin-left: 0.25rem;
  }
}

/* ==================================================
   HOMEPAGE EDITORIAL FEATURE
================================================== */

.asmaneh-featured-row {
  height: 60vh;
  min-height: 420px;
}

.asmaneh-featured-row .carousel,
.asmaneh-featured-row .carousel-inner,
.asmaneh-featured-row .carousel-item {
  height: 100%;
}

.asmaneh-featured-row .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-item-featured::before {
  content: "";
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 60%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
}
.carousel-caption-featured {
  z-index: 2; /* keep text above gradient */
}
.asmaneh-featured-writers .asmaneh-writer-link {
  color: inherit;
  text-decoration: none;
}

.asmaneh-featured-writers .asmaneh-writer-link:hover {
  text-decoration: underline;
}
/* Carousel arrows — no background panel */
.asmaneh-featured-row .carousel-control-prev,
.asmaneh-featured-row .carousel-control-next {
  background: transparent;
  border: 0;
  box-shadow: none;
}
/* ==================================================
   HOMEPAGE CARDS — SHARED
================================================== */

.bap-home-card,
.blog-home-card,
.home-section-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  direction: rtl;
}

.bap-home-card,
.home-section-card {
  background: var(--bs-light);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.bap-home-card:hover,
.home-section-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(28, 57, 191, 0.1);
}
/* Featured full-width Asmaneh Books card */

.home-asmanebooks .bap-home-card {
  min-height: 180px;
  height: 180px;
}
.home-asmanebooks .bap-home-card-content {
  justify-content: center;
}

.home-asmanebooks .bap-home-card-label {
  margin-bottom: 1rem;
}

.home-asmanebooks .bap-home-card-title {
  margin: 0;
}

/* --------------------------------------------------
   Homepage — BAP introduction grid
-------------------------------------------------- */

.bap-home-card {
  min-height: 290px;
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bap-home-card.has-background .bap-home-card-excerpt {
  color: rgba(255, 255, 255, 0.9);
}

.bap-home-card-excerpt {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
  line-height: 1.7;
}
.bap-home-card-excerpt,
.blog-home-card-excerpt,
.home-section-card-excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
/* Category heading */

.bap-home-card-label {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.bap-home-card-label a {
  color: var(--bs-primary);
  text-decoration: none;
}
/* Optional featured-image background for BAP cards */

.bap-home-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.bap-home-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 1;
}

.bap-home-card-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.bap-home-card.has-background,
.bap-home-card.has-background a {
  color: #fff;
}

/* Content title */

.bap-home-card-title {
  font-size: 1.5rem;
  line-height: 1.5;
  font-weight: 700;
  margin: auto 0 0;
}

.bap-home-card-title a {
  color: var(--bs-primary);
  text-decoration: none;
}

/* Empty category */

.bap-home-card.is-empty {
  opacity: 0.65;
}

.bap-home-card-coming {
  margin-top: auto;
  font-size: 1rem;
  color: var(--bs-primary);
}

/* Mobile */

@media (max-width: 767.98px) {
  .bap-home-card {
    min-height: 220px;
    padding: 1.5rem;
  }
}
/* --------------------------------------------------
   Homepage — latest blog post
-------------------------------------------------- */

.blog-home-card {
  min-height: 300px;
  background: var(--bs-light);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.blog-home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(28, 57, 191, 0.14);
}

/* Background image */

.blog-home-card-bg {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  display: block;
}

/* Blue overlay */

.blog-home-card-overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    90deg,
    rgba(28, 57, 191, 0.25) 0%,
    rgba(28, 57, 191, 0.55) 45%,
    rgba(28, 57, 191, 0.92) 100%
  );
}

/* Text */

.blog-home-card-content {
  position: relative;
  z-index: 2;

  min-height: 300px;
  padding: 2.25rem 2.5rem;

  display: flex;
  flex-direction: column;

  color: #fff;
}

.blog-home-card-label {
  font-size: 1rem;
  margin-bottom: auto;
}

.blog-home-card-text {
  max-width: 55%;
  margin-right: 0;
  margin-left: auto;
}

.blog-home-card-title {
  font-size: 1.5rem;
  line-height: 1.55;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.blog-home-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-home-card-excerpt {
  font-size: 1rem;
  line-height: 1.9;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

/* No featured image */

.blog-home-card:not(.has-image) .blog-home-card-content {
  color: var(--bs-primary);
}

.blog-home-card:not(.has-image) .blog-home-card-text {
  max-width: 100%;
}

/* Mobile */

@media (max-width: 767.98px) {
  .blog-home-card,
  .blog-home-card-content {
    min-height: 300px;
  }

  .blog-home-card-content {
    padding: 1.5rem;
  }

  .blog-home-card-text {
    max-width: 100%;
  }

  .blog-home-card-overlay {
    background: rgba(28, 57, 191, 0.78);
  }

  .blog-home-card-excerpt {
    font-size: 0.95rem;
  }
}
/* --------------------------------------------------
   Homepage — research / dossier / voices / talks
-------------------------------------------------- */

.home-content-grid {
  display: grid;

  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 190px 190px;

  gap: 1.5rem;
}

.home-grid-research {
  grid-column: 1;
  grid-row: 1 / 3;
}

.home-grid-dossier {
  grid-column: 2 / 4;
  grid-row: 1;
}

.home-grid-voices {
  grid-column: 2;
  grid-row: 2;
}

.home-grid-talks {
  grid-column: 3;
  grid-row: 2;
}

.home-section-card {
  height: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.home-section-card-excerpt {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.home-section-card.has-background .home-section-card-excerpt {
  color: rgba(255, 255, 255, 0.9);
}

/* Image version — dossier */

.home-section-card-content {
  position: relative;
  z-index: 2;

  height: 100%;

  display: flex;
  flex-direction: column;
}

.home-section-card-bg {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  display: block;
}

.home-section-card-overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(
    90deg,
    rgba(28, 57, 191, 0.3) 0%,
    rgba(28, 57, 191, 0.6) 50%,
    rgba(28, 57, 191, 0.9) 100%
  );
}

.home-section-card.has-background,
.home-section-card.has-background .home-section-card-label,
.home-section-card.has-background .home-section-card-title a {
  color: #fff;
}

.home-section-card-label {
  font-size: 1rem;
  color: var(--bs-primary);
}

.home-section-card-title {
  font-size: 1.5rem;
  line-height: 1.5;
  font-weight: 700;

  margin: auto 0 0;
}

.home-section-card-title a {
  color: var(--bs-primary);
  text-decoration: none;
}

.home-section-card.is-empty {
  opacity: 0.65;
}

.home-section-card-coming {
  margin-top: auto;
  color: var(--bs-primary);
}
/* Audio card — صداهای آسمانه */

.home-section-card-media-icon {
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-section-card-play {
  width: 56px;
  height: 56px;

  background: #c1d844;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;
}

.home-section-card-play-triangle {
  width: 0;
  height: 0;

  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid #fff;

  margin-left: 4px;
}

/* Mobile */

@media (max-width: 767.98px) {
  .home-content-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .home-grid-research,
  .home-grid-dossier,
  .home-grid-voices,
  .home-grid-talks {
    grid-column: auto;
    grid-row: auto;
  }

  .home-section-card {
    min-height: 190px;
    padding: 1.5rem;
  }
}
/* Homepage news */

.news-home-card {
  min-height: 260px;
  padding: 2rem;

  background: var(--bs-primary);
  border-radius: 1rem;

  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;

  direction: rtl;
  color: #fff;
}

.news-home-heading {
  font-size: 1.5rem;
  font-weight: 700;

  display: flex;
  align-items: flex-start;
}

.news-home-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.news-home-item {
  padding: 0 1.5rem;

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.news-home-item:first-child {
  border-right: 0;
}

.news-home-date {
  margin-bottom: auto;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  direction: rtl;
  unicode-bidi: isolate;
}

.news-home-title {
  margin: 2rem 0 0;

  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 700;
}

.news-home-title a {
  color: #fff;
  text-decoration: none;
}

.news-home-title a:hover {
  opacity: 0.8;
}

@media (max-width: 767.98px) {
  .news-home-card {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 1.5rem;
  }

  .news-home-items {
    grid-template-columns: 1fr;
  }

  .news-home-item {
    padding: 1.5rem 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  }

  .news-home-item:last-child {
    border-bottom: 0;
  }

  .news-home-date {
    margin-bottom: 0.75rem;
  }

  .news-home-title {
    margin: 0;
  }
}
/* =========================================
   Homepage voice preview
   ========================================= */

.home-section-audio-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: auto 0;
  direction: rtl;
}

/* Play / pause button */

.asmaneh-audio-play {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  border: 0;
  border-radius: 50%;

  background: var(--color-teal);
  color: #fff;

  cursor: pointer;
}

.asmaneh-audio-play:hover,
.asmaneh-audio-play:focus-visible {
  background: var(--color-teal-dark);
}

/* Play / pause icon */

.asmaneh-audio-icon {
  width: 13px;
  height: 17px;
  fill: currentColor;
  display: block;
}

/* Progress track */

.asmaneh-audio-track {
  position: relative;
  flex: 1;
  height: 4px;

  overflow: hidden;
  border-radius: 999px;

  background: rgba(28, 57, 187, 0.15);
  cursor: pointer;
}

.asmaneh-audio-progress {
  width: 0;
  height: 100%;

  background: var(--color-primary);
  border-radius: inherit;
}

/* Time */

.asmaneh-audio-time {
  flex: 0 0 auto;
  min-width: 38px;

  color: var(--color-primary);
  font-size: 0.8rem;
  direction: ltr;
  text-align: left;
}

/* Real audio element remains functional but invisible */

.asmaneh-audio-element {
  display: none;
}
.asmaneh-audio-icon path {
  fill: currentColor;
}
/* ==================================================
   ARCHIVES
================================================== */

/* --------------------------------------------------
   Shared archive UI
-------------------------------------------------- */

/* Category and tag archive header */
.asmaneh-taxonomy-header {
  background-color: var(--color-green-pale);
  color: var(--color-teal-dark);
}
.asmaneh-archive-empty {
  background-color: var(--color-green-pale);
  color: var(--color-teal-dark);
  border: 0;
}
/* Category badge */
.asmaneh-category-badge {
  background-color: var(--color-teal-dark);
  color: #fff;
}
/* ==================================================
   SHARED CARD HOVER INTERACTION
================================================== */

.asmaneh-image-reveal {
  position: relative;
  overflow: hidden;
}

.asmaneh-image-reveal img {
  transition: transform 0.4s ease;
}

.asmaneh-image-reveal .asmaneh-reveal-overlay {
  transition: opacity 0.35s ease;
}

/* Image cards: reveal the clear image */
.asmaneh-image-reveal.has-image:hover .asmaneh-reveal-overlay {
  opacity: 0;
}

.asmaneh-image-reveal.has-image:hover img {
  transform: scale(1.02);
}

/* No-image cards: reveal the clear base colour */
.asmaneh-image-reveal.no-image:hover .asmaneh-reveal-overlay {
  opacity: 0;
}

/* Load more */
.asmaneh-load-more-wrap {
  width: 100%;
}

.asmaneh-load-more {
  appearance: none;
  padding: 0.7rem 2.25rem;
  border: 1px solid var(--color-teal);
  border-radius: 0;
  background: transparent;
  color: var(--color-teal);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}

.asmaneh-load-more:hover,
.asmaneh-load-more:focus-visible {
  background: var(--color-teal);
  color: #fff;
}

.asmaneh-load-more:disabled {
  cursor: wait;
  opacity: 0.6;
}
/* ==================================================
   GENERIC ARCHIVE CARDS — BAP ETC.
================================================== */

.asmaneh-archive-card,
.blog-archive-card {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 0.75rem;
}

.asmaneh-archive-card {
  background: var(--color-teal);
}

.asmaneh-archive-card-link,
.blog-archive-card-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.asmaneh-archive-card-image,
.blog-archive-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Faded turquoise surface */
.asmaneh-archive-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(83, 210, 209, 0.65);
}

/* No-image cards use solid turquoise underneath the faded surface */

.asmaneh-archive-card.no-image .asmaneh-archive-card-overlay {
  background: rgba(255, 255, 255, 0.28);
}

/* Content always stays visible */
.asmaneh-archive-card-content,
.blog-archive-card-content {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 1.5rem;
  direction: rtl;
  text-align: right;
}

/* Keep text readable when there is an image */
.asmaneh-archive-card.has-image .asmaneh-archive-card-content,
.asmaneh-archive-card.has-image .asmaneh-archive-card-content a {
  color: #fff;
}

.asmaneh-archive-card.has-image .asmaneh-archive-card-content,
.blog-archive-card.has-image .blog-archive-card-content {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.68) 0%,
    rgba(0, 0, 0, 0.25) 65%,
    transparent 100%
  );
}
.asmaneh-archive-card.has-image .asmaneh-archive-card-content a:hover,
.asmaneh-archive-card.has-image .asmaneh-archive-card-content a:focus {
  color: #fff;
}

.asmaneh-archive-card.no-image
  .asmaneh-archive-card-content
  .asmaneh-writer-link {
  color: #1f1f1f;
}

.asmaneh-archive-card-title,
.blog-archive-card-title {
  font-size: 1.35rem;
  line-height: 1.55;
  font-weight: 700;
}

.asmaneh-archive-card-title {
  margin: 0.65rem 0 0.4rem;
}

.asmaneh-archive-card-date {
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

.asmaneh-archive-card .asmaneh-category-badge {
  display: inline-block;
  margin-bottom: 0.25rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}

@media (max-width: 767.98px) {
  .asmaneh-archive-card,
  .blog-archive-card {
    height: 270px;
  }

  .asmaneh-archive-card-content,
  .blog-archive-card-content {
    padding: 1.25rem;
  }

  .asmaneh-archive-card-title,
  .blog-archive-card-title {
    font-size: 1.15rem;
  }
}

/* =========================================================
   BLOG ARCHIVE CARDS
   ========================================================= */

.blog-archive-card {
  background: var(--color-green-pale);
}

/* Green wash over cards with images */
.blog-archive-card.has-image .blog-archive-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(213, 233, 226, 0.65);
}

.blog-archive-card.no-image .blog-archive-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.28);
}

/* Keep text readable over both images and plain cards */
.blog-archive-card.has-image .blog-archive-card-content {
  color: #fff;
}

.blog-archive-card.no-image .blog-archive-card-content {
  color: #1f1f1f;
}

.blog-archive-card-title {
  margin: 0 0 0.65rem;
}

.blog-archive-card-writers {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.blog-archive-card-date {
  font-size: 0.85rem;
  opacity: 0.8;
}
.asmaneh-card-writers .asmaneh-writer-link {
  color: #fff;
  text-decoration: none;
}

.asmaneh-card-writers .asmaneh-writer-link:hover {
  text-decoration: underline;
}

.asmaneh-card-placeholder {
  background-color: var(--color-teal);
}

/* BAP archive filters */
.bap-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 2rem 1rem 0;
  direction: rtl;
}

.bap-filters a {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  border: 1px solid var(--color-teal);
  border-radius: 999px;
  color: var(--color-teal-dark);
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.bap-filters a:hover,
.bap-filters a:focus,
.bap-filters a.active {
  background: var(--color-teal);
  color: #fff;
}

/* ==================================================
   SINGLE CONTENT
================================================== */

.entry-content ul,
.entry-content ol,
.asmaneh-static-page-content ul,
.asmaneh-static-page-content ol {
  padding-inline-start: 1.5rem;
  padding-inline-end: 0;
}

.asmaneh-single-meta {
  direction: rtl;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.asmaneh-single-writers {
  font-weight: 700;
}
/* Remove legacy white backgrounds imported from the old website */
.entry-content span[style*="background-color"] {
  background-color: transparent !important;
}
/* Clean legacy backgrounds inside article text */
.entry-content em,
.entry-content i,
.entry-content strong,
.entry-content b {
  background-color: transparent !important;
  background: transparent !important;
}

/* ─── Single article typography ─────────────────────────────────── */

/*
 * Old content contains inline font declarations imported
 * from previous editors. Use Farhang consistently for article content.
 */

.single .entry-content,
.single .entry-content * {
  font-family: "Farhang", sans-serif !important;
}
/* Reader text sizes */

.single .entry-content.reader-size-small {
  font-size: 0.95rem;
  line-height: 1.9;
}

.single .entry-content.reader-size-normal {
  font-size: 1.05rem;
  line-height: 2;
}

.single .entry-content.reader-size-large {
  font-size: 1.2rem;
  line-height: 2.05;
}
.asmaneh-reader-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
  direction: rtl;
}

.asmaneh-reader-controls span {
  margin-left: 0.6rem;
  font-size: 0.85rem;
  color: #666;
}

.asmaneh-reader-controls button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--color-teal);
  border-radius: 50%;
  background: transparent;
  color: var(--color-teal);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.asmaneh-reader-controls button:hover,
.asmaneh-reader-controls button:focus-visible,
.asmaneh-reader-controls button.is-active {
  background: var(--color-teal);
  color: #fff;
}
/* ─── Writers directory ─────────────────────────────────── */

.writers-directory {
  column-count: 3;
  column-gap: 3rem;
  direction: rtl;
}

.writer-directory-item {
  display: block;
  break-inside: avoid;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);

  color: inherit;
  font-size: 1.1rem;
  text-decoration: none;

  transition: color 0.2s ease;
}
.asmaneh-writer-link {
  color: inherit;
  text-decoration: none;
}

.asmaneh-writer-link:hover,
.asmaneh-writer-link:focus {
  color: inherit;
  text-decoration: underline;
}

/* Tablet */

@media (max-width: 991.98px) {
  .writers-directory {
    column-count: 2;
  }
}

/* Mobile */

@media (max-width: 575.98px) {
  .writers-directory {
    column-count: 1;
  }
}
/* =========================================================
   Writer profile
   ========================================================= */

/* Profile hero */

.writer-profile-hero {
  background: var(--color-writer-hero);
  padding: 4.5rem 0;
}

.writer-profile-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
}

.writer-profile-image {
  flex: 0 0 220px;
}

.writer-profile-image img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
}

.writer-profile-info {
  flex: 1;
  max-width: 500px;
  text-align: right;
}

.writer-profile-name {
  color: var(--bs-primary);
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.writer-profile-description {
  font-size: 1rem;
  line-height: 2;
}

/* Writer's posts */

.writer-profile-posts {
  background: #fff;
  padding: 4rem 0 5rem;
}

.writer-profile-posts-title {
  color: var(--bs-primary);
  font-size: 1.7rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  text-align: right;
}

.writer-profile-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

/* Responsive */

@media (max-width: 767.98px) {
  .writer-profile-hero {
    padding: 3rem 1rem;
  }

  .writer-profile-inner {
    flex-direction: column;
    gap: 2rem;
  }

  .writer-profile-image {
    flex-basis: auto;
  }

  .writer-profile-image img {
    width: 170px;
    height: 170px;
  }

  .writer-profile-info {
    text-align: center;
  }

  .writer-profile-name {
    font-size: 1.8rem;
  }

  .writer-profile-posts-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   Writer page — post cards
   ========================================================= */

.writer-profile-count {
  margin-top: 0.4rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--bs-primary);
  direction: rtl;
}
.writer-post-card {
  position: relative;
  height: 220px;
  background: var(--color-teal);
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
}

.writer-post-card-link {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  padding: 1.75rem;
  text-decoration: none;
  color: #fff;
}

/* Keep link styling stable during hover/focus */
.writer-post-card-link:hover,
.writer-post-card-link:focus {
  color: #fff;
  text-decoration: none;
}

/* Featured image, when available */
.writer-post-card-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.writer-post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Turquoise overlay over featured images */
.writer-post-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(83, 210, 209, 0.45);
  z-index: 1;
}

.writer-post-card.no-image .writer-post-card-overlay {
  background: rgba(255, 255, 255, 0.28);
}

/* Content */
.writer-post-card-content {
  position: relative;
  z-index: 2;
  direction: rtl;
  text-align: right;
}

.writer-post-card-title {
  margin: 0 0 0.4rem;
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 700;
}

.writer-post-card-meta {
  font-size: 0.9rem;
  opacity: 0.8;
}

@media (max-width: 767.98px) {
  .writer-post-card {
    height: 190px;
  }

  .writer-post-card-link {
    padding: 1.25rem;
  }
}

/* ==================================================
   MOBILE PAGE & CONTENT TITLES
================================================== */

@media (max-width: 767.98px) {
  /* Archive / section title bands */
  .asmaneh-taxonomy-header h1,
  .container-fluid > .row[class*="subtle"] h1 {
    font-size: 2rem;
    line-height: 1.45;
  }

  /* Single post / content page main titles */
  .asmaneh-single-title {
    font-size: 1.5rem;
    line-height: 1.5;
  }
}
/* Voices — Aparat player */
.asmaneh-aparat-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 2rem;
  overflow: hidden;
  border-radius: 0.5rem;
}

.asmaneh-aparat-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* ==================================================
   SEARCH
================================================== */

.asmaneh-search {
  direction: rtl;
}

/* Search area */

.asmaneh-search-header {
  padding: 4rem 0;
  background: var(--color-green-pale);
}

.asmaneh-search-title {
  margin: 0 0 2rem;
  color: var(--color-teal-dark);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
}

/* Search form */

.asmaneh-search-form {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
}

.asmaneh-search-input {
  display: block;
  width: 100%;
  height: 58px;
  padding: 0 1.5rem 0 4rem;

  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;

  background: #fff;
  color: #1f1f1f;

  font-family: inherit;
  font-size: 1rem;
}

.asmaneh-search-input:focus {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
}

.asmaneh-search-button {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  transform: translateY(-50%);

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 50%;

  background: var(--color-primary);
  color: #fff;

  cursor: pointer;
}

/* Results */

.asmaneh-search-results {
  padding: 3rem 0 5rem;
}

.asmaneh-search-results-title {
  margin: 0 0 2rem;

  color: var(--color-primary);

  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.6;

  text-align: right;
}

/* Mobile */

@media (max-width: 767.98px) {
  .asmaneh-search-header {
    padding: 3rem 1rem;
  }

  .asmaneh-search-title {
    font-size: 1.6rem;
  }

  .asmaneh-search-results {
    padding: 3rem 1rem 4rem;
  }

  .asmaneh-search-results-title {
    font-size: 1.25rem;
  }
}
/* ==================================================
   FOOTER
================================================== */

footer {
  padding: 2rem 0 1.5rem;
}

.asmaneh-footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  direction: rtl;
}

/* Main footer links */

.asmaneh-footer-links {
  display: flex;
  gap: 3rem;
}

.asmaneh-footer-links a {
  color: inherit;
  font-size: 1.1rem;
  text-decoration: none;
}

.asmaneh-footer-links a:hover,
.asmaneh-footer-links a:focus {
  color: var(--color-teal);
}

/* Logo and contact information */

.asmaneh-footer-identity {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 1.5rem;
  row-gap: 0.5rem;
}

.asmaneh-footer-identity .logo-wrapper {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  margin: 0;
}

.asmaneh-footer-identity .custom-logo {
  display: block;
  width: auto;
  height: 100px;
}

.asmaneh-footer-identity .socials {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.asmaneh-footer-identity .socials a {
  color: inherit;
  font-size: 1.75rem;
  line-height: 1;
}
.asmaneh-footer-identity .socials .asmaneh-aparat-link img {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
}

.asmaneh-footer-email {
  grid-column: 2;
  grid-row: 2;
  color: inherit;
  text-decoration: none;
}

/* Bottom row */

.asmaneh-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  direction: ltr;
}

.asmaneh-footer-bottom p {
  margin: 0;
}

.asmaneh-footer-bottom > p:first-child {
  text-align: right;
}

.asmaneh-footer-bottom > p:last-child {
  text-align: left;
}

/* Mobile */

@media (max-width: 767.98px) {
  footer {
    padding: 2.5rem 0 1rem;
  }

  .asmaneh-footer-main {
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
  }

  .asmaneh-footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
  }

  .asmaneh-footer-identity {
    align-items: center;
  }

  .asmaneh-footer-identity .custom-logo {
    height: 90px;
  }

  .asmaneh-footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
  }

  .asmaneh-footer-bottom > p:first-child,
  .asmaneh-footer-bottom > p:last-child {
    text-align: center;
  }
}
