/* ── VARIABLES ── */
:root {
  --blue-primary: #2563EB;
  --blue-light:   #DBEAFE;
  --blue-mid:     #3B82F6;
  --bg:           #E8F3FC;
  --white:        #FFFFFF;
  --text-dark:    #1E293B;
  --text-muted:   #64748B;
  --input-bg:     #F0F7FF;
  --shadow:       0 4px 24px rgba(37,99,235,0.10);
}

body { background: var(--bg); }

/* ── LAYOUT PRINCIPAL ── */
.content {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 2rem;
  align-items: start;
}

/* ── FORM CARD ── */
.form-card {
  grid-column: 1;
  grid-row: 1 / 3;
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ── HERO ── */
.hero {
  grid-column: 2;
  grid-row: 1;
  padding: 0.5rem 0 0;
}

.hero h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.2;
  flex-wrap: wrap;
}

.hero h1 svg {
  flex-shrink: 0;
  width: clamp(36px, 4.5vw, 56px);
  height: clamp(36px, 4.5vw, 56px);
}

.hero h1 .contacto { color: var(--blue-primary); }

.hero p {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  line-height: 1.65;
}

/* ── INFO CARD ── */
.info-card {
  grid-column: 2;
  grid-row: 2;
  background: var(--white);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-top: 10%;
}

.info-card h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem; }

.info-item { margin-bottom: 1.1rem; }

.info-item h3 {
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.info-item h3 svg { flex-shrink: 0; }
.info-item p { font-size: 0.95rem; font-weight: 500; padding-left: 30px; }

/* ── FORM HEADER ── */
.form-header {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-mid));
  padding: 1.75rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.form-header::before {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.form-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.18);
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.form-badge::before {
  content: '';
  width: 8px; height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  flex-shrink: 0;
}

.form-header h2 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 700; color: white; margin-bottom: 0.25rem; }
.form-header p  { color: rgba(255,255,255,0.82); font-size: 0.9rem; }

/* ── FORM BODY ── */
.form-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.field { display: flex; flex-direction: column; gap: 0.35rem; }

.field label { margin-top: 8px; font-size: 0.88rem; font-weight: 600; }

.field input,
.field textarea {
  background: var(--input-bg);
  border: 1.5px solid #BFDBFE;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
  width: 100%;
  box-sizing: border-box;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.field textarea { height: 130px; }

/* ── BOTONES ── */
.botones {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1rem;
}

.btn-submit {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-mid));
  color: white;
  border: none;
  border-radius: 12px;
  width: 100%;
  max-width: 200px;
  height: 46px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.45); }

/* ── SUCCESS MODAL OVERLAY (MENSAJES) ── */
.success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(232, 243, 252, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1.5rem;
  opacity: 1;
  transition: opacity 0.4s ease;
}

.success-overlay.exit-anim {
  opacity: 0;
  pointer-events: none;
}

.success-modal {
  background: var(--white);
  border: 1px solid #BFDBFE;
  border-radius: 24px;
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  animation: slideDownIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform-origin: top center;
}

.success-modal.exit-anim {
  animation: slideUpOut 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}

/* Animaciones */
@keyframes slideDownIn {
  from {
    opacity: 0;
    transform: translateY(-80px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideUpOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-80px) scale(0.9);
  }
}

/* Ícono de éxito animado premium */
.success-icon-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 0.5rem;
}

.success-icon-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  animation: pulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.success-icon-bg {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 70px;
  height: 70px;
  background: rgba(34, 197, 94, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
}

.success-icon-bg svg {
  width: 38px;
  height: 38px;
  stroke: #22c55e;
  animation: scaleCheck 0.4s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.85);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.2;
  }
  100% {
    transform: scale(0.85);
    opacity: 0.8;
  }
}

@keyframes scaleCheck {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.success-modal h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.success-modal p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.btn-back {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-mid));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37,99,235,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-back:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}

.btn-back svg {
  transition: transform 0.2s;
}

.btn-back:hover svg {
  transform: translateX(-3px);
}

.error-box {
  background: #FEE2E2; border: 1.5px solid #FCA5A5;
  border-radius: 12px; padding: 1rem 1.25rem;
  color: #DC2626; font-weight: 600; font-size: 0.9rem;
}

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */

@media (max-width: 1024px) {
  .content {
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    padding: 0 1.25rem;
  }
}

@media (max-width: 768px) {
  .content {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.25rem;
    margin: 1.5rem auto;
    padding: 0 1rem;
  }

  .hero      { grid-column: 1; grid-row: 1; padding: 0; }
  .form-card { grid-column: 1; grid-row: 2; }
  .info-card { grid-column: 1; grid-row: 3; margin-bottom: 1rem; }

  .hero h1 { font-size: 1.55rem; }
  .hero h1 svg { width: 36px; height: 36px; }

  .form-header { padding: 1.5rem 1.25rem; }
  .form-body   { padding: 1.5rem 1.25rem; }

  .botones    { justify-content: stretch; }
  .btn-submit { max-width: 100%; width: 100%; }
}

@media (max-width: 480px) {
  .content {
    padding: 0 0.75rem;
    margin: 1rem auto;
    gap: 1rem;
  }

  .hero h1 { font-size: 1.3rem; gap: 8px; }
  .hero h1 svg { width: 30px; height: 30px; }
  .hero p  { font-size: 0.9rem; }

  .form-header { padding: 1.25rem 1rem; }
  .form-body   { padding: 1.25rem 1rem; }
  .info-card   { padding: 1.25rem 1rem; }

  .field input,
  .field textarea { font-size: 0.9rem; padding: 0.65rem 0.85rem; }
}