/* =========================================================
   CONTÁCTANOS STYLESHEET
   Responsive: Desktop / Tablet / Mobile
   Color base: var(--color-primary)
   ========================================================= */

/* =========================================================
   01. BASE
   ========================================================= */

.contactanos-page {
  background: #f8fafc;
  color: #334155;
  font-family: inherit;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.contactanos-page *,
.contactanos-page *::before,
.contactanos-page *::after {
  box-sizing: border-box;
}

.contactanos-page .container {
  width: 100%;
  padding-inline: clamp(20px, 3vw, 48px);
  margin-inline: auto;
  box-sizing: border-box;
}

.contactanos-single-col {
  width: min(100% - 48px, 680px) !important;
  margin-inline: auto;
}

/* =========================================================
   02. SECCIÓN DEL FORMULARIO
   ========================================================= */

.contactanos-form-section {
  padding: 36px 0 60px;
}

.contactanos-header {
  margin-bottom: 26px;
  text-align: center;
}

.contactanos-header h2 {
  margin: 0 0 8px;

  color: #0f172a;
  font-family: inherit;
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.contactanos-header p {
  max-width: 520px;
  margin: 0 auto;

  color: #64748b;
  font-size: 14.5px;
  line-height: 1.6;
}

/* =========================================================
   03. ALERTA DE ERROR
   ========================================================= */

.contactanos-form__error {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  max-width: 100%;
  margin: 18px auto 0;
  padding: 13px 16px;

  border: 1px solid #fecaca;
  border-radius: 12px;

  background: #fef2f2;
  color: #991b1b;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
}

.contactanos-form__error svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: #ef4444;
}

/* =========================================================
   04. TARJETA DEL FORMULARIO
   ========================================================= */

.contactanos-form-wrapper {
  padding: 36px 40px;

  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.035);
}

.contactanos-form {
  display: flex;
  flex-direction: column;
}

.contactanos-form__group {
  margin-bottom: 18px;
}

.contactanos-form__label {
  display: block;
  margin-bottom: 6px;

  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
}

.contactanos-form__label .required {
  color: var(--color-primary);
  margin-left: 2px;
}

.contactanos-form__input,
.contactanos-form__textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;

  border: 1px solid #e2e8f0;
  border-radius: 9px;

  background-color: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;

  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.contactanos-form__input:focus,
.contactanos-form__textarea:focus {
  border-color: var(--color-primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.contactanos-form__textarea {
  min-height: 120px;
  resize: vertical;
}

/* =========================================================
   05. SELECTOR DE PAÍS / TELÉFONO
   ========================================================= */

.phone-input-group {
  display: flex;
  width: 100%;
  min-width: 0;
}

.country-code-select-wrapper {
  flex: 0 0 auto;
}

.country-code-select {
  width: auto !important;
  min-width: 105px;
  height: 100%;
  padding: 11px 12px;

  border: 1px solid #e2e8f0;
  border-right: none !important;
  border-radius: 9px 0 0 9px !important;

  background-color: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  outline: none;
  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.country-code-select:focus {
  position: relative;
  z-index: 1;
  border-color: var(--color-primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.phone-input-group .contactanos-form__input {
  border-radius: 0 9px 9px 0 !important;
}

/* =========================================================
   06. BOTÓN DE ENVÍO
   ========================================================= */

.contactanos-form__submit {
  width: 100% !important;
  justify-content: center !important;
  margin-top: 10px;
}

/* =========================================================
   07. RESPONSIVE
   ========================================================= */

/* Tablet: 769px - 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .contactanos-single-col {
    width: min(100% - 40px, 640px) !important;
  }

  .contactanos-form-wrapper {
    padding: 32px 34px;
  }
}

/* Mobile & Tablet pequeña: <= 768px */
@media (max-width: 768px) {
  .contactanos-form-section {
    padding: 28px 0 48px;
  }

  .contactanos-single-col {
    width: min(100% - 32px, 560px) !important;
  }

  .contactanos-header {
    margin-bottom: 20px;
  }

  .contactanos-header h2 {
    font-size: 23px;
  }

  .contactanos-header p {
    font-size: 13.5px;
  }

  .contactanos-form-wrapper {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .contactanos-form__group {
    margin-bottom: 15px;
  }

  .country-code-select {
    min-width: 95px;
    padding: 10px 10px;
    font-size: 13px;
  }

  .contactanos-form__input,
  .contactanos-form__textarea {
    padding: 10px 12px;
    font-size: 13.5px;
  }

  .contactanos-form__textarea {
    min-height: 105px;
  }
}

/* Mobile pequeño: <= 480px */
@media (max-width: 480px) {
  .contactanos-single-col {
    width: calc(100% - 24px) !important;
  }

  .contactanos-form-wrapper {
    padding: 20px 16px;
  }

  .contactanos-header h2 {
    font-size: 20px;
  }

  .country-code-select {
    min-width: 88px;
    padding: 10px 8px;
    font-size: 12.5px;
  }
}

/* Mobile muy pequeño: <= 360px */
@media (max-width: 360px) {
  .contactanos-single-col {
    width: calc(100% - 18px) !important;
  }

  .contactanos-header h2 {
    font-size: 19px;
  }
}

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  .contactanos-page *,
  .contactanos-page *::before,
  .contactanos-page *::after {
    animation: none !important;
    transition: none !important;
  }
}
