/* ============================================================
   ACP · Agenda tu cita
   Diseño formal corporativo · Paleta Volvo
   ============================================================ */

:root {
  /* === Paleta corporativa (CMYK → HEX) === */
  --acp-brand:        #0000CC;  /* Azul logo — principal */
  --acp-brand-dark:   #00009E;  /* Hover del brand */
  --acp-brand-light:  #E6E6FA;  /* Wash del brand */

  /* Azules de la paleta adjunta */
  --blue-100-40:      #0066B3;  /* C100 M40 Y0 K0 */
  --blue-100-55:      #00549E;  /* C100 M55 Y0 K0 */
  --blue-100-70:      #1E3A8A;  /* C100 M70 Y0 K0 */
  --blue-100-80:      #1E3A7A;  /* C100 M80 Y0 K0 */
  --blue-95-60-20:    #1A4F8A;  /* C95 M60 Y0 K20 */
  --blue-100-40-40:   #123F66;  /* C100 M40 Y0 K40 */
  --blue-100-90-50:   #0D1B4C;  /* C100 M90 Y0 K50 */
  --blue-100-100-40:  #1A1440;  /* C100 M100 Y40 K40 */

  /* Neutros de la paleta */
  --neutral-sand:     #CCA877;  /* C0 M20 Y50 K20 — arena */
  --neutral-slate:    #9AA4AC;  /* C10 M0 Y0 K40 — gris azulado */
  --neutral-stone:    #858D82;  /* C20 M10 Y20 K40 — gris verdoso */

  /* Negros y blancos */
  --ink-100:          #0A0A0A;  /* Negro */
  --ink-90:           #1A1A1F;
  --ink-70:           #3D3D45;
  --ink-50:           #6B6B75;
  --ink-30:           #A8A8B0;
  --ink-15:           #D5D5DA;
  --ink-08:           #E8E8EC;
  --ink-05:           #F2F2F5;
  --ink-02:           #FAFAFB;
  --white:            #FFFFFF;

  /* Semánticos */
  --success:          #0F7A4C;
  --success-bg:       #E6F4EC;
  --error:            #B42318;
  --error-bg:         #FEF2F1;

  /* UI tokens */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --field-h: 46px;
  --shadow-card: 0 20px 60px rgba(13, 27, 76, 0.18), 0 2px 8px rgba(13, 27, 76, 0.08);
  --shadow-input-focus: 0 0 0 3px rgba(0, 0, 204, 0.12);

  /* Fuentes */
  --f-body: 'Calibri', system-ui, -apple-system, 'Calibri', sans-serif;
  --f-serif: 'Calibri', Georgia, serif;
}

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-90);
  background: var(--blue-100-90-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
fieldset { border: none; padding: 0; margin: 0; }

/* ========== FONDO ========== */
.bg-image {
  position: fixed;
  inset: 0;
  background-image: url('images/background-acp.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -3;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(135deg,
      rgba(26, 20, 64, 0.92) 0%,
      rgba(13, 27, 76, 0.88) 45%,
      rgba(30, 58, 138, 0.82) 100%);
}

/* ========== PAGE ========== */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== BRAND BAR ========== */
.brand-bar {
  padding: 28px 0 20px;
}

.brand-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.logo-acp {
  height: 44px;
  width: auto;
}

.brand-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.3);
}

.logo-volvo {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* ========== FORM WRAPPER ========== */
.form-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 24px 20px 40px;
}

/* ========== FORM CARD ========== */
.form-card {
  width: 100%;
  max-width: 860px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  animation: cardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* Barra superior de marca */
.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--acp-brand);
}

/* ========== CARD HEADER ========== */
.card-header {
  padding: 48px 56px 36px;
  border-bottom: 1px solid var(--ink-08);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acp-brand);
  padding: 6px 14px;
  background: var(--acp-brand-light);
  border-radius: 100px;
  margin-bottom: 20px;
}

.card-header h1 {
  font-family: var(--f-serif);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink-90);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-50);
  max-width: 540px;
  margin: 0 auto;
}

/* ========== FORM BODY ========== */
.cita-form {
  padding: 40px 56px 48px;
}

/* ========== SECCIONES ========== */
.section {
  margin-bottom: 36px;
}
.section:last-of-type { margin-bottom: 28px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-100-90-50);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-08);
  width: 100%;
}

.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--acp-brand);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  letter-spacing: 0;
}

/* ========== GRID ========== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px 20px;
}

.field.full { grid-column: 1 / -1; }

/* ========== LABELS ========== */
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-90);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.req {
  color: var(--acp-brand);
  font-weight: 700;
  margin-left: 2px;
}

/* ========== INPUTS / SELECTS / TEXTAREA ========== */
.field input,
.field select,
.field textarea {
  width: 100%;
  height: var(--field-h);
  padding: 0 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-90);
  background: var(--white);
  border: 1px solid var(--ink-15);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
}

.field textarea {
  height: auto;
  min-height: 110px;
  padding: 12px 14px;
  resize: vertical;
  line-height: 1.6;
  font-family: inherit;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-30);
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-50);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--acp-brand);
  box-shadow: var(--shadow-input-focus);
}

.field input.error,
.field select.error,
.field textarea.error {
  border-color: var(--error);
  background: var(--error-bg);
}

/* Select custom arrow */
.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-50);
  border-bottom: 2px solid var(--ink-50);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: border-color 0.2s ease;
}

.select-wrap:hover::after { border-color: var(--ink-90); }

.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  cursor: pointer;
}

/* ========== NOTA CAMPOS OBLIGATORIOS ========== */
.required-note {
  font-size: 13px;
  color: var(--ink-50);
  margin: 0 0 24px;
  padding: 12px 16px;
  background: var(--ink-02);
  border-left: 3px solid var(--acp-brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ========== COMPLIANCE (políticas + captcha) ========== */
.compliance {
  background: var(--ink-02);
  border: 1px solid var(--ink-08);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 28px;
}

/* Checkbox de políticas */
.check-policy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--ink-08);
}

.check-policy input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-visual {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink-50);
  border-radius: 3px;
  background: var(--white);
  position: relative;
  transition: all 0.2s ease;
  margin-top: 1px;
}

.check-policy input[type="checkbox"]:checked + .checkbox-visual {
  background: var(--acp-brand);
  border-color: var(--acp-brand);
}

.check-policy input[type="checkbox"]:checked + .checkbox-visual::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg);
}

.check-policy input[type="checkbox"]:focus-visible + .checkbox-visual {
  box-shadow: var(--shadow-input-focus);
}

.check-text {
  font-size: 13.5px;
  color: var(--ink-70);
  line-height: 1.55;
}

.check-text a {
  color: var(--acp-brand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.check-text a:hover { color: var(--acp-brand-dark); }

/* Captcha */
.captcha-block { }

.captcha-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-70);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.g-recaptcha {
  transform-origin: 0 0;
}

/* ========== ACTIONS ========== */
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 36px;
  height: 52px;
  background: var(--acp-brand);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 204, 0.25);
}

.btn-primary:hover {
  background: var(--acp-brand-dark);
  box-shadow: 0 8px 24px rgba(0, 0, 204, 0.35);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 204, 0.3);
}

.btn-primary:disabled {
  background: var(--ink-30);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn-primary svg { transition: transform 0.2s ease; }
.btn-primary:hover:not(:disabled) svg { transform: translateX(3px); }

.response-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-50);
  margin: 0;
}

.response-time svg {
  color: var(--acp-brand);
  flex-shrink: 0;
}

/* ========== MENSAJE DE ÉXITO ========== */
.success-msg {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding: 18px 22px;
  background: var(--success-bg);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-md);
  animation: fadeUp 0.4s ease;
}

.success-msg svg {
  color: var(--success);
  flex-shrink: 0;
  margin-top: 1px;
}

.success-msg strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 2px;
}

.success-msg span {
  font-size: 13px;
  color: var(--ink-70);
}

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

/* ========== CARD FOOTER ========== */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 56px;
  background: var(--ink-02);
  border-top: 1px solid var(--ink-08);
}

.footer-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.footer-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-50);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-90);
  transition: color 0.2s ease;
}

a.footer-value:hover { color: var(--acp-brand); }

.footer-divider {
  width: 1px;
  height: 32px;
  background: var(--ink-15);
}

/* ========== LEGAL FOOTER ========== */
.legal-footer {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 720px) {
  .brand-bar { padding: 20px 0 16px; }
  .brand-inner { gap: 16px; padding: 0 20px; }
  .logo-acp { height: 36px; }
  .logo-volvo { height: 18px; }

  .form-wrapper { padding: 16px 16px 32px; }

  .card-header { padding: 36px 28px 28px; }
  .cita-form { padding: 28px 28px 36px; }
  .card-footer { padding: 20px 28px; flex-direction: column; gap: 16px; }
  .footer-divider { width: 32px; height: 1px; }

  .grid-2 { grid-template-columns: 1fr; gap: 16px; }

  .compliance { padding: 18px 18px; }

  .actions { flex-direction: column; align-items: stretch; }
  .btn-primary { justify-content: center; width: 100%; }
  .response-time { justify-content: center; }

  .g-recaptcha { transform: scale(0.95); }
}

@media (max-width: 420px) {
  .card-header { padding: 28px 20px 22px; }
  .cita-form { padding: 24px 20px 28px; }
  .card-footer { padding: 18px 20px; }
  .card-header h1 { font-size: 26px; }
  .subtitle { font-size: 14px; }

  .section-title {
    font-size: 12px;
    gap: 10px;
  }
  .section-num {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .g-recaptcha { transform: scale(0.85); }
}

/* ========== PRINT (por si imprimen el formulario) ========== */
@media print {
  .bg-image, .bg-overlay, .brand-bar, .legal-footer { display: none; }
  body { background: white; }
  .form-card { box-shadow: none; border: 1px solid #ccc; }
}
