/* =========================================
   FORMULARIO CONTACTO - CSS AISLADO
   Prefijo cfc- para evitar conflictos
   ========================================= */

.cfc-wrapper,
.cfc-wrapper *,
.cfc-wrapper *::before,
.cfc-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.cfc-wrapper {
  --cfc-primary: #2563eb;
  --cfc-primary-dark: #1e40af;
  --cfc-text: #1f2937;
  --cfc-text-light: #6b7280;
  --cfc-border: #e5e7eb;
  --cfc-bg: #f9fafb;
  --cfc-white: #ffffff;
  --cfc-success: #10b981;
  --cfc-error: #ef4444;
  --cfc-radius: 12px;
  --cfc-shadow: 0 10px 30px rgba(0,0,0,0.08);

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 40px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--cfc-bg);
}

.cfc-box {
  width: 100%;
  max-width: 620px;
  background: var(--cfc-white);
  border-radius: var(--cfc-radius);
  box-shadow: var(--cfc-shadow);
  padding: 40px;
  border: 1px solid var(--cfc-border);
}

/* Header */
.cfc-header {
  margin-bottom: 28px;
  text-align: center;
}

.cfc-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--cfc-text);
  margin-bottom: 8px;
}

.cfc-header p {
  font-size: 14px;
  color: var(--cfc-text-light);
  line-height: 1.5;
}

/* Form layout */
.cfc-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cfc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.cfc-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cfc-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--cfc-text);
  letter-spacing: 0.3px;
}

.cfc-group input,
.cfc-group textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--cfc-text);
  background: var(--cfc-white);
  border: 1.5px solid var(--cfc-border);
  border-radius: 8px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.cfc-group input::placeholder,
.cfc-group textarea::placeholder {
  color: #9ca3af;
}

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

.cfc-group input.cfc-error,
.cfc-group textarea.cfc-error {
  border-color: var(--cfc-error);
}

.cfc-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Honeypot invisible */
.cfc-honeypot {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  width: 0 !important;
}

/* Botón */
.cfc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--cfc-white);
  background: linear-gradient(135deg, var(--cfc-primary), var(--cfc-primary-dark));
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, opacity .2s;
  letter-spacing: 0.3px;
}

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

.cfc-btn:active:not(:disabled) {
  transform: translateY(0);
}

.cfc-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.cfc-btn-loading { display: none; }
.cfc-btn.cfc-loading .cfc-btn-text { display: none; }
.cfc-btn.cfc-loading .cfc-btn-loading { display: inline; }

/* Mensajes de estado */
.cfc-msg {
  font-size: 13.5px;
  padding: 0;
  border-radius: 8px;
  text-align: center;
  transition: all .3s;
}

.cfc-msg.cfc-msg-error {
  padding: 10px 14px;
  background: #fef2f2;
  color: var(--cfc-error);
  border: 1px solid #fecaca;
}

.cfc-msg.cfc-msg-ok {
  padding: 10px 14px;
  background: #ecfdf5;
  color: var(--cfc-success);
  border: 1px solid #a7f3d0;
}

/* ============ MODAL CONFIRMACIÓN ============ */
.cfc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
  animation: cfcFade .25s ease;
}

.cfc-modal-overlay.cfc-show { display: flex; }

.cfc-modal {
  background: var(--cfc-white, #fff);
  border-radius: 16px;
  padding: 36px 30px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: cfcPop .3s cubic-bezier(.18,.89,.32,1.28);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.cfc-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  box-shadow: 0 8px 20px rgba(16,185,129,0.4);
}

.cfc-modal h3 {
  font-size: 22px;
  color: #1f2937;
  margin-bottom: 10px;
  font-weight: 700;
}

.cfc-modal p {
  font-size: 14.5px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
}

.cfc-modal p strong { color: #1f2937; }

.cfc-modal .cfc-btn {
  max-width: 180px;
  margin: 0 auto;
}

@keyframes cfcFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes cfcPop {
  from { opacity: 0; transform: scale(.9) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .cfc-wrapper { padding: 24px 12px; }
  .cfc-box { padding: 28px 22px; border-radius: 10px; }
  .cfc-header h2 { font-size: 22px; }
  .cfc-row { grid-template-columns: 1fr; gap: 16px; }
  .cfc-modal { padding: 28px 22px; }
  .cfc-modal h3 { font-size: 19px; }
}
/* =========================================
   CONFIRMACIÓN INLINE (reemplaza al form)
   ========================================= */
.cfc-confirm {
  text-align: center;
  padding: 20px 10px 10px;
  animation: cfcFadeIn .4s ease;
}

.cfc-confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 38px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 10px 24px rgba(16,185,129,0.35);
  animation: cfcPopIn .45s cubic-bezier(.18,.89,.32,1.28);
}

.cfc-confirm h3 {
  font-size: 22px;
  color: var(--cfc-text);
  margin-bottom: 10px;
  font-weight: 700;
}

.cfc-confirm p {
  font-size: 14.5px;
  color: var(--cfc-text-light);
  line-height: 1.6;
  margin-bottom: 24px;
}

.cfc-confirm p strong { color: var(--cfc-text); }

.cfc-confirm .cfc-btn {
  max-width: 220px;
  margin: 0 auto;
}

@keyframes cfcFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cfcPopIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}
