/* Modern courses + community — Odoo-style clean cards */

/* ═══ COURSES ═══ */
#coursesGrid.academy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.course-card {
  background: #0b1228;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  color: #fff;
}
.course-card:hover,
.course-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border-color: rgba(139, 92, 246, 0.45);
  outline: none;
}

.course-card-media {
  position: relative;
  height: 130px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(59, 130, 246, 0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.course-card-icon { font-size: 3rem; line-height: 1; }
.course-card-type {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #c4b5fd;
  background: rgba(5, 8, 22, 0.7);
  backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 999px;
}

.course-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0b1228;
}
.course-card-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 800;
  color: #fff !important;
  line-height: 1.3;
}
.course-card-body p {
  margin: 0 0 12px;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.65) !important;
  line-height: 1.5;
  flex: 1;
}
.course-card-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5) !important;
  margin: 0 0 14px !important;
}
.course-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.course-card-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: #34d399;
}
.course-card-cta {
  font-size: 0.78rem;
  font-weight: 700;
  color: #a78bfa;
}
.course-owned-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: #059669;
  background: #d1fae5;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Course modal (redesigned) */
.course-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9800;
}
.course-modal-backdrop[hidden] {
  display: none !important;
}
.course-modal {
  position: fixed;
  inset: 0;
  z-index: 9900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
}
.course-modal[hidden] {
  display: none !important;
}
.course-modal:not([hidden]) { pointer-events: auto; }
.course-modal-inner {
  background: #fff;
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: crs-scale 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes crs-scale {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}
.course-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: #f1f5f9;
  color: #475569;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.course-modal-close:hover { background: #e2e8f0; }

.course-modal-hero {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}
.course-modal-icon {
  font-size: 2.8rem;
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.course-modal-hero h2 {
  margin: 6px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.course-modal-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.55;
  margin: 0 0 12px;
}
.course-modal-inner h4 {
  margin: 16px 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.course-detail-list {
  margin: 0 0 6px;
  padding-left: 1.15rem;
  font-size: 0.87rem;
  color: #334155;
  line-height: 1.55;
}
.course-detail-list li { margin-bottom: 4px; }

.course-modal-actions { margin-top: 20px; }
.course-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.32);
  transition: transform 0.15s, filter 0.15s;
}
.course-modal-btn:hover { transform: translateY(-1px); filter: brightness(1.07); }

body.course-modal-open { overflow: hidden; }

/* ═══ COMMUNITY ═══ */
.community-shell {
  display: grid;
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}

/* Section 1: WhatsApp hero */
.cm-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border-radius: 22px;
  padding: 34px 34px;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  box-shadow: 0 14px 40px rgba(37, 211, 102, 0.28);
  position: relative;
  overflow: hidden;
}
.cm-whatsapp::before {
  content: '';
  position: absolute;
  top: -60%; right: -20%;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, transparent 60%);
  pointer-events: none;
}
.cm-whatsapp-info { position: relative; z-index: 1; }
.cm-whatsapp-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.22);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  backdrop-filter: blur(6px);
}
.cm-whatsapp-info h2,
.cm-whatsapp-title {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}
.cm-whatsapp-info p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  line-height: 1.55;
  opacity: 0.95;
  max-width: 48ch;
}
.cm-whatsapp-info ul {
  margin: 0 0 4px;
  padding-left: 1.15rem;
  font-size: 0.87rem;
  opacity: 0.92;
  line-height: 1.7;
}

.cm-whatsapp-cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  background: #fff;
  color: #128c7e;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.cm-whatsapp-cta:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24); }
.cm-whatsapp-note {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* Social links */
.cm-social-section { margin-top: 0; }
.cm-social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cm-social-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fafbfc;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.cm-social-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
}
.cm-social-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.cm-social-card--instagram .cm-social-icon { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.cm-social-card--youtube .cm-social-icon { background: #ff0000; }
.cm-social-card--x .cm-social-icon { background: #0f172a; }
.cm-social-card--linkedin .cm-social-icon { background: #0a66c2; }
.cm-social-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.cm-social-body strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #1e293b;
}
.cm-social-handle {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6366f1;
}
.cm-social-blurb {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.4;
  margin-top: 2px;
}
.cm-social-arrow {
  font-size: 1rem;
  font-weight: 800;
  color: #94a3b8;
  flex-shrink: 0;
}

/* Section 2: benefits */
.cm-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 24px 26px;
}
.cm-section-head { margin-bottom: 18px; }
.cm-section-head h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0f172a;
}
.cm-section-head p {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.55;
}

.cm-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.cm-benefit {
  background: #fafbfc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 20px;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.cm-benefit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  border-color: rgba(99, 102, 241, 0.35);
}
.cm-benefit-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 10px;
}
.cm-benefit h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}
.cm-benefit p {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.5;
}

/* Section 3: events */
.cm-events {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.cm-event {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.cm-event:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
}
.cm-event-tag {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.cm-event h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 800; }
.cm-event p { margin: 0 0 14px; font-size: 0.85rem; color: #64748b; line-height: 1.5; }
.cm-event-meta {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.7;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 10px;
}
.cm-event-cta {
  align-self: stretch;
  padding: 10px 16px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff !important;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  font-family: inherit;
}
.cm-event-cta:hover { filter: brightness(1.07); }
.cm-event-cta--muted {
  background: #e5e7eb;
  color: #64748b !important;
  cursor: default;
}

.cm-events-empty {
  margin: 0;
  padding: 28px 20px;
  text-align: center;
  color: #64748b;
  font-size: 0.92rem;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 14px;
}

@media (max-width: 780px) {
  .cm-whatsapp { grid-template-columns: 1fr; }
  .cm-whatsapp-cta { width: 100%; justify-content: center; }
  .cm-social-grid { grid-template-columns: 1fr; }
  .cm-benefits { grid-template-columns: 1fr; }
}
