/* ===========================
   CONTACTO - BLOQUE CORREGIDO
   Reemplaza el CSS antiguo de "contacto" por este
   =========================== */

/* Contenedor principal de la sección */
.contacto {
  max-width: 62.25rem;
  width: 100%;
  margin: 0 auto;
  /* padding: 1.25rem; */
  gap: 1.2325rem;
  text-align: center;
  font-family: 'Quicksand', sans-serif;
  box-sizing: border-box;
}

.required-star{
  color:#FF0004 ;
}

/* Títulos principales */
.main-title,
.section.contacto .section-title {
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: #003899;
  font-family: 'Quicksand', sans-serif;
  margin: 0;
  padding-bottom: 20px;
}

/* Subtítulo */
.section.contacto .text-contactos {
  font-size: 1.625rem;
  color: #252525;
  text-align: center;
  margin-bottom: 1.875rem;
  font-weight: 400;
}

/* Contenedor padre del bloque de info + formulario */
.table-contacto {
  width: 100%;
  max-width: 62.25rem;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Caja blanca que contiene info + formulario (flexible) */
.table-contacto .white {
  width: 996px;
  max-width: 100%;
  margin: 0 auto;

  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);

  display: flex;
  align-items: stretch; /* 🔥 IMPORTANTE */
  justify-content: space-between;

  gap: 20px;
  padding: 20px;

  box-sizing: border-box;
}



/* Panel izquierdo - Información de contacto */
.contact-info {
  width: 408.39px;
  max-width: 100%;

  background: #003899;
  color: white;

  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* 🔥 antes estaba centrado */

  padding: 32px 28px;
  border-radius: 12px;

  box-sizing: border-box;
}



/* Textos info */
.info-title {
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 1rem 0;
  text-align: left;
}

.info-subtitle {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 1.125rem 0;
  text-align: left;
}

/* Lista de datos */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.875rem;
  font-weight: 400;
  gap: 0.625rem;
}

.info-list li:last-child { margin-bottom: 0; text-align: left;}

.info-list .icon { display: flex; align-items: center; margin-top: 0.125rem; }
.info-list .icon img { width: 1.25rem; height: 1.25rem; filter: brightness(0) invert(1); display:block; }

.info-list a,
.info-list address {
  color: white;
  text-decoration: none;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.2;
  text-align: left;
}

/* Panel derecho - Formulario */
.contact-form {
  width: 500px;
  max-width: 100%;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  padding: 10px 0;

  box-sizing: border-box;
}



/* Filas y grupos de formulario */
.form-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;  /* 🔥 más compacto */
  box-sizing: border-box;
  width: 100%;
}

.form-row.single { flex-direction: column; }

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  box-sizing: border-box;
}

.form-group.full-width { width: 100%; }

.form-group label {
  font-size: 1rem;
  font-weight: 400;
  color: #000;
  margin-bottom: 0.375rem;
  text-align: left;
}

/* Inputs */
.form-group input,
.form-group textarea {
  border: none;
  border-bottom: 0.125rem solid #8D8D8D;
  font-size: 0.85rem;        /* 🔥 más pequeño */
  padding: 0.35rem 0.25rem;  /* 🔥 menos alto */
  border-bottom: 1.5px solid #8D8D8D;
  background: transparent;
  color: #000;
  transition: border-color .2s ease;
  width: 100%;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus { outline: none; border-bottom-color: #003899; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: #8D8D8D; }

.form-group textarea {  min-height: 4rem;   /* 🔥 más compacto */
  resize: vertical; padding-top: 0.5rem; }

/* Validación / estados */
.form-group.field-error input,
.form-group.field-error textarea,
.form-group.field-error select {
  border-color: #e53935 !important;
  box-shadow: 0 0.375rem 1.125rem rgba(229,57,53,0.12);
  animation: shake 360ms ease;
}

.form-group.field-valid input,
.form-group.field-valid textarea,
.form-group.field-valid select {
  border-color: #43a047 !important;
  box-shadow: 0 0.5rem 1.5rem rgba(67,160,71,0.12);
}

.form-group.field-valid::after {
  content: "✓";
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  background: #43a047;
  color: #fff;
  font-size: 0.78rem;
  width: 1.25rem;
  height: 1.25rem;
  line-height: 1.25rem;
  text-align: center;
  border-radius: 50%;
  box-shadow: 0 0.25rem 0.625rem rgba(67,160,71,0.18);
  z-index: 3;
  pointer-events: none;
}

.form-group.field-valid input,
.form-group.field-valid textarea,
.form-group.field-valid select { padding-right: 2.375rem; }

/* CAPTCHA + Botón */
*:where(:not(canvas, iframe, img, svg)) { box-sizing: border-box; }

.captcha-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  min-width: 0;
  height: 2.4rem;
}

.button-area {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-end;
}

/* Botón principal */
.btn-send {
  display: block;
  width: 100%;
  max-width: 22.5rem;
  height: 2.4rem;
  font-size: 1rem;
  max-width: 18rem;   /* 🔥 más corto */
  padding: 0.6875rem 1.3125rem;
  border-radius: 0.90625rem;
  background-color: #003899;
  color: #fff;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 0.5rem 1.625rem rgba(0,0,0,0.12);
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background .16s ease, transform .12s ease, box-shadow .16s ease;
  font-family: 'Quicksand', sans-serif;
}

.btn-send:not([disabled]):hover { background: #002d7a; }
.btn-send:focus-visible { outline: 0.1875rem solid rgba(0,56,153,0.12); outline-offset: 0.1875rem; }

.btn-send[disabled], .btn-send[aria-disabled="true"] {
  opacity: 0.6; cursor: not-allowed; filter: grayscale(.02); box-shadow: none; transform: none;
}

/* Captcha visual */
#captcha-label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .65rem;
  border-radius: 0.5rem;
  border: 0.0625rem solid #D6D6D6;
  background: #FAFAFA;
  box-shadow: 0 0.5rem 1.625rem rgba(10,10,10,0.04);
  cursor: pointer;
  height: 2.75rem;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

#captcha-label.checked { background-color: #4caf50; color: #000; transform: translateY(-0.125rem); }

.captcha-box { width:2.75rem; height:2.75rem; display:inline-flex; align-items:center; justify-content:center; padding:0; }
.captcha-svg { width:1.875rem; height:1.875rem; display:block; border: 0.0625rem solid #D6D6D6; border-radius: 20%; background-color:#FAFAFA; }

/* animación shake */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-0.375rem); }
  40% { transform: translateX(0.3125rem); }
  60% { transform: translateX(-0.25rem); }
  80% { transform: translateX(0.125rem); }
  100% { transform: translateX(0); }
  
}



/* boton de captcha  */

.captcha-path{
  stroke: #ffffff;
  stroke-width: 4;
  opacity: 0;
  transition: opacity .2s ease;
}

.captcha-bg{
  fill: #ffffff;
  stroke: #D6D6D6;
  stroke-width: 1;
  transition: fill .2s ease, stroke .2s ease;
}

/* Cuando está marcado */
#captcha-checkbox:checked + #captcha-label .captcha-bg{
  fill: #4CAF50;
  stroke: #4CAF50;
}

#captcha-checkbox:checked + #captcha-label .captcha-path{
  opacity: 1;
}


/* =========================
   Responsive específico para contacto
   ========================= */

@media (max-width: 75rem) {
  .table-contacto .white { width: 100%; padding: 0.875rem; }
  .contact-info, .contact-form { padding: 1.25rem; }
}

@media (max-width: 64rem) {
  .table-contacto .white {
    flex-direction: column;
    width: 90%;
    padding: 1.125rem;
    margin: 0 auto;
    align-items: stretch;
    gap: 0.875rem;
  }
  .contact-info, .contact-form {
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding: 1rem;
  }
  .info-title, .info-subtitle, .info-list li a, .info-list li address { text-align: center; }
  .button-area { justify-content: center; }
  .btn-send { max-width: 100%; }
}

@media (max-width: 48rem) {
  .form-row { flex-direction: column; gap: 0.75rem; margin-bottom: 0.75rem; }
  .section.contacto .section-title { font-size: 22px; }
  .section.contacto .text-contactos { font-size: 14px; padding: 0 0.9375rem; }
  .contact-info { padding: 0.9375rem; border-radius: 0.375rem; }
  .btn-send { width: 100%; max-width: 100%; }
  .captcha-area { gap: 0.625rem; }
  
}

@media (max-width: 30rem) {
  .table-contacto .white { flex-direction: column; gap: 0.75rem; padding: 0.75rem; width: 319px; }
  .contact-info, .contact-form { width: 100%; text-align: center; padding: 0.75rem; }
  .info-title { font-size: 1.5rem; }
  .info-subtitle { font-size: 1rem; }
  .info-list li { font-size: 14px; text-align: left;  }
  .form-group label { font-size: 0.95rem; }
  .form-group input, .form-group textarea { font-size: 0.9rem; padding: 0.5rem 0.375rem; }
  .captcha-area { flex-direction: column; align-items: center; width: 100%; }
  .button-area { width: 100%; display:flex; justify-content:center; }
  .btn-send { height: 2.25rem; padding: 0.4375rem 0.75rem; font-size: 0.95rem; border-radius: 0.625rem; max-width: 20rem; width: 100%; }
  #captcha-label { width: auto; height: 2.625rem; padding: .25rem .5rem; }
  .captcha-box { width: 1.75rem; height: 1.75rem; }
  .captcha-svg { width: 1.125rem; height: 1.125rem; }
  .main-title{
    font-size: 22px;
    font-weight: 700;
  }
  .section-title{
    font-size: 22px;
    font-weight: 700;
  }
  .text-contactos{
    font-size: 14px;
    font-weight: 700;
  }
  .info-title{
    font-size: 14px;
  }
  .info-subtitle{
    text-align: center;
    font-size: 19px;
    font-weight: 100;
    margin: 0 auto;
    font-weight: 700;
    width: auto;
    padding-left: 0;
    padding-right: 0;
  }
  .contact-info{
    padding: 30px;
  }

  .btn-send[disabled], .btn-send[aria-disabled="true"]{
    height: 40px;
    font-size: 14px;
    width: 235px;
  }

  #captcha-label{
    width: 235px;
    font-size: 14px;
  }

  .captcha-svg{
    height: 24px;
    width: 24px;
  }


  .form-group label{
    font-size: 14px;
  }



}

@media (max-width: 22.5rem) {
  .section.contacto .section-title { font-size: 2rem; }
  .info-title { font-size: 1.3rem; }
  .info-subtitle { font-size: 0.95rem; }
  .form-group input, .form-group textarea { font-size: 0.85rem; }
  .btn-send { font-size: 0.85rem; height: 2.125rem; padding: 0.375rem 0.625rem; }
}




@media (max-width: 23.4375rem) {
  .table-contacto .white { flex-direction: column; gap: 0.75rem; padding: 0.75rem; width: 319px; }
  .contact-info, .contact-form { width: 100%; text-align: center; padding: 0.75rem; }
  .info-title { font-size: 1.5rem; }
  .info-subtitle { font-size: 1rem; }
  .info-list li { font-size: 14px; text-align: left;  }
  .form-group label { font-size: 0.95rem; }
  .form-group input, .form-group textarea { font-size: 0.9rem; padding: 0.5rem 0.375rem; }
  .captcha-area { flex-direction: column; align-items: center; width: 100%; }
  .button-area { width: 100%; display:flex; justify-content:center; }
  .btn-send { height: 2.25rem; padding: 0.4375rem 0.75rem; font-size: 0.95rem; border-radius: 0.625rem; max-width: 20rem; width: 100%; }
  #captcha-label { width: auto; height: 2.625rem; padding: .25rem .5rem; }
  .captcha-box { width: 1.75rem; height: 1.75rem; }
  .captcha-svg { width: 1.125rem; height: 1.125rem; }
  .main-title{
    font-size: 22px;
    font-weight: 700;
  }
  .section-title{
    font-size: 22px;
    font-weight: 700;
  }
  .text-contactos{
    font-size: 14px;
    font-weight: 700;
  }
  .info-title{
    font-size: 14px;
  }
  .info-subtitle{
    text-align: center;
    font-size: 19px;
    font-weight: 100;
    margin: 0 auto;
    font-weight: 700;
    width: auto;
    padding-left: 0;
    padding-right: 0;
  }
  .contact-info{
    padding: 30px;
  }

  .btn-send[disabled], .btn-send[aria-disabled="true"]{
    height: 40px;
    font-size: 14px;
    width: 235px;
  }

  #captcha-label{
    width: 235px;
    font-size: 14px;
  }

  .captcha-svg{
    height: 24px;
    width: 24px;
  }


  .form-group label{
    font-size: 14px;
  }



}
