/* =========================
   CONTACTO
========================= */

.contact-section {
  padding: 100px 20px;
  background: linear-gradient(
    180deg,
    #f4f8fc 0%,
    #e8f0f8 100%
  );
}

.contact-container {
  max-width: 900px;
  margin: auto;
  background: #ffffff;
  border-radius: 22px;
  padding: 60px 55px;

  box-shadow:
    0 25px 50px rgba(12, 34, 56, 0.12),
    0 6px 16px rgba(12, 34, 56, 0.08);
}

/* ================= HEADER ================= */

.contact-header {
  text-align: center;
  margin-bottom: 45px;
}

.contact-header h2 {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #2e76d3, #589ecc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.contact-header p {
  font-size: 15px;
  color: #5c6f85;
  max-width: 600px;
  margin: auto;
  line-height: 1.6;
}

/* ================= FORM ================= */

.contact-form {
  display: grid;
  gap: 22px;
}

.form-group {
  display: flex;
  flex-direction: column;
  position: relative; /* necesario para flecha */
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1c2e45;
}

/* INPUTS GENERALES */

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;

  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #d7e1ec;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;

  transition: border 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  background: #ffffff;
}

/* TEXTAREA */

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* SELECT FIX DEFINITIVO */

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 40px; /* espacio para flecha */
}

/* Flecha personalizada */
.form-group select + .select-arrow {
  display: none;
}

.form-group::after {
  content: "▾";
  position: absolute;
  right: 16px;
  top: 44px;
  font-size: 14px;
  pointer-events: none;
  color: #6c7f95;
}

/* FOCUS */

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2f80ed;
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
  transform: translateY(-1px);
}

/* BOTÓN */

.contact-form .btn-primary {
  margin-top: 10px;
  align-self: center;
  padding: 14px 36px;
  font-size: 15px;
}

/* =========================
   RESPONSIVE MOBILE
========================= */

@media (max-width: 768px) {

  .contact-section {
    padding: 70px 16px;
  }

  .contact-container {
    padding: 35px 20px;
    border-radius: 18px;
  }

  .contact-header {
    margin-bottom: 30px;
  }

  .contact-header h2 {
    font-size: 24px;
    line-height: 1.2;
  }

  .contact-header p {
    font-size: 14px;
  }

  .contact-form {
    gap: 18px;
  }

  .form-group label {
    font-size: 13px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* mejora UX táctil */
    padding: 16px;
  }

  .form-group textarea {
    min-height: 140px;
  }

  /* Botón ancho completo en mobile */
  .contact-form .btn-primary {
    width: 100%;
    align-self: stretch;
    font-size: 16px;
    padding: 16px;
    border-radius: 14px;
  }

  /* Ajuste fino flecha en mobile */
  .form-group::after {
    top: 46px;
  }
}

/* =========================
   SEGURIDAD ANTI OVERFLOW
========================= */

html, body {
  overflow-x: hidden;
}

.contact-section,
.contact-container,
.contact-form {
  width: 100%;
  max-width: 100%;
}
