/* ==========================================
   ESTILOS BASE DEL FORMULARIO
   ========================================== */

/* Contenedores principales */
#edit-content-left,
#edit-content-right {
  display: flex;
  flex-direction: column;
}

.content.block-content form{
  margin-top: -25px
}

/* ==========================================
   CAMPOS DE ENTRADA (INPUTS Y SELECTS)
   ========================================== */

.content.block-content input,
.content.block-contentinput,
.content.block-content select,
.content.block-contentselect {
  max-height: 35px;
  border-radius: 15px;
  border: 1px solid #4547ef;
  margin: 0;
  color: #000;
  padding: 8px 15px;
  width: 100%;
  box-sizing: border-box;
  font-size: 12px;
}

/* Textarea */
.content.block-content textarea,
.content.block-contenttextarea {
  border-radius: 15px;
  border: 1px solid #4547ef;
  padding: 10px 15px;
  width: 100%;
  box-sizing: border-box;
  min-height: 80px;
  font-size: 14px;
  resize: vertical;
}

/* ==========================================
   ESPACIADO Y ESTRUCTURA
   ========================================== */

.webform-flex--container {
  margin: 5px 4px 0;
}

#edit-pais--wrapper {
  margin-top: -20px;
}

#edit-flexbox-one {
  max-height: 14rem;
}

.webform-submission-form .form-item {
  margin-bottom: 0;
}

form .form-item label {
  margin-top: 2px;
  font-size: 14px;
  color: #333;
  font-weight: 500;
  text-transform: none !important;
}

#edit-texto-descriptivo {
  height: 62px;
}

/* ==========================================
   BOTÓN DE ENVÍO
   ========================================== */

#edit-actions-submit {
  width: 100%;
  padding: 10px 0 20px;
  color: #fff !important;
  min-height: 43px;
  border-radius: 15px;
  background-color: #4547ef;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

#edit-actions-submit:hover {
  background-color: #3335cd;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(69, 71, 239, 0.3);
}

/* ==========================================
   SECCIÓN LEGAL
   ========================================== */

#edit-content-legal > div > div > div > label {
  display: none;
}

#edit-content-legal > div > div > div {
  display: flex;
  margin-top: 20px;
  align-items: flex-start;
}

#edit-content-legal > div > div > div > div {
  font-size: 11px;
  line-height: 140%;
  width: 90%;
  color: #666;
}

#edit-legal--description > p {
  color: #000;
  font-size: 12px;
  line-height: 1.5;
}

#edit-legal--description > p > a {
  color: #4547ef !important;
  text-decoration: underline;
  font-weight: 500;
}

#edit-legal {
  max-width: 25px;
  min-width: 20px;
  cursor: pointer;
}

/* ==========================================
   OTROS ELEMENTOS
   ========================================== */

.widget.gsc-block-drupal {
  margin: 0;
}

/* Imagen del formulario */
.widget.gsc-image.text-none {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;
}

.widget.gsc-image.text-none img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================
   COLUMNAS DEL GRID
   ========================================== */

.gsc-column.el-59798554 {
  padding: 15px;
  box-sizing: border-box;
}

/* Desktop y pantallas grandes */
.col-xxl-5,
.col-xl-5 {
  width: 41.666667%;
  float: left;
}

/* Tablets grandes y laptops pequeñas */
.col-lg-5 {
  width: 41.666667%;
  float: left;
}

/* Tablets */
.col-md-5 {
  width: 41.666667%;
  float: left;
}

@media (min-width: 768px) {
    .col-md-7 {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
      
    }
}

/* ==========================================
   RESPONSIVE - TABLETS (768px - 1023px)
   ========================================== */

@media screen and (max-width: 1023px) and (min-width: 768px) {
  #edit-flexbox-one {
    max-height: 18rem;
  }

  #edit-content-legal > div > div > div > div {
    font-size: 10.5px;
    width: 92%;
  }

  form .form-item label {
    font-size: 13px;
  }

  /* Ajuste de imagen en tablets */
  .widget.gsc-image.text-none {
    padding: 15px 0;
    margin: 10px auto;
    max-width: 60%;
  }

  .widget.gsc-image.text-none img {
    max-width: 100%;
    height: auto;
  }

  /* Columna en tablets */
  .gsc-column.el-59798554 {
    padding: 10px;
  }
}

/* ==========================================
   RESPONSIVE - TABLETS MEDIANAS (992px - 1200px)
   ========================================== */

@media screen and (max-width: 1200px) and (min-width: 992px) {
  /* Ajuste de imagen en tablets medianas */
  .widget.gsc-image.text-none {
    padding: 15px 0;
    margin: 10px auto;
    max-width: 70%;
  }

  .widget.gsc-image.text-none img {
    max-width: 100%;
    height: auto;
  }

  /* Columna en tablets medianas */
  .gsc-column.el-59798554 {
    padding: 12px;
  }
}

/* ==========================================
   RESPONSIVE - TABLETS (768px - 991px)
   ========================================== */

@media screen and (max-width: 991px) and (min-width: 768px) {
  .col-md-5 {
    width: 60%;
    float: none;
    margin: 0 auto;
  }

  .gsc-column.el-59798554 {
    padding: 10px;
    max-width: 100%;
  }
}

/* ==========================================
   RESPONSIVE - MÓVILES (max 767px)
   ========================================== */

@media screen and (max-width: 767px) {
  /* Columnas móviles */
  .col-sm-12,
  .col-xs-12 {
    width: 100%;
    float: none;
  }

  .gsc-column.el-59798554 {
    padding: 8px;
    width: 100%;
  }

  /* Ajuste de contenedor flexible */
  #edit-flexbox-one {
    max-height: none;
    margin-left: 0;
  }

  /* Formulario en una columna */
  .content.block-content{
    margin-top: 0;
    display: flex;
    flex-direction: column;
  }

  /* Campos de ancho completo */
  #edit-plataforma-o-ecosistema,
  #edit-rol-de-desicion,
  #edit-texto-descriptivo {
    width: 100%;
  }

  /* Ajuste de inputs y selects */
  .content.block-content input,
  .content.block-contentinput,
  .content.block-content select,
  .content.block-contentselect {
    font-size: 10px; /* Evita zoom en iOS */
    padding: 10px 15px;
  }

  /* Textarea móvil */
  .content.block-content textarea,
  .content.block-contenttextarea {
    min-height: 100px;
    font-size: 10px;
  }

  /* Espaciado entre campos */
  .webform-submission-form .form-item {
    margin-bottom: 8px;
  }

  /* Labels móviles */
  form .form-item label {
    margin-top: 8px;
    margin-bottom: 6px;
    font-size: 10px;
  }

  #edit-pais--wrapper > div > div > div > div > div > div > label,
  #webform-submission-form-general-contacto-node-145-add-form
    > div.js-form-item.form-item.js-form-type-select.form-item-plataforma-o-ecosistema.js-form-item-plataforma-o-ecosistema
    > label,
  #webform-submission-form-general-contacto-node-145-add-form
    > div.js-form-item.form-item.js-form-type-select.form-item-rol-de-desicion.js-form-item-rol-de-desicion
    > label,
  #webform-submission-form-general-contacto-node-145-add-form
    > div.js-form-item.form-item.js-form-type-textarea.form-item-texto-descriptivo.js-form-item-texto-descriptivo
    > label {
    margin-top: 12px;
  }

  /* Sección legal móvil */
  #edit-content-legal > div > div > div {
    display: inline-flex !important;
    margin-top: 15px;
  }

  #edit-content-legal > div > div > div > div {
    font-size: 10px;
    line-height: 150%;
    width: 100%;
  }

  #edit-legal {
    margin: 0;
  }

  /* Botón de envío móvil */
  #edit-actions-submit {
    margin-top: 15px;
    padding: 12px 0;
    font-size: 14px;
    min-height: 48px; /* Tamaño mínimo táctil */
  }

  /* Contenedor flex móvil */
  .webform-flex--container {
    margin: 5px 0 0;
  }

  /* Ajuste de imagen en móviles */
  .widget.gsc-image.text-none {
    padding: 15px 0;
    margin: 10px 0;
  }
}

/* ==========================================
   RESPONSIVE - MÓVILES PEQUEÑOS (max 480px)
   ========================================== */

@media screen and (max-width: 480px) {
  #edit-content-legal > div > div > div > div {
    font-size: 9.5px;
    line-height: 155%;
  }

  form .form-item label {
    font-size: 12px;
  }

  #edit-actions-submit {
    font-size: 15px;
  }
}

/* ==========================================
   MEJORAS DE ACCESIBILIDAD
   ========================================== */

/* Focus visible para navegación por teclado */
.content.block-content input:focus,
.content.block-contentinput:focus,
.content.block-content select:focus,
.content.block-contentselect:focus,
.content.block-content textarea:focus,
.content.block-contenttextarea:focus {
  outline: 2px solid #4547ef;
  outline-offset: 2px;
  border-color: #4547ef;
}

#edit-actions-submit:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Estados de error */
.form-item input.error,
.form-item select.error,
.form-item textarea.error {
  border-color: #dc3545;
  background-color: #fff5f5;
}

/* Placeholder legible */
::placeholder {
  color: #999;
  opacity: 1;
}