/* =============================================
   AMIC UGT – pay.associacioamic.cat  v4
   ============================================= */

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

:root {
  --rojo:       #CC2222;
  --rojo-dark:  #aa1a1a;
  --negro:      #111111;
  --gris-text:  #555555;
  --gris-light: #f5f5f5;
  --gris-borde: #e0e0e0;
  --blanco:     #ffffff;
  --verde-ok:   #1a7a3a;
  --rojo-ko:    #CC2222;
  --font-main:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ar:    'Noto Sans Arabic', sans-serif;
  --radio:      8px;
  --sombra:     0 2px 12px rgba(0,0,0,0.08);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  color: var(--negro);
  background: var(--gris-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.rtl { font-family: var(--font-ar); }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
  background: var(--blanco);
  border-bottom: 1px solid var(--gris-borde);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-logo img { display: block; height: 48px; width: auto; }

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Selector de idioma tipo dropdown */
.lang-dropdown { position: relative; }

.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--gris-borde);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--negro);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s;
  white-space: nowrap;
}
.lang-btn:hover { border-color: #aaa; }

.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--blanco);
  border: 1px solid var(--gris-borde);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  overflow: hidden;
  min-width: 120px;
  z-index: 300;
}
.lang-menu.open { display: block; }

.lang-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gris-text);
  text-decoration: none;
  transition: background 0.1s;
}
.lang-menu a:hover { background: var(--gris-light); color: var(--negro); }
.lang-menu a.active {
  background: #fff0f0;
  color: var(--rojo);
  font-weight: 700;
}

/* Frase central header — solo escritorio */
.header-claim {
  font-size: 0.78rem;
  color: #999;
  text-align: center;
  flex: 1;
  padding: 0 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 680px) {
  .header-claim { display: none; }
}
.hero {
  background: var(--blanco);
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--gris-borde);
}

.hero h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--negro);
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.hero .subtitulo {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gris-text);
  line-height: 1.65;
  max-width: 580px;
  margin-bottom: 18px;
}

/* Indicador de proceso — una sola línea siempre */
.proceso-steps {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  margin-top: 4px;
  overflow: hidden;
}

.proceso-step {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.step-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gris-borde);
  color: #999;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-label {
  font-size: 0.72rem;
  color: #bbb;
  white-space: nowrap;
}

.proceso-step.active .step-num {
  background: var(--rojo);
  color: white;
}
.proceso-step.active .step-label {
  color: var(--negro);
  font-weight: 600;
}

.proceso-sep {
  font-size: 0.65rem;
  color: #ccc;
  margin: 0 6px;
  flex-shrink: 0;
}

@media (max-width: 400px) {
  .hero h1 { font-size: 1.35rem; }
  .step-label { font-size: 0.65rem; }
  .proceso-sep { margin: 0 4px; }
}

/* =============================================
   FORMULARIO
   ============================================= */
.formulario-section { padding: 24px 0; }

.card {
  background: var(--blanco);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  padding: 22px 24px;
  margin-bottom: 14px;
}

/* Servicios — nunca se rompe en móvil */
.servicio-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  flex-wrap: nowrap;
}

.servicio-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.servicio-nombre {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--negro);
}

.servicio-precio {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--rojo);
}

.servicio-divider {
  height: 1px;
  background: var(--gris-borde);
  margin: 12px 0;
}

/* Cantidad — fijo, nunca baja */
.qty-control {
  display: flex;
  align-items: center;
  border: 2px solid var(--gris-borde);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.qty-btn {
  background: var(--gris-light);
  border: none;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--negro);
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--gris-borde); }

.qty-control input[type="number"] {
  width: 42px;
  height: 36px;
  border: none;
  border-left: 1px solid var(--gris-borde);
  border-right: 1px solid var(--gris-borde);
  text-align: center;
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--negro);
  background: var(--blanco);
  -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; }

.multi-persona-hint {
  margin-top: 12px;
  padding: 8px 12px;
  background: #f0f7ff;
  border-left: 3px solid #4a90d9;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #2c5f8a;
  line-height: 1.4;
}

/* Datos */
.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--negro);
  margin-bottom: 5px;
}
.form-group label .req { color: var(--rojo); margin-left: 2px; }
.form-group label .opcional {
  font-size: 0.74rem;
  font-weight: 400;
  color: #999;
  margin-left: 4px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 6px;
  font-size: 0.97rem;
  font-family: inherit;
  color: var(--negro);
  background: var(--blanco);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--rojo);
  box-shadow: 0 0 0 3px rgba(204,34,34,0.1);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.error-msg {
  display: none;
  font-size: 0.78rem;
  color: var(--rojo);
  margin-top: 4px;
}
.error-msg.visible { display: block; }

/* Total y botón */
.total-card { text-align: center; }

.total-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.total-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gris-text);
}

.total-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--rojo);
}

.btn-pagar {
  display: block;
  width: 100%;
  padding: 15px 24px;
  background: var(--rojo);
  color: var(--blanco);
  border: none;
  border-radius: 6px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.15s, transform 0.1s;
  margin-bottom: 16px;
}
.btn-pagar:hover { background: var(--rojo-dark); }
.btn-pagar:active { transform: scale(0.99); }

/* Bloque de confianza — texto pequeño gris, alineado izquierda */
.confianza-block {
  padding-top: 14px;
  border-top: 1px solid var(--gris-borde);
  text-align: left;
}

.confianza-item {
  font-size: 0.72rem;
  color: #aaa;
  line-height: 1.6;
  padding: 1px 0;
}

/* =============================================
   QUÉ ES AMIC
   ============================================= */
.que-es-section {
  background: var(--blanco);
  padding: 44px 0;
  border-top: 1px solid var(--gris-borde);
}
.que-es-inner { display: flex; align-items: center; gap: 40px; }
.que-es-texto { flex: 1; }
.que-es-texto h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; color: var(--negro); }
.que-es-texto p { font-size: 0.94rem; color: var(--gris-text); line-height: 1.7; }
.que-es-imagen { flex-shrink: 0; }

/* =============================================
   FAQ
   ============================================= */
.faq-section { padding: 44px 0; background: var(--gris-light); }
.faq-section h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 18px; color: var(--negro); }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--blanco); border-radius: var(--radio); padding: 16px 20px; box-shadow: var(--sombra); }
.faq-pregunta { font-weight: 700; color: var(--negro); margin-bottom: 4px; font-size: 0.93rem; }
.faq-respuesta { font-size: 0.88rem; color: var(--gris-text); line-height: 1.6; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer { background: var(--negro); color: #ccc; padding: 28px 0; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.footer-info { font-size: 0.82rem; line-height: 1.7; color: #aaa; }
.footer-info strong { color: var(--blanco); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.footer-links a { font-size: 0.79rem; color: #aaa; text-decoration: none; }
.footer-links a:hover { color: var(--blanco); }
.footer-copy { font-size: 0.75rem; color: #666; border-top: 1px solid #333; padding-top: 14px; text-align: center; }

/* =============================================
   OK / KO
   ============================================= */
.resultado-page { background: var(--gris-light); }
.resultado-section { padding: 48px 0; }
.resultado-container { max-width: 640px; text-align: center; }
.resultado-icono { width: 72px; height: 72px; border-radius: 50%; font-size: 2rem; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.ok-icono { background: #e8f5ee; color: var(--verde-ok); }
.ko-icono { background: #fdecea; color: var(--rojo-ko); }
.resultado-container h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 16px; }
.resultado-section.ok h1 { color: var(--verde-ok); }
.resultado-section.ko h1 { color: var(--rojo-ko); }
.resultado-container p { font-size: 0.97rem; color: var(--gris-text); margin-bottom: 12px; line-height: 1.7; }
.resumen-pago { background: var(--blanco); border-radius: var(--radio); padding: 20px 24px; margin: 24px 0; text-align: left; box-shadow: var(--sombra); }
.resumen-pago h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; color: var(--negro); }
.resumen-pago table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.resumen-pago td { padding: 6px 0; color: var(--gris-text); }
.resumen-pago td:first-child { color: #888; width: 50%; }
.info-box { background: #f0f7ff; border-left: 4px solid #2277cc; border-radius: 0 var(--radio) var(--radio) 0; padding: 18px 20px; margin: 20px 0; text-align: left; }
.info-box h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; color: #1a4a88; }
.info-box p { font-size: 0.9rem; color: #2a5a99; margin: 0; }
.info-box a { color: #1a4a88; }
.ko-info { background: #fff8f8; border-left-color: var(--rojo); }
.ko-info h3 { color: var(--rojo-dark); }
.ko-info p, .ko-info li { color: #553333; font-size: 0.9rem; }
.ko-info ul { padding-left: 20px; margin: 8px 0; }
.ko-info li { margin-bottom: 6px; }
.problema-box { background: var(--gris-light); border-radius: var(--radio); padding: 16px 20px; margin: 16px 0; text-align: left; }
.problema-box h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 6px; }
.problema-box p { font-size: 0.87rem; color: var(--gris-text); }
.problema-box a { color: var(--rojo); }

/* =============================================
   BOTÓN WHATSAPP FLOTANTE
   ============================================= */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 7000; /* debajo del banner cookies z-index:8000 */
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: wapulse 2.5s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.whatsapp-float:hover,
.whatsapp-float:active {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  animation: none;
}

@keyframes wapulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(0,0,0,0.22); }
  50%       { box-shadow: 0 4px 26px rgba(37,211,102,0.7); }
}

@media (max-width: 480px) {
  .whatsapp-float { bottom: 20px; right: 16px; width: 52px; height: 52px; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 600px) {
  .card { padding: 16px 14px; }
  .form-row-2 { grid-template-columns: 1fr; }
  .que-es-inner { flex-direction: column; }
  .que-es-imagen { display: none; }
  .footer-inner { flex-direction: column; }
  .total-amount { font-size: 1.7rem; }
}

/* =============================================
   RTL
   ============================================= */
body.rtl .multi-persona-hint { border-left: none; border-right: 3px solid #4a90d9; }
body.rtl .confianza-block { text-align: right; }
body.rtl .whatsapp-float { right: auto; left: 28px; }

/* =============================================
   CHECKBOX TÉRMINOS Y CONDICIONES
   ============================================= */
.terminos-wrap {
  margin-bottom: 14px;
  text-align: left;
}
.terminos-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.83rem;
  color: var(--gris-text);
  line-height: 1.5;
}
.terminos-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--rojo);
  cursor: pointer;
}
.terminos-label a {
  color: var(--rojo);
  text-decoration: underline;
}
.terminos-label a:hover { color: var(--rojo-dark); }

/* =============================================
   FOOTER REDSYS LINE + LINKS
   ============================================= */
.footer-redsys {
  font-size: 0.72rem;
  color: #555;
  text-align: center;
  margin-bottom: 10px;
}
.footer-info a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.82rem;
}
.footer-info a:hover { color: var(--blanco); }

/* =============================================
   BANNER COOKIES — compacto, centrado
   ============================================= */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  background: var(--blanco);
  border-top: 1px solid var(--gris-borde);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.09);
  padding: 10px 20px 12px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.4s ease, opacity 0.4s ease;
  text-align: center;
}
.cookie-text {
  font-size: 0.8rem;
  color: var(--gris-text);
}
.cookie-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
}
.cookie-btn {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid var(--gris-borde);
  background: var(--blanco);
  color: var(--negro);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.cookie-btn:hover { background: var(--gris-light); }
.cookie-configurar { color: #2277cc; border-color: #b8d4f0; background: #f0f7ff; }
.cookie-configurar:hover { background: #ddeeff; }
.cookie-aceptar { background: #2277cc; color: white; border-color: #2277cc; }
.cookie-aceptar:hover { background: #1a5fa8; border-color: #1a5fa8; }
.cookie-rechazar { color: var(--gris-text); }

@media (max-width: 420px) {
  .cookie-btn { padding: 6px 12px; font-size: 0.74rem; }
}

/* =============================================
   MODAL COOKIES
   ============================================= */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.45);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cookie-modal-overlay.open { display: flex; }
.cookie-modal {
  background: var(--blanco);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  overflow: hidden;
}
.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--gris-borde);
}
.cookie-modal-header h3 { font-size: 1rem; font-weight: 700; color: var(--negro); }
.cookie-modal-close {
  background: none; border: none; font-size: 1rem;
  cursor: pointer; color: #999; padding: 4px;
}
.cookie-modal-close:hover { color: var(--negro); }
.cookie-modal-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cookie-modal-body > p { font-size: 0.85rem; color: var(--gris-text); line-height: 1.5; }
.cookie-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--gris-borde);
}
.cookie-option strong { font-size: 0.9rem; color: var(--negro); display: block; margin-bottom: 3px; }
.cookie-option p { font-size: 0.78rem; color: var(--gris-text); line-height: 1.4; margin: 0; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--gris-borde);
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: #2277cc; }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle input:disabled + .toggle-slider { background: #a0b4d4; cursor: not-allowed; }

.cookie-modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--gris-borde);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
