
.calc-catalogue {
  background:
    linear-gradient(
      180deg,
      #fffaf5 0%,
      #ffffff 100%
    );

  padding: 90px 0;
  color: var(--text);

  overflow: hidden;
}


/* =========================================================
   CONTAINER
========================================================= */

.calc-container {

  width: min(1400px, calc(100% - 40px));

  margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.calc-header {

  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 40px;

  padding: 55px 60px;

  margin-bottom: 30px;

  border-radius: var(--radius-lg);

  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(255, 202, 129, 0.15),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      var(--primary-dark),
      var(--primary)
    );

  color: var(--white);

  box-shadow: var(--shadow-lg);

  overflow: hidden;
}


.calc-header::before {

  content: "";

  position: absolute;

  width: 260px;
  height: 260px;

  right: -100px;
  top: -140px;

  border-radius: 50%;

  border: 1px solid rgba(255,255,255,0.1);
}


.calc-header::after {

  content: "";

  position: absolute;

  width: 180px;
  height: 180px;

  left: -100px;
  bottom: -120px;

  border-radius: 50%;

  background: rgba(255,202,129,0.08);
}


.calc-header-content {

  position: relative;
  z-index: 2;

  max-width: 760px;
}


.calc-eyebrow {

  display: inline-flex;

  padding: 8px 15px;

  margin-bottom: 18px;

  border: 1px solid rgba(255,255,255,0.2);

  border-radius: 50px;

  color: var(--secondary);

  font-size: 11px;
  font-weight: 800;

  letter-spacing: 1.8px;

  text-transform: uppercase;

  background: rgba(255,255,255,0.05);
}


.calc-header h1 {

  margin: 0 0 15px;

  font-size: clamp(38px, 5vw, 68px);

  line-height: 0.98;

  font-weight: 900;

  letter-spacing: -2px;

  color: var(--white);
}


.calc-header h1 span {

  color: var(--secondary);
}


.calc-header p {

  max-width: 680px;

  margin: 0;

  color: rgba(255,255,255,0.76);

  font-size: 15px;

  line-height: 1.8;
}


/* =========================================================
   COURSE COUNTER
========================================================= */

.calc-course-counter {

  position: relative;
  z-index: 3;

  flex-shrink: 0;

  min-width: 180px;

  padding: 25px;

  border-radius: var(--radius-md);

  border: 1px solid rgba(255,255,255,0.14);

  background: rgba(255,255,255,0.07);

  text-align: center;

  backdrop-filter: blur(10px);
}


.calc-course-counter strong {

  display: block;

  color: var(--secondary);

  font-size: 48px;

  line-height: 1;

  font-weight: 900;
}


.calc-course-counter span {

  display: block;

  margin-top: 8px;

  color: rgba(255,255,255,0.72);

  font-size: 11px;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 1px;
}


/* =========================================================
   TOOLBAR
========================================================= */

.calc-toolbar {

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin-bottom: 22px;

  padding: 18px;

  border: 1px solid var(--border3);

  border-radius: var(--radius-md);

  background: var(--white);

  box-shadow: var(--shadow-sm);
}


.calc-search {

  position: relative;

  width: min(420px, 100%);
}


.calc-search > i {

  position: absolute;

  left: 17px;
  top: 50%;

  transform: translateY(-50%);

  color: var(--primary);

  font-size: 14px;
}


.calc-search input {

  width: 100%;

  height: 48px;

  padding: 0 45px;

  border: 1px solid var(--border);

  border-radius: var(--radius-sm);

  outline: none;

  color: var(--text);

  background: var(--light);

  font-size: 13px;

  transition: var(--transition);
}


.calc-search input:focus {

  border-color: var(--primary);

  background: var(--white);

  box-shadow:
    0 0 0 4px rgba(113,25,40,0.07);
}


.calc-search button {

  position: absolute;

  right: 8px;
  top: 50%;

  transform: translateY(-50%);

  width: 32px;
  height: 32px;

  border: 0;

  border-radius: 50%;

  background: transparent;

  color: var(--muted);

  cursor: pointer;

  opacity: 0;

  pointer-events: none;

  transition: var(--transition);
}


.calc-search.has-value button {

  opacity: 1;

  pointer-events: auto;
}


.calc-filter {

  display: flex;

  flex-wrap: wrap;

  justify-content: flex-end;

  gap: 7px;
}


.calc-filter-btn {

  border: 1px solid var(--border);

  background: var(--white);

  color: var(--text2);

  border-radius: 50px;

  padding: 9px 14px;

  font-size: 11px;

  font-weight: 700;

  cursor: pointer;

  transition: var(--transition);
}


.calc-filter-btn:hover {

  border-color: var(--primary);

  color: var(--primary);
}


.calc-filter-btn.active {

  border-color: var(--primary);

  background: var(--primary);

  color: var(--white);

  box-shadow:
    0 5px 15px rgba(113,25,40,0.15);
}


/* =========================================================
   TABLE
========================================================= */

.calc-table-wrapper {

  border: 1px solid var(--border3);

  border-radius: var(--radius-md);

  background: var(--white);

  box-shadow: var(--shadow-sm);

  overflow: hidden;
}


.calc-table-head {

  display: grid;

  grid-template-columns:
    55px
    minmax(270px, 2fr)
    90px
    minmax(150px, 1fr)
    110px
    100px
    115px;

  align-items: center;

  min-height: 58px;

  padding: 0 20px;

  background: var(--primary);

  color: var(--white);

  font-size: 10px;

  font-weight: 800;

  letter-spacing: .8px;

  text-transform: uppercase;
}


.calc-course {

  border-bottom: 1px solid var(--border3);

  background: var(--white);

  animation: calcCourseIn .5s ease both;

  transition: var(--transition);
}


.calc-course:last-child {

  border-bottom: 0;
}


.calc-course:hover {

  background: #fffdfb;
}


/* =========================================================
   COURSE MAIN ROW
========================================================= */

.calc-course-row {

  display: grid;

  grid-template-columns:
    55px
    minmax(270px, 2fr)
    90px
    minmax(150px, 1fr)
    110px
    100px
    115px;

  align-items: center;

  min-height: 95px;

  padding: 15px 20px;

  gap: 0;
}


/* =========================================================
   NUMBER
========================================================= */

.calc-number {

  display: flex;

  align-items: center;

  justify-content: center;

  width: 32px;
  height: 32px;

  border-radius: 9px;

  background: var(--light-bg);

  color: var(--primary);

  font-size: 11px;

  font-weight: 900;
}


/* =========================================================
   COURSE NAME
========================================================= */

.calc-course-info {

  padding-right: 25px;
}


.calc-course-name {

  margin: 0 0 6px;

  color: var(--primary);

  font-size: 14px;

  line-height: 1.35;

  font-weight: 800;
}


.calc-course-description {

  display: inline-block;

  margin-top: 2px;

  color: var(--muted);

  font-size: 10px;

  line-height: 1.5;
}


.calc-discontinued {

  display: inline-flex;

  align-items: center;

  margin-top: 7px;

  padding: 4px 8px;

  border-radius: 5px;

  background: #fff0f0;

  color: #a32828;

  font-size: 9px;

  font-weight: 800;
}


/* =========================================================
   CODE
========================================================= */

.calc-code {

  display: inline-flex;

  width: fit-content;

  padding: 6px 8px;

  border-radius: 6px;

  background: #f7f1f2;

  color: var(--primary);

  font-family: monospace;

  font-size: 10px;

  font-weight: 800;
}


/* =========================================================
   ELIGIBILITY
========================================================= */

.calc-eligibility {

  color: var(--text2);

  font-size: 11px;

  line-height: 1.45;

  padding-right: 12px;
}


/* =========================================================
   DURATION
========================================================= */

.calc-duration {

  color: var(--text3);

  font-size: 11px;

  font-weight: 700;
}


/* =========================================================
   FEES
========================================================= */

.calc-fees {

  color: var(--primary);

  font-size: 12px;

  font-weight: 900;
}


/* =========================================================
   MODULE BUTTON
========================================================= */

.calc-module-btn {

  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 8px;

  width: 100%;

  min-height: 38px;

  border: 1px solid var(--primary);

  border-radius: 8px;

  background: transparent;

  color: var(--primary);

  font-size: 10px;

  font-weight: 800;

  cursor: pointer;

  transition: var(--transition);
}


.calc-module-btn:hover {

  background: var(--primary);

  color: var(--white);

  transform: translateY(-2px);

  box-shadow:
    0 7px 18px rgba(113,25,40,0.18);
}


.calc-module-btn i {

  transition: var(--transition);
}


.calc-course.open
.calc-module-btn i {

  transform: rotate(180deg);
}


/* =========================================================
   MODULE AREA
========================================================= */

.calc-modules {

  display: grid;

  grid-template-rows: 0fr;

  transition:
    grid-template-rows .45s
    cubic-bezier(.22,1,.36,1);

  background: #fffaf6;
}


.calc-course.open .calc-modules {

  grid-template-rows: 1fr;
}


.calc-modules-inner {

  min-height: 0;

  overflow: hidden;
}


.calc-modules-content {

  margin: 0 20px 20px;

  padding: 20px;

  border: 1px solid var(--border3);

  border-radius: var(--radius);

  background: var(--white);

  box-shadow: 0 5px 20px rgba(113,25,40,.04);
}


.calc-modules-title {

  display: flex;

  align-items: center;

  gap: 10px;

  margin-bottom: 15px;

  color: var(--primary);

  font-size: 12px;

  font-weight: 900;

  text-transform: uppercase;

  letter-spacing: .6px;
}


.calc-modules-title i {

  width: 28px;
  height: 28px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 7px;

  background: var(--secondary);

  color: var(--primary);

  font-size: 11px;
}


.calc-module-grid {

  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 10px;
}


.calc-module-item {

  display: grid;

  grid-template-columns: 80px 1fr;

  gap: 10px;

  align-items: start;

  padding: 13px;

  border: 1px solid var(--border3);

  border-radius: 9px;

  background: #fffdfb;

  transition: var(--transition);
}


.calc-module-item:hover {

  border-color: var(--secondary);

  transform: translateY(-2px);

  box-shadow: 0 6px 15px rgba(113,25,40,.05);
}


.calc-module-code {

  color: var(--primary);

  font-family: monospace;

  font-size: 10px;

  font-weight: 900;
}


.calc-module-name {

  color: var(--text2);

  font-size: 11px;

  line-height: 1.55;
}


/* =========================================================
   NO RESULT
========================================================= */

.calc-no-result {

  padding: 70px 20px;

  border: 1px solid var(--border3);

  border-radius: var(--radius-md);

  background: var(--white);

  text-align: center;

  box-shadow: var(--shadow-sm);
}


.calc-no-result-icon {

  display: flex;

  align-items: center;
  justify-content: center;

  width: 60px;
  height: 60px;

  margin: 0 auto 15px;

  border-radius: 16px;

  background: var(--light-bg);

  color: var(--primary);

  font-size: 22px;
}


.calc-no-result h3 {

  margin: 0 0 8px;

  color: var(--primary);

  font-size: 20px;
}


.calc-no-result p {

  margin: 0 0 20px;

  color: var(--muted);

  font-size: 13px;
}


.calc-reset-btn {

  border: 0;

  border-radius: 8px;

  padding: 11px 18px;

  background: var(--primary);

  color: var(--white);

  font-size: 11px;

  font-weight: 800;

  cursor: pointer;
}


/* =========================================================
   ANIMATION
========================================================= */

@keyframes calcCourseIn {

  from {

    opacity: 0;

    transform:
      translateY(15px);

  }

  to {

    opacity: 1;

    transform:
      translateY(0);

  }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

  .calc-header {

    padding: 45px;
  }


  .calc-table-wrapper {

    overflow-x: auto;
  }


  .calc-table-head,
  .calc-course-row {

    min-width: 1000px;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

  .calc-catalogue {

    padding: 55px 0;
  }


  .calc-container {

    width:
      min(
        100% - 24px,
        600px
      );
  }


  .calc-header {

    flex-direction: column;

    align-items: flex-start;

    padding: 32px 25px;

    gap: 25px;

    border-radius: var(--radius-md);
  }


  .calc-header h1 {

    font-size: 39px;

    letter-spacing: -1px;
  }


  .calc-header p {

    font-size: 13px;
  }


  .calc-course-counter {

    width: 100%;
  }


  /* MOBILE TOOLBAR */

  .calc-toolbar {

    flex-direction: column;

    align-items: stretch;

    padding: 14px;
  }


  .calc-search {

    width: 100%;
  }


  .calc-filter {

    justify-content: flex-start;

    overflow-x: auto;

    flex-wrap: nowrap;

    padding-bottom: 3px;

    scrollbar-width: none;
  }


  .calc-filter::-webkit-scrollbar {

    display: none;
  }


  .calc-filter-btn {

    white-space: nowrap;

    flex-shrink: 0;
  }


  /* HIDE DESKTOP TABLE HEADER */

  .calc-table-head {

    display: none;
  }


  .calc-table-wrapper {

    overflow: visible;

    border: 0;

    background: transparent;

    box-shadow: none;
  }


  /* COURSE CARD */

  .calc-course {

    margin-bottom: 14px;

    border: 1px solid var(--border3);

    border-radius: var(--radius);

    overflow: hidden;

    box-shadow: var(--shadow-sm);
  }


  .calc-course-row {

    display: grid;

    grid-template-columns:
      42px 1fr;

    gap: 10px;

    min-width: 0;

    padding: 18px;

  }


  .calc-number {

    grid-row: span 2;

  }


  .calc-course-info {

    padding: 0;
  }


  .calc-course-name {

    font-size: 14px;
  }


  .calc-code {

    margin-top: 5px;
  }


  .calc-eligibility,
  .calc-duration,
  .calc-fees {

    grid-column: 2;
  }


  .calc-eligibility {

    padding: 5px 0 0;
  }


  .calc-duration {

    padding-top: 3px;
  }


  .calc-fees {

    padding-top: 2px;
  }


  .calc-module-btn {

    grid-column: 1 / -1;

    margin-top: 8px;
  }


  .calc-modules-content {

    margin: 0 12px 12px;

    padding: 14px;
  }


  .calc-module-grid {

    grid-template-columns: 1fr;

    gap: 8px;
  }


  .calc-module-item {

    grid-template-columns: 70px 1fr;

    padding: 11px;
  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

  .calc-catalogue {

    padding: 40px 0;
  }


  .calc-header {

    padding: 28px 20px;
  }


  .calc-header h1 {

    font-size: 34px;
  }


  .calc-header p {

    font-size: 12px;
  }


  .calc-course-row {

    padding: 15px;
  }


  .calc-course-name {

    font-size: 13px;
  }


  .calc-module-item {

    grid-template-columns: 1fr;
  }


  .calc-module-code {

    margin-bottom: -4px;
  }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

  .calc-course {

    animation: none;
  }

  .calc-modules {

    transition: none;
  }

  .calc-module-btn,
  .calc-filter-btn,
  .calc-course {

    transition: none;
  }

}
