/**
 * Estilos para la página de detalle del curso
 * Instituto Jiménez - Cursos Libres
 */

/* ===== Hero del curso ===== */
.curso-hero {
  position: relative;
  min-height: 60vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: center/cover no-repeat;

}

.curso-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.85));
  z-index: 1;
}

.curso-hero .hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 40px 0;
  animation: rise 0.8s ease both;
}

.curso-hero .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

.curso-hero .back-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-4px);
}

.curso-hero .eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.curso-hero h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  margin: 12px 0 16px;
  font-weight: 300;
  color: white;
  line-height: 1.2;
}

.curso-hero .lead {
  font-size: clamp(1rem, 1.5vw + 0.5rem, 1.3rem);
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
  max-width: 80ch;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.hero-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-meta .meta-item svg {
  flex-shrink: 0;
  color: var(--secondary-1);
}

.hero-meta .meta-item.price {
  background: var(--brand);
  font-size: 1.2rem;
  font-weight: 800;
}

/* ===== Contenido del curso ===== */
.curso-content {
  padding: 60px 0;
  background: #f8f9fa;
}

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

/* ===== Columna principal ===== */
.main-column {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.content-section {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  animation: fade 0.5s ease both;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--brand);
}

.section-title svg {
  color: var(--brand);
  flex-shrink: 0;
}

.section-content {
  color: #333;
  line-height: 1.8;
  font-size: 1.05rem;
}

.section-content p {
  margin-bottom: 16px;
}

.section-content p:last-child {
  margin-bottom: 0;
}

/* ===== Lista de habilidades ===== */
.habilidades-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.habilidades-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid var(--brand);
  transition: all var(--transition-fast);
}

.habilidades-list li:hover {
  background: #e9ecef;
  transform: translateX(4px);
}

.habilidades-list li svg {
  color: var(--brand);
  flex-shrink: 0;
}

.habilidades-list li span {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

/* ===== Lista de contenidos ===== */
.contenidos-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contenidos-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
  transition: all var(--transition-fast);
}

.contenidos-list li:hover {
  background: white;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.contenido-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.contenido-info svg {
  color: var(--brand);
  flex-shrink: 0;
}

.contenido-info span:first-of-type {
  font-weight: 600;
  color: #333;
  flex: 1;
}

.contenido-tipo {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(0, 108, 182, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--brand);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-download:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 108, 182, 0.3);
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-card,
.related-card {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  animation: fade 0.5s ease both;
}

.contact-card h3,
.related-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.contact-card p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-whatsapp {
  background: #25D366;
  color: white;
  width: 100%;
  justify-content: center;
}

.btn-whatsapp:hover {
  background: #20BA5A;
}

.btn-email {
  background: var(--brand);
  color: white;
  width: 100%;
  justify-content: center;
}

.btn-email:hover {
  background: var(--brand-hover);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #666;
  font-size: 0.9rem;
}

.info-item svg {
  color: var(--brand);
  flex-shrink: 0;
}

.related-card .btn-secondary {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sidebar {
    position: static;
    order: -1;
  }

  .contact-card {
    background: var(--brand);
    color: white;
  }

  .contact-card h3 {
    color: white;
  }

  .contact-card p {
    color: rgba(255, 255, 255, 0.9);
  }

  .contact-info {
    border-top-color: rgba(255, 255, 255, 0.2);
  }

  .info-item {
    color: rgba(255, 255, 255, 0.9);
  }

  .info-item svg {
    color: var(--secondary-1);
  }
}

@media (max-width: 768px) {
  .curso-hero {
    min-height: 50vh;
  }

  .curso-content {
    padding: 40px 0;
  }

  .content-section {
    padding: 24px 20px;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .section-content {
    font-size: 1rem;
  }

  .habilidades-list {
    grid-template-columns: 1fr;
  }

  .contenidos-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
  }

  .hero-meta {
    gap: 12px;
  }

  .hero-meta .meta-item {
    font-size: 0.9rem;
    padding: 8px 12px;
  }
}

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

  .curso-hero .lead {
    font-size: 1rem;
  }

  .content-section {
    padding: 20px 16px;
  }

  .section-title {
    font-size: 1.2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .contact-card,
  .related-card {
    padding: 20px;
  }
}
