/**
 * MS STUDY GURU — Courses Catalog Page Styles (courses-catalog.css)
 * Exact match with user reference screenshot:
 * - "Our Courses" heading with dark underline under "Our" and teal "Courses"
 * - 4-column responsive grid on desktop
 * - Clean cards with 16:9 thumbnails, bold 2-line title
 * - "Buy Now" (solid teal) and "View Details" (outline teal) buttons
 * - Floating WhatsApp widget in bottom-right corner
 */

:root {
  --catalog-teal: #236f7e;
  --catalog-teal-dark: #1b5b68;
  --catalog-teal-light: #e6f4f6;
  --catalog-text-dark: #111827;
  --catalog-text-muted: #64748b;
  --catalog-border: #eaedf0;
  --catalog-card-bg: #ffffff;
  --catalog-page-bg: #ffffff;
}

body.courses-catalog-page {
  background-color: var(--catalog-page-bg) !important;
  color: var(--catalog-text-dark);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Main Content Wrapper */
.courses-catalog-wrapper {
  padding-top: 110px;
  padding-bottom: 90px;
  min-height: calc(100vh - 220px);
}

/* Header Section: "Our Courses" */
.catalog-header-section {
  margin-bottom: 24px;
}

.catalog-main-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 6px 0;
  display: inline-block;
  letter-spacing: -0.02em;
}

.catalog-main-heading .heading-our {
  color: #1e293b;
}

.catalog-main-heading .heading-courses {
  color: var(--catalog-teal);
}

.catalog-heading-underline {
  width: 44px;
  height: 3.5px;
  background-color: #1e293b;
  border-radius: 2px;
  margin-top: 5px;
  margin-bottom: 20px;
}

/* ==============================================================
   4-Column Course Catalog Cards (Matched to reference suggestion)
   ============================================================== */
.course-catalog-card {
  background: var(--catalog-card-bg);
  border-radius: 16px;
  border: 1px solid var(--catalog-border);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 16px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.course-catalog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.02);
  border-color: #cbd5e1;
}

/* Banner Image Wrap (4:3 aspect ratio preserves full 1200x900 graphic without cropping) */
.course-catalog-banner-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: #f1f5f9;
  border-radius: 12px;
}

.course-catalog-banner-wrap a {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.course-catalog-banner-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.course-catalog-card:hover .course-catalog-banner-wrap img {
  transform: scale(1.03);
}

/* Card Body */
.course-catalog-body {
  padding: 14px 2px 0 2px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-catalog-title {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 38px;
}

.course-catalog-title a {
  color: #111827;
  text-decoration: none;
  transition: color 0.15s ease;
}

.course-catalog-title a:hover {
  color: var(--catalog-teal);
}

/* Bottom Action Buttons: Rounded Pill [ Buy Now ] [ View Details ] */
.course-catalog-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.btn-catalog-buy {
  flex: 1;
  text-align: center;
  background: var(--catalog-teal);
  color: #ffffff !important;
  border: 1.5px solid var(--catalog-teal);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(35, 111, 126, 0.2);
}

.btn-catalog-buy:hover {
  background: var(--catalog-teal-dark);
  border-color: var(--catalog-teal-dark);
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(35, 111, 126, 0.35);
  transform: translateY(-1px);
}

.btn-catalog-details {
  flex: 1;
  text-align: center;
  background: #ffffff;
  color: var(--catalog-teal) !important;
  border: 1.5px solid var(--catalog-teal);
  padding: 6.5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-catalog-details:hover {
  background: var(--catalog-teal-light);
  border-color: var(--catalog-teal);
  color: var(--catalog-teal-dark) !important;
  transform: translateY(-1px);
}

/* Floating WhatsApp Button (matches reference screenshot) */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  background: #25D366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.45);
  z-index: 999;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-float-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.55);
  color: #ffffff !important;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .courses-catalog-wrapper {
    padding-top: 95px;
    padding-bottom: 60px;
  }
  .catalog-main-heading {
    font-size: 1.95rem;
  }
}

@media (max-width: 575px) {
  .courses-catalog-wrapper {
    padding-top: 85px;
    padding-bottom: 50px;
  }
  .catalog-header-section {
    margin-bottom: 20px;
  }
  .catalog-main-heading {
    font-size: 1.7rem;
    line-height: 1.2;
  }
  .catalog-heading-underline {
    width: 38px;
    height: 3px;
    margin-bottom: 16px;
  }
  .course-catalog-card {
    max-width: 420px;
    margin: 0 auto;
    border-radius: 14px;
    padding: 10px 10px 14px 10px;
  }
  .course-catalog-body {
    padding: 12px 2px 0 2px;
  }
  .course-catalog-title {
    font-size: 14px;
    line-height: 1.35;
    height: auto;
    min-height: 38px;
    margin-bottom: 14px;
  }
  .course-catalog-actions {
    gap: 8px;
  }
  .btn-catalog-buy, .btn-catalog-details {
    font-size: 13px;
    font-weight: 700;
    min-height: 40px;
    padding: 8px 10px;
    border-radius: 999px;
  }
  .whatsapp-float-btn {
    bottom: 18px;
    right: 18px;
    width: 48px;
    height: 48px;
    font-size: 26px;
  }
}
