/* =========================================================
   PRACTISI — COURSES CATALOG & COURSE DETAILS STYLES
   Calm, structured, academic education platform styling.
   Adheres to Practisi design identity: zero box borders,
   clean surfaces, 4px radius, Practisi green.
========================================================= */

/* ---------------------------------------------------------
   CATALOG PAGE LAYOUT
--------------------------------------------------------- */
.courses-page {
  padding-top: 36px;
  padding-bottom: 96px;
}

/* ---------------------------------------------------------
   ACCORDION SUBJECTS
--------------------------------------------------------- */
.catalog-subjects {
  max-width: 1140px;
  margin: 0 auto;
}

.catalog-subject {
  border: 0 !important;
  margin-bottom: 20px;
}

.catalog-subject:first-child {
  border: 0 !important;
}

.catalog-subject-heading {
  margin: 0;
  font-size: inherit;
}

.catalog-subject-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.catalog-subject-toggle:hover {
  background: var(--surface-deep);
}

.catalog-subject-toggle:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Dedicated solid-color squares with centered white icons */
.catalog-subject-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.catalog-subject-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

/* Canonical subject colors with accessible white icon contrast */
.catalog-subject-icon-business {
  background-color: #9E866F; /* warm sand family (#D5C4B2 tone for crisp white contrast) */
}

.catalog-subject-icon-coding {
  background-color: #798B64; /* moss */
}

.catalog-subject-icon-ai {
  background-color: #8C5C68; /* muted wine */
}

.catalog-subject-icon-research {
  background-color: #C9795C; /* clay */
}

.catalog-subject-icon-core-skills {
  background-color: #4F6878; /* canonical institutional blue */
}

.catalog-subject-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.catalog-subject-name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.catalog-subject-description {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.catalog-subject-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.catalog-subject-count {
  font-size: 14px;
  font-weight: 500;
  color: var(--soft);
  white-space: nowrap;
}

.catalog-subject-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 200ms ease;
  color: var(--muted);
}

.catalog-subject-toggle[aria-expanded="true"] .catalog-subject-chevron {
  transform: rotate(180deg);
}

.catalog-subject-panel {
  padding: 8px 12px 36px;
}

.catalog-subject-panel[hidden] {
  display: none;
}

/* ---------------------------------------------------------
   CATALOG GRID & CARDS
--------------------------------------------------------- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.catalog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 360px;
  width: 100%;
  background: #ffffff;
  border: 0 !important;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.catalog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.catalog-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface);
  border: 0 !important;
  overflow: hidden;
}

.catalog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.catalog-card:hover .catalog-card-media img {
  transform: scale(1.02);
}

.catalog-card-save-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
  cursor: pointer;
  transition: opacity 150ms ease, transform 150ms ease, background 150ms ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.catalog-card-save-btn:hover {
  transform: scale(1.08);
  background: #ffffff;
}

.catalog-card-save-btn.is-saved {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}

.catalog-card-save-btn svg,
.catalog-card-save-btn img {
  width: 16px;
  height: 16px;
}

.catalog-card-enrolled-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.catalog-card-enrolled-badge img {
  width: 15px;
  height: 15px;
}

.catalog-card-body {
  padding: 16px 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.catalog-card-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--soft);
  margin-top: 4px;
}

.catalog-card-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  font-weight: 600;
}

.catalog-card-rating img {
  width: 13px;
  height: 13px;
  color: var(--green);
}

.catalog-card-enrollment {
  font-size: 12px;
  color: var(--soft);
}

/* ---------------------------------------------------------
   COURSE DETAILS PAGE
--------------------------------------------------------- */
.course-detail-view {
  max-width: 1140px;
  margin: 0 auto;
  padding: 32px 0 96px;
}

.course-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 150ms ease, color 150ms ease;
  cursor: pointer;
}

.back-link:hover {
  background: var(--surface-deep);
  color: var(--green);
}

.back-link img {
  width: 14px;
  height: 14px;
}

/* HERO SECTION */
.course-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr);
  gap: 48px;
  align-items: start;
  margin-bottom: 48px;
  padding: 40px 44px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 0 !important;
}

.course-detail-hero-content {
  display: flex;
  flex-direction: column;
}

.course-detail-title {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.course-detail-description {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* TOP METADATA LINE - STRICTLY 12 modules · Self-paced · Certificate of Completion */
.course-detail-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 0;
  border-bottom: 0;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.stat-item img {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}

/* ACTION ROW */
.course-detail-cta-row {
  margin-top: 1lh;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.course-detail-primary-btn {
  min-width: 160px;
  height: 46px;
  font-size: 15px;
}

.course-detail-bookmark-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0 !important;
  border: 1px solid var(--text, #171717) !important;
  border-radius: 50% !important;
  background: transparent !important;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.course-detail-bookmark-btn .bookmark-text {
  display: none !important;
}

.course-detail-bookmark-btn img {
  width: 16px;
  height: 16px;
  display: block;
  transition: filter 150ms ease;
}

.course-detail-bookmark-btn:hover {
  border-color: var(--green, #20663E) !important;
  background: transparent !important;
}

.course-detail-bookmark-btn:hover img {
  filter: brightness(0) saturate(100%) invert(34%) sepia(25%) saturate(1150%) hue-rotate(92deg) brightness(85%) contrast(87%) !important;
}

.course-detail-bookmark-btn.is-saved {
  border-color: var(--green, #20663E) !important;
  background: transparent !important;
}

.course-detail-bookmark-btn.is-saved img {
  filter: brightness(0) saturate(100%) invert(34%) sepia(25%) saturate(1150%) hue-rotate(92deg) brightness(85%) contrast(87%) !important;
}

.course-detail-bookmark-btn:focus-visible {
  outline: 2px solid var(--green, #20663E);
  outline-offset: 3px;
}

.enrolled-status-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--green-soft, #eaf3ed);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}

.enrolled-status-badge img {
  width: 14px;
  height: 14px;
}

/* SOCIAL PROOF */
.course-detail-social-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--muted);
}

.course-detail-rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.course-detail-rating-score-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.course-detail-rating-score-row img {
  width: 16px;
  height: 16px;
}

.course-enrollment-count strong {
  color: var(--text);
  font-weight: 600;
}

.course-detail-hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
}

.course-detail-hero-media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* SUBNAV SECTIONS */
.course-detail-sections {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
  padding-top: 24px;
  padding-bottom: 16px;
  border-bottom: 0;
  position: sticky;
  top: var(--header-h, 80px);
  background: var(--bg, #ffffff);
  z-index: 10;
}

.course-detail-sections a {
  padding: 8px 16px;
  border-radius: 44px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background-color 150ms ease, color 150ms ease;
}

.course-detail-sections a:hover {
  background: var(--surface-deep);
  color: var(--green);
}

/* CONTENT SECTIONS */
.course-section {
  padding: 56px 0;
  border-bottom: 0;
  scroll-margin-top: calc(var(--header-h, 80px) + 88px);
}

.course-section:last-of-type {
  border-bottom: 0;
}

.course-section h2 {
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.course-overview-copy {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 16px;
  max-width: 800px;
}

/* OUTCOMES & FEATURES GRID */
.learn-outcomes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.learn-outcome-item {
  display: flex;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border-radius: var(--radius);
}

.learn-outcome-item img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.learn-outcome-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.learn-outcome-item p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* WHAT YOU'LL LEARN CHECKLIST */
.outcomes-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.outcome-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
}

.outcome-check-item img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ---------------------------------------------------------
   CURRICULUM TREE (ALL 12 MODULES)
--------------------------------------------------------- */
.curriculum-modules {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}

.curriculum-module {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}

.curriculum-module-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.curriculum-module-toggle:hover {
  background: var(--surface-deep);
}

.module-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.module-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.module-header-titles {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.module-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.module-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.module-chevron {
  width: 16px;
  height: 16px;
  transition: transform 200ms ease;
  color: var(--muted);
  flex-shrink: 0;
}

.curriculum-module-toggle[aria-expanded="true"] .module-chevron {
  transform: rotate(180deg);
}

.curriculum-module-lessons {
  padding: 12px 24px 20px;
  border-top: 0;
  background: #ffffff;
}

.curriculum-module-lessons[hidden] {
  display: none;
}

.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.lesson-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.lesson-pos {
  font-size: 12px;
  font-weight: 600;
  color: var(--soft);
  min-width: 18px;
}

.lesson-name {
  font-weight: 500;
  color: var(--text);
}

.lesson-description {
  color: var(--muted);
}

/* ---------------------------------------------------------
   CERTIFICATE SECTION
--------------------------------------------------------- */
.certificate-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr);
  gap: 40px;
  align-items: center;
  padding: 36px 40px;
  background: var(--surface);
  border-radius: var(--radius);
}

.certificate-card h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.certificate-card p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.certificate-card ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.certificate-preview-box {
  background: transparent;
  padding: 0;
  border-radius: var(--radius);
  box-shadow: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.certificate-preview-box img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* ---------------------------------------------------------
   REVIEWS & RATINGS SECTION
--------------------------------------------------------- */
.reviews-dashboard {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 24px;
}

.rating-overview-box {
  padding: 28px;
  background: var(--surface);
  border-radius: var(--radius);
}

.rating-score-large {
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  margin-bottom: 8px;
}

.rating-stars-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}

.rating-stars-row img {
  width: 18px;
  height: 18px;
}

.rating-count-label {
  font-size: 13px;
  color: var(--soft);
  margin-bottom: 24px;
}

.rating-breakdown-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
}

.rating-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.rating-bar-row span:first-child {
  width: 14px;
  font-weight: 600;
}

.rating-bar-track {
  flex: 1;
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.rating-bar-fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-card {
  padding: 20px 24px;
  background: var(--surface);
  border-radius: var(--radius);
}

.review-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.review-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.review-date {
  font-size: 12px;
  color: var(--soft);
}

.review-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
}

.review-stars img {
  width: 14px;
  height: 14px;
}

.review-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------------------------------------------------------
   RATE MODAL
--------------------------------------------------------- */
.rate-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rate-modal-backdrop[hidden] {
  display: none;
}

.rate-modal {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  position: relative;
}

.rate-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
}

.rate-modal-close:hover {
  background: var(--surface);
  color: var(--text);
}

.rate-modal h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.rate-modal p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}

.star-rating-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.star-rating-btn {
  background: transparent;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: var(--line);
  transition: color 150ms ease, transform 150ms ease;
}

.star-rating-btn:hover {
  transform: scale(1.15);
}

.star-rating-btn.active,
.star-rating-btn.hover {
  color: var(--green);
}

.star-rating-btn svg,
.star-rating-btn img {
  width: 28px;
  height: 28px;
}

.rate-modal textarea {
  width: 100%;
  height: 110px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 20px;
}

.rate-modal textarea:focus {
  outline: 2px solid var(--green);
  border-color: transparent;
}

.rate-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ---------------------------------------------------------
   RESPONSIVENESS
--------------------------------------------------------- */
@media (max-width: 1080px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .course-detail-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 24px;
  }
  .learn-outcomes-grid,
  .outcomes-list,
  .certificate-card,
  .reviews-dashboard {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .courses-page .catalog-subject-panel {
    padding: 16px 0 24px;
  }
  .catalog-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .catalog-grid::-webkit-scrollbar {
    display: none;
  }
  .catalog-card {
    flex: 0 0 min(74vw, 260px);
    width: min(74vw, 260px);
    max-width: min(74vw, 260px);
    scroll-snap-align: start;
  }
  .catalog-card-body {
    flex: 1;
    justify-content: space-between;
  }
  .catalog-subject-toggle {
    gap: 12px;
    padding: 14px 12px;
  }
  .curriculum-module-toggle {
    min-height: 64px;
    padding: 14px 18px;
  }
  .catalog-subject-count {
    display: none;
  }
  .courses-page {
    padding-top: clamp(76px, 11svh, 104px);
    padding-bottom: 96px;
  }
  .catalog-subject {
    margin-bottom: 28px;
  }
  .course-detail-view {
    padding-top: 16px;
  }
  .course-detail-sections {
    top: var(--header-h);
  }
}


/* Author display rules must never override authenticated visibility. */
.catalog-card-enrolled-badge[hidden],
.enrolled-status-badge[hidden] { display: none !important; }

.curriculum-module, .curriculum-module-lessons { border: 0 !important; }
.course-detail-sections a { border-radius: 4px; }
.learn-outcome-item img { width: 24px; height: 24px; object-fit: contain; }
.certificate-preview-box { padding: 0; background: transparent !important; box-shadow: none !important; }
.certificate-preview-frame { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; border: 0; background: transparent !important; }
.certificate-card { background: transparent !important; box-shadow: none !important; }

/* Course outcomes use the existing soft FAQ surface. */
.outcome-check-item { background:var(--surface); padding:18px 20px; border-radius:var(--radius); }
.courses-page { padding-top:clamp(80px, 12vh, 130px); }
.courses-page .catalog-subject-panel { padding-top:36px; }
.courses-page .catalog-card-footer { justify-content:flex-end; }
.courses-page .catalog-subject-icon-box { width:46px; height:46px; }
.courses-page .catalog-subject-icon-box .catalog-subject-icon { width:24px; height:24px; }

/* Review dialog follows the application source dimensions and typography. */
.rate-modal {
  position: relative;
  max-width: 720px;
  width: calc(100% - 32px);
  box-sizing: border-box;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: var(--raised, #fff);
  border: 0 !important;
  border-radius: var(--radius, 4px);
  padding: 40px;
  box-shadow: none !important;
}

.rate-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted, #6b6b68);
  cursor: pointer;
  padding: 0;
  border-radius: 50% !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.rate-modal-close:hover {
  background: var(--hover, #e8ece8) !important;
  color: var(--text, #171717);
}

html[data-theme="dark"] .rate-modal-close:hover {
  background: #2a2a28 !important;
}

.rate-modal-header {
  margin-top: 10px;
  margin-bottom: 40px;
  text-align: left;
}

.rate-modal-header h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.rate-modal-subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--muted, #6b6b68);
  line-height: 1.45;
}

.star-rating {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.rate-rating-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.rate-rating-row .star-rating {
  margin-bottom: 0;
}

.rate-rating-description {
  font-size: 13px;
  color: var(--muted, #6b6b68);
}

.rate-star-icon {
  display: block;
  width: 24px;
  height: 24px;
  background: var(--muted, #6b6b68);
  mask: url('../../assets/icons/star-sharp-svgrepo-com.svg') center / contain no-repeat;
}

.rate-star-icon.filled {
  background: #20663E;
}

.star-button {
  border: 0 !important;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  border-radius: var(--radius, 4px);
  transition: transform 0.1s ease;
}

.star-button:hover {
  transform: scale(1.15);
}

.rate-review-label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  font-size: 14px;
  font-weight: 600;
}

.rate-review-label textarea {
  border: 0 !important;
  background: var(--surface, #f7f7f5);
  border-radius: var(--radius, 4px);
  padding: 10px;
  font-size: 13px;
  outline: 0;
  resize: vertical;
}

.rate-review-label textarea:focus {
  outline: 2px solid #20663E;
}

.rate-modal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 28px;
}

.rate-modal-notice {
  flex: 1;
  margin: 0;
  color: var(--muted, #6b6b68);
  font-size: 12px;
  line-height: 1.6;
}

.rate-modal-notice a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .rate-modal { padding: 40px 24px 24px; }
  .rate-rating-row { gap: 12px; }
  .rate-modal-actions { flex-wrap: wrap; gap: 20px; }
  .rate-modal-notice { flex-basis: 100%; }
}


.rate-modal { font-family:var(--font); }
.rate-modal .rate-modal-header h2 { font-family:var(--font); font-size:18px; }
.rate-modal .rate-modal-subtitle { margin:0; font-size:13px; line-height:1.45; }
.rate-modal .rate-modal-notice { margin:0; font-size:12px; line-height:1.6; }
.rate-modal .rate-review-label textarea { width:100%; margin:0; font:400 13px var(--font); }
.rate-modal .star-rating-btn { width:32px; height:32px; padding:4px; transform:none; }
.rate-modal .star-rating-btn svg { fill:none; stroke:var(--muted); stroke-width:1.5; }
.rate-modal .star-rating-btn.active svg { fill:var(--green); stroke:var(--green); stroke-width:0; }
.rate-modal .rate-modal-actions button[type="submit"] { font:500 12px var(--font); padding:9px 12px; min-height:0; }
.rate-modal-backdrop { padding:0; background:rgba(0,0,0,.28); backdrop-filter:none; }
.rate-modal .star-rating-btn svg { width:24px; height:24px; }
.rate-modal .rate-modal-actions button:disabled { opacity:.5; cursor:not-allowed; }

/* Reverse the course review call-to-action background states. */
.course-detail-view #openRateModalBtn { background:var(--surface-deep); }
.course-detail-view #openRateModalBtn:hover { background:transparent; }

.courses-page .catalog-subject-description { font-weight:400; }

/* Unsaved catalog bookmarks appear with card interaction; saved ones persist. */
.courses-page .catalog-card-save-btn:not(.is-saved) { opacity:0; pointer-events:none; transition:opacity 150ms ease; }
.courses-page .catalog-card:hover .catalog-card-save-btn,
.courses-page .catalog-card:focus-within .catalog-card-save-btn,
.courses-page .catalog-card-save-btn.is-saved { opacity:1; pointer-events:auto; }
@media (hover:none) { .courses-page .catalog-card-save-btn:not(.is-saved) { opacity:1; pointer-events:auto; } }
@media (prefers-reduced-motion:reduce) { .courses-page .catalog-card-save-btn { transition:none; } }

/* Subject artwork keeps its natural color and transparent silhouette. */
.courses-page .catalog-subject-art { display:block; width:104px; height:104px; flex:0 0 104px; object-fit:contain; filter:none; background:transparent; }
.courses-page .catalog-subject-toggle { gap:28px; }
@media(max-width:760px) {
  .courses-page .catalog-subject-art { width:48px; height:48px; flex:0 0 48px; }
  .courses-page .catalog-subject-toggle { gap:12px; padding:14px 12px; }
  .courses-page .catalog-subject-copy { gap:2px; }
  .courses-page .catalog-subject-name { font-size:17px; line-height:1.2; }
  .courses-page .catalog-subject-description { font-size:13px; line-height:1.4; }
  .courses-page .catalog-subject-panel { padding:16px 0 24px; }
  .courses-page .catalog-subject-chevron { width:20px; height:20px; }
}

.courses-page .catalog-subject-chevron { width:24px; height:24px; color:var(--text); opacity:1; }

/* Desktop and phone course-saving use the same circular icon control. */
.login-button.course-detail-bookmark-btn {
 display:flex; align-items:center; justify-content:center; flex:0 0 44px;
 width:44px; height:44px; min-height:44px; padding:0; border:1px solid currentColor;
 border-radius:50%; background:transparent; color:var(--text);
}
.course-detail-bookmark-btn .bookmark-text { display:none; }
.course-detail-bookmark-icon { display:block; width:16px; height:16px; flex:none; }
.login-button.course-detail-bookmark-btn:hover,
.login-button.course-detail-bookmark-btn:focus-visible,
.login-button.course-detail-bookmark-btn.is-saved { color:#20663E; border-color:#20663E; background:transparent; }
