/* ============================================
   CONTACT FORM 7 - INVESTMENT FORM STYLES v5
   FONT: MANROPE REGULAR
   COMPATIBLE CON ESTRUCTURA REAL DE CF7
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

/* Container principal */
.investment-form-wrapper {
  max-width: 100%;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
}

/* ============================================
   TÍTULOS
   ============================================ */

.investment-form-title {
  font-family: Georgia, "Garamond", serif;
  font-size: 2.5rem;
  font-weight: 400;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.investment-form-subtitle {
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  text-align: center;
  color: #666;
  margin-bottom: 3rem;
  font-size: 1rem;
}

/* ============================================
   FIELDSETS
   ============================================ */

.investment-fieldset {
  border: none;
  padding: 2rem 0;
  margin: 0;
}

.investment-fieldset legend {
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #333;
  margin-bottom: 1.5rem;
  display: block;
  width: 100%;
}

/* ============================================
   RADIO BUTTONS - CONTENEDOR
   ============================================ */

.investment-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
}

/* Versión centrada (sin iconos) */
.investment-radio-group-centered {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
}

/* Fieldset dentro del contenedor (CF7 lo genera automáticamente) */
.investment-radio-group fieldset {
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.investment-radio-group legend {
  display: none;
}

/* Cada item de radio */
.investment-radio-group label {
  font-family: 'Manrope', sans-serif;
  flex: 0 0 calc(20% - 1rem);
  min-width: 140px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 1.25rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 0.95rem;
  color: #333;
  min-height: auto;
  margin: 0;
  font-weight: 400;
}

.investment-radio-group label:hover {
  border-color: #999;
  background-color: #f9f9f9;
}

/* Input radio invisible */
.investment-radio-group input[type="radio"] {
  display: none !important;
}

/* Label text dentro del label */
.investment-radio-group .wpcf7-list-item-label {
  display: block;
  font-size: 0.95rem;
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
}

/* Cuando está checked */
.investment-radio-group input[type="radio"]:checked + .wpcf7-list-item-label {
  font-weight: 500;
}

.investment-radio-group input[type="radio"]:checked ~ .wpcf7-list-item-label {
  font-weight: 500;
}

/* Estilo del label cuando el radio adentro está checked */
.investment-radio-group label:has(input[type="radio"]:checked) {
  border-color: #333;
  background-color: #f0f0f0;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   ICONOS EN RADIO BUTTONS - POR VALOR
   ============================================ */

/* Iconos como pseudo-elemento antes del label */
.investment-radio-group label::before {
  content: "";
  width: 28px;
  height: 28px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
  flex-shrink: 0;
  order: -1;
}

/* Cattle */
.investment-radio-group input[value="Cattle"] + .wpcf7-list-item-label::before,
.investment-radio-group label:has(input[value="Cattle"])::before {
  background-image: url('/wp-content/themes/Divi_child/assets/images/icons/cattle.svg');
}

/* Crops */
.investment-radio-group input[value="Crops"] + .wpcf7-list-item-label::before,
.investment-radio-group label:has(input[value="Crops"])::before {
  background-image: url('/wp-content/themes/Divi_child/assets/images/icons/crops.svg');
}

/* Dairy */
.investment-radio-group input[value="Dairy"] + .wpcf7-list-item-label::before,
.investment-radio-group label:has(input[value="Dairy"])::before {
  background-image: url('/wp-content/themes/Divi_child/assets/images/icons/dairy.svg');
}

/* Forestry */
.investment-radio-group input[value="Forestry"] + .wpcf7-list-item-label::before,
.investment-radio-group label:has(input[value="Forestry"])::before {
  background-image: url('/wp-content/themes/Divi_child/assets/images/icons/forest.svg');
}

/* Diversified */
.investment-radio-group input[value="Diversified"] + .wpcf7-list-item-label::before,
.investment-radio-group label:has(input[value="Diversified"])::before {
  background-image: url('/wp-content/themes/Divi_child/assets/images/icons/diversified.svg');
}

/* Not sure */
.investment-radio-group input[value="Not sure"] + .wpcf7-list-item-label::before,
.investment-radio-group label:has(input[value="Not sure"])::before {
  background-image: url('/wp-content/themes/Divi_child/assets/images/icons/not_shure.svg');
}

/* ============================================
   OCULTAR ICONOS PARA INVESTMENT-SIZE + CENTRAR TEXTO
   ============================================ */

.investment-radio-group input[value="Under 1M"]::before,
.investment-radio-group input[value="1M - 5M"]::before,
.investment-radio-group input[value="5M - 20M"]::before,
.investment-radio-group input[value="Above 20M"]::before {
  display: none !important;
}

.investment-radio-group label:has(input[value="Under 1M"])::before,
.investment-radio-group label:has(input[value="1M - 5M"])::before,
.investment-radio-group label:has(input[value="5M - 20M"])::before,
.investment-radio-group label:has(input[value="Above 20M"])::before {
  display: none !important;
}

/* Estilos centrados para radios sin iconos */
.investment-radio-group label:has(input[value="Under 1M"]),
.investment-radio-group label:has(input[value="1M - 5M"]),
.investment-radio-group label:has(input[value="5M - 20M"]),
.investment-radio-group label:has(input[value="Above 20M"]) {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  padding: 1.5rem 1rem;
}

/* ============================================
   RESPONSIVE RADIO BUTTONS
   ============================================ */

@media (max-width: 1200px) {
  .investment-radio-group label {
	flex: 0 0 calc(25% - 1rem);
  }
}

@media (max-width: 1024px) {
  .investment-radio-group label {
	flex: 0 0 calc(33.333% - 1rem);
  }
}

@media (max-width: 768px) {
  .investment-radio-group label {
	flex: 0 0 calc(50% - 0.5rem);
	padding: 1rem;
	font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .investment-radio-group label {
	flex: 0 0 100%;
	padding: 0.85rem;
	font-size: 0.85rem;
  }
}

/* ============================================
   DROPDOWNS (SELECT)
   ============================================ */

.investment-select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .investment-select-row {
	grid-template-columns: 1fr;
	gap: 1.5rem;
  }
}

.investment-select-group {
  display: flex;
  flex-direction: column;
}

.investment-select-group label {
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #333;
  margin-bottom: 0.5rem;
}

.investment-select-group select {
  font-family: 'Manrope', sans-serif;
  padding: 0.75rem 0.5rem;
  border: none;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background-color: transparent;
  font-size: 1rem;
  color: #333;
  cursor: pointer;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right center;
  padding-right: 2rem;
  transition: border-color 0.2s ease;
  font-weight: 400;
}

.investment-select-group select:hover {
  border-bottom-color: #999;
}

.investment-select-group select:focus {
  outline: none;
  border-bottom-color: #333;
}

/* ============================================
   TEXTAREA
   ============================================ */

.investment-textarea-group {
  margin: 2rem 0;
}

.investment-textarea-group label {
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #333;
  display: block;
  margin-bottom: 1rem;
}

.investment-textarea-group textarea {
  font-family: 'Manrope', sans-serif;
  width: 100%;
  min-height: 120px;
  padding: 1rem 0;
  border: none;
  border-bottom: 1px solid #ddd;
  background-color: transparent;
  font-size: 1rem;
  color: #333;
  resize: vertical;
  transition: border-color 0.2s ease;
  font-weight: 400;
}

.investment-textarea-group textarea::placeholder {
  color: #999;
  font-weight: 400;
}

.investment-textarea-group textarea:hover {
  border-bottom-color: #999;
}

.investment-textarea-group textarea:focus {
  outline: none;
  border-bottom-color: #333;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.investment-submit-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.investment-btn {
  font-family: 'Manrope', sans-serif;
  background-color: #1a1a1a;
  color: white;
  padding: 1rem 2.5rem;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.investment-btn:hover {
  background-color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.investment-btn:active {
  transform: translateY(1px);
}

/* ============================================
   VALIDACIÓN
   ============================================ */

.wpcf7-form-control.wpcf7-not-valid {
  border-color: #dc3545 !important;
}

.wpcf7-form span.wpcf7-not-valid-tip {
  font-family: 'Manrope', sans-serif;
  color: #dc3545;
  font-size: 0.85rem;
  display: block;
  margin-top: 0.3rem;
}

/* ============================================
   MENSAJES
   ============================================ */

.wpcf7-mail-sent-ok {
  font-family: 'Manrope', sans-serif;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.wpcf7-mail-sent-ng {
  font-family: 'Manrope', sans-serif;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

/* ============================================
   RESPONSIVE - TÍTULOS Y GENERAL
   ============================================ */

@media (max-width: 768px) {
  .investment-form-title {
	font-size: 2rem;
  }

  .investment-fieldset {
	padding: 1.5rem 0;
  }
}

/* ============================================
   ANIMACIONES
   ============================================ */

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

.investment-form-wrapper {
  animation: fadeIn 0.4s ease;
}