/* =========================================================
   Página de apresentação do curso
   ========================================================= */

.course-page {
  background: #fff;
  padding: 36px 0 60px;
}

.course-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

/* ----- Coluna principal ----- */
.course-cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.course-cat-row .cat-name {
  font-size: 13px;
  color: var(--gray-500);
}
.course-cat-row .badge-new {
  display: inline-block;
  background: #27ae60;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
}

.course-title {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.25;
  margin-bottom: 12px;
}

.course-excerpt {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 640px;
}
.course-excerpt .show-more {
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}
.course-excerpt .show-more:hover {
  text-decoration: underline;
}

.course-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--gray-200);
}

.meta-instructors {
  display: flex;
  align-items: center;
  gap: 10px;
}
.meta-instructors .avatars {
  display: flex;
}
.meta-instructors .avatars img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  margin-left: -8px;
}
.meta-instructors .avatars img:first-child {
  margin-left: 0;
}
.meta-instructors .info {
  font-size: 12px;
  color: var(--gray-500);
}
.meta-instructors .info strong {
  display: block;
  font-size: 13px;
  color: var(--gray-800);
  font-weight: 600;
}

.meta-stat {
  font-size: 13px;
  color: var(--gray-600);
}
.meta-stat strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}
.meta-rating {
  font-size: 13px;
  color: var(--gray-600);
}
.meta-rating .stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 2px;
}
.meta-rating .stars i {
  color: #f1c40f;
  font-size: 13px;
}
.meta-rating .stars span {
  margin-left: 6px;
  font-weight: 700;
  color: var(--gray-900);
  font-size: 14px;
}

/* Tabs */
.course-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
  overflow-x: auto;
}
.course-tabs button {
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.course-tabs button:hover {
  color: var(--primary);
}
.course-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

.course-hero-img {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 24px;
  max-height: 380px;
  object-fit: cover;
}

.course-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 24px 0 12px;
}
.course-body p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.75;
  margin-bottom: 14px;
}
.course-body ul {
  margin: 0 0 16px 18px;
  list-style: disc;
}
.course-body ul li {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 6px;
}

/* Related courses */
.related-courses {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-200);
}
.related-courses h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 18px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-card {
  background: #fff;
}
.related-card .thumb {
  position: relative;
  height: 120px;
  overflow: hidden;
  margin-bottom: 10px;
}
.related-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.related-card .badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: #e74c3c;
}
.related-card .title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 6px;
  line-height: 1.35;
}
.related-card .price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 4px;
}
.related-card .price-row .free {
  color: #27ae60;
  font-weight: 700;
}
.related-card .price-row .price {
  font-weight: 700;
  color: var(--gray-900);
}
.related-card .price-row .old {
  color: var(--gray-400);
  text-decoration: line-through;
  font-size: 12px;
}
.related-card .stars i {
  color: #f1c40f;
  font-size: 11px;
}
.related-card .by {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

/* ----- Sidebar ----- */
.course-sidebar {
  position: sticky;
  top: 90px;
}

.sidebar-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--gray-600);
}
.sidebar-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--gray-600);
  font-size: 13px;
}
.sidebar-actions button:hover {
  color: var(--primary);
}

/* GET COURSE + dropdown de compra */
.get-course-wrap {
  position: relative;
  margin-bottom: 24px;
}
.btn-get-course {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  border-radius: 0.6rem !important;
}
.btn-get-course:hover {
  background: var(--primary-dark);
}
.btn-get-course .price-box {
  text-align: right;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.btn-get-course .price-box .now {
  font-size: 15px;
  font-weight: 700;
}
.btn-get-course .price-box .was {
  font-size: 11px;
  text-decoration: line-through;
  opacity: 0.8;
  font-weight: 400;
}
.btn-get-course .chev {
  margin-left: 8px;
  font-size: 11px;
  opacity: 0.9;
}

.purchase-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--gray-200);
  z-index: 50;
  overflow: hidden;
}
.purchase-dropdown.open {
  display: block;
}

.purchase-option {
  padding: 16px 18px;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  background: #f7f8fa;
}
.purchase-option:last-child {
  border-bottom: 0;
  background: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 500;
}
.purchase-option.active {
  background: #f0f2f5;
}
.purchase-option .opt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.purchase-option .opt-head .label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
}
.purchase-option .radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.purchase-option .radio.checked::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
.purchase-option .radio.empty {
  border-color: var(--gray-300);
}
.purchase-option .price-line {
  margin-bottom: 12px;
}
.purchase-option .price-line .now {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}
.purchase-option .price-line .was {
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: line-through;
  margin-left: 6px;
}
.btn-buy-course {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-transform: none;
  cursor: pointer;
  margin-bottom: 8px;
}
.btn-buy-course:hover {
  background: var(--primary-dark);
}
.cert-note {
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
}

/* Modal partilha */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s,
    visibility 0.2s;
}
.share-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.share-modal {
  background: #fff;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  padding: 22px 22px 20px;
  transform: translateY(8px);
  transition: transform 0.2s;
}
.share-modal-overlay.open .share-modal {
  transform: translateY(0);
}
.share-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.share-modal-head h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.35;
  margin: 0;
}
.share-modal-head .close-share {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-500);
  flex-shrink: 0;
}
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  border: 0;
}
.share-btn.facebook {
  background: #1877f2;
}
.share-btn.twitter {
  background: #000;
}
.share-btn.linkedin {
  background: #0a66c2;
}
.share-btn.telegram {
  background: #2aa1e0;
}
.share-btn.whatsapp {
  background: #25d366;
}
.share-btn.copy {
  background: #5a6270;
}
.share-btn:hover {
  filter: brightness(1.08);
}
.share-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-900);
  color: #fff;
  padding: 10px 18px;
  font-size: 13px;
  z-index: 21000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s,
    transform 0.2s,
    visibility 0.2s;
}
.share-toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.sidebar-block {
  margin-bottom: 28px;
}
.sidebar-block h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}

.detail-list {
}
.detail-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 13px;
  color: var(--gray-600);
}
.detail-list li:last-child {
  border-bottom: 0;
}
.detail-list li .label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.detail-list li .label i {
  width: 18px;
  text-align: center;
  color: var(--gray-400);
}
.detail-list li strong {
  color: var(--gray-900);
  font-weight: 600;
}

.popular-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.popular-item .thumb {
  position: relative;
  width: 70px;
  height: 52px;
  flex-shrink: 0;
  overflow: hidden;
}
.popular-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.popular-item .thumb .badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  padding: 1px 5px;
  background: #e74c3c;
}
.popular-item .thumb .badge.special {
  background: #e67e22;
}
.popular-item .info {
  flex: 1;
  min-width: 0;
}
.popular-item .info .t {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.popular-item .info .meta {
  font-size: 12px;
  color: var(--gray-500);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.popular-item .info .meta .free {
  color: #27ae60;
  font-weight: 600;
}
.popular-item .info .meta .old {
  text-decoration: line-through;
  color: var(--gray-400);
}
.popular-item .info .meta i {
  color: #f1c40f;
  font-size: 10px;
}
.popular-item .info .by {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px;
}

.archive-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  font-size: 13px;
  color: var(--gray-700);
  background: #fff;
  cursor: pointer;
}

@media (max-width: 1000px) {
  .course-layout {
    grid-template-columns: 1fr;
  }
  .course-sidebar {
    position: static;
  }
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
  .course-meta-row {
    gap: 16px;
  }
}

/* ----- GET COURSE dropdown ----- */
.get-course-wrap {
  position: relative;
  margin-bottom: 24px;
}
.btn-get-course {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 18px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  margin-bottom: 0;
}
.btn-get-course:hover {
  background: var(--primary-dark);
}
.btn-get-course .price-box {
  text-align: right;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-get-course .price-box .now {
  font-size: 15px;
  font-weight: 700;
}
.btn-get-course .price-box .was {
  font-size: 11px;
  text-decoration: line-through;
  opacity: 0.8;
  font-weight: 400;
}
.btn-get-course .chev {
  font-size: 11px;
  margin-left: 4px;
  transition: transform 0.2s;
}
.btn-get-course.open .chev {
  transform: rotate(180deg);
}

.get-course-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.14);
  border: 1px solid var(--gray-200);
  z-index: 50;
  overflow: hidden;
}
.get-course-dropdown.open {
  display: block;
}

.gcd-option {
  padding: 16px 18px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
}
.gcd-option:last-child {
  border-bottom: 0;
}
.gcd-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gcd-option-head .label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
}
.gcd-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gray-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gcd-option.active .gcd-radio {
  border-color: var(--primary);
}
.gcd-option.active .gcd-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
.gcd-option.active {
  background: #f8f5fc;
}
.gcd-price {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
}
.gcd-price .old {
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 6px;
}
.gcd-buy {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
}
.gcd-buy:hover {
  background: var(--primary-dark);
}
.gcd-cert {
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
}

/* ----- Share modal ----- */
.share-modal-box {
  background: #fff;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  padding: 22px 22px 20px;
}
.share-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.share-modal-head h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.35;
  margin: 0;
}
.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
}
.share-btn.facebook {
  background: #1877f2;
}
.share-btn.twitter {
  background: #000;
}
.share-btn.linkedin {
  background: #0a66c2;
}
.share-btn.telegram {
  background: #2aa1da;
}
.share-btn.whatsapp {
  background: #25d366;
}
.share-btn.copy {
  background: #5a6270;
}
.share-btn:hover {
  filter: brightness(1.08);
}
.share-toast {
  margin-top: 12px;
  font-size: 12px;
  color: #27ae60;
  text-align: center;
  display: none;
}
.share-toast.show {
  display: block;
}
