/* Configuración de la fuente Rounded Elegance */
@font-face {
  font-family: 'Rounded Elegance';
  /* Ruta relativa: desde static/css/style.css sube un nivel hacia fonts/ */
  src: url('./fonts/Rounded_Elegance.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #a4c635;
  --primary-dark: #8ea82d;
  --primary-light: rgba(164, 198, 53, 0.15);

  /* Los botones y pasos ahora usan el verde de AgroCognitive */
  --primary-btn-bg-color: #a4c635;
  --primary-btn-bg-hover: #8ea82d;

  --main-color: #a4c635;
  --containers-color: #ffffff;
  --main-bg-color: #ffffff;
  --icono-font-size: 15px;

  /* Fondo transparente para acoplarse al fondo de Astro */
  --background: transparent;
  --text: #374151;
  --heading: #1f2937;
  --border: #e5e7eb;
}

/* Permitir que la tarjeta de la calculadora use el 100% del iframe disponible */
.container {
    max-width: 1200px !important; /* o 100% si prefieres fluida */
    width: 100% !important;
}

.shadow-card, .card {
    max-width: 100% !important;
    width: 100% !important;
}
/* Aplicación obligatoria de la fuente a todos los textos */
*,
html,
body,
h1, h2, h3, h4, h5, h6,
p, span, div, a, button, input, select, textarea, label {
  font-family: 'Rounded Elegance', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

body {
  background: var(--background);
  color: var(--text);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
/* Eliminar espacios vacíos al final de la calculadora */
body, main {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.shadow-card {
    margin-bottom: 10px !important;
}

.container.py-5 {
    padding-bottom: 0.5rem !important;
}

.title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--heading);
}

.subtitle {
  color: #6b7280;
  margin-bottom: 30px;
}

.shadow-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 35px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.btn-agro {
  background: var(--primary-btn-bg-color) !important;
  color: white !important;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}

.btn-agro:hover {
  background: var(--primary-btn-bg-hover) !important;
  color: white !important;
  transform: translateY(-1px);
}

.btn-agro:focus,
.btn-agro:active {
  box-shadow: 0 0 0 3px var(--primary-light) !important;
  outline: none;
}

.step-trigger {
  border: none !important;
  box-shadow: none !important;
}

.step-trigger:focus {
  outline: none !important;
}

.bs-stepper-circle {
  background: #e5e7eb !important;
  color: #6b7280 !important;
  width: 32px;
  height: 32px;
  font-size: 14px;
  line-height: 32px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border-radius: 50%;
  transition: background 0.3s ease;
}

/* El paso activo toma el verde con halo translúcido */
.step.active .bs-stepper-circle {
  background: var(--primary) !important;
  color: white !important;
  box-shadow: 0 0 0 4px var(--primary-light) !important;
}

.step.completed .bs-stepper-circle {
  background: var(--primary) !important;
  color: white !important;
}

.bs-stepper-label {
  font-weight: 600;
  font-size: 12px;
  color: #6b7280;
}

.step.active .bs-stepper-label {
  color: var(--heading);
  font-weight: 700;
}

.bs-stepper-header {
  justify-content: center;
  gap: 0;
}

.bs-stepper-header .step {
  flex: 0 1 auto;
}

.bs-stepper-header .line {
  flex: 0 1 30px;
  background-color: var(--border);
  height: 2px;
}

.bs-stepper-content {
  overflow-y: visible;
}

.bs-stepper-content::-webkit-scrollbar {
  width: 6px;
}

.bs-stepper-content::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

.bs-stepper .content {
  transition: opacity 0.3s ease;
}

.bs-stepper .content:not(.active) {
  display: none;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.lang-toggle:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(164, 198, 53, 0.25);
}

.lang-flag {
  font-size: 18px;
  line-height: 1;
}

.lang-text {
  letter-spacing: 0.5px;
}

#investmentBreakdown {
  animation: slideDown 0.4s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem var(--primary-light);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .shadow-card {
    padding: 20px;
    border-radius: 14px;
  }

  .bs-stepper-header {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .bs-stepper-header::-webkit-scrollbar {
    display: none;
  }

  .bs-stepper-label {
    font-size: 10px;
    white-space: nowrap;
  }

  .bs-stepper-circle {
    width: 30px;
    height: 30px;
    font-size: 13px;
    line-height: 30px;
  }

  .line {
    flex: 0 0 auto;
    min-width: 8px;
    max-width: 15px;
  }

  .step {
    flex-shrink: 0;
  }

  h2, h3 {
    font-size: 1.3rem;
  }

  .container.py-5 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 576px) {
  .shadow-card {
    padding: 15px;
    border-radius: 12px;
  }

  .bs-stepper-label {
    font-size: 9px;
  }

  .bs-stepper-circle {
    width: 26px;
    height: 26px;
    font-size: 11px;
    line-height: 26px;
  }

  .bs-stepper-content {
    max-height: none;
    overflow-y: visible;
  }

  .title {
    font-size: 1.6rem;
  }

  h2, h3 {
    font-size: 1.15rem;
  }

  #moneyLeft {
    font-size: 1.6rem !important;
  }

  #fomoChart {
    height: auto !important;
    min-height: 150px;
  }

  .card-body.py-4 {
    padding: 0.75rem !important;
  }

  .card-body.py-5 {
    padding: 1.25rem !important;
  }

  .subtitle {
    font-size: 0.85rem;
    margin-bottom: 15px;
  }

  .form-control, .form-select {
    font-size: 14px;
    border-radius: 8px;
  }

  .btn {
    font-size: 13px;
  }
}