/**********************************************************************************************/
/****************************** HOME SECTION - Agile Courses **********************************/
/**********************************************************************************************/

.apm-home-agile-courses,
.apm-home-agile-courses * {
  box-sizing: border-box;
}

.apm-home-agile-courses {
  --apm-course-bg: #f8f6f2;
  --apm-course-bg-2: #fcfbf8;
  --apm-course-ink: #11233d;
  --apm-course-ink-soft: #4f5f72;
  --apm-course-line: #dbe2ea;
  --apm-course-white: #ffffff;
  --apm-course-gold: #c89a43;
  --apm-course-gold-soft: rgba(200, 154, 67, 0.14);
  --apm-course-shadow: 0 18px 50px rgba(17, 35, 61, 0.08);
  --apm-course-shadow-hover: 0 28px 70px rgba(17, 35, 61, 0.14);

  position: relative;
  overflow: hidden;
  padding: 99px 6vw 90px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 88% 82%, rgba(215, 223, 232, 0.32) 0%, rgba(215, 223, 232, 0) 28%),
    linear-gradient(135deg, #fbfaf8 0%, #f5f3ee 48%, #fcfbf9 100%);
  color: var(--apm-course-ink);
  font-family: "Barlow", "Inter", Arial, sans-serif;
}

.apm-home-agile-courses::before {
  content: "";
  position: absolute;
  top: -120px;
  left: -140px;
  width: 520px;
  height: 340px;
  border: 2px solid rgba(200, 154, 67, 0.38);
  border-right: none;
  border-bottom: none;
  border-radius: 0 0 320px 0;
  opacity: 0.8;
  pointer-events: none;
}

.apm-home-agile-courses::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 480px;
  height: 320px;
  border: 2px solid rgba(109, 134, 103, 0.22);
  border-left: none;
  border-top: none;
  border-radius: 320px 0 0 0;
  opacity: 0.85;
  pointer-events: none;
}

.apm-home-agile-courses-wrap {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
}

.apm-home-agile-courses-wrap::before {
  content: "";
  position: absolute;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  width: min(980px, 80vw);
  height: 260px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 72%);
  pointer-events: none;
  z-index: -1;
}

.apm-home-agile-courses-wrap::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 70px;
  width: 180px;
  height: 180px;
  opacity: 0.18;
  background-image: radial-gradient(#9ca8b5 1.2px, transparent 1.2px);
  background-size: 12px 12px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

/* Header */
.apm-home-agile-courses-header {
  max-width: 850px;
  margin: 0 auto 48px;
  text-align: center;
}

.apm-home-agile-courses-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #4b6658;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.apm-home-agile-courses-eyebrow-mark {
  color: var(--apm-course-gold);
  font-size: 16px;
  line-height: 1;
  opacity: 0.95;
}

.apm-home-agile-courses-title {
  margin: 0;
  color: var(--apm-course-ink);
  font-family: "Barlow", serif;
  font-size: clamp(42px, 3.15vw, 56px);
  line-height: 0.96;
  font-weight: 700;
}

.apm-home-agile-courses-subtitle {
  max-width: 760px;
  margin: 18px auto 0;
  color: var(--apm-course-ink-soft);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.5;
  font-weight: 400;
}

.apm-home-agile-courses-line {
  width: 76px;
  height: 4px;
  margin: 22px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #c89a43 0%, #ddb970 100%);
}

/* Grid */
.apm-home-agile-courses-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 27px;
}

/* Card defaults */
.apm-home-agile-courses-card {
  --card-accent: #2f5d4d;
  --card-accent-soft: #dfe9e4;
  --card-accent-soft-2: #edf3f0;
  --card-icon-ink: #ffffff;

  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 387px;
  padding: 25px 25px 20px;
  border: 1px solid rgba(219, 226, 234, 0.92);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--apm-course-shadow);
  backdrop-filter: blur(8px);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.apm-home-agile-courses-card:hover {
  transform: translateY(-7px);
  border-color: rgba(200, 154, 67, 0.36);
  box-shadow: var(--apm-course-shadow-hover);
}

.apm-home-agile-courses-card:nth-child(1) {
  --card-accent: #2f5d4d;
  --card-accent-soft: #dce8e2;
  --card-accent-soft-2: #eef4f1;
  --card-icon-ink: #ffffff;
}

.apm-home-agile-courses-card:nth-child(2) {
  --card-accent: #c89a43;
  --card-accent-soft: #efe1bf;
  --card-accent-soft-2: #f7efd9;
  --card-icon-ink: #ffffff;
}

.apm-home-agile-courses-card:nth-child(3) {
  --card-accent: #93b8ac;
  --card-accent-soft: #dbe9e4;
  --card-accent-soft-2: #eef6f3;
  --card-icon-ink: #ffffff;
}

.apm-home-agile-courses-card:nth-child(4) {
  --card-accent: #3e5789;
  --card-accent-soft: #dbe3f1;
  --card-accent-soft-2: #eef2f8;
  --card-icon-ink: #ffffff;
}

/* Top */
.apm-home-agile-courses-top {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 19px;
}

.apm-home-agile-courses-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--card-accent) 0%, color-mix(in srgb, var(--card-accent) 85%, #000 15%) 100%);
  color: var(--card-icon-ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.apm-home-agile-courses-icon svg {
  width: 38px;
  height: 38px;
}

.apm-home-agile-courses-card-title {
  margin: 0 0 8px;
  color: var(--apm-course-ink);
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: clamp(27px, 2.15vw, 32px);
  line-height: 1.03;
  font-weight: 700;
}

.apm-home-agile-courses-intro {
  margin: 0;
  color: var(--apm-course-ink-soft);
  font-size: 15.5px;
  line-height: 1.52;
  font-weight: 400;
}

/* Details */
.apm-home-agile-courses-details {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 21px;
  margin-top: 2px;
  padding-top: 19px;
  border-top: 1px solid var(--apm-course-line);
}

.apm-home-agile-courses-meta {
  display: grid;
  gap: 12px;
}

.apm-home-agile-courses-meta-row {
  display: grid;
  grid-template-columns: 24px 78px 1fr;
  align-items: start;
  gap: 10px;
  color: var(--apm-course-ink-soft);
  font-size: 14px;
  line-height: 1.42;
}

.apm-home-agile-courses-meta-icon {
  display: inline-flex;
  color: var(--apm-course-ink);
  opacity: 0.9;
}

.apm-home-agile-courses-meta-icon svg {
  width: 19px;
  height: 19px;
}

.apm-home-agile-courses-meta-label {
  color: var(--apm-course-ink);
  font-weight: 700;
}

.apm-home-agile-courses-focus-box {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  padding-left: 21px;
  border-left: 1px solid var(--apm-course-line);
}

.apm-home-agile-courses-focus-icon {
  color: var(--card-accent);
}

.apm-home-agile-courses-focus-icon svg {
  width: 22px;
  height: 22px;
}

.apm-home-agile-courses-focus-title {
  display: block;
  margin-bottom: 5px;
  color: var(--apm-course-ink);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.apm-home-agile-courses-focus-text {
  margin: 0;
  color: var(--apm-course-ink-soft);
  font-size: 14px;
  line-height: 1.48;
}

/* CTA button on cards */
.apm-home-agile-courses-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin-top: auto;
  padding: 15px 20px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--card-accent) 0%, color-mix(in srgb, var(--card-accent) 88%, #ffffff 12%) 100%);
  color: #ffffff !important;
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition:
    transform 0.25s ease,
    filter 0.25s ease,
    box-shadow 0.25s ease;
}

.apm-home-agile-courses-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 10px 24px rgba(17, 35, 61, 0.16);
}

.apm-home-agile-courses-cta span:last-child {
  font-size: 18px;
  line-height: 1;
}

/* Footer CTA */
.apm-home-agile-courses-footer {
  display: flex;
  justify-content: center;
  margin-top: 41px;
}

.apm-home-agile-courses-main-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 26px;
  border: 1px solid rgba(17, 35, 61, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--apm-course-ink) !important;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 12px 30px rgba(17, 35, 61, 0.08);
  backdrop-filter: blur(8px);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.apm-home-agile-courses-main-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(200, 154, 67, 0.35);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(17, 35, 61, 0.11);
  color: var(--apm-course-ink) !important;
}

.apm-home-agile-courses-main-cta span:last-child {
  font-size: 18px;
  line-height: 1;
}

/* Tablet */
@media (max-width: 1180px) {
  .apm-home-agile-courses {
    padding: 83px 4vw 79px;
  }

  .apm-home-agile-courses-grid {
    gap: 22px;
  }

  .apm-home-agile-courses-card {
    min-height: 369px;
    padding: 22px 22px 18px;
  }

  .apm-home-agile-courses-card-title {
    font-size: 30px;
  }
}

/* One column */
@media (max-width: 1024px) {
  .apm-home-agile-courses-grid {
    grid-template-columns: 1fr;
  }

  .apm-home-agile-courses-card {
    min-height: auto;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .apm-home-agile-courses {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 65px 0 68px !important;
    overflow-x: hidden !important;
  }

  .apm-home-agile-courses::before {
    top: -110px;
    left: -180px;
    width: 380px;
    height: 240px;
  }

  .apm-home-agile-courses::after {
    right: -140px;
    bottom: -120px;
    width: 320px;
    height: 220px;
  }

  .apm-home-agile-courses-wrap {
    width: 100% !important;
    max-width: none !important;
    padding-left: 22px !important;
    padding-right: 22px !important;
    margin: 0 auto !important;
  }

  .apm-home-agile-courses-wrap::after {
    width: 110px;
    height: 110px;
    right: -8px;
    bottom: 34px;
    opacity: 0.12;
  }

  .apm-home-agile-courses-header {
    margin-bottom: 32px;
    text-align: left;
  }

  .apm-home-agile-courses-eyebrow {
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 12px;
    letter-spacing: 0.26em;
  }

  .apm-home-agile-courses-title {
    font-size: clamp(42px, 13vw, 58px);
    line-height: 0.98;
  }

  .apm-home-agile-courses-subtitle {
    margin-top: 15px;
    font-size: 17px;
    line-height: 1.52;
  }

  .apm-home-agile-courses-line {
    margin-left: 0;
    margin-top: 20px;
  }

  .apm-home-agile-courses-card {
    padding: 20px 18px 16px;
    border-radius: 22px;
  }

  .apm-home-agile-courses-top {
    grid-template-columns: 56px 1fr;
    gap: 15px;
    margin-bottom: 16px;
  }

  .apm-home-agile-courses-icon {
    width: 52px;
    height: 52px;
  }

  .apm-home-agile-courses-icon svg {
    width: 33px;
    height: 33px;
  }

  .apm-home-agile-courses-card-title {
    font-size: 25px;
    line-height: 1.04;
  }

  .apm-home-agile-courses-intro {
    font-size: 14.5px;
    line-height: 1.48;
  }

  .apm-home-agile-courses-details {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 16px;
  }

  .apm-home-agile-courses-meta {
    gap: 11px;
  }

  .apm-home-agile-courses-meta-row {
    grid-template-columns: 22px 72px 1fr;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.42;
  }

  .apm-home-agile-courses-focus-box {
    padding-left: 0;
    padding-top: 16px;
    border-left: none;
    border-top: 1px solid var(--apm-course-line);
  }

  .apm-home-agile-courses-focus-text {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .apm-home-agile-courses-cta {
    padding: 14px 18px;
    font-size: 15px;
  }

  .apm-home-agile-courses-footer {
    justify-content: flex-start;
    margin-top: 31px;
  }

  .apm-home-agile-courses-main-cta {
    width: 100%;
    padding: 14px 22px;
  }
}