/* =========================================================
   AIDT complete course catalog
   ========================================================= */

.course-catalog-page {
  color: var(--navy);
  background: var(--ivory);
}

.catalog-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: var(--header-height);
  color: var(--white);
  background:
    linear-gradient(105deg, rgba(2, 8, 18, 0.98) 0%, rgba(6, 26, 64, 0.92) 48%, rgba(2, 8, 18, 0.32) 100%),
    url("../assets/images/courses-hero.jpg") center right / cover no-repeat;
}

.catalog-hero::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -240px;
  z-index: -1;
  width: 620px;
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.2;
  border: 1px solid rgba(229, 199, 119, 0.32);
  border-radius: 50%;
  box-shadow: inset 0 0 0 72px rgba(229, 199, 119, 0.025);
}

.catalog-hero-inner {
  display: grid;
  gap: 34px;
  align-items: center;
  min-height: 570px;
  padding-block: 64px 72px;
}

.catalog-hero-copy {
  max-width: 760px;
}

.catalog-breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 700;
}

.catalog-breadcrumb a {
  color: var(--gold-light);
}

.catalog-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.catalog-hero .eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.catalog-hero h1 {
  max-width: 760px;
  margin-top: 16px;
  color: var(--white);
  font-size: clamp(3rem, 5vw, 4.75rem);
  line-height: 0.98;
}

.catalog-hero-copy > p {
  max-width: 62ch;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.06rem;
  line-height: 1.7;
}

.catalog-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.catalog-hero .btn-light {
  color: var(--white);
  background: rgba(2, 8, 18, 0.3);
  border-color: rgba(229, 199, 119, 0.6);
}

.catalog-hero-facts {
  overflow: hidden;
  border: 1px solid rgba(229, 199, 119, 0.4);
  border-top: 3px solid var(--gold);
  background: rgba(3, 17, 40, 0.84);
  box-shadow: 0 26px 62px rgba(0, 4, 13, 0.34);
  backdrop-filter: blur(12px);
}

.catalog-total {
  display: flex;
  align-items: flex-end;
  gap: 13px;
  padding: 25px 26px 20px;
  border-bottom: 1px solid rgba(229, 199, 119, 0.22);
}

.catalog-total strong {
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 0.82;
}

.catalog-total span {
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-hero-facts dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.catalog-hero-facts dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  padding: 14px 18px;
  border-right: 1px solid rgba(229, 199, 119, 0.16);
  border-bottom: 1px solid rgba(229, 199, 119, 0.16);
}

.catalog-hero-facts dl div:nth-child(even) {
  border-right: 0;
}

.catalog-hero-facts dl div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.catalog-hero-facts dt {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
}

.catalog-hero-facts dd {
  margin: 0;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 800;
}

.catalog-section {
  position: relative;
  overflow: hidden;
  padding: 96px 0 104px;
  background:
    linear-gradient(rgba(247, 242, 231, 0.91), rgba(247, 242, 231, 0.96)),
    url("../assets/images/courses-pattern-bg.jpg") center top / 920px auto repeat;
}

.catalog-section-header {
  display: grid;
  gap: 26px;
  align-items: end;
  margin-bottom: 38px;
}

.catalog-section-header h2 {
  max-width: 780px;
  margin-top: 8px;
  font-size: clamp(2.3rem, 4vw, 3.7rem);
  line-height: 1.02;
}

.catalog-section-header > p {
  max-width: 58ch;
  color: rgba(6, 26, 64, 0.72);
  line-height: 1.7;
}

.catalog-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(150px, 1fr));
  gap: 1px;
  padding: 1px;
  border: 1px solid rgba(6, 26, 64, 0.13);
  border-top: 3px solid var(--gold);
  background: rgba(6, 26, 64, 0.12);
  box-shadow: 0 18px 42px rgba(6, 26, 64, 0.08);
}

.catalog-field {
  min-width: 0;
  padding: 15px 16px 16px;
  background: rgba(255, 253, 247, 0.96);
}

.catalog-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--red);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-field input,
.catalog-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(6, 26, 64, 0.2);
  border-radius: 3px;
  color: var(--navy);
  background: var(--white);
  font: inherit;
  font-size: 1rem;
}

.catalog-field input:focus-visible,
.catalog-field select:focus-visible,
.catalog-clear:focus-visible,
.catalog-load-more .btn:focus-visible {
  outline: 3px solid #946810;
  outline-offset: 2px;
  border-color: var(--gold);
}

.catalog-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(6, 26, 64, 0.16);
}

.catalog-results-bar p {
  color: rgba(6, 26, 64, 0.76);
  font-size: 0.88rem;
  font-weight: 700;
}

.catalog-clear {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  color: var(--red);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(179, 25, 66, 0.35);
  text-underline-offset: 5px;
}

.catalog-results {
  border-bottom: 1px solid rgba(6, 26, 64, 0.14);
}

.catalog-course {
  position: relative;
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr) minmax(300px, auto);
  gap: 24px;
  align-items: center;
  min-height: 118px;
  padding: 22px 18px;
  border-top: 1px solid rgba(6, 26, 64, 0.14);
  background: rgba(255, 253, 247, 0.76);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.catalog-course::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
  transition: background-color 160ms ease;
}

.catalog-course:hover {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(6, 26, 64, 0.06);
}

.catalog-course:hover::before {
  background: linear-gradient(var(--gold), var(--red));
}

.catalog-course-code {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.catalog-course-main {
  min-width: 0;
}

.catalog-course-main h3 {
  color: var(--navy);
  font-size: 1.08rem;
  line-height: 1.34;
}

.catalog-course-main p {
  margin-top: 7px;
  color: rgba(6, 26, 64, 0.62);
  font-size: 0.76rem;
  line-height: 1.45;
}

.catalog-course-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.catalog-course-meta li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(6, 26, 64, 0.13);
  border-radius: 999px;
  color: rgba(6, 26, 64, 0.76);
  background: rgba(247, 242, 231, 0.8);
  font-size: 0.69rem;
  font-weight: 800;
}

.catalog-empty {
  padding: 64px 24px;
  color: rgba(6, 26, 64, 0.7);
  text-align: center;
}

.catalog-load-more {
  display: flex;
  justify-content: center;
  padding-top: 34px;
}

.catalog-load-more .btn {
  min-width: 220px;
  min-height: 50px;
}

.catalog-noscript {
  margin-top: 24px;
  padding: 18px;
  border-left: 3px solid var(--gold);
  background: var(--white);
}

.catalog-guidance {
  padding: 76px 0;
  color: var(--white);
  background:
    linear-gradient(100deg, rgba(2, 8, 18, 0.96), rgba(6, 26, 64, 0.86)),
    url("../assets/images/courses-cta-bg.jpg") center / cover no-repeat;
}

.catalog-guidance-inner {
  display: grid;
  gap: 28px;
  align-items: center;
}

.catalog-guidance h2 {
  max-width: 780px;
  margin-top: 8px;
  color: var(--white);
  font-size: clamp(2.1rem, 4vw, 3.5rem);
}

.catalog-guidance p {
  max-width: 66ch;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

@media (min-width: 920px) {
  .catalog-hero-inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.55fr);
  }

  .catalog-section-header,
  .catalog-guidance-inner {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  }

  .catalog-guidance-inner .btn {
    justify-self: end;
  }
}

@media (max-width: 1100px) {
  .catalog-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-search-field {
    grid-column: 1 / -1;
  }

  .catalog-course {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .catalog-course-meta {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .catalog-hero {
    background:
      linear-gradient(180deg, rgba(2, 8, 18, 0.96), rgba(6, 26, 64, 0.82) 56%, rgba(2, 8, 18, 0.9)),
      url("../assets/images/courses-hero.jpg") 66% center / cover no-repeat;
  }

  .catalog-hero-inner {
    min-height: 0;
    padding-block: 42px 46px;
  }

  .catalog-hero h1 {
    font-size: clamp(2.35rem, 11vw, 3.35rem);
  }

  .catalog-hero-copy > p {
    font-size: 1rem;
  }

  .catalog-hero-actions {
    display: grid;
  }

  .catalog-hero-actions .btn {
    width: 100%;
    min-height: 50px;
  }

  .catalog-section {
    padding: 62px 0 68px;
  }

  .catalog-section-header {
    gap: 16px;
    margin-bottom: 26px;
  }

  .catalog-section-header h2 {
    font-size: clamp(2rem, 9vw, 2.7rem);
  }

  .catalog-controls {
    grid-template-columns: 1fr;
  }

  .catalog-search-field {
    grid-column: auto;
  }

  .catalog-field {
    padding: 13px 14px 14px;
  }

  .catalog-results-bar {
    align-items: flex-start;
  }

  .catalog-course {
    display: block;
    min-height: 0;
    padding: 20px 14px;
  }

  .catalog-course-main {
    margin-top: 9px;
  }

  .catalog-course-main h3 {
    font-size: 1rem;
  }

  .catalog-course-meta {
    justify-content: flex-start;
    margin-top: 14px;
  }

  .catalog-guidance {
    padding: 58px 0;
  }

  .catalog-guidance-inner .btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .catalog-hero h1 {
    font-size: 2.12rem;
  }

  .catalog-total {
    padding-inline: 18px;
  }

  .catalog-hero-facts dl {
    grid-template-columns: 1fr;
  }

  .catalog-hero-facts dl div,
  .catalog-hero-facts dl div:nth-child(even),
  .catalog-hero-facts dl div:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid rgba(229, 199, 119, 0.16);
  }

  .catalog-hero-facts dl div:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-course,
  .catalog-course::before {
    transition: none;
  }
}
