/* Match the archive's content rails when the widget occupies its own row. */
@media (min-width: 1025px) {
  .elementor-location-archive > .e-con.e-con-full:has(> .elementor-widget-afaridan_archive_intro:only-child) {
    --padding-left: 0px;
    --padding-right: 0px;
    --padding-top: 0px;
    padding: 0 0 var(--padding-bottom, 10px);
  }
}

.af-archive {
  --af-archive-gap: 15px;
  --af-archive-accent: #eac900;
  --af-archive-title-bg: rgb(60 60 60 / 50%);
  --af-archive-title-color: #000;
  --af-archive-panel-bg: #f0f0f0;
  --af-archive-button-bg: #4f4f4f;
  --af-archive-button-color: #eee;
  display: grid;
  grid-template-columns: minmax(0, 80fr) minmax(0, 25fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  gap: var(--af-archive-gap);
  width: 100%;
}

.af-archive__side,
.af-archive__stack {
  display: grid;
  align-content: start;
  gap: var(--af-archive-gap);
  min-width: 0;
}

.af-archive__side {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 1025px) {
  .af-archive__header {
    grid-area: 1 / 1;
    align-self: start;
  }

  .af-archive__side {
    grid-area: 1 / 2 / 3 / 3;
  }

  .af-archive .af-archive__intro {
    grid-area: 2 / 1;
    padding-bottom: 100px;
  }

  .af-archive__stack {
    position: sticky;
    top: 90px;
  }
}

.af-archive__header {
  display: grid;
  gap: 10px;
  padding: 5px 10px 10px;
  background: var(--af-archive-title-bg);
  color: var(--af-archive-title-color);
}

.af-archive .af-archive__title {
  margin: 0;
  padding: 10px 0;
  color: inherit;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  overflow-wrap: anywhere;
}

.af-archive__crumb {
  justify-self: start;
  height: 33px;
  padding-top: 9px;
  position: relative;
  font-size: 14px;
  line-height: 1;
  color: #bbb;
}

.af-archive__crumb::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 37px;
  border-bottom: 5px solid var(--af-archive-accent);
}

.af-archive .af-archive__crumb a,
.af-archive .af-archive__crumb [aria-current="page"] {
  color: #fff;
}

.af-archive__summary,
.af-archive__intro {
  color: #000;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.af-archive__summary {
  color: inherit;
}

.af-archive__summary > :last-child,
.af-archive__intro > :last-child {
  margin-bottom: 0;
}

.af-archive__intro {
  padding: 15px 0 15px 15px;
  text-align: justify;
}

.af-archive__image {
  height: 300px;
  flex: 0 0 300px;
  overflow: hidden;
}

.af-archive .af-archive__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.af-archive a.af-archive__cta {
  display: grid;
  place-items: center;
  min-height: 45px;
  padding: 17.5px 0 15.5px;
  background: var(--af-archive-button-bg);
  color: var(--af-archive-button-color);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
}

.af-archive a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.af-archive__panel {
  display: grid;
  gap: 30px;
  padding: 30px 15px;
  background: var(--af-archive-panel-bg);
}

.af-archive .af-archive__panel-title {
  position: relative;
  isolation: isolate;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  color: #3c3c3c;
  text-align: start;
}

.af-archive__panel-title--badged > span {
  position: relative;
  z-index: 1;
  padding-inline-start: 24px;
}

.af-archive .af-archive__badge {
  position: absolute;
  z-index: 0;
  top: -13px;
  right: -3px;
  width: 45px;
  height: 45px;
  object-fit: contain;
  pointer-events: none;
}

.af-archive .af-archive__links,
.af-archive .af-archive__recent {
  margin: 0;
  padding: 0;
  list-style: none;
}

.af-archive .af-archive__links li {
  margin: 0;
}

.af-archive .af-archive__links li + li {
  margin-top: 10px;
}

.af-archive .af-archive__links a {
  display: block;
  padding: 0;
  color: #000;
  border-top: 1px solid rgb(255 255 255 / 22%);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  text-align: right;
  text-decoration: none;
}

.af-archive .af-archive__links a:is(:hover, :focus-visible) {
  background-color: #3c3c3c;
  color: #fff;
}

.af-archive .af-archive__recent li {
  margin: 0;
}

.af-archive .af-archive__recent li + li {
  margin-top: 10px;
}

.af-archive .af-archive__recent a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  color: #000;
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
  text-decoration: none;
}

.af-archive__recent img {
  flex: none;
  width: 45px;
  height: 45px;
  object-fit: cover;
}

@media (max-width: 1024px) {
  .af-archive {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }

  .af-archive__intro {
    margin-inline: 15px;
    padding-inline: 15px;
  }

  .af-archive__image {
    flex: none;
    height: auto;
    overflow: visible;
  }

  .af-archive .af-archive__image img {
    height: auto;
    object-fit: contain;
  }

  .af-archive__side .af-archive__panel {
    display: none;
  }

  .af-archive__side:not(:has(.af-archive__image, .af-archive__cta)),
  .af-archive__stack:not(:has(.af-archive__cta)) {
    display: none;
  }
}

.af-archive.af-post-sidebar {
  display: block;
  height: 100%;
}

.af-single-post__headings {
  display: grid;
  gap: 5px;
  padding-block: 10px;
}

.af-company-profile .af-company-profile__header {
  min-height: 140px;
  align-content: start;
  color: #000;
  text-align: left;
}

.af-company-profile .af-company-profile__body {
  min-width: 0;
  padding-inline: 15px;
  color: #000;
  text-align: left;
}

.af-company-profile__path {
  justify-self: end;
  font-size: 14px;
  text-align: right;
}

.af-company-profile .af-company-profile__path a {
  color: inherit;
}

.af-company-profile__headings {
  display: grid;
  gap: 5px;
  padding-block: 5px;
}

.af-company-profile .af-company-profile__headings .af-archive__title {
  padding: 0;
  line-height: 1.45;
}

.af-company-profile .af-company-profile__headings p,
.af-company-profile .af-company-profile__meta,
.af-company-profile .af-company-profile__meta li {
  margin: 0;
}

.af-company-profile .af-company-profile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.af-company-profile__meta li + li {
  border-inline-start: 2px solid #3c3c3c;
  padding-inline-start: 8px;
}

.af-company-profile .af-archive__panel-title > span {
  position: relative;
  z-index: 1;
  padding-inline-start: 24px;
}

.af-company-profile .af-archive__panel-title::before {
  content: "";
  position: absolute;
  inset-block-start: -13px;
  inset-inline-start: -3px;
  box-sizing: border-box;
  width: 45px;
  height: 45px;
  border: 7px solid #3c3c3c;
}

@media (max-width: 1024px) {
  .af-company-profile .af-company-profile__body {
    margin-inline: 0;
  }
}

.af-single-post .af-archive__title {
  padding: 0;
  line-height: 1.45;
}

.af-single-post .af-single-post__subtitle,
.af-single-post .af-single-post__meta {
  margin: 0;
  color: #000;
  font-size: 14px;
  line-height: 1.6;
}

.af-single-post .af-single-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.af-single-post__meta > li {
  margin: 0;
}

.af-single-post__meta > li + li {
  border-inline-start: 5px solid var(--af-archive-accent);
  padding-inline-start: 10px;
}

.af-single-post .af-single-post__body {
  min-width: 0;
  font-size: 15px;
  line-height: 2;
}

.af-single-post__body .post-navigation {
  margin-block: 30px;
}

.af-single-post__nav-label {
  display: block;
  font-size: 12px;
}

.af-post-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-block: 24px 0;
}

.af-post-share__label {
  color: #000;
}

.af-post-share__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.af-single-post .af-post-share__button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--af-archive-accent);
  color: #000;
  font: 700 20px/1 Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.af-single-post .af-post-share__button:is(:hover, :focus-visible) {
  background: #3c3c3c;
  color: #fff;
}

.af-post-share__button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.af-post-share__button[data-af-copy-url] svg {
  fill: none;
}

.af-post-share__status:empty {
  display: none;
}

.af-single-post__related {
  grid-column: 1 / -1;
  min-width: 0;
}

.af-post-cards {
  --af-cards-visible: 3;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--af-cards-visible) - 1) * 20px) / var(--af-cards-visible));
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.af-post-cards::-webkit-scrollbar {
  display: none;
}

.af-card-carousel__viewport {
  position: relative;
}

.af-card-carousel button[hidden],
.af-card-carousel [hidden] {
  display: none !important;
}

.af-card-carousel button.af-card-carousel__arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgb(60 60 60 / 52%);
  color: #fff;
  transform: translateY(-50%);
}

.af-card-carousel__arrow--right { right: 0; }
.af-card-carousel__arrow--left { left: 0; }

.af-card-carousel__arrow svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.af-card-carousel__arrow:disabled {
  opacity: .45;
}

.af-card-carousel__dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-block-start: 12px;
}

.af-card-carousel__dots button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.af-card-carousel__dots button::before {
  content: "";
  width: 12px;
  height: 12px;
  background: #c4cbd2;
}

.af-card-carousel__dots button[aria-current="true"]::before {
  background: #3c3c3c;
}

.af-post-card {
  --af-card-inset: 30px;
  position: relative;
  isolation: isolate;
  display: grid;
  min-width: 0;
  min-height: 400px;
  margin: 0;
  overflow: hidden;
  background: #92969b;
  scroll-snap-align: start;
}

.af-post-card .af-post-card__link {
  display: grid;
  align-items: stretch;
  justify-items: center;
  padding: var(--af-card-inset);
  color: #1c2026;
  text-decoration: none;
}

.af-post-card .af-post-card__link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -5px;
}

.af-post-card .af-post-card__image {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.af-post-card__panel {
  position: relative;
  box-sizing: border-box;
  width: min(290px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
  padding: 25px 20px 20px;
  border-top: 8px solid var(--af-card-accent);
  background: rgb(246 248 252 / 86%);
  transition: background-color 180ms;
}

.af-post-card__link::before,
.af-post-card__panel::before {
  content: "";
  pointer-events: none;
  position: absolute;
}

.af-post-card__link::before {
  z-index: -1;
  inset: 0;
  background: var(--af-card-accent);
  opacity: 0;
  clip-path: inset(var(--af-card-inset) max(var(--af-card-inset), calc((100% - 290px) / 2)));
}

.af-post-card__panel::before {
  inset-block: -8px 0;
  inset-inline-start: 0;
  width: 5px;
  height: auto;
  background: var(--af-card-accent);
  transform: scaleY(0);
  transform-origin: top;
}

.af-post-card__path,
.af-post-card__meta {
  font-size: 12px;
  line-height: 1.6;
}

.af-post-card__headings {
  display: grid;
  gap: 6px;
}

.af-post-card .af-post-card__title {
  margin: 0;
  color: inherit;
  font-size: 20px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.af-post-card__detail {
  visibility: hidden;
  opacity: 0;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  transition: opacity 180ms;
}

.af-post-card__meta {
  margin-block-start: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.af-post-card__meta > span + span {
  border-inline-start: 2px solid var(--af-card-accent);
  padding-inline-start: 8px;
}

.af-post-card__link:is(:hover, :focus-visible)::before {
  animation: af-card-spread 360ms 240ms ease-out both;
}

.af-post-card__link:is(:hover, :focus-visible) .af-post-card__panel {
  animation: af-card-panel-reveal 180ms 420ms both;
}

.af-post-card__link:is(:hover, :focus-visible) .af-post-card__meta > span + span {
  border-color: currentColor;
}

.af-post-card__link:is(:hover, :focus-visible) .af-post-card__panel::before {
  animation: af-card-stripe 240ms ease-out both;
}

.af-post-card__link:is(:hover, :focus-visible) .af-post-card__detail {
  visibility: visible;
  opacity: 1;
}

@keyframes af-card-stripe {
  to { transform: scaleY(1); }
}

@keyframes af-card-spread {
  from { opacity: .78; }
  to { opacity: 1; clip-path: inset(0); }
}

@keyframes af-card-panel-reveal {
  to { background-color: transparent; color: var(--af-card-hover-ink); }
}

.af-post-card-list__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-block-start: 20px;
}

.af-archive + .af-post-card-list {
  margin-block-start: 20px;
}

@media (max-width: 1024px) {
  .af-post-cards {
    --af-cards-visible: 2;
  }
}

@media (max-width: 767px) {
  .af-post-cards {
    --af-cards-visible: 1;
  }
}

@media (hover: none) {
  .af-post-card__detail {
    visibility: visible;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .af-post-card__link:is(:hover, :focus-visible)::before {
    animation: none;
    clip-path: inset(0);
    opacity: 1;
  }

  .af-post-card__link:is(:hover, :focus-visible) .af-post-card__panel {
    animation: none;
    background-color: transparent;
    color: var(--af-card-hover-ink);
  }

  .af-post-card__link:is(:hover, :focus-visible) .af-post-card__panel::before {
    animation: none;
    transform: scaleY(1);
  }

  .af-post-card__panel,
  .af-post-card__detail {
    transition: none;
  }
}

@media (max-width: 1024px) {
  .af-single-post > .af-single-post__header,
  .af-single-post > .af-single-post__body {
    margin-inline: 0;
  }
}

@media (min-width: 1025px) {
  .elementor-widget-afaridan_post_sidebar {
    flex: 1 1 auto;
  }

  .elementor-widget-afaridan_post_sidebar > .elementor-widget-container,
  .af-post-sidebar > .af-archive__side {
    height: 100%;
  }
}
