/* ── HERO SECTION ── */

.grid {
  display: grid;
  gap: 5rem;
}

.lbl {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #313131;
  text-align: center;
}

.ring-wrap {
  position: relative;
  flex-shrink: 0;
  padding: 0;
}

.ring-wrap svg {
  display: block;
  transform: rotate(-90deg);
}

.num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 500;
  color: var(--primary-color);
}

.r-bg {
  fill: none;
  stroke: rgba(0, 0, 0, 0.07);
  stroke-width: 5;
}

.r-fill {
  fill: none;
  stroke: var(--primary-color);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 402;
  stroke-dashoffset: 402;
  transition: all 0.5s ease-in;
}

.hero-text-box {
  background-color: #f5f6fa;
  padding: 2rem;
  box-shadow: 0px 12px 30px 0px rgb(0 0 0 / 43%);
  max-width: 350px;
  width: 100%;
  height: 250px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}


.container-hero-text-box {
  display: flex;
  gap: 2rem;
  justify-content: center;
  width: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 40vh;
}

.borderLeft {
  margin-top: 5rem;
}

h1 {
  color: var(--title-color);
  padding-left: 2rem;
}

.page-wrap {
  height: 100vh;
  overflow-y: scroll;
  position: relative;
  display: flex;
  justify-content: end;
  padding: 4rem 0;
}

/* ── FILTER TAB── */
.filter-tab {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  width: 50px;
  height: 80vh;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, width .3s cubic-bezier(.4, 0, .2, 1);
  overflow: hidden;
}

.filter-tab:hover {
  background: var(--primary-color);
}

.filter-tab.open {
  background: var(--primary-color);
}

.filter-tab-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .9);
  white-space: nowrap;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-tab-arrow {
  font-style: normal;
  transition: transform .3s;
  font-size: 2rem;
}

.filter-tab.open .filter-tab-arrow {
  transform: rotate(180deg);
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #fff;
  color: var(--primary-color);
  font-weight: 700;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .2s, transform .2s;
}

.filter-badge.visible {
  opacity: 1;
  transform: scale(1);
}

/* FILTER PANEL */
.filter-panel {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99;
  background: #fff;
  padding: 1.6rem 1.4rem;
  width: 240px;
  overflow-x: hidden;
  height: 80vh;
  overflow-y: auto;
  transition: width .35s ease-in-out, opacity .25s, padding .25s;
  margin-left: 40px;
  box-shadow: 4px 0 24px rgba(0, 0, 80, .08);
}

.filter-panel-title {
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-clear-btn {
  font-family: "Poppins", sans-serif;
  font-size: .7rem;
  font-weight: 600;
  color: #6b7280;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  transition: color .2s;
}

.filter-clear-btn:hover {
  color: var(--primary-color);
}

.filter-group {
  margin-bottom: 1.3rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-group-label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #1a1a2e;
  margin-bottom: .6rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid #e2e4f0;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
  user-select: none;
}

.filter-option input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 3px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: border-color .15s, background .15s;
}

.filter-option input:checked {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.filter-option input:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 7px;
  border: 1.5px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.filter-option-lbl {
  font-size: .8rem;
  color: #6b7280;
  transition: color .15s;
}

.filter-option:hover .filter-option-lbl {
  color: #1a1a2e;
}

.filter-option input:checked~.filter-option-lbl {
  color: var(--primary-color);
  font-weight: 600;
}

/* ── CONTENT (courses list) ── */
.content-area {
  max-width: 1200px;
  width: 100%;
}

.courses-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ── COURSE ROW ── */
.course-row {
  background: #fff;
  position: relative;
}

.course-row:hover,
.course-row.expanded.course-row {
  box-shadow: var(--primary-shadow);
}

.course-row.hidden {
  display: none;
}


.course-row.expanded {
  border-color: var(--primary-color);
  background: #fff;
  z-index: 2;
  position: relative;
}


/* ROW HEADER */
.course-row-header {
  display: flex;
  align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  gap: 1rem;
  height: 120px;
  transition: all 0.3s ease-in-out;
}


.course-row-left {
  flex: 1;
  min-width: 0;
  border-right: 2px solid #9ca3af1f;
}

.course-row-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #0000dd73;
    background: color-mix(in srgb, #0000dd57 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 30%, transparent);
    padding: 3px 10px;
    border-radius: 20px;
    width: fit-content;
    margin-bottom: 10px;
}

.course-row-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0000dd78;
  flex-shrink: 0;
}

.course-row-title {
  font-size: 18px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-color);
  margin-bottom: 7px;
}


.course-row-filtro {
  display: flex;
  align-items: center;
  row-gap: 0px;
  column-gap: 10px;
  flex-wrap: wrap;
}

.filtro-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .9rem;
  color: #9ca3af;
}

.filtro-tag svg {
  fill: #9ca3af;
  width: 1rem;
  height: auto;
}

.course-row-header:hover .filtro-tag svg,
.course-row.expanded.course-row svg {
  fill: var(--primary-color);
}


/* EXPAND BTN */
.course-expand-btn {
  width: 100px;
  height: 100px;
  border-color: transparent;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s, transform .35s cubic-bezier(.34, 1.56, .64, 1);
  padding: -18px -22px;
}

.course-expand-btn svg {
  fill: #9ca3af;
  transition: all 0.2s ease-in-out;
}

.course-row:hover .course-expand-btn svg {
  fill: var(--primary-color);
}

.course-row.expanded .course-expand-btn {
  transform: rotate(45deg);
  font-size: 1rem;
}

/* ROW BODY (expand) */
.course-row-body {
  max-height: 0;
  overflow: hidden;
  transition: all 1.2s ease-in-out;
}

.course-row.expanded .course-row-body {
  max-height: 800px;
}

.course-row-body-inner {
  padding: 0 22px 52px;
  border-top: 1px solid #f0f2f7;
  padding-top: 16px;
  position: relative;
}

.course-row-body-title {
  font-size: .82rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.course-row-body-desc {

  background-color: #fff;
  z-index: 2;
  position: relative;
}

.course-row-body-desc ul li {
  list-style: none;
  padding-left: 1.75rem;
  position: relative;
}

.course-row-body-desc ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='36px' viewBox='0 -960 960 960' width='36px' fill='%230000DD'%3E%3Cpath d='M494.67-480.67 301.33-674l74-74 267.34 267.33-267.34 267.34-74-74 193.34-193.34Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.course-row-body-desc * {
  font-size: .9rem;
  color: #6b7280;
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 12px;
}

.course-row-body-desc strong {
  font-weight: 600;
}

/* CTA button — */

.course-row-cta {
  color: #fff;
  position: absolute;
  bottom: 10px;
  width: fit-content;
  height: 36px;
  background: #0000dd40;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 99;
  font-size: 14px;
  font-weight: 500;
  padding: 0 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 1.2s ease,
    visibility 0s linear 1.2s,
    background 0.3s ease-in-out,
    transform 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out;
}

.course-row-cta:hover {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 221, .25);
}

.course-row.expanded .course-row-cta {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 1.2s ease,
    background 0.3s ease-in-out,
    transform 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out;
}

/* no results */
.no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
  font-size: .88rem;
  display: none;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

.no-results.visible {
  display: block;
}

.no-results strong {
  color: #1a1a2e;
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}

@media (min-width:992px) {

  .hero-text-box.first {
    top: -50px;
  }

  .hero-text-box.second {
    top: -100px;

  }

  h1.learning-portal {
    font-size: 4rem !important;
  }

  .banner-wrapper {
    position: absolute;
  }
}

@media (max-width:991px) {

  .hero-text-box {
    flex-shrink: 0;
  }

  .container-hero-text-box {
    position: relative;
    overflow-x: scroll;
    top: 0;
    justify-content: start;
    padding: 20vh 0px 10vh;
  }

  .grid {
    gap: 3rem;
  }

  .borderLeft {
    margin-top: 0;
  }

  .banner-wrapper {
    position: absolute;
  }

  .container-banner-img {
    height: 45vh;
    min-height: 200px;
  }


}

@media(max-width:700px) {

  .course-row.expanded .course-row-body {
    max-height: 1000px;
  }

  .page-wrap {
    padding-left: 0;
    padding-top: 30px;
    height: 90vh;
  }

  .filter-tab {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    height: 45px;
    border-radius: 0;
    z-index: 200;
    flex-direction: row;
    padding: 0 1.2rem;
    justify-content: flex-start;
    gap: 10px;
  }

  .filter-tab-text {
    writing-mode: horizontal-tb;
    transform: none;
    flex-direction: row;
    font-size: .68rem;
    gap: 8px;
  }

  .filter-tab-arrow {
    transform: none !important;
  }

  .filter-tab.open .filter-tab-arrow {
    transform: rotate(90deg) !important;
  }

  .filter-panel {
    position: absolute;
    top: 45px;
    left: 0;
    right: 0;
    transform: none;
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
  }

  .filter-group-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .filter-option {
    background: #f5f6fa;
    padding: 5px 12px;
  }

  .filter-option:has(input:checked) {
    background: rgba(0, 0, 221, .07);
  }

  .filter-option input[type=checkbox] {
    display: none;
  }

  .filter-option-lbl {
    font-size: .75rem;
  }

  .content-area {
    padding: 1rem 1rem;
  }

  .course-row-header {
    padding: 14px 16px;
    height: fit-content;
    z-index: 2;
    position: relative;
  }

  .course-row-body-inner {
    padding: 0 16px 60px;
    padding-top: 14px;
  }

  .course-expand-btn {
    width: 25px;
    height: auto;
  }
}

@media(max-width:400px) {

  .course-row.expanded .course-row-body {
    max-height: 1200px;
  }
}