/* ========================
   CONTACTO HERO
   ======================== */

.contacto-hero {
  position: relative;
  padding-top: calc(var(--navbar-total-height) + var(--space-3xl));
  text-align: center;
  overflow: hidden;
}

/* Location text — matches hero-location style */
.contacto-badge {
  display: block;
  color: #93c5fd;
  font-size: var(--font-size-base);
  font-weight: var(--font-semibold);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-md);
}

.contacto-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-bold);
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.contacto-desc {
  color: rgba(255, 255, 255, 0.8);
  max-width: 660px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Gradient accent line — matches nosotros */
.contacto-hero-line {
  display: block;
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6 0%, #93c5fd 100%);
  margin: var(--space-xl) auto 0;
  border-radius: 2px;
}

/* Floating blobs */
.contacto-hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.contacto-hero-blob--1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 40% 40%, #3b82f6 0%, #1d4ed8 100%);
  opacity: 0.12;
  top: -140px;
  right: -100px;
}

.contacto-hero-blob--2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle at 60% 60%, #93c5fd 0%, #3b82f6 100%);
  opacity: 0.10;
  bottom: -80px;
  left: -60px;
}

@media (max-width: 768px) {
  .contacto-title {
    font-size: var(--font-size-3xl);
  }
}

/* ========================
   CONTACTO FORM SECTION
   ======================== */

.contacto-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-3xl);
  align-items: start;
}

/* ----- Info sidebar ----- */
.contacto-info {
  position: sticky;
  top: calc(var(--navbar-total-height) + var(--space-xl));
}

.contacto-info h2 {
  margin-bottom: var(--space-md);
  line-height: 1.2;
}

.contacto-info > p {
  margin-bottom: var(--space-2xl);
  line-height: 1.7;
}

.contacto-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  list-style: none;
}

.contacto-info-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.contacto-info-list li:hover {
  background-color: rgba(37, 99, 235, 0.04);
}

.contacto-info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  background-color: rgba(37, 99, 235, 0.08);
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.contacto-info-list li:hover .contacto-info-icon {
  background-color: rgba(37, 99, 235, 0.14);
  transform: scale(1.05);
}

.contacto-info-list li div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contacto-info-list li strong {
  font-weight: var(--font-semibold);
  color: var(--color-heading);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contacto-info-list li span,
.contacto-info-list li a {
  color: var(--color-body);
  font-size: var(--font-size-base);
  line-height: 1.5;
}

.contacto-info-list li a {
  transition: color 0.2s ease;
}

.contacto-info-list li a:hover {
  color: var(--color-primary);
}

/* ----- Form card ----- */
.contacto-form-card {
  background-color: #ffffff;
  border-radius: 16px;
  padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-top: 4px solid var(--color-primary);
  box-shadow: var(--shadow-xl);
}

.contacto-form-heading {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid #f1f5f9;
}

/* Mismos campos que /matricula: visibles solo si el motivo es matrícula */
.contacto-matricula-extra {
  display: none;
}

.contacto-form-card--matricula .contacto-matricula-extra {
  display: block;
}

/* ----- Fields ----- */
.contacto-field {
  margin-bottom: var(--space-lg);
  flex: 1;
  min-width: 0;
}

/* Two-column row for name+email, phone+subject */
.contacto-field-row {
  display: flex;
  gap: var(--space-lg);
}

.contacto-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: var(--font-semibold);
  color: var(--color-heading);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.contacto-field label .required {
  color: #ef4444;
  margin-left: 2px;
}

.contacto-field input,
.contacto-field select,
.contacto-field textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--font-size-base);
  color: var(--color-body);
  background-color: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  outline: none;
}

.contacto-field input::placeholder,
.contacto-field textarea::placeholder {
  color: #94a3b8;
}

.contacto-field input:hover,
.contacto-field select:hover,
.contacto-field textarea:hover {
  border-color: #cbd5e1;
}

.contacto-field input:focus,
.contacto-field select:focus,
.contacto-field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background-color: #ffffff;
}

.contacto-field input.is-invalid,
.contacto-field select.is-invalid,
.contacto-field textarea.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.contacto-field-error {
  display: block;
  font-size: 0.8125rem;
  color: #ef4444;
  margin-top: 4px;
  min-height: 0;
}

.contacto-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231e293b' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 5.646a.5.5 0 0 1 .708 0L8 8.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

.contacto-field textarea {
  resize: vertical;
  min-height: 130px;
}

/* ----- Submit button ----- */
.btn-contacto-submit {
  width: 100%;
  padding: 16px var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: var(--font-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
}

.btn-contacto-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-contacto-submit .btn-loading svg {
  display: block;
}

/* ----- Success state ----- */
.contacto-success {
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
}

.contacto-success-icon {
  margin-bottom: var(--space-xl);
}

.contacto-success-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.contacto-success h4 {
  margin-bottom: var(--space-sm);
}

.contacto-success p {
  margin-bottom: var(--space-xl);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  color: var(--color-body);
}

.contacto-reset-btn {
  display: inline-block;
}

/* ========================
   RESPONSIVE
   ======================== */

@media (max-width: 1024px) {
  .contacto-layout {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .contacto-info {
    position: static;
    text-align: center;
  }

  .contacto-info-list {
    align-items: center;
  }

  .contacto-info-list li {
    max-width: 360px;
  }
}

@media (max-width: 640px) {
  .contacto-form-card {
    padding: var(--space-xl) var(--space-lg);
  }

  .contacto-field-row {
    flex-direction: column;
    gap: 0;
  }

  .contacto-info-list li {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
