/* ==========================================================================
   NOVA TRADING INSTITUTE - COMPONENTS STYLESHEET (components.css)
   Tarjetas, calculadoras, acordeones, modales, widgets y componentes UI
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO SECTION & COMPONENTES PRINCIPALES
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 80px 0 60px 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0) 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-brand), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-family-mono);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Card gráfica del Hero */
.hero-preview-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.hero-preview-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-brand), transparent);
}

/* --------------------------------------------------------------------------
   2. TARJETAS DE MÓDULOS Y CURSOS
   -------------------------------------------------------------------------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 28px;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--color-brand);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   3. CALCULADORA DE RIESGO WIDGET
   -------------------------------------------------------------------------- */
.calculator-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-family-sans);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.calc-results {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.95rem;
}

.calc-row:last-child {
  border-bottom: none;
}

.calc-val-highlight {
  font-family: var(--font-family-mono);
  font-weight: 700;
  color: var(--color-brand);
}

/* --------------------------------------------------------------------------
   4. ACORDEÓN PARA FAQS Y MÓDULOS
   -------------------------------------------------------------------------- */
.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.accordion-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background-color: var(--bg-card-hover);
}

.accordion-icon {
  transition: transform 0.3s ease;
  color: var(--color-accent);
}

.accordion-item.is-open .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 24px 24px 24px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: none;
}

.accordion-item.is-open .accordion-content {
  display: block;
}

/* --------------------------------------------------------------------------
   5. RESPONSIVE COMPONENTES
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
}
