/* ==========================================================================
   COMPONENT / COURSES SECTION
   "Recent courses" peek-carousel (Swiper) — a large featured course slide
   with faded neighbours. Originally lived only in pages/_article.css;
   moved here (2026) because Category.html now reuses this exact section
   ("קורסים אחרונים בנושא...") and duplicating ~370 lines of CSS per page
   is worse than one shared component. Any page that includes this
   section must link this file (see Article.html / Category.html <head>).
   Depends on: Swiper's own CSS/JS (loaded separately), design tokens in
   base/_variables.css (colors are still literal Figma values here, not
   yet tokenized — left as-is to avoid an unrelated visual diff).
   ========================================================================== */

/* --------------------------------------------------------------------------
   4. Courses Section
   -------------------------------------------------------------------------- *//* ==========================================================================
   ARTICLE COURSES SECTION - FIGMA MATCH
   ========================================================================== */

.article-courses-section {
  width: 100%;
  margin: 80px auto 0;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  direction: rtl;
  box-sizing: border-box;
  overflow: hidden; /* Prevents horizontal scrollbar on body */
}

.article-courses-title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 32px;
  line-height: 40px;
  text-align: center;
  color: #000080;
  margin: 0;
}

/* Swiper Outer Wrapper */
.article-courses-slider-wrapper {
  position: relative;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

.article-courses-swiper {
  width: 100%;
  padding: 20px 0 50px 0;
  overflow: visible; /* Allows side cards to peek through without clipping */
}

.article-courses-swiper .swiper-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}

.article-courses-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 1166px !important; /* Fixed width matching Figma */
  flex-shrink: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.article-courses-swiper .swiper-slide:not(.swiper-slide-active) {
  opacity: 0.5;
}

/* Featured Large Course Card Container (1166px x 600px) */
.article-course-card {
  position: relative;
  display: flex;
  flex-direction: row; /* Purple media on Right, white content on Left */
  justify-content: center;
  align-items: center;
  width: 1166px;
  height: 600px;
  background: #F6F6F6;
  border-radius: 24px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Dashed Border Overlay Frame */
.article-course-card__dashed-border {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  border: 1.5px dashed #5E2E8A;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.002);
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
  box-sizing: border-box;
}

/* Left Media/Illustration Container */
.article-course-card__media {
  position: relative;
  width: 572px;
  height: 600px;
  background: #EEEEFC;
  border-radius: 20px 0 0 20px; /* Rounded corners aligned to the right side of the card */
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  z-index: 1;
}

.article-course-card__illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 142px;
  height: 113px;
}

.article-course-card__illustration svg {
  width: 100%;
  height: 100%;
}

/* Course Badge Pill (Top-Right of Media Column) */
.article-course-card__badge-pill {
  position: absolute;
  top: 25px;
  right: 25px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: #C22DAF;
  border-radius: 9999px;
  box-shadow: 0px 20px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 3;
}

.article-course-card__badge-text {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 16px;
  letter-spacing: 0.3px;
  color: #FFFFFF;
}

.article-course-card__badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21px;
  height: 21px;
  background: #FFFFFF;
  border-radius: 38px;
}

/* White Content Container (On the Left) */
.article-course-card__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 594px;
  height: 600px;
  padding: 40px;
  gap: 16px;
  box-sizing: border-box;
  z-index: 1;
}

.article-course-card__meta-top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.article-course-card__meta-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-course-card__meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 20px;
  color: #000080;
}

.article-course-card__meta-icon {
  display: flex;
  align-items: center;
}

.article-course-card__sub-badge {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 6px 16px;
  background: #A1CEE1;
  backdrop-filter: blur(6px);
  border-radius: 9999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 16px;
  color: #000080;
  text-transform: uppercase;
}

.article-course-card__title {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 30px;
  line-height: 36px;
  text-align: right;
  color: #000080;
  margin: 0;
  width: 100%;
}

.article-course-card__desc {
  font-family: 'Fredoka', sans-serif;
  font-weight: 400;
  font-size: 21px;
  line-height: 26px;
  text-align: right;
  color: #183B51;
  margin: 0;
  width: 100%;
}

.article-course-card__author {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.article-course-card__author-avatar {
  width: 40px;
  height: 40px;
  background: #EBEEF4;
  border-radius: 9999px;
}

.article-course-card__author-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.article-course-card__author-name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 20px;
  color: #000080;
}

.article-course-card__author-role {
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 20px;
  color: rgba(0, 0, 128, 0.85);
}

.article-course-card__list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.article-course-card__list li {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  color: #183B51;
}

.article-course-card__list .dot {
  width: 20px;
  height: 20px;
  background: #000080;
  border-radius: 4px;
}

.article-course-card__footer {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  border-top: 1px solid rgba(179, 179, 179, 0.5);
  padding-top: 24px;
  margin-top: auto;
}

.article-course-card__btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 24px;
  width: 163px;
  height: 50px;
  background: #CB6DA7;
  border-radius: 9999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 24px;
  color: #FFFFFF;
  text-decoration: none;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

.article-course-card__btn:hover {
  background: #b55893;
}

/* Bottom CTA Button: לכל הקורסים */
.article-courses-cta {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

.article-courses-cta__btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 20px 50px;
  /* width: 208px; */
  height: 52px;
  background: #CB6DA7;
  border-radius: 9999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  color: #FFFFFF;
  text-decoration: none;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

.article-courses-cta__btn:hover {
  background: #b55893;
}

/* --------------------------------------------------------------------------
   Swiper Pagination (split from the combined courses/tools/related rule
   that used to live in _article.css — see components/_tools-section.css
   and pages/_article.css's .article-related-pagination for the others)
   -------------------------------------------------------------------------- */
.article-courses-pagination {
  position: static;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.article-courses-pagination .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: rgba(0, 0, 128, 0.2);
  opacity: 1;
  margin: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.article-courses-pagination .swiper-pagination-bullet-active {
  background: #C22DAF;
  transform: scale(1.15);
}

/* --------------------------------------------------------------------------
   Responsive (split out of the page-wide media queries that used to live
   in pages/_article.css)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  /* Course slide + card become fluid instead of the fixed Figma px. */
  .article-courses-swiper .swiper-slide {
    width: 100% !important;
  }

  .article-course-card {
    width: 100%;
    height: auto;
    flex-direction: column;
  }

  .article-course-card__media,
  .article-course-card__content {
    width: 100%;
    height: auto;
  }

  .article-course-card__media {
    height: 260px;
  }

  .article-course-card__content {
    padding: 24px;
  }

  .article-courses-section {
    padding: 0 24px;
  }
}

@media (max-width: 767px) {
  .article-courses-section {
    margin-top: 40px;
    padding: 0 20px;
  }

  .article-courses-swiper {
    padding-bottom: 24px;
  }

  .article-courses-title {
    font-size: 26px;
    line-height: 32px;
  }

  .article-course-card__title {
    font-size: 24px;
    line-height: 30px;
  }

  .article-course-card__desc {
    font-size: 17px;
    line-height: 24px;
  }

  .article-courses-cta__btn {
    width: 100%;
    padding: 16px 24px;
  }
}

@media (max-width: 480px) {
  .article-course-card__footer {
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
  }
}
