/* ========================================
   CURSOS_STYLE.CSS - Plataforma de Cursos
   Magali Repostería
   ======================================== */

/* Variables heredadas de front_style.css:
   --primary-brown: #703b33
   --secondary-brown: #5e2f28
   --cream: #eee9dc
   --warm-cream: #f4efe5
   --accent-gold: #d4a574
   --dark-brown: #3d2306
   --text-dark: #3d2306
*/

/* ========================================
   LAYOUT GENERAL CURSOS
   ======================================== */
.cursos-page {
  font-family: 'DM Sans', sans-serif;
  color: #3d2306;
  background: linear-gradient(135deg, #eee9dc, #f4efe5);
  min-height: 100vh;
  min-height: 100dvh;
}

.cursos-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   CURSOS NAVBAR
   ======================================== */
.cursos-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(238, 233, 220, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(112, 59, 51, 0.1);
  padding: 0 24px;
}

.cursos-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.cursos-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #703b33;
}

.cursos-nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.cursos-nav-brand span {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
}

.cursos-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cursos-nav-link {
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: #3d2306;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.cursos-nav-link:hover {
  background: rgba(112, 59, 51, 0.08);
  color: #703b33;
}

.cursos-nav-link.active {
  background: #703b33;
  color: #fff;
}

/* Login / User UI */
.cursos-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: #703b33;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cursos-login-btn:hover {
  background: #5e2f28;
}

.cursos-user-menu {
  display: none;
  align-items: center;
  gap: 12px;
}

.cursos-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #703b33, #d4a574);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
}

.cursos-user-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: #3d2306;
}

.cursos-logout-btn {
  background: none;
  border: 1px solid rgba(112, 59, 51, 0.2);
  color: #703b33;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cursos-logout-btn:hover {
  background: rgba(112, 59, 51, 0.08);
}

/* ========================================
   HERO BANNER
   ======================================== */
.cursos-hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.cursos-hero-badge {
  display: inline-block;
  padding: 6px 20px;
  background: rgba(112, 59, 51, 0.08);
  border: 1px solid rgba(112, 59, 51, 0.15);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #703b33;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.cursos-hero h1 {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #3d2306;
  margin-bottom: 16px;
  line-height: 1.2;
}

.cursos-hero h1 em {
  font-style: italic;
  color: #703b33;
}

.cursos-hero-subtitle {
  font-size: 1.1rem;
  color: #5e4a3a;
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.cursos-hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 24px;
}

.cursos-hero-stat {
  text-align: center;
}

.cursos-hero-stat-value {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: #703b33;
  display: block;
}

.cursos-hero-stat-label {
  font-size: 0.85rem;
  color: #8a7a6a;
  margin-top: 4px;
}

/* ========================================
   FILTROS
   ======================================== */
.cursos-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.cursos-filter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5e4a3a;
}

.cursos-filter-select {
  padding: 10px 36px 10px 14px;
  border: 1px solid rgba(112, 59, 51, 0.2);
  border-radius: 8px;
  background: #fff;
  color: #3d2306;
  font-size: max(16px, 0.9rem);
  font-family: 'DM Sans', sans-serif;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23703b33'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 0.3s;
}

.cursos-filter-select:hover,
.cursos-filter-select:focus {
  border-color: #703b33;
  outline: none;
}

/* ========================================
   CURSOS GRID (CATÁLOGO)
   ======================================== */
.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}

/* ========================================
   CURSO CARD (CATÁLOGO)
   ======================================== */
.curso-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(112, 59, 51, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.curso-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(112, 59, 51, 0.15);
}

.curso-card-img {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #eee9dc;
}

.curso-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.curso-card:hover .curso-card-img img {
  transform: scale(1.05);
}

.curso-nivel-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.curso-nivel-badge.principiante {
  background: rgba(76, 175, 80, 0.9);
  color: #fff;
}

.curso-nivel-badge.intermedio {
  background: rgba(212, 165, 116, 0.95);
  color: #3d2306;
}

.curso-nivel-badge.avanzado {
  background: rgba(112, 59, 51, 0.95);
  color: #fff;
}

.curso-discount-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: #c0392b;
  color: #fff;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.curso-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.curso-card-category {
  font-size: 0.8rem;
  font-weight: 600;
  color: #d4a574;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.curso-card-title {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #3d2306;
  margin-bottom: 8px;
  line-height: 1.3;
}

.curso-card-desc {
  font-size: 0.9rem;
  color: #6b5a4a;
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.curso-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: #8a7a6a;
  margin-bottom: 16px;
}

.curso-card-meta i {
  color: #d4a574;
  margin-right: 4px;
}

.curso-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(112, 59, 51, 0.08);
}

.curso-card-price {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #703b33;
}

.precio-original {
  text-decoration: line-through;
  color: #999;
  font-size: 0.95rem;
  margin-right: 6px;
}

.precio-descuento {
  color: #c0392b;
}

.curso-card-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: #703b33;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s ease;
}

.curso-card:hover .curso-card-cta {
  gap: 10px;
}

/* ========================================
   COURSE DETAIL VIEW (inline on cursos.html)
   ======================================== */
.curso-detail {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.curso-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #703b33;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 24px;
  transition: gap 0.3s;
}

.curso-detail-back:hover {
  gap: 12px;
}

.curso-detail-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.curso-detail-img {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #eee9dc;
}

.curso-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.curso-detail-info h1 {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: #3d2306;
  margin-bottom: 12px;
  line-height: 1.2;
}

.curso-detail-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.curso-detail-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #6b5a4a;
}

.curso-detail-meta i {
  color: #d4a574;
}

.curso-detail-desc {
  font-size: 0.95rem;
  color: #5e4a3a;
  line-height: 1.7;
  margin-bottom: 24px;
}

.curso-detail-price-box {
  background: linear-gradient(135deg, #703b33, #5e2f28);
  color: #fff;
  padding: 20px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.curso-detail-price {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
}

.curso-detail-buy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #d4a574;
  color: #3d2306;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.curso-detail-buy-btn:hover {
  background: #c4955a;
}

/* Video list in detail */
.curso-detail-videos {
  margin-top: 40px;
}

.curso-detail-videos h2 {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #3d2306;
  margin-bottom: 20px;
}

.module-header {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #703b33;
  padding: 12px 0 8px;
  border-bottom: 1px solid rgba(112, 59, 51, 0.1);
  margin-top: 20px;
}

.module-header:first-child {
  margin-top: 0;
}

/* ========================================
   VIDEO CARDS (in course detail)
   ======================================== */
.video-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

.video-card:hover {
  background: rgba(112, 59, 51, 0.04);
}

.video-card.locked {
  opacity: 0.7;
}

.video-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.video-card.unlocked .video-card-icon {
  background: rgba(112, 59, 51, 0.08);
  color: #703b33;
}

.video-card.locked .video-card-icon {
  background: rgba(0,0,0,0.05);
  color: #999;
}

.video-card-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.video-card-order {
  font-size: 0.85rem;
  color: #8a7a6a;
  font-weight: 600;
  width: 24px;
  text-align: right;
  flex-shrink: 0;
}

.video-card-text {
  flex: 1;
  min-width: 0;
}

.video-card-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #3d2306;
  margin: 0;
}

.video-card-duration {
  font-size: 0.8rem;
  color: #8a7a6a;
}

.video-preview-tag {
  padding: 3px 10px;
  background: rgba(76, 175, 80, 0.12);
  color: #2e7d32;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.video-price-tag {
  padding: 3px 10px;
  background: rgba(112, 59, 51, 0.08);
  color: #703b33;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* ========================================
   AUTH MODAL
   ======================================== */
.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.auth-modal.active {
  display: flex;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 35, 6, 0.5);
  backdrop-filter: blur(4px);
}

.auth-modal-content {
  position: relative;
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 440px;
  padding: 40px 36px;
  box-shadow: 0 24px 64px rgba(61, 35, 6, 0.25);
  animation: authModalIn 0.3s ease;
}

@keyframes authModalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #8a7a6a;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s;
}

.auth-modal-close:hover {
  background: rgba(0,0,0,0.05);
}

.auth-modal-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-modal-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  border-bottom: 2px solid rgba(112, 59, 51, 0.1);
}

.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #8a7a6a;
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  transition: color 0.3s;
}

.auth-tab.active {
  color: #703b33;
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #703b33;
}

.auth-form-group {
  margin-bottom: 18px;
}

.auth-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5e4a3a;
  margin-bottom: 6px;
}

.auth-form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(112, 59, 51, 0.2);
  border-radius: 8px;
  font-size: max(16px, 0.95rem);
  font-family: 'DM Sans', sans-serif;
  color: #3d2306;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #703b33;
  box-shadow: 0 0 0 3px rgba(112, 59, 51, 0.1);
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #703b33, #5e2f28);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.3s;
  margin-top: 8px;
}

.auth-submit-btn:hover {
  opacity: 0.9;
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-error {
  color: #c0392b;
  font-size: 0.85rem;
  text-align: center;
  min-height: 20px;
  margin-top: 12px;
}

.auth-switch-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: #8a7a6a;
}

.auth-switch-link a {
  color: #703b33;
  text-decoration: none;
  font-weight: 600;
}

/* ========================================
   AUTH — GOOGLE + MAGIC LINK
   ======================================== */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(112, 59, 51, 0.12);
}

.auth-divider span {
  font-size: 0.8rem;
  color: #8a7a6a;
  white-space: nowrap;
}

.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: #3d2306;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.auth-google-btn:hover {
  background: #f8f8f8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.auth-google-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-magic-link-section {
  margin-top: 16px;
}

.auth-magic-link-toggle {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #703b33;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  text-align: center;
  transition: opacity 0.2s;
}

.auth-magic-link-toggle:hover {
  opacity: 0.75;
}

.auth-magic-link-form {
  display: none;
  margin-top: 12px;
}

.auth-magic-link-form.active {
  display: block;
}

.auth-magic-link-form .auth-ml-row {
  display: flex;
  gap: 8px;
}

.auth-magic-link-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(112, 59, 51, 0.2);
  border-radius: 8px;
  font-size: max(16px, 0.9rem);
  font-family: 'DM Sans', sans-serif;
  color: #3d2306;
  transition: border-color 0.3s;
}

.auth-magic-link-form input:focus {
  outline: none;
  border-color: #703b33;
}

.auth-magic-link-send {
  padding: 10px 18px;
  background: none;
  border: 1.5px solid #703b33;
  border-radius: 8px;
  color: #703b33;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.auth-magic-link-send:hover {
  background: #703b33;
  color: #fff;
}

.auth-magic-link-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-magic-link-success {
  display: none;
  text-align: center;
  padding: 16px;
  margin-top: 12px;
  background: rgba(76, 175, 80, 0.06);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 10px;
}

.auth-magic-link-success.active {
  display: block;
}

.auth-magic-link-success i {
  display: block;
  font-size: 1.5rem;
  color: #2e7d32;
  margin-bottom: 8px;
}

.auth-magic-link-success p {
  font-size: 0.85rem;
  color: #3d6b3d;
  line-height: 1.4;
  margin: 0;
}

/* ========================================
   VIDEO VIEWER PAGE
   ======================================== */
.viewer-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  min-height: calc(100vh - 64px);
}

.viewer-main {
  padding: 24px;
}

.viewer-player-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.viewer-player-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Marca de agua anti-grabación */
.video-watermark {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  color: rgba(255, 255, 255, 0.12);
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* Botón fullscreen propio */
.video-fullscreen-btn {
  position: absolute;
  z-index: 11;
  bottom: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}

.viewer-player-wrapper:hover .video-fullscreen-btn {
  opacity: 1;
}

.video-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

/* Fullscreen: contenedor ocupa toda la pantalla */
.viewer-player-wrapper:fullscreen {
  padding-top: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: #000;
}

.viewer-player-wrapper:fullscreen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.viewer-player-wrapper:fullscreen .video-fullscreen-btn {
  bottom: 20px;
  right: 20px;
}

.viewer-placeholder,
.viewer-locked {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 40px;
}

.viewer-placeholder i,
.viewer-locked i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.viewer-locked h3 {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.viewer-locked p {
  font-size: 0.95rem;
  opacity: 0.8;
  max-width: 400px;
  margin-bottom: 16px;
}

.viewer-locked-price {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: #d4a574;
  margin-bottom: 20px;
}

.viewer-locked-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #d4a574;
  color: #3d2306;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.viewer-locked-btn:hover {
  background: #c4955a;
}

.viewer-progress-bar {
  height: 3px;
  background: rgba(112, 59, 51, 0.1);
  border-radius: 2px;
  margin-bottom: 20px;
  overflow: hidden;
}

.viewer-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #703b33, #d4a574);
  width: 0%;
  transition: width 0.5s ease;
}

.viewer-info {
  padding: 0 4px;
}

.viewer-info-module {
  font-size: 0.8rem;
  font-weight: 600;
  color: #d4a574;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.viewer-info-title {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #3d2306;
  margin-bottom: 8px;
}

.viewer-info-desc {
  font-size: 0.95rem;
  color: #6b5a4a;
  line-height: 1.6;
  margin-bottom: 20px;
}

.viewer-nav-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.viewer-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(112, 59, 51, 0.06);
  color: #703b33;
  border: 1px solid rgba(112, 59, 51, 0.15);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.viewer-nav-btn:hover {
  background: rgba(112, 59, 51, 0.12);
}

/* Sidebar */
.viewer-sidebar {
  background: #fff;
  border-left: 1px solid rgba(112, 59, 51, 0.08);
  overflow-y: auto;
  max-height: calc(100vh - 64px);
  position: sticky;
  top: 64px;
}

.viewer-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(112, 59, 51, 0.08);
}

.viewer-sidebar-header h3 {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #3d2306;
}

.sidebar-module-header {
  padding: 12px 20px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #d4a574;
  background: rgba(212, 165, 116, 0.06);
}

.sidebar-video-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.sidebar-video-item:hover {
  background: rgba(112, 59, 51, 0.04);
}

.sidebar-video-item.active {
  background: rgba(112, 59, 51, 0.08);
  border-left: 3px solid #703b33;
}

.sidebar-video-item.locked {
  opacity: 0.55;
}

.sidebar-video-item i {
  font-size: 0.9rem;
  color: #703b33;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-video-item.locked i {
  color: #999;
}

.sidebar-video-info {
  flex: 1;
  min-width: 0;
}

.sidebar-video-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3d2306;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-video-duration {
  font-size: 0.75rem;
  color: #8a7a6a;
}

.sidebar-preview-tag {
  padding: 2px 8px;
  background: rgba(76, 175, 80, 0.1);
  color: #2e7d32;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* ========================================
   EMPTY / LOADING STATES
   ======================================== */
.cursos-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #8a7a6a;
}

.cursos-empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.cursos-empty-state h3 {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.5rem;
  color: #5e4a3a;
  margin-bottom: 8px;
}

.cursos-empty {
  text-align: center;
  color: #8a7a6a;
  padding: 40px;
  font-size: 0.95rem;
}

/* ========================================
   FOOTER (cursos pages)
   ======================================== */
.cursos-footer {
  background: #3d2306;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.85rem;
}

.cursos-footer a {
  color: #d4a574;
  text-decoration: none;
}

/* ========================================
   FORUM Q&A
   ======================================== */
.forum-section {
  border-top: 1px solid rgba(112, 59, 51, 0.1);
  margin-top: 32px;
  padding-top: 32px;
}

.forum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.forum-title {
  font-family: 'Didot', 'Times New Roman', 'Bodoni MT', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #3d2306;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.forum-title i {
  color: #d4a574;
  font-size: 1.1rem;
}

.forum-filter {
  display: flex;
  gap: 4px;
  background: rgba(112, 59, 51, 0.04);
  border-radius: 8px;
  padding: 3px;
}

.forum-filter-btn {
  padding: 7px 16px;
  border: none;
  border-radius: 6px;
  background: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b5a4a;
  cursor: pointer;
  transition: all 0.2s;
}

.forum-filter-btn.active {
  background: #703b33;
  color: #fff;
}

.forum-filter-btn:hover:not(.active) {
  background: rgba(112, 59, 51, 0.08);
}

/* New post area */
.forum-new-post {
  margin-bottom: 24px;
}

.forum-new-post-collapsed {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid rgba(112, 59, 51, 0.12);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 0.9rem;
  color: #8a7a6a;
}

.forum-new-post-collapsed:hover {
  border-color: rgba(112, 59, 51, 0.25);
  box-shadow: 0 2px 8px rgba(112, 59, 51, 0.06);
}

.forum-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #703b33, #d4a574);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.forum-new-post-form {
  background: #fff;
  border: 1px solid rgba(112, 59, 51, 0.15);
  border-radius: 12px;
  padding: 20px;
}

.forum-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(112, 59, 51, 0.2);
  border-radius: 8px;
  font-size: max(16px, 0.95rem);
  font-family: 'DM Sans', sans-serif;
  color: #3d2306;
  margin-bottom: 12px;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.forum-input:focus {
  outline: none;
  border-color: #703b33;
  box-shadow: 0 0 0 3px rgba(112, 59, 51, 0.1);
}

.forum-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(112, 59, 51, 0.2);
  border-radius: 8px;
  font-size: max(16px, 0.95rem);
  font-family: 'DM Sans', sans-serif;
  color: #3d2306;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.forum-textarea:focus {
  outline: none;
  border-color: #703b33;
  box-shadow: 0 0 0 3px rgba(112, 59, 51, 0.1);
}

.forum-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.forum-submit-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, #703b33, #5e2f28);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.forum-submit-btn:hover {
  opacity: 0.9;
}

.forum-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.forum-cancel-btn {
  padding: 10px 20px;
  background: none;
  border: 1px solid rgba(112, 59, 51, 0.2);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6b5a4a;
  cursor: pointer;
  transition: background 0.2s;
}

.forum-cancel-btn:hover {
  background: rgba(112, 59, 51, 0.04);
}

.forum-form-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 8px;
  min-height: 0;
}

/* Post */
.forum-post {
  display: flex;
  gap: 0;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(112, 59, 51, 0.06);
  overflow: hidden;
}

.forum-post-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px 6px;
  min-width: 48px;
  background: rgba(112, 59, 51, 0.02);
}

.forum-vote-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  color: #8a7a6a;
  font-size: 0.85rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.forum-vote-btn:hover {
  background: rgba(112, 59, 51, 0.08);
  color: #703b33;
}

.forum-vote-btn.active {
  color: #703b33;
}

.forum-vote-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: #3d2306;
  line-height: 1;
}

.forum-post-body {
  flex: 1;
  padding: 16px 18px 16px 12px;
  min-width: 0;
}

.forum-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.forum-post-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #703b33, #d4a574);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.forum-post-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: #3d2306;
}

.forum-post-time {
  font-size: 0.8rem;
  color: #8a7a6a;
}

.forum-badge-pinned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(212, 165, 116, 0.15);
  color: #8a6d3b;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.forum-badge-instructor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #703b33;
  color: #fff;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.forum-post-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #3d2306;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.forum-post-content {
  font-size: 0.9rem;
  color: #5e4a3a;
  line-height: 1.6;
  margin: 0;
  word-break: break-word;
}

.forum-post-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.forum-reply-toggle {
  background: none;
  border: none;
  color: #703b33;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: opacity 0.2s;
}

.forum-reply-toggle:hover {
  opacity: 0.75;
}

.forum-admin-btn {
  background: none;
  border: none;
  color: #8a7a6a;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  display: none;
}

.forum-admin-visible .forum-admin-btn {
  display: inline-flex;
}

.forum-admin-btn:hover {
  color: #703b33;
  background: rgba(112, 59, 51, 0.06);
}

.forum-admin-btn.active-pin {
  color: #d4a574;
}

.forum-admin-btn.active-instructor {
  color: #703b33;
}

.forum-delete-btn {
  background: none;
  border: none;
  color: #8a7a6a;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.forum-delete-btn:hover {
  color: #c0392b;
  background: rgba(192, 57, 43, 0.06);
}

/* Replies */
.forum-replies {
  margin-left: 56px;
  margin-bottom: 12px;
}

.forum-reply {
  display: flex;
  gap: 0;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(112, 59, 51, 0.05);
  overflow: hidden;
}

.forum-reply .forum-post-vote {
  min-width: 40px;
  padding: 12px 4px;
}

.forum-reply .forum-post-body {
  padding: 12px 14px 12px 8px;
}

.forum-reply .forum-post-avatar {
  width: 24px;
  height: 24px;
  font-size: 0.65rem;
}

.forum-reply-form {
  background: #fff;
  border: 1px solid rgba(112, 59, 51, 0.12);
  border-radius: 10px;
  padding: 14px;
  margin-top: 8px;
}

.forum-reply-form .forum-textarea {
  min-height: 60px;
  margin-bottom: 0;
}

.forum-reply-form .forum-form-actions {
  margin-top: 10px;
}

/* Load more */
.forum-load-more {
  width: 100%;
  padding: 12px;
  background: none;
  border: 1px solid rgba(112, 59, 51, 0.15);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #703b33;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

.forum-load-more:hover {
  background: rgba(112, 59, 51, 0.04);
}

/* Empty state */
.forum-empty {
  text-align: center;
  padding: 48px 20px;
  color: #8a7a6a;
}

.forum-empty i {
  font-size: 2.5rem;
  opacity: 0.25;
  display: block;
  margin-bottom: 12px;
}

.forum-empty p {
  margin: 0;
  font-size: 0.95rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .viewer-layout {
    grid-template-columns: 1fr;
  }

  .viewer-sidebar {
    position: static;
    max-height: none;
    border-left: none;
    border-top: 1px solid rgba(112, 59, 51, 0.08);
  }

  .curso-detail-header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cursos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .cursos-hero {
    padding: 50px 0 40px;
  }

  .cursos-hero-stats {
    gap: 24px;
  }

  .cursos-hero-stat-value {
    font-size: 1.5rem;
  }

  .cursos-nav-link {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .auth-modal-content {
    padding: 32px 24px;
    width: 95%;
  }

  .viewer-main {
    padding: 16px;
  }

  .viewer-info-title {
    font-size: 1.3rem;
  }

  .cursos-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .curso-detail-price-box {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .forum-replies {
    margin-left: 16px;
  }

  .forum-post-vote {
    min-width: 40px;
    padding: 12px 4px;
  }

  .forum-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .cursos-hero h1 {
    font-size: 1.8rem;
  }

  .cursos-hero-stats {
    flex-direction: column;
    gap: 12px;
  }

  .cursos-nav-inner {
    height: 56px;
  }

  .cursos-nav-links {
    gap: 4px;
  }

  .cursos-login-btn {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}
