/* ============================================
   ExamConnect — Category Page (Phase 1)
   Brand: #327b74 Teal | #0F4C81 Navy | #F59E0B Amber
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

.ec-cat-page,
.ec-cat-page * {
  font-family: 'Poppins', sans-serif !important;
  box-sizing: border-box;
}

.ec-cat-page {
  background: #fafbfc;
  padding: 24px 0 60px;
  min-height: 60vh;
}

.ec-cat-page .container-cat {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Hide gray title bar from _title include */
.ec-cat-page-wrap ~ .container-fluid[style*="dee2e6"],
.container-fluid[style*="dee2e6"]:has(+ .ec-cat-page) {
  display: none !important;
}

/* === BREADCRUMB === */
.ec-cat-breadcrumb {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 14px;
}
.ec-cat-breadcrumb a { color: #327b74; text-decoration: none; font-weight: 500; }
.ec-cat-breadcrumb a:hover { text-decoration: underline; }
.ec-cat-breadcrumb b { color: #0F4C81; font-weight: 600; }
.ec-cat-breadcrumb .sep { margin: 0 6px; color: #cbd5e1; }

/* === HERO === */
.ec-cat-hero {
  background: linear-gradient(135deg, #0F4C81 0%, #327b74 100%);
  border-radius: 14px;
  padding: 32px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 6px 24px rgba(15, 76, 129, 0.15);
}

.ec-cat-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.ec-cat-hero::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: 30%;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.ec-cat-hero-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.ec-cat-tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.ec-cat-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #FAC775;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
  letter-spacing: 0.3px;
}
.ec-cat-tag.live {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ec-cat-tag.live .dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: ec-cat-pulse 2s infinite;
}
@keyframes ec-cat-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.ec-cat-title {
  font-size: 32px !important;
  font-weight: 800 !important;
  margin: 0 0 8px !important;
  line-height: 1.2;
  color: #fff !important;
}

.ec-cat-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 14px;
  line-height: 1.55;
}

.ec-cat-meta {
  display: flex;
  gap: 18px;
  font-size: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.ec-cat-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
}
.ec-cat-meta b { color: #FAC775; font-weight: 700; }
.ec-cat-meta svg { color: #FAC775; }

.ec-cat-stats-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px 18px;
  backdrop-filter: blur(10px);
}
.ec-cat-stats-title {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}
.ec-cat-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}
.ec-cat-stat-row:last-child { border: none; padding-bottom: 0; }
.ec-cat-stat-row span { color: rgba(255, 255, 255, 0.8); }
.ec-cat-stat-row b { color: #FAC775; font-weight: 700; font-size: 14px; }

/* === SECTION COMMON === */
.ec-cat-section { margin-bottom: 24px; }
.ec-cat-section-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.ec-cat-section-title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #0F4C81 !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ec-cat-section-tag {
  background: #e1f5ee;
  color: #0F6E56;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.ec-cat-section-tag.premium {
  background: linear-gradient(135deg, #F59E0B, #d97706);
  color: #fff;
}

/* === FREE PACKAGES GRID === */
.ec-cat-free-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.ec-cat-free-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.ec-cat-free-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981, #0F6E56);
}

.ec-cat-free-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.12);
  border-color: #10b981;
}

.ec-cat-free-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 8px;
}

.ec-cat-free-name {
  font-size: 14px;
  font-weight: 700;
  color: #0F4C81;
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.ec-cat-free-badge {
  background: #10b981;
  color: #fff;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.ec-cat-free-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ec-cat-free-btn {
  display: flex !important;
  background: #327b74 !important;
  color: #fff !important;
  padding: 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none !important;
  width: 100%;
  transition: all 0.2s;
}

.ec-cat-free-btn:hover {
  background: #245c57 !important;
  color: #fff !important;
}

/* === PREMIUM PACKAGES GRID === */
.ec-cat-pkg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.ec-cat-pkg-card {
  background: #fff;
  border: 1.5px solid #fde68a;
  border-radius: 14px;
  padding: 18px 16px;
  transition: all 0.25s ease;
  position: relative;
  background: linear-gradient(135deg, #fffbeb 0%, #fff 60%);
}

.ec-cat-pkg-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.15);
  border-color: #F59E0B;
}

.ec-cat-pkg-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 8px;
}

.ec-cat-pkg-name {
  font-size: 15px;
  font-weight: 700;
  color: #0F4C81;
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.ec-cat-pkg-badge {
  background: linear-gradient(135deg, #F59E0B, #d97706);
  color: #fff;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.ec-cat-pkg-desc {
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ec-cat-pkg-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.ec-cat-pkg-price {
  font-size: 22px;
  font-weight: 800;
  color: #0F4C81;
  line-height: 1;
}

.ec-cat-pkg-price small {
  font-size: 13px;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
  margin-left: 4px;
}

.ec-cat-pkg-btn {
  background: linear-gradient(135deg, #F59E0B, #d97706) !important;
  color: #fff !important;
  padding: 9px 18px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  border: none !important;
  transition: all 0.2s;
}

.ec-cat-pkg-btn:hover {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
  color: #fff !important;
}

/* === EMPTY STATE === */
.ec-cat-empty {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
}
.ec-cat-empty-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #e1f5ee, #f0faf9);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #327b74;
}
.ec-cat-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #0F4C81;
  margin: 0 0 4px;
}
.ec-cat-empty-text {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

/* === FINAL CTA === */
.ec-cat-cta {
  background: linear-gradient(135deg, #0F4C81 0%, #327b74 100%);
  border-radius: 14px;
  padding: 32px 24px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-top: 12px;
}
.ec-cat-cta::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
}
.ec-cat-cta-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 6px;
  position: relative;
  z-index: 1;
}
.ec-cat-cta-title b {
  background: linear-gradient(135deg, #F59E0B, #FAC775);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ec-cat-cta-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 18px;
  position: relative;
  z-index: 1;
}
.ec-cat-cta-btn {
  background: linear-gradient(135deg, #F59E0B, #d97706);
  color: #fff;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: all 0.2s;
}
.ec-cat-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.5);
  color: #fff;
  text-decoration: none;
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 991px) {
  .ec-cat-hero { padding: 24px 20px; }
  .ec-cat-hero-row { grid-template-columns: 1fr; gap: 18px; }
  .ec-cat-title { font-size: 26px !important; }
  .ec-cat-free-grid { grid-template-columns: repeat(2, 1fr); }
  .ec-cat-pkg-grid { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
  .ec-cat-page { padding: 14px 0 40px; }
  .ec-cat-hero { padding: 20px 16px; }
  .ec-cat-title { font-size: 22px !important; }
  .ec-cat-desc { font-size: 13px; }
  .ec-cat-meta { font-size: 11px; gap: 10px; }
  .ec-cat-free-grid { grid-template-columns: 1fr; }
  .ec-cat-section-title { font-size: 16px !important; }
  .ec-cat-pkg-price { font-size: 18px; }
  .ec-cat-cta-title { font-size: 18px; }
}