/* Sección de Contacto */

.section.contacto {
  background-color: #f5f5f5;
  padding: 0 20px;
  /* min-height: 100vh; */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 60px !important;
  
}


/* Título principal */
.section.contacto .section-title {
  
  font-weight: 700;
  font-style: Bold;
  font-size: 57px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;
  color: #003899;
  
}

/* Subtítulo */
.section.contacto .text-contactos {
  font-size: 1.625rem;
  color: #252525;
  text-align: center;
  margin-bottom: 60px;
  
  font-weight: 400;
}



/* Contenedor principal */
.table-contacto {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.table-contacto .white {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  width: 72.25rem;
  height: 420px;
  gap: 10px;
  opacity: 1;
  padding: 10px;
}

/* Panel izquierdo - Información de contacto */
.contact-info {
  background: #003899;
  color: white;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 29.625rem;
  height: 400px;
  /* justify-content: space-between; */
  opacity: 1;
  padding-left: 40px;
  padding-right: 40px;
  border-radius: 10px;
}

.info-title {
  
  font-weight: 700;
  font-style: Bold;
  font-size: 1.625rem; /* 26px */
  line-height: 100%;
  letter-spacing: 0%;
  text-align: left;
}

.info-subtitle {
  
  font-weight: 400;
  font-style: Regular;
  font-size: 1.125rem; /* 18px */
  line-height: 100%;
  letter-spacing: 0%;
  text-align: left;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  
  font-weight: 400;
}

.info-list li:last-child {
  margin-bottom: 0;
}

.info-list .icon {
  margin-right: 15px;
  display: flex;
  align-items: flex-start;
  margin-top: 2px;
}

.info-list .icon img {
  width: 1.25rem;
  height: 20px;
  filter: brightness(0) invert(1);
}

.info-list a,
.info-list address {
  color: white;
  text-decoration: none;
  
  font-weight: 400;
  font-style: Regular;
  font-size: 1.125rem; /* 18px */
  line-height: 100%;
  letter-spacing: 0%;
  text-align: left;
}

.info-list a:hover {
  text-decoration: underline;
}

/* Panel derecho - Formulario */
.contact-form {
  width: 40.75rem;
  height: 427px;
  justify-content: space-between;
  padding-top: 10px;
  padding-right: 40px;
  padding-bottom: 10px;
  padding-left: 40px;
  opacity: 1;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.form-row.single {
  flex-direction: column;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  width: 100%;
}

.form-group label {
  font-size: 1.125rem; /* 18px */
  font-weight: 500;
  color: #000000;
  margin-bottom: 8px;
  
  text-align: left;
}

.form-group input {
  border: none;
  border-bottom: 2px solid #8D8D8D;
  font-size: 1rem;
  background: transparent;
  color: #000000;
  
  transition: border-color 0.3s ease;
  width: 100%;
}

.form-group input:focus {
  outline: none;
  border-bottom-color: #003899;
}

.form-group input::placeholder {
  color: #8D8D8D;
  
}



/* ========== CAPTCHA + BOTÓN (layout moderno, responsive) ========== */

/* asegúrate box-sizing global (si no lo tienes ya) */
*:where(:not(canvas, iframe, img, svg)) { box-sizing: border-box; }

/* contenedor principal que reemplaza la tabla */
.captcha-area {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap;
  
}

/* fila del captcha (checkbox + texto) */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: auto !important;   /* override de reglas antiguas */
  flex: 0 0 auto;           /* no se estire innecesariamente */
  min-width: 0;             /* evita overflow en flex */
  height: 24px;
}

/* area del botón toma el espacio restante */
.button-area {
  flex: 1 1 auto;
  min-width: 0;             /* importante para que el botón pueda encogerse correctamente */
}

/* Botón principal de envío */
.btn-send {
  display: block;
  width: 100%;
  max-width: 400px;         /* límite superior en desktop */
  height: 44px;
  padding: 11px 21px;
  border-radius: 14.5px;
  background-color: #003899;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  text-align: center;
  box-shadow: 0 8px 26px rgba(0,0,0,0.12);
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 160ms ease, transform 120ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Quicksand', sans-serif;
}

/* hover / focus visible */
.btn-send:not([disabled]):hover { background: #002d7a; }
.btn-send:focus-visible { outline: 3px solid rgba(0,56,153,0.12); outline-offset: 3px; }

/* estado deshabilitado (por defecto) */
.btn-send[disabled],
.btn-send[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(.02);
  box-shadow: none;
  transform: none;
}

/* ====== CAPTCHA visual ====== */
/* ====== asteriscos rojos para campos obligatorios ====== */
.required-star {
  color: #e53935;            /* rojo */
  margin-left: 0.25rem;
  font-weight: 700;
  line-height: 1;
  font-size: 1.05em;
  display: inline-block;
  transform: translateY(-1px);
}

/* ====== asegurar que el wrapper .form-group posicione el ::after ====== */
/* (esto permite que la palomita se posicione correctamente) */
.form-group {
  position: relative; /* importante para el ::after */
}

/* ====== palomita verde visible en el wrapper cuando el campo es válido ====== */
.form-group.field-valid::after {
  content: "✓";
  position: absolute;
  right: 10px;               /* distancia desde el borde derecho del wrapper */
  top: 50%;
  transform: translateY(-50%);
  background: #43a047;       /* verde */
  color: #fff;
  font-size: 0.78rem;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(67,160,71,0.18);
  z-index: 3;                /* encima de inputs */
  pointer-events: none;
}

/* Evitar que la palomita tape el texto del input: añadir padding-right cuando el wrapper sea .field-valid */
.form-group.field-valid input,
.form-group.field-valid textarea,
.form-group.field-valid select {
  padding-right: 38px; /* deja espacio para la palomita */
  /* mantenemos tu borde verde / shadow ya existente (no lo tocamos) */
}

.captcha-area{
  background-color: #FAFAFA;
}
#captcha-label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .35rem .65rem;
  border-radius: 8px;
  border: 1px solid #D6D6D6;
  background: linear-gradient(180deg,#FAFAFA,#FAFAFA);
  background-color: #FAFAFA;
  box-shadow: 0 8px 26px rgba(10,10,10,0.04);
  cursor: pointer;
  user-select: none;
  width: auto !important;   /* sobreescribe anchos viejos */
  height: 44px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
#captcha-label:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }

/* caja SVG */
.captcha-box { width:44px; height:44px; display:inline-flex; align-items:center; justify-content:center; padding:0; }
.captcha-svg { width:30px; height:30px; display:block; border: 1px solid #D6D6D6; border-radius: 20%; background-color:#FAFAFA ;}

/* path: preparado para animación de trazo */
.captcha-path {
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  transition: stroke-dashoffset 420ms cubic-bezier(.2,.9,.3,1), opacity 200ms ease;
  opacity: 0;
  stroke: #fff;
}

/* checked state (clase .checked añadida por JS) */
#captcha-label.checked {
  background-color: #4caf50;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
#captcha-label.checked .captcha-path {
  stroke-dashoffset: 0;
  opacity: 1;
  stroke: #4caf50;
}

/* ripple/halo opcional (si lo quieres) */
#captcha-label.checked .captcha-box::after {
  content: "";
  position: absolute;
  width: 88px;
  height: 88px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.7);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76,175,80,0.12), transparent 45%);
  opacity: 1;
  pointer-events: none;
  z-index: -1;
}

/* ========== MANTENER ESTILOS DE VALIDACIÓN (los tuyos) ========== */
/* borde rojo y pequeño shake cuando hay error */
.form-group.field-error input,
.form-group.field-error textarea,
.form-group.field-error select {
  border-color: #e53935 !important;
  box-shadow: 0 6px 18px rgba(229,57,53,0.12);
  animation: shake 360ms ease;
}

/* borde verde y check cuando es válido */
.form-group.field-valid input,
.form-group.field-valid textarea,
.form-group.field-valid select {
  border-color: #43a047 !important;
  box-shadow: 0 8px 24px rgba(67,160,71,0.12);
}

/* check pequeño en la esquina derecha del wrapper (ya lo tenías) */
.form-group.field-valid::after {
  content: "✓";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #43a047;
  color: #fff;
  font-size: 0.78rem;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(67,160,71,0.18);
}

/* animación shake (la tuya) */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

/* ********************************************** */
/* MODO RESPONSIVE PARA DIFERENTES DISPOSITIVOS */
/* ********************************************** */

/* Laptops y Desktops Pequeños (1200px) */
@media (max-width: 1200px) {
  .table-contacto .white {
    width: 100%;
    max-width: 980px; /* Límite para que no se estire demasiado */
  }
}

/* Tablets en horizontal y vertical (1024px) */
@media (max-width: 1024px) {
  .table-contacto .white {
    flex-direction: column;
    width: 90%;
    height: auto;
    padding: 20px;
    margin: 0 auto;
  }

  .contact-info, .contact-form {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    height: auto;
  }

  .btn-send {
    max-width: 100%;
  }
}

/* Móviles Grandes y Tablets en vertical (768px) */
@media (max-width: 768px) {
    .table-contacto .white {
        width: 100%;
        padding: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 15px;
    }

    .section.contacto .section-title {
        font-size: 40px;
    }

    .section.contacto .text-contactos {
        font-size: 1.2rem;
        padding: 0 15px;
    }

    .btn-send {
      max-width: 100%;
  }
}

/* ---------- Reemplazo: comportamiento horizontal y shrink para <=480px ---------- */
@media (max-width: 480px) {
  /* Forzamos fila horizontal y evitamos que bajen a la siguiente línea */
  .captcha-area {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
   
  }

  .button-area{
    width: 90%;
  }

 

  /* Contenedor del captcha (icon + texto) */
  .captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;         /* no tomar el espacio restante */
    min-width: 0;
    justify-content: flex-start;
    width: auto !important;
    padding-bottom: 45px;
    padding-top: 20px;
  }

  /* Etiqueta del captcha: más compacta */
  #captcha-label {
    padding: 0.18rem 0.45rem;
    border-radius: 7px;
    white-space: nowrap;
    align-items: center;
    display: inline-flex;
    gap: .4rem;
    height: 45px;
    width: 180px !important; 
  }

  /* Caja SVG y tamaño del icono */
  .captcha-box { width: 32px; height: 32px; }
  .captcha-svg { width: 20px; height: 20px; display:block; }
  /* Texto del captcha: más pequeño y con truncado si hace falta */
  .captcha-text {
    font-size: 1rem;
    max-width: 90px;           /* límite para que no empuje demasiado */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
    white-space: nowrap;
    display: inline-block;
  }

  /* Área del botón ocupa el espacio restante */
  .button-area {
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
  }

  /* Botón compacto pero full-width dentro de .button-area */
  .btn-send {
    display: block;
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    font-size: .98rem;
    border-radius: 11px;
    max-width: none;
    box-sizing: border-box;
    
  }
}

/* ---------- Reemplazo: comportamiento horizontal y shrink para <=375px ---------- */
@media (max-width: 402px) {
  .captcha-area {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;

  }
  
  .button-area{
    width: 90%;
  }

  .captcha-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
    justify-content: flex-start;
    width: auto !important;
    padding-bottom: 45px;
    padding-top: 20px;
  }

  #captcha-label {
    padding: 0.14rem 0.38rem;
    border-radius: 6px;
    white-space: nowrap;
    gap: .35rem;
    height: 45px;
    width: 180px !important; 
  }

  .captcha-box { width: 28px; height: 28px; }
  .captcha-svg { width: 18px; height: 18px; display:block; }
  .captcha-text {
    font-size: 1rem;
    max-width: 70px;  /* más agresivo para pantallas muy estrechas */
    /* overflow: hidden;
    text-overflow: ellipsis; */
    white-space: nowrap;
    display: inline-block;
  }

  .button-area {
    flex: 1 1 auto;
    min-width: 0;
  }

  .btn-send {
    display: block;
    width: 100%;
    height: 36px;
    padding: 7px 10px;
    font-size: .9rem;
    border-radius: 10px;
    max-width: none;
    box-sizing: border-box;
  }
}