/*--------------------------------------------------------------
# ForexMentor: articles, archives, banners, sidebar, comments
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Page banner (top of every inner page)
--------------------------------------------------------------*/
.page-banner {
  position: relative;
  padding: 150px 0 64px;
  background: #000;
  color: #fff;
  overflow: clip;
}

.admin-bar .page-banner { padding-top: 182px; }

.page-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.7) 60%, rgba(0, 0, 0, 0.82) 100%);
}

.page-banner .container { position: relative; z-index: 2; }

.page-banner__inner { max-width: 880px; }

.page-banner__title {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.18;
  margin: 0;
  overflow-wrap: anywhere;
}

.page-banner__lead {
  margin: 16px 0 0;
  max-width: 44rem;
  font-size: 1.15rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
}

.crumbs { margin-bottom: 20px; }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

.crumbs li + li::before {
  content: "/";
  padding-inline: 10px;
  color: rgba(255, 255, 255, 0.3);
}

.crumbs a { color: rgba(255, 255, 255, 0.85); }
.crumbs a:hover { color: var(--accent-color); }

.banner-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.banner-cats a {
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--accent-color);
  color: var(--contrast-color);
  font: 600 13px var(--nav-font);
}

.banner-cats a:hover { background: #fff; color: #000; }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.entry-meta i { color: var(--accent-color); margin-inline-end: 4px; }

.entry-meta__author { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 500; }
.entry-meta__avatar { border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); }

/*--------------------------------------------------------------
# Article cards
--------------------------------------------------------------*/
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.post-card:hover,
.post-card:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 12px 32px -16px rgba(0, 0, 0, 0.35);
}

.post-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b0b0b;
}

.post-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.post-card:hover .post-card__img { transform: scale(1.04); }

.post-card__ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent-color);
  font-size: 44px;
  background:
    linear-gradient(rgba(255, 196, 81, 0.07) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, rgba(255, 196, 81, 0.07) 1px, transparent 1px) 0 0 / 28px 100%,
    linear-gradient(135deg, #000, #1d1608);
}

.post-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}

.post-card__cat {
  position: relative;
  z-index: 4;
  align-self: flex-start;
  font: 600 13px var(--nav-font);
  color: var(--link-color);
}

.post-card__cat:hover { color: #000; text-decoration: underline; }

.post-card__title {
  margin: 6px 0 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.32;
}

.post-card__title a { color: var(--heading-color); }
.post-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.post-card:hover .post-card__title a { color: var(--link-color); }

.post-card__excerpt {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: auto;
  font-size: 13px;
  color: #777;
}

.post-card__meta i { margin-inline-end: 4px; color: var(--link-color); }

/* Feature: image behind the text */
.post-card--feature {
  min-height: 480px;
  justify-content: flex-end;
  border: 0;
  background: #000;
  color: #fff;
}

.post-card--feature .post-card__media {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.post-card--feature .post-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0.05) 100%);
}

.post-card--feature .post-card__body { position: relative; flex: 0 0 auto; padding: 34px; }
.post-card--feature .post-card__cat { padding: 4px 12px; border-radius: 999px; background: var(--accent-color); color: var(--contrast-color); }
.post-card--feature .post-card__cat:hover { background: #fff; color: #000; text-decoration: none; }
.post-card--feature .post-card__title { margin-top: 14px; font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.22; }
.post-card--feature .post-card__title a { color: #fff; }
.post-card--feature:hover .post-card__title a { color: var(--accent-color); }
.post-card--feature .post-card__excerpt { color: rgba(255, 255, 255, 0.8); max-width: 38rem; }
.post-card--feature .post-card__meta { color: rgba(255, 255, 255, 0.7); }
.post-card--feature .post-card__meta i { color: var(--accent-color); }

/* Row: image beside the text */
.post-card--row { flex: 1; flex-direction: row; }

.post-card--row .post-card__media {
  flex: 0 0 38%;
  aspect-ratio: auto;
  min-height: 150px;
}

.post-card--row .post-card__media .post-card__img { position: absolute; inset: 0; }
.post-card--row .post-card__body { padding: 18px 20px; justify-content: center; }
.post-card--row .post-card__title { font-size: 18px; margin-bottom: 8px; }

.post-card--row .post-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-bottom: 12px;
  font-size: 14px;
}

@media (max-width: 575px) {
  .post-card--row { flex-direction: column; }
  .post-card--row .post-card__media { flex-basis: auto; aspect-ratio: 16 / 10; min-height: 0; }
  .post-card--feature { min-height: 400px; }
  .post-card--feature .post-card__body { padding: 24px; }
}

/*--------------------------------------------------------------
# Archive bar, pills, search, pagination
--------------------------------------------------------------*/
.archive-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 36px;
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pills a {
  padding: 7px 16px;
  border: 1px solid var(--line-color);
  border-radius: 999px;
  font: 500 14px var(--nav-font);
  color: var(--heading-color);
}

.pills a:hover { border-color: #000; color: #000; }

.pills a.is-active {
  background: #000;
  border-color: #000;
  color: var(--accent-color);
}

.search-form {
  display: flex;
  width: 100%;
  max-width: 340px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.search-form:focus-within { border-color: #000; box-shadow: 0 0 0 3px rgba(255, 196, 81, 0.45); }

.search-field {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 10px 14px;
  font-size: 15px;
  background: transparent;
}

.search-field:focus { outline: none; }

.search-submit {
  border: 0;
  padding: 0 16px;
  background: var(--accent-color);
  color: var(--contrast-color);
  font-size: 16px;
  cursor: pointer;
}

.search-submit:hover { background: #000; color: var(--accent-color); }

.navigation.pagination { margin-top: 48px; }

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.page-numbers {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  color: var(--heading-color);
  font: 500 15px var(--nav-font);
}

a.page-numbers:hover { border-color: #000; color: #000; }
.page-numbers.current { background: var(--accent-color); border-color: var(--accent-color); color: var(--contrast-color); }
.page-numbers.dots { border-color: transparent; }

.empty-state {
  max-width: 520px;
  margin: 20px auto;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
}

.empty-state > i { display: block; margin-bottom: 14px; font-size: 40px; color: var(--link-color); }
.empty-state p { margin-bottom: 20px; }

/*--------------------------------------------------------------
# Article text
--------------------------------------------------------------*/
.entry-content {
  font-size: 18px;
  line-height: 1.8;
  color: #262626;
  overflow-wrap: break-word;
}

.entry-content--wide { font-size: 17px; }

/* Each block takes the direction of its own text, so Persian and English can be mixed. */
.entry-content :is(p, li, h1, h2, h3, h4, h5, h6, blockquote, figcaption, td, th, dt, dd) {
  unicode-bidi: plaintext;
  text-align: start;
}

.entry-content > * + * { margin-top: 1.25em; }
.entry-content > :first-child { margin-top: 0; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2em;
  margin-bottom: 0;
}

.entry-content h2 { font-size: 1.65rem; }
.entry-content h3 { font-size: 1.35rem; }
.entry-content h4 { font-size: 1.15rem; }
.entry-content h2 + *, .entry-content h3 + *, .entry-content h4 + * { margin-top: 0.7em; }

.entry-content a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(138, 88, 0, 0.4);
}

.entry-content a:hover { color: #000; text-decoration-color: currentColor; }

.entry-content ul,
.entry-content ol { padding-inline-start: 1.5rem; }
.entry-content li { margin-top: 0.4em; }
.entry-content li::marker { color: var(--link-color); }

.entry-content blockquote,
.entry-content .wp-block-quote {
  margin-inline: 0;
  padding: 18px 24px;
  border-inline-start: 4px solid var(--accent-color);
  background: var(--soft-bg);
  font-size: 1.05em;
}

.entry-content blockquote p { margin: 0; }
.entry-content blockquote cite { display: block; margin-top: 8px; font-size: 14px; color: #666; font-style: normal; }

.entry-content img,
.entry-content video,
.entry-content iframe { max-width: 100%; height: auto; border-radius: var(--radius); }

.entry-content figure { margin-inline: 0; }
.entry-content figcaption,
.wp-caption-text { margin-top: 8px; font-size: 14px; color: #666; text-align: center; }

.entry-content code {
  padding: 2px 6px;
  border-radius: 3px;
  background: #f1eee6;
  font-size: 0.9em;
  direction: ltr;
  unicode-bidi: embed;
}

.entry-content pre {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: #0d0d0d;
  color: #f1eee6;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}

.entry-content pre code { padding: 0; background: none; color: inherit; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
}

.entry-content .wp-block-table { overflow-x: auto; }

.entry-content th { background: #000; color: #fff; font-weight: 600; }
.entry-content th,
.entry-content td { padding: 10px 14px; border: 1px solid rgba(0, 0, 0, 0.15); }
.entry-content tbody tr:nth-child(even) { background: #faf8f3; }

.entry-content hr { border: 0; height: 3px; width: 72px; background: var(--accent-color); opacity: 1; margin: 2.5em 0; }

.entry-content .alignleft { float: left; margin: 0.4em 1.5em 1em 0; }
.entry-content .alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.entry-content .aligncenter { display: block; margin-inline: auto; }
.entry-content .alignwide,
.entry-content .alignfull { max-width: 100%; }
.entry-content::after { content: ""; display: table; clear: both; }

.entry-content .wp-block-button__link { border-radius: var(--radius); text-decoration: none; }
.entry-content .wp-block-embed { margin-inline: 0; }

.page-links { margin-top: 24px; display: flex; gap: 8px; }

/* Footer of an article: tags and sharing */
.entry-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-color);
}

.entry-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.entry-tags > i { color: var(--link-color); }
.entry-tags a { padding: 4px 12px; border-radius: 999px; background: var(--soft-bg); color: var(--heading-color); }
.entry-tags a:hover { background: #000; color: var(--accent-color); }

.share { display: flex; align-items: center; gap: 8px; }
.share__label { margin-inline-end: 4px; font: 500 14px var(--nav-font); color: #555; }

.share a,
.share button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  background: #fff;
  color: var(--heading-color);
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.share a:hover,
.share button:hover { background: #000; border-color: #000; color: var(--accent-color); }

.share button.is-copied { background: var(--accent-color); border-color: var(--accent-color); color: var(--contrast-color); }

.author-box {
  display: flex;
  gap: 20px;
  margin-top: 40px;
  padding: 24px;
  background: var(--soft-bg);
  border-radius: var(--radius);
}

.author-box__avatar { border-radius: 50%; flex-shrink: 0; height: 72px; width: 72px; }
.author-box__name { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.author-box p { margin: 0; font-size: 15px; line-height: 1.65; }

.post-navigation { margin-top: 40px; }

.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.post-navigation a {
  display: block;
  height: 100%;
  padding: 16px 20px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  color: var(--heading-color);
}

.post-navigation a:hover { border-color: var(--accent-color); }
.post-navigation .nav-next { text-align: end; grid-column: 2; }
.post-navigation .nav-previous:only-child { grid-column: 1; }
.post-navigation .nav-sub { display: block; font-size: 13px; color: #777; margin-bottom: 4px; }
.post-navigation .nav-title { font: 700 16px/1.4 var(--heading-font); }

@media (max-width: 575px) {
  .post-navigation .nav-links { grid-template-columns: 1fr; }
  .post-navigation .nav-next { grid-column: 1; }
  .author-box { flex-direction: column; }
}

.related { background: var(--soft-bg); }

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.sidebar__sticky { position: sticky; top: 96px; }

.download-box {
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--accent-color);
  color: var(--contrast-color);
}

.download-box img { display: block; width: 100%; height: auto; border-bottom: 3px solid #000; }
.download-box__body { padding: 22px; }
.download-box h2 { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: var(--contrast-color); }
.download-box p { margin: 0 0 16px; font-size: 15px; line-height: 1.55; }
.download-box .btn-gold--dark { background: #000; border-color: #000; color: var(--accent-color); }
.download-box .btn-gold--dark:hover { background: #fff; border-color: #fff; color: #000; }

.fm-widget {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
  background: #fff;
}

.fm-widget__title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-color);
  font-size: 17px;
  font-weight: 700;
}

.fm-widget ul { list-style: none; margin: 0; padding: 0; }
.fm-widget .search-form { max-width: none; }

.mini-list li { display: flex; gap: 14px; padding: 10px 0; }
.mini-list li:first-child { padding-top: 0; }
.mini-list li:last-child { padding-bottom: 0; }

.mini-list__thumb {
  position: relative;
  flex: 0 0 72px;
  height: 72px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0b0b0b;
}

.mini-list__thumb .post-card__img { position: absolute; inset: 0; }
.mini-list__thumb .post-card__ph { font-size: 24px; }
.mini-list__title { display: block; font: 600 15px/1.4 var(--heading-font); color: var(--heading-color); }
.mini-list__title:hover { color: var(--link-color); }
.mini-list time { display: block; margin-top: 4px; font-size: 13px; color: #777; }

.cat-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-color); }
.cat-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.cat-list a { color: var(--heading-color); }
.cat-list a:hover { color: var(--link-color); }
.cat-list span { color: #777; font-size: 14px; }

/*--------------------------------------------------------------
# Comments
--------------------------------------------------------------*/
.comments { margin-top: 56px; }

.comments__title,
.comment-reply-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }

.comment-list { list-style: none; margin: 0 0 32px; padding: 0; }
.comment-list .children { list-style: none; padding-inline-start: 28px; }

.comment-body {
  position: relative;
  margin-bottom: 18px;
  padding: 18px 20px 18px 82px;
  border: 1px solid var(--line-color);
  border-radius: var(--radius);
}

html[dir="rtl"] .comment-body { padding: 18px 82px 18px 20px; }

.comment-body .avatar { position: absolute; inset-inline-start: 18px; top: 18px; border-radius: 50%; }
.comment-author { font-weight: 700; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 13px; margin-bottom: 8px; }
.comment-metadata a { color: #777; }
.comment-content p { margin-bottom: 8px; }
.reply a { font: 600 13px var(--nav-font); }

.comment-form label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 15px; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
  font-size: 15px;
}

.comment-form input:focus,
.comment-form textarea:focus { outline: none; border-color: #000; box-shadow: 0 0 0 3px rgba(255, 196, 81, 0.45); }

.comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; }

/* Tools */
.tool-page .entry-content { min-height: 200px; }
