/* Final responsive contract for the leading panel on every archive surface. */

@media (max-width: 960px) {
  body.page-p-lessonplans-lessonplans .lesson-hero,
  body.page-p-courses-courses .qatreh-courses-hero,
  html[data-qatreh-theme="dark"] body.page-p-lessonplans-lessonplans .lesson-hero,
  html[data-qatreh-theme="dark"] body.page-p-courses-courses .qatreh-courses-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr) !important;
    align-items: center !important;
    gap: clamp(16px, 3vw, 26px) !important;
    min-height: 280px !important;
  }

  body.page-p-lessonplans-lessonplans .lesson-hero > *,
  body.page-p-courses-courses .qatreh-courses-hero > * {
    min-width: 0;
  }

  body.page-p-courses-courses .qatreh-courses-hero__art {
    display: grid !important;
    width: min(180px, 100%) !important;
  }
}

@media (max-width: 760px) {
  body.page-p-storyanimation-storyanimation .story-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 92px !important;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 4px 14px;
    min-height: 180px;
    padding: 22px 20px !important;
    text-align: right !important;
  }

  body.page-p-storyanimation-storyanimation .story-hero-icon {
    grid-column: 2;
    grid-row: 1 / 3;
    margin: 0 auto !important;
  }

  body.page-p-storyanimation-storyanimation .story-hero h1 {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    margin: 0 0 4px !important;
  }

  body.page-p-storyanimation-storyanimation .story-hero p {
    display: -webkit-box;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    margin: 0 !important;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body.qatreh-wordpress-theme.page-p-product-product .qatreh-catalog-hero {
    box-sizing: border-box !important;
    height: clamp(160px, 28vw, 180px) !important;
    min-height: 160px !important;
    max-height: 180px !important;
    padding-block: 20px !important;
  }

  body.qatreh-wordpress-theme.page-p-product-product .qatreh-catalog-hero__copy {
    min-width: 0;
    max-width: 100%;
  }

  body.qatreh-wordpress-theme.page-p-product-product .qatreh-catalog-hero p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 640px) {
  body.page-p-lessonplans-lessonplans .lesson-hero,
  body.page-p-courses-courses .qatreh-courses-hero,
  html[data-qatreh-theme="dark"] body.page-p-lessonplans-lessonplans .lesson-hero,
  html[data-qatreh-theme="dark"] body.page-p-courses-courses .qatreh-courses-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(88px, .65fr) !important;
    gap: 10px !important;
    min-height: 0 !important;
    padding: 18px 14px !important;
    border-radius: 24px !important;
  }

  body.page-p-courses-courses .qatreh-courses-hero > div:first-child {
    min-width: 0;
  }

  body.page-p-courses-courses .qatreh-courses-hero > div:first-child > span {
    max-width: 100%;
    padding: 5px 8px;
    font-size: .67rem;
    line-height: 1.55;
  }

  body.page-p-courses-courses .qatreh-courses-hero h1 {
    margin: 8px 0 5px;
    font-size: clamp(1.2rem, 5.6vw, 1.55rem);
    line-height: 1.55;
  }

  body.page-p-courses-courses .qatreh-courses-hero p {
    display: -webkit-box;
    overflow: hidden;
    font-size: .72rem;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.page-p-courses-courses .qatreh-courses-hero nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    margin-top: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.page-p-courses-courses .qatreh-courses-hero nav::-webkit-scrollbar {
    display: none;
  }

  body.page-p-courses-courses .qatreh-courses-hero nav a {
    flex: 0 0 auto;
    padding: 5px 7px;
    font-size: .56rem;
    white-space: nowrap;
  }

  body.page-p-courses-courses .qatreh-courses-hero__art {
    width: min(104px, 100%) !important;
  }

  body.page-p-courses-courses .qatreh-courses-hero__art > span {
    font-size: clamp(2.45rem, 13vw, 3.45rem);
  }

  body.page-p-courses-courses .qatreh-courses-hero__art i {
    right: 0;
    bottom: 5px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: .62rem;
  }

  body.page-p-courses-courses .qatreh-courses-hero__art small {
    top: 5px;
    left: -4px;
    max-width: calc(100% + 8px);
    padding: 4px 5px;
    overflow: hidden;
    font-size: .52rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.page-p-storyanimation-storyanimation .story-hero {
    grid-template-columns: minmax(0, 1fr) 78px !important;
    gap: 3px 10px;
    min-height: 150px;
    margin: 10px 0 30px !important;
    padding: 16px 14px !important;
    border-radius: 24px !important;
  }

  body.page-p-storyanimation-storyanimation .story-hero-icon {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    font-size: 27px;
  }

  body.page-p-storyanimation-storyanimation .story-hero h1 {
    font-size: clamp(1.2rem, 5.6vw, 1.45rem);
    line-height: 1.55;
  }

  body.page-p-storyanimation-storyanimation .story-hero p {
    font-size: .7rem;
    line-height: 1.75;
  }

  body.page-p-occasions-occasions .occasion-banner {
    width: 100% !important;
    height: clamp(150px, 42vw, 185px) !important;
    min-height: 150px;
    max-height: 185px;
    margin-bottom: 30px !important;
    border-radius: 24px !important;
  }

  body.page-p-occasions-occasions .occasion-banner-placeholder {
    gap: 7px;
    padding: 16px;
  }

  body.page-p-occasions-occasions .occasion-banner-placeholder :is(p, .occasion-banner-copy) {
    display: -webkit-box;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body.qatreh-wordpress-theme .archive-header:not(.occasion-banner) {
    box-sizing: border-box;
    min-height: 128px;
    max-height: 180px;
    align-items: center !important;
    flex-direction: row !important;
    gap: 12px;
    padding: 16px;
    overflow: hidden;
    background: linear-gradient(
      145deg,
      color-mix(in srgb, var(--q-surface, #fff) 88%, var(--q-primary-soft, #dcfff4)),
      color-mix(in srgb, var(--q-surface, #fff) 92%, var(--q-accent-soft, #fff0f5))
    );
    border: 1px solid var(--q-border, rgba(24,72,88,.1));
    border-radius: 24px;
    box-shadow: var(--q-shadow, 0 16px 38px rgba(28,55,75,.08));
  }

  body.qatreh-wordpress-theme .archive-header:not(.occasion-banner) > :first-child {
    min-width: 0;
  }

  body.qatreh-wordpress-theme .archive-header:not(.occasion-banner) h1 {
    font-size: clamp(1.2rem, 5.8vw, 1.55rem);
    line-height: 1.5;
  }

  body.qatreh-wordpress-theme .archive-header:not(.occasion-banner) :is(p, .archive-description) {
    display: -webkit-box;
    margin: 5px 0 0;
    overflow: hidden;
    font-size: .72rem;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body.qatreh-wordpress-theme .archive-header:not(.occasion-banner) > a {
    flex: 0 0 auto;
    max-width: 42%;
    padding: 8px 10px;
    overflow: hidden;
    font-size: .64rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
