/* ===============================
   🌿 BASE GLOBAL
==================================*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===============================
   🌄 SECCIÓN DE CONTACTO
==================================*/
.contact-section {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0px clamp(15px, 3vw, 40px);
  min-height: 800px;
  height: 100vh;
  width: 100%;
  color: var(--color-bg);
}

/* 🎥 Video de fondo */
.contact-section video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* 🌑 Overlay oscuro */
.contact-section .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

/* ===============================
   ⚙️ LAYOUT PRINCIPAL
==================================*/
.contact-flex {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(30px, 5vw, 60px);
  width: 100%;
  max-width: 1440px;
  z-index: 2;
}

/* ===============================
   💬 TEXTO IZQUIERDO
==================================*/
.contact-info {
  flex: 1;
  max-width: 45%;
}

.contact-info h2 {
  font-family: var(--font-title);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
  color: var(--color-bg);
}

.contact-info p {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  font-family: var(--font-paragraph);
  color: var(--color-bg);
  font-family: var(--font-paragraph);
}

/* ===============================
   🧾 FORMULARIO (DERECHA)
==================================*/
.contact-form {
  flex: 1;
  max-width: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: clamp(20px, 4vw, 30px);
  text-align: left;
  z-index: 2;
}

.contact-form h2 {
  color: var(--color-bg);
  font-family: "Montserrat-Bold";
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin-bottom: clamp(15px, 2vw, 20px);
}

/* === ORGANIZACIÓN DE CAMPOS === */
.contact-form form {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 20px);
}

/* Todos los inputBox por defecto */
.inputBox {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* 🔹 Nombre + Apellido en una fila */
.inputBox:nth-child(2),
.inputBox:nth-child(3) {
  width: calc(50% - 10px);
  flex: 1 1 calc(50% - 10px);
}

/* 🔹 Teléfono + Correo en una fila */
.inputBox:nth-child(4),
.inputBox:nth-child(5) {
  width: calc(50% - 10px);
  flex: 1 1 calc(50% - 10px);
}

/* Mensaje ocupa todo el ancho */
.inputBox textarea {
  width: 100%;
}

/* Etiquetas */
.inputBox p {
  text-align: left;
  margin-bottom: 5px;
  font-family: var(--font-paragraph);
  font-size: clamp(0.9rem, 1.6vw, 1rem);
}

/* Campos */
/* Campos */
.contact-form input:not([type="checkbox"]), /* <-- ¡AÑADIR ESTO! */
.contact-form textarea {
  width: 100%;
  padding: clamp(10px, 2vw, 14px);
  border-radius: 6px;
  font-family: var(--font-paragraph);
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  color: var(--color-text);
  border: 2px solid transparent;
}

/* 🔲 Personalizar el borde o sombra al enfocar */
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; /* Quita el borde negro */
  border: 2px solid var(--color-light-green); /* o el color que quieras */
}

/* ===============================
   ✅ CHECKBOX Y POLÍTICA
==================================*/
/* ===============================
   ✅ CHECKBOX Y POLÍTICA (versión fluida optimizada)
==================================*/
.checkbox {
  width: 100%;
  display: flex;
  align-items: flex-start;
  font-size: clamp(0.85rem, 1.5vw, 0.95rem);
  color: var(--color-bg);
}

.checkbox label {
  display: inline-block;
  font-family: var(--font-paragraph);
  line-height: 1.6;
  word-break: break-word;
  text-align: left;
  max-width: 100%;
}

/* Input checkbox */
.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  position: relative;
  top: -2px;
  margin-right: 4px;
  vertical-align: middle;
  border: 1px solid #ccc;
  border-radius: 3px;
  appearance: none;
  background-color: #fff;
  transition: background-color 0.2s, border-color 0.2s;
}

/* ✅ Estado activo con color y chulito */
.checkbox input[type="checkbox"]:checked {
  background-color: var(--color-light-green);
  border-color: var(--color-light-green);
}

/* ✳️ Chulito (✓) centrado */
.checkbox input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 10px; /* más pequeño */
  font-weight: bold;
}

#accept:hover {
  transform: scale(1.2);
  color: var(--color-light-green);
}

/* Texto e hipervínculo */
.checkbox-text-before,
.checkbox-policy,
.checkbox-text-after {
  display: inline;
  white-space: normal; /* fluido */
}

.checkbox a {
  color: var(--color-bg);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.checkbox a:hover {
  color: var(--color-light-green);
}

/* ===============================
   🚀 BOTÓN DE ENVÍO
==================================*/
#SubmitBtn {
  background: var(--color-green-title);
  color: var(--color-bg);
  font-family: var(--font-paragraph);
  border: none;
  border-radius: 6px;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  cursor: pointer;
  transition: background 0.3s ease;
  padding: clamp(10px, 2.5vw, 14px) clamp(30px, 5vw, 50px);
  align-self: flex-start;
  width: max-content;
}

#SubmitBtn:hover {
  background: var(--color-light-green);
}

/* ===============================
   ⚠️ ALERTAS (MENSAJES)
==================================*/
.alert-success,
.alert-error {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 10;
  background: var(--color-light-green);
  color: var(--color-bg);
  font-family: var(--font-title);
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  padding: 15px 25px;
  border: 1px solid var(--color-bg);
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* ===============================
   📱 RESPONSIVE (≤ 900px)
==================================*/
@media (max-width: 900px) {
  .header {
    position: sticky !important;
  }

  .contact-section {
    height: max-content;
  }

  .contact-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(25px, 4vw, 40px);
    padding: clamp(20px, 5vw, 40px) 0px;
  }

  .contact-info,
  .contact-form {
    max-width: 100%;
  }

  .contact-info h2 {
    font-size: clamp(1.6rem, 4vw, 1.9rem);
  }

  .contact-info p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
  }

  .contact-form {
    text-align: center;
    padding: clamp(20px, 4vw, 30px);
  }

  /* Inputs se apilan */
  .contact-form form {
    flex-direction: column;
  }

  .inputBox:nth-child(2),
  .inputBox:nth-child(3),
  .inputBox:nth-child(4),
  .inputBox:nth-child(5) {
    width: 100%;
  }

  .inputBox p {
    text-align: center;
  }

  #SubmitBtn {
    align-self: center;
  }

  .alert-success,
  .alert-error {
    top: 70px;
    right: 0;
    left: 0;
    margin: 0 auto;
    max-width: 90%;
    text-align: center;
  }
}
