/* ============================================
   WINVEST CURSOS - Estilos
   ============================================ */

/* Variáveis */
:root {
  --wc-primary: #0b3a6d;
  --wc-primary-dark: #072948;
  --wc-accent: #f05a28;
  --wc-bg: #f2f4f8;
  --wc-card-bg: #ffffff;
  --wc-text: #212529;
  --wc-text-muted: #5a6573;
  --wc-border: #d7dde5;
  --wc-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  --wc-shadow-hover: 0 12px 28px rgba(15, 23, 42, 0.12);
  --wc-radius: 12px;
  --wc-radius-sm: 8px;
}

/* Container */
.wc-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Breadcrumb */
.wc-breadcrumb {
  padding: 1.25rem 0 0.5rem;
  font-size: 0.875rem;
  color: var(--wc-text-muted);
}

.wc-breadcrumb a {
  color: var(--wc-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.wc-breadcrumb a:hover {
  color: var(--wc-primary-dark);
  text-decoration: underline;
}

.wc-breadcrumb span[aria-hidden] {
  margin: 0 0.5rem;
}

/* ============================================
   PÁGINA DE LISTAGEM
   ============================================ */

.wc-page {
  background: var(--wc-bg);
  min-height: 60vh;
  padding-bottom: 3rem;
}

/* Hero da página */
.winvest-cursos-page {
  background:
    radial-gradient(circle at 8% 12%, rgba(11, 58, 109, 0.16), transparent 45%),
    radial-gradient(circle at 92% 8%, rgba(240, 90, 40, 0.14), transparent 40%),
    linear-gradient(180deg, #e9eef6 0%, #f4f6fb 42%, var(--wc-bg) 100%);
  color: var(--wc-text);
}

.wc-hero {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3.5rem);
}

.wc-hero__content {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

@media (min-width: 992px) {
  .wc-hero__content {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  }
}

.wc-hero__text {
  display: grid;
  gap: 1rem;
  max-width: 56ch;
}

.wc-hero__eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(11, 58, 109, 0.85);
}

.wc-hero__title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #0b1c33;
  line-height: 1.12;
}

.wc-hero__subtitle {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(11, 28, 51, 0.72);
}

.wc-hero__cta {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--wc-primary) 0%, #124a8b 55%, #1a6fb6 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 14px 26px rgba(11, 58, 109, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wc-hero__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(11, 58, 109, 0.3);
}

.wc-hero__highlights {
  display: grid;
  gap: 1rem;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.9) 0%, rgba(239, 244, 255, 0.9) 100%);
  border: 1px solid rgba(11, 58, 109, 0.12);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 18px 34px rgba(11, 58, 109, 0.14);
}

.wc-hero__highlight {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
}

.wc-hero__highlight strong {
  display: block;
  font-size: 0.95rem;
  color: #0b1c33;
  margin-bottom: 0.2rem;
}

.wc-hero__highlight span {
  color: rgba(11, 28, 51, 0.66);
  font-size: 0.9rem;
  line-height: 1.5;
}

.wc-hero__bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wc-accent), #f79b7b);
  margin-top: 0.35rem;
  box-shadow: 0 0 0 4px rgba(240, 90, 40, 0.18);
}

.wc-header {
  text-align: center;
  padding: 2rem 0 3rem;
}

.wc-page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--wc-text);
  margin-bottom: 0.5rem;
}

.wc-page-subtitle {
  font-size: 1.125rem;
  color: var(--wc-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Section em flatpages */
.wc-modulos-section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, var(--wc-bg) 65%);
}

.wc-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #0b1c33;
}

.wc-section-subtitle {
  text-align: center;
  color: var(--wc-text-muted);
  margin-bottom: 2rem;
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.wc-intro {
  padding: 0 0 1.5rem;
}

.wc-intro .wc-container {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95) 0%, rgba(235, 242, 255, 0.9) 100%);
  border: 1px solid rgba(11, 58, 109, 0.12);
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 16px 30px rgba(11, 58, 109, 0.14);
}

.wc-intro h1,
.wc-intro h2,
.wc-intro h3 {
  color: #0b1c33;
  margin-top: 0;
}

.wc-intro p {
  color: rgba(11, 28, 51, 0.72);
  line-height: 1.7;
}

/* Grid de módulos */
.wc-modulos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Card de módulo */
.wc-modulo-card {
  background: var(--wc-card-bg);
  border-radius: var(--wc-radius);
  overflow: hidden;
  border: 1px solid rgba(11, 58, 109, 0.12);
  box-shadow: var(--wc-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.wc-modulo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--wc-shadow-hover);
}

.wc-modulo-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.wc-modulo-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 0;
}

.wc-modulo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.wc-modulo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--wc-primary) 0%, var(--wc-primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
}

.wc-modulo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.wc-modulo-card:hover .wc-modulo-overlay {
  opacity: 1;
}

.wc-modulo-play {
  width: 56px;
  height: 56px;
  background: var(--wc-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transform: scale(0.8);
  transition: transform 0.3s;
}

.wc-modulo-card:hover .wc-modulo-play {
  transform: scale(1);
}

.wc-modulo-content {
  padding: 1.25rem;
  display: grid;
  gap: 0.5rem;
}

.wc-modulo-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--wc-text);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.wc-modulo-desc {
  font-size: 0.875rem;
  color: var(--wc-text-muted);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}

.wc-modulo-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--wc-text-muted);
  flex-wrap: wrap;
}

.wc-modulo-aulas,
.wc-modulo-duracao {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.wc-modulo-aulas svg,
.wc-modulo-duracao svg {
  opacity: 0.7;
}

/* Estado vazio */
.wc-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--wc-text-muted);
}

.wc-empty svg {
  opacity: 0.3;
  margin-bottom: 1rem;
}

.wc-empty h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--wc-text);
}

/* ============================================
   PÁGINA DE MÓDULO (DETALHE)
   ============================================ */

.wc-modulo-page {
  background: var(--wc-bg);
  min-height: 80vh;
  padding-bottom: 3rem;
}

.wc-modulo-header {
  padding: 1rem 0 2rem;
}

.wc-modulo-page-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--wc-text);
  margin: 0 0 0.5rem;
}

.wc-modulo-page-desc {
  color: var(--wc-text-muted);
  font-size: 1rem;
  margin: 0;
  max-width: 800px;
}

/* Layout player + sidebar */
.wc-modulo-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .wc-modulo-layout {
    grid-template-columns: 1fr;
  }
}

/* Área do player */
.wc-player-area {
  background: var(--wc-card-bg);
  border-radius: var(--wc-radius);
  overflow: hidden;
  box-shadow: var(--wc-shadow);
}

.wc-player-wrapper {
  background: #000;
}

.wc-player-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}

.wc-player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Info da aula atual */
.wc-aula-info {
  padding: 1.5rem;
}

.wc-aula-position {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.wc-aula-badge {
  background: var(--wc-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.wc-aula-duracao {
  font-size: 0.875rem;
  color: var(--wc-text-muted);
}

.wc-aula-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--wc-text);
  margin: 0 0 1rem;
}

.wc-aula-resumo {
  font-size: 0.9375rem;
  color: var(--wc-text-muted);
  line-height: 1.6;
}

.wc-aula-resumo p {
  margin: 0 0 0.75rem;
}

.wc-aula-resumo p:last-child {
  margin-bottom: 0;
}

/* Navegação entre aulas */
.wc-aula-nav {
  display: flex;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--wc-border);
  gap: 1rem;
}

.wc-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: var(--wc-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.wc-nav-btn:not(.is-disabled) {
  background: var(--wc-primary);
  color: white;
}

.wc-nav-btn:not(.is-disabled):hover {
  background: var(--wc-primary-dark);
}

.wc-nav-btn.is-disabled {
  background: var(--wc-border);
  color: var(--wc-text-muted);
  cursor: not-allowed;
}

/* Sidebar de aulas */
.wc-aulas-sidebar {
  background: var(--wc-card-bg);
  border-radius: var(--wc-radius);
  overflow: hidden;
  box-shadow: var(--wc-shadow);
  max-height: calc(100vh - 200px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 100px;
}

@media (max-width: 1024px) {
  .wc-aulas-sidebar {
    position: static;
    max-height: 500px;
  }
}

.wc-aulas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--wc-border);
  background: var(--wc-card-bg);
}

.wc-aulas-sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wc-text);
  margin: 0;
}

.wc-aulas-count {
  font-size: 0.8125rem;
  color: var(--wc-text-muted);
}

.wc-aulas-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.wc-aula-item {
  border-bottom: 1px solid var(--wc-border);
}

.wc-aula-item:last-child {
  border-bottom: none;
}

.wc-aula-link {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.wc-aula-link:hover {
  background: rgba(0, 0, 0, 0.03);
}

.wc-aula-item.is-active .wc-aula-link {
  background: rgba(26, 95, 122, 0.08);
}

.wc-aula-thumb {
  position: relative;
  width: 100px;
  min-width: 100px;
  aspect-ratio: 16 / 9;
  border-radius: var(--wc-radius-sm);
  overflow: hidden;
  margin: 0;
}

.wc-aula-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wc-aula-playing {
  position: absolute;
  inset: 0;
  background: rgba(196, 48, 43, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.wc-aula-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
}

.wc-aula-number {
  font-size: 0.75rem;
  color: var(--wc-text-muted);
  font-weight: 500;
}

.wc-aula-name {
  font-size: 0.875rem;
  color: var(--wc-text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wc-aula-item.is-active .wc-aula-name {
  font-weight: 600;
  color: var(--wc-primary);
}

.wc-aula-time {
  font-size: 0.75rem;
  color: var(--wc-text-muted);
}

.wc-aula-empty {
  padding: 2rem;
  text-align: center;
  color: var(--wc-text-muted);
  font-size: 0.875rem;
}

/* Ementa */
.wc-ementa {
  margin-top: 2rem;
  background: var(--wc-card-bg);
  border-radius: var(--wc-radius);
  padding: 1.5rem;
  box-shadow: var(--wc-shadow);
}

.wc-ementa-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--wc-text);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--wc-border);
}

.wc-ementa-content {
  font-size: 0.9375rem;
  color: var(--wc-text-muted);
  line-height: 1.7;
}

.wc-ementa-content p {
  margin: 0 0 0.75rem;
}

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

/* Estado sem aulas */
.wc-no-aulas {
  padding: 3rem;
  text-align: center;
  color: var(--wc-text-muted);
}
