/**
 * Eco90 — Responsive
 * @package Eco90
 */

@media (min-width: 1025px) and (max-width: 1280px) {
  .eco90-layout--contact .eco90-contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  :root {
    --eco90-section-gap: 2.25rem;
  }

  .eco90-layout--single,
  .eco90-layout--archive,
  .eco90-layout--search,
  .eco90-layout--author,
  .eco90-layout--multimedia,
  .eco90-layout--404,
  .eco90-layout--page {
    grid-template-columns: 1fr;
  }

  .eco90-card-grid--archive,
  .eco90-card-grid--search,
  .eco90-media-grid,
  .eco90-home-latest__grid,
  .eco90-home-authors__grid,
  .eco90-home-multimedia__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eco90-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eco90-home-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    align-items: start;
    row-gap: 1rem;
  }

  .eco90-home-hero__main,
  .eco90-home-hero__aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: auto;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
  }

  .eco90-home-hero .eco90-lead,
  .eco90-home-hero .eco90-lead--split,
  .eco90-home-hero .eco90-home-hero-cards,
  .eco90-home-hero .eco90-home-block--selected,
  .eco90-home-hero .eco90-home-block--popular,
  .eco90-home-hero .eco90-ad-slot {
    grid-column: auto;
    grid-row: auto;
    height: auto;
    align-self: auto;
  }

  .eco90-home-hero .eco90-home-block--selected .eco90-home-block__list {
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  /* Keep latest/popular list at ~10 visible rows + scroll */
  .eco90-home-hero .eco90-home-block--popular {
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
    align-self: start;
  }

  .eco90-home-hero .eco90-home-block--popular .eco90-home-block__panel {
    flex: 0 1 auto;
    min-height: 0;
    height: auto;
  }

  .eco90-home-hero .eco90-home-block--popular .eco90-home-block__list,
  .eco90-home-hero .eco90-home-block--popular .eco90-home-block__list--scroll {
    flex: 0 1 auto;
    min-height: 0;
    height: auto;
    --eco90-ranked-row: 3.15rem;
    max-height: calc(6 * var(--eco90-ranked-row));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .eco90-home-hero__main {
    gap: 1.5rem;
  }

  .eco90-home-hero-cards__grid {
    gap: 0.5rem;
  }

  .eco90-home-block,
  .eco90-side-panel {
    flex: 0 0 auto;
    height: auto;
    min-height: min-content;
  }

  .eco90-home-block__list,
  .eco90-side-panel__list {
    flex: 0 0 auto;
    height: auto;
    min-height: min-content;
    justify-content: flex-start;
  }

  .eco90-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .eco90-footer__col {
    padding-inline: 0;
  }

  .eco90-footer__col + .eco90-footer__col {
    border-inline-start: 0;
  }

  .eco90-home-multimedia__columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .eco90-home-multimedia__col + .eco90-home-multimedia__col {
    border-inline-start: 0;
    border-top: 1px solid rgba(8, 47, 87, 0.1);
  }

  .eco90-home-multimedia__col {
    padding-inline: 0.25rem;
  }

  .eco90-featured-media__link {
    grid-template-columns: 1fr;
  }

  .eco90-search-filters__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eco90-contact-grid {
    grid-template-columns: 1fr;
  }

  .eco90-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --eco90-section-gap: 2rem;
  }
  .eco90-main {
    padding-block: 1.25rem;
  }

  .eco90-header {
    overflow-x: hidden;
  }

  .eco90-brand-row {
    overflow: visible;
    padding-block: 0.55rem;
  }

  .eco90-brand-row__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    direction: ltr;
    gap: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    min-height: 2.75rem;
  }

  .eco90-menu-toggle,
  .eco90-search-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 3;
    background: var(--eco90-surface-soft);
    border: 1px solid var(--eco90-border);
    border-radius: 50%;
    color: var(--eco90-primary);
  }

  .eco90-menu-toggle .eco90-icon,
  .eco90-menu-toggle .eco90-icon svg {
    display: none !important;
  }

  .eco90-menu-toggle__bars {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 18px;
    height: 14px;
    background: none;
    box-shadow: none;
  }

  .eco90-mobile-menu__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    flex: 0 0 2.75rem;
    background: var(--eco90-surface-soft);
    border: 1px solid var(--eco90-border);
    border-radius: 50%;
    color: var(--eco90-primary);
  }

  .eco90-search-toggle .eco90-icon {
    width: 22px;
    height: 22px;
  }

  .eco90-search-toggle .eco90-icon svg {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
  }

  .eco90-menu-toggle {
    order: 3;
  }

  .eco90-brand {
    order: 2;
    position: absolute;
    inset-inline: 3.25rem;
    inset-block: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    z-index: 1;
    flex: none;
    max-width: none;
    min-width: 0;
    pointer-events: none;
  }

  .eco90-brand a {
    pointer-events: auto;
  }

  .eco90-brand-row__search {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.75rem;
    width: 2.75rem;
    max-width: 2.75rem;
    margin: 0;
    position: relative;
    z-index: 3;
  }

  .eco90-brand-row__search .eco90-search-form--desktop {
    display: none;
  }

  .eco90-mobile-search-panel {
    display: none;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  body.eco90-mobile-search-open .eco90-brand-row__inner {
    gap: 0.55rem;
  }

  body.eco90-mobile-search-open .eco90-brand {
    display: none;
  }

  body.eco90-mobile-search-open .eco90-search-toggle {
    display: none !important;
  }

  body.eco90-mobile-search-open .eco90-brand-row__search {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    justify-content: stretch;
  }

  body.eco90-mobile-search-open .eco90-mobile-search-panel:not([hidden]) {
    display: block;
  }

  .eco90-mobile-search-panel__form {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.35rem;
    width: 100%;
    min-height: 2.55rem;
    padding: 0.2rem;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid var(--eco90-border);
    background: #fff;
    box-shadow: 0 2px 10px rgba(8, 47, 87, 0.1);
  }

  .eco90-mobile-search-panel__close {
    flex: 0 0 auto;
    align-self: stretch;
    width: 2.35rem;
    min-width: 2.35rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
  }

  .eco90-mobile-search-panel__close::after {
    content: "\00d7";
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 400;
  }

  .eco90-mobile-search-panel__input {
    flex: 1 1 auto;
    min-width: 0;
    width: 1%;
    margin: 0;
    padding: 0.5rem 0.55rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--eco90-text);
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: none;
  }

  .eco90-mobile-search-panel__input::placeholder {
    color: #94a3b8;
  }

  .eco90-mobile-search-panel__input:focus {
    outline: none;
    box-shadow: none;
  }

  .eco90-mobile-search-panel__form:focus-within {
    border-color: rgba(0, 143, 180, 0.45);
    box-shadow: 0 0 0 2px rgba(0, 143, 180, 0.14);
  }

  .eco90-mobile-search-panel__submit {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.42rem;
    min-width: 2.42rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: var(--eco90-primary, #0b3a66);
    color: #fff;
    cursor: pointer;
  }

  .eco90-mobile-search-panel__submit .eco90-icon,
  .eco90-mobile-search-panel__submit svg {
    width: 1.05rem;
    height: 1.05rem;
    display: block;
  }

  /* Mobile never uses the fullscreen popup */
  .eco90-search-overlay {
    display: none !important;
  }

  .eco90-nav {
    display: none;
  }

  .eco90-brand__logo {
    justify-content: center;
    max-width: 100%;
    min-width: 0;
  }

  .eco90-brand__logo img {
    max-height: 40px;
    max-width: 165px;
    width: auto;
    min-width: 0;
  }

  .eco90-brand__slogan {
    display: none;
  }

  .eco90-card-grid--archive,
  .eco90-card-grid--search,
  .eco90-card-grid--related,
  .eco90-media-grid,
  .eco90-home-latest__grid,
  .eco90-home-authors__grid,
  .eco90-home-multimedia__grid,
  .eco90-category-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .eco90-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-block: 2rem;
  }

  .eco90-footer__newsletter-row {
    flex-direction: column;
  }

  .eco90-footer__newsletter-btn {
    width: 100%;
  }

  .eco90-home-multimedia__col {
    grid-template-columns: minmax(0, 1fr) 90px;
  }

  .eco90-author-profile__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .eco90-author-profile__social {
    justify-content: center;
  }

  .eco90-author-card__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .eco90-article__meta {
    flex-direction: column;
  }

  .eco90-market-table__head,
  .eco90-market-table__row {
    grid-template-columns: 1fr 1fr;
    font-size: 0.9375rem;
  }

  .eco90-market-table__head span:last-child,
  .eco90-market-table__row .eco90-market-table__change {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .eco90-search-filters__grid {
    grid-template-columns: 1fr;
  }

  .eco90-breaking__inner {
    flex-wrap: wrap;
  }

  .eco90-utility {
    display: none;
  }

  .eco90-share__list {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .eco90-card--related-row .eco90-card__link {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .eco90-cat-featured__link {
    grid-template-columns: 1fr;
    direction: rtl;
  }

  .eco90-cat-featured__media {
    min-height: 12rem;
  }

  .eco90-cat-featured__content {
    grid-column: 1;
    grid-row: 2;
  }

  .eco90-cat-featured__img,
  .eco90-cat-featured__ph {
    min-height: 12rem;
  }

  .eco90-cat-feed__card {
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
  }

  .eco90-cat-feed__excerpt {
    -webkit-line-clamp: 2;
  }

  .eco90-search-head__title {
    font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem);
  }

  .eco90-rail-card__link {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
  }

  .eco90-rail-card__index {
    display: none;
  }

  .eco90-rail-card__thumb {
    width: 72px;
    height: 72px;
  }

  .eco90-pagination a.page-numbers,
  .eco90-pagination span.page-numbers {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.3rem 0.65rem;
  }

  .eco90-home-hero-cards .eco90-card--cover .eco90-card__media {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 96px;
  }

  .eco90-card--cover .eco90-card__media {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .eco90-container {
    width: min(100% - 1.25rem, var(--eco90-container));
  }

  .eco90-article,
  .eco90-page,
  .eco90-author-profile {
    padding: 1rem;
    border-radius: var(--eco90-radius-md);
  }

  .eco90-btn--lg {
    width: 100%;
  }

  .eco90-market-strip__label {
    display: none;
  }

  .eco90-mobile-menu__panel {
    width: 100%;
    max-width: none;
  }

  .eco90-cat-feed__card {
    grid-template-columns: minmax(0, 1fr);
  }

  .eco90-cat-feed__media {
    max-width: none;
  }

  .eco90-rail-card__link {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
  }

  .eco90-rail-card__index {
    display: none;
  }

  .eco90-rail-card__thumb {
    width: 72px;
    height: 72px;
  }

  .eco90-pagination a.page-numbers.prev,
  .eco90-pagination a.page-numbers.next {
    flex: 1 1 calc(50% - 0.2rem);
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .eco90-mobile-menu {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Mobile type scale — readable Persian sizes on all pages
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  html {
    font-size: 17px;
  }

  :root {
    --eco90-fs-body: 1rem;
    --eco90-fs-content: 1.125rem;
    --eco90-fs-title: 1.0625rem;
    --eco90-fs-meta: 0.875rem;
  }

  body.eco90-theme {
    font-size: var(--eco90-fs-body);
    line-height: 1.8;
  }

  h1 {
    font-size: 1.625rem;
  }

  h2 {
    font-size: 1.3125rem;
  }

  h3 {
    font-size: 1.125rem;
  }

  h4 {
    font-size: 1.0625rem;
  }

  .eco90-content,
  .eco90-article__content,
  .eco90-article__lead,
  .eco90-page__content,
  .eco90-author-profile__bio,
  .eco90-page__intro {
    font-size: var(--eco90-fs-content);
    line-height: 1.9;
  }

  .eco90-article__title,
  .eco90-page__title,
  .eco90-media-single__title,
  .eco90-media-header__title,
  .eco90-archive-header__title,
  .eco90-search-head__title,
  .eco90-author-profile__name,
  .eco90-error-404__title {
    font-size: 1.5rem;
    line-height: 1.4;
  }

  .eco90-error-404__lead {
    font-size: 1.0625rem;
  }

  .eco90-search-head__query {
    font-size: 1.25rem;
  }

  .eco90-section-title,
  .eco90-section__title,
  .eco90-home-block__title,
  .eco90-home-latest__title,
  .eco90-home-authors__title,
  .eco90-home-ads__title,
  .eco90-cat-block__title,
  .eco90-sidebar-block__title,
  .eco90-side-panel__title,
  .eco90-notes-rail__title,
  .eco90-market-body__title,
  .eco90-subcat-grid__title,
  .eco90-comments-area__title,
  .eco90-ad-cta__title,
  .eco90-newsletter--home .eco90-newsletter__title,
  .eco90-footer__title,
  .eco90-category-grid__title {
    font-size: 1.125rem;
  }

  .eco90-card__title,
  .eco90-card--large .eco90-card__title,
  .eco90-card--cover .eco90-card__title,
  .eco90-card--horizontal .eco90-card__title,
  .eco90-card--ranked .eco90-card__title,
  .eco90-card--related-row .eco90-card__title,
  .eco90-card--stack .eco90-card__title,
  .eco90-home-hero-cards .eco90-card--cover .eco90-card__title,
  .eco90-home-hero .eco90-home-block--popular .eco90-home-block__list .eco90-card--ranked .eco90-card__title,
  .eco90-section__grid > .eco90-card .eco90-card__title,
  .eco90-section--featured-stack .eco90-section__lead .eco90-card__title,
  .eco90-lead__title,
  .eco90-rail-card__title,
  .eco90-cat-feed__title,
  .eco90-cat-featured__title,
  .eco90-economy-lead__title,
  .eco90-economy-item__title,
  .eco90-media-card__title,
  .eco90-featured-media__title,
  .eco90-popular-list__title,
  .eco90-sidebar-list__title,
  .eco90-sidebar-ranked__title,
  .eco90-author-card__title {
    font-size: var(--eco90-fs-title);
    line-height: 1.5;
  }

  .eco90-cat-featured__title {
    font-size: 1.25rem;
  }

  .eco90-lead__title {
    font-size: 1.35rem;
  }

  .eco90-card__cat,
  .eco90-card__meta,
  .eco90-card__date,
  .eco90-card__excerpt,
  .eco90-card__roytitr,
  .eco90-card--cover .eco90-card__badge,
  .eco90-card--cover .eco90-card__excerpt,
  .eco90-card--cover .eco90-card__date,
  .eco90-card--cover .eco90-card__roytitr,
  .eco90-home-hero-cards .eco90-card--cover .eco90-card__roytitr,
  .eco90-home-hero-cards .eco90-card--cover .eco90-card__excerpt,
  .eco90-home-hero-cards .eco90-card--cover .eco90-card__date,
  .eco90-home-hero-cards .eco90-card--cover .eco90-card__badge,
  .eco90-posted-on,
  .eco90-posted-by,
  .eco90-breadcrumb,
  .eco90-article__cat,
  .eco90-article__caption,
  .eco90-article__meta,
  .eco90-article__source,
  .eco90-rail-card__cat,
  .eco90-rail-card__date,
  .eco90-rail-card__index,
  .eco90-cat-feed__kicker,
  .eco90-cat-feed__rotitr,
  .eco90-cat-feed__excerpt,
  .eco90-cat-feed__meta,
  .eco90-cat-featured__rotitr,
  .eco90-cat-featured__excerpt,
  .eco90-lead__meta,
  .eco90-lead__excerpt,
  .eco90-lead__cat,
  .eco90-lead__category,
  .eco90-economy-item__cat,
  .eco90-sidebar-list__date,
  .eco90-sidebar-cats__item a,
  .eco90-sidebar-cats__count,
  .eco90-search-head__meta,
  .eco90-search-header__count,
  .eco90-archive-header__desc,
  .eco90-error-404__text,
  .eco90-author-profile__title,
  .eco90-author-profile__expertise,
  .eco90-badge,
  .eco90-market-strip__updated,
  .eco90-footer__slogan,
  .eco90-footer__menu a,
  .eco90-footer__bottom,
  .eco90-pagination a.page-numbers,
  .eco90-pagination span.page-numbers,
  .eco90-content figcaption {
    font-size: var(--eco90-fs-meta);
  }

  .eco90-btn,
  .eco90-search-form__input,
  .eco90-search-form__btn,
  .eco90-input,
  .eco90-select,
  .eco90-field label,
  .eco90-mobile-menu__list a,
  .eco90-nav__list > li > a {
    font-size: 1rem;
  }

  .eco90-breaking,
  .eco90-breaking__list {
    font-size: 0.9375rem;
  }
}
