/* ════════════════════════════════════════════════════════════════
   TPVReady — Landing CSS (Metro Tiles modernizados)
   eXtremaNET Consultores Tecnológicos S.L.U.
   ════════════════════════════════════════════════════════════════ */

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

:root {
  /* Identidad corporativa TPVReady / eXtremaNET */
  --color-primary: #1a1a2e;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-light: #eff6ff;
  --color-purple: #7c3aed;
  --color-purple-light: #f5f3ff;
  --color-text: #1e293b;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-success: #059669;
  --color-success-light: #ecfdf5;
  --color-warn: #d97706;
  --color-warn-light: #fff7ed;
  --color-danger: #dc2626;
  --color-cyan: #0891b2;
  --color-pink: #db2777;
  --color-teal: #0d9488;
  --color-indigo: #4f46e5;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 48px rgba(15, 23, 42, 0.10);
  --shadow-tile: 0 6px 18px rgba(15, 23, 42, 0.10);
  --shadow-tile-hover: 0 14px 32px rgba(15, 23, 42, 0.18);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

html, body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

body { display: flex; flex-direction: column; min-height: 100vh; }
a { color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ════════════════════════════════════════════════════════════════
   HEADER (consistente con landing actual)
   ════════════════════════════════════════════════════════════════ */
.site-header {
  padding: 1rem 2rem;
  border-bottom: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 72px;
}
.site-header.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 130px;
}
.logo-container img { height: 36px; width: auto; max-height: 42px; }
.logo-container .brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header-nav a.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.header-nav a.nav-link:hover { color: var(--color-accent); }

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-header:hover { transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-secondary:hover { background: var(--color-accent-light); }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); }

/* ════════════════════════════════════════════════════════════════
   HERO compacto del landing
   ════════════════════════════════════════════════════════════════ */
.hero-compact {
  position: relative;
  padding: 4rem 2rem 2.5rem;
  text-align: center;
  background:
    radial-gradient(ellipse 760px 420px at 70% 20%, rgba(37, 99, 235, 0.10), transparent 65%),
    radial-gradient(ellipse 760px 420px at 20% 80%, rgba(124, 58, 237, 0.08), transparent 65%),
    linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
}

.hero-compact .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-accent);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.hero-compact h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  line-height: 1.1;
  max-width: 920px;
  margin: 0 auto 1rem;
}
.hero-compact h1 .accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-compact .subtitle {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--color-muted);
  max-width: 720px;
  margin: 0 auto 1.75rem;
  line-height: 1.55;
}

.hero-compact .cta-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-hero.primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}
.btn-hero.primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}
.btn-hero.secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn-hero.secondary:hover { background: var(--color-accent-light); }

/* ════════════════════════════════════════════════════════════════
   TILES METRO MODERNIZADOS — Mosaico irregular
   ════════════════════════════════════════════════════════════════ */
.tiles-section {
  padding: 3rem 1.5rem 5rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.tiles-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.tiles-section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.tiles-section-header p {
  font-size: 1rem;
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Grid mosaico irregular — 6 columnas en desktop, tiles ocupan 1 o 2 */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 150px;
  gap: 12px;
}

@media (max-width: 1024px) {
  .tiles-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 140px; }
}
@media (max-width: 640px) {
  .tiles-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; gap: 10px; }
}

/* Tile base */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem;
  text-decoration: none;
  color: #fff;
  border-radius: 4px; /* casi cuadrado, estilo Metro */
  overflow: hidden;
  box-shadow: var(--shadow-tile);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.25s ease;
  isolation: isolate;
  cursor: pointer;
}

/* Brillo sutil tipo Metro encima del degradado */
.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.12) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Mancha de luz arriba-derecha (efecto moderno) */
.tile::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.4s ease;
}

.tile > * { position: relative; z-index: 2; }

.tile:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-tile-hover);
}
.tile:hover::after {
  transform: scale(1.15) translate(-10px, 10px);
}
.tile:active {
  transform: translateY(-2px) scale(0.995);
}

.tile-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.tile-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.tile-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.tile-desc {
  font-size: 0.82rem;
  font-weight: 400;
  opacity: 0.92;
  margin-top: 0.25rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tamaños — mosaico irregular */
.tile.tile-2x2 { grid-column: span 2; grid-row: span 2; }
.tile.tile-2x1 { grid-column: span 2; grid-row: span 1; }
.tile.tile-1x2 { grid-column: span 1; grid-row: span 2; }
.tile.tile-1x1 { grid-column: span 1; grid-row: span 1; }

/* En tiles grandes, agrandamos icono y título */
.tile.tile-2x2 .tile-icon { width: 64px; height: 64px; }
.tile.tile-2x2 .tile-title { font-size: 1.45rem; }
.tile.tile-2x2 .tile-desc {
  font-size: 0.9rem;
  -webkit-line-clamp: 3;
}

.tile.tile-2x1 .tile-icon { width: 48px; height: 48px; }
.tile.tile-2x1 .tile-title { font-size: 1.15rem; }

/* Responsive: en móvil las grandes pasan a 2x1 (ancho completo en 2 cols) */
@media (max-width: 640px) {
  .tile.tile-2x2 { grid-column: span 2; grid-row: span 2; }
  .tile.tile-1x2 { grid-column: span 1; grid-row: span 2; }
  .tile.tile-2x1 { grid-column: span 2; grid-row: span 1; }
}

/* ─── Variantes de color con degradado sutil ─── */
.tile.azul {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}
.tile.morado {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}
.tile.verde {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}
.tile.naranja {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
}
.tile.rojo {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}
.tile.cyan {
  background: linear-gradient(135deg, #0891b2 0%, #155e75 100%);
}
.tile.rosa {
  background: linear-gradient(135deg, #db2777 0%, #9d174d 100%);
}
.tile.teal {
  background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
}
.tile.indigo {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
}
.tile.gris-oscuro {
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
}
.tile.ambar {
  background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
}
.tile.lima {
  background: linear-gradient(135deg, #65a30d 0%, #3f6212 100%);
}

/* ════════════════════════════════════════════════════════════════
   BANDA Verifactu / CTA secundario
   ════════════════════════════════════════════════════════════════ */
.banda-verifactu {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.banda-verifactu::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 300px at 20% 50%, rgba(37, 99, 235, 0.25), transparent 70%),
    radial-gradient(ellipse 600px 300px at 80% 50%, rgba(124, 58, 237, 0.25), transparent 70%);
  pointer-events: none;
}
.banda-verifactu > * { position: relative; z-index: 2; }
.banda-verifactu .badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.banda-verifactu h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.banda-verifactu h2 em {
  font-style: normal;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.banda-verifactu p {
  max-width: 680px;
  margin: 0 auto 1.5rem;
  color: #cbd5e1;
  font-size: 1rem;
}

/* ════════════════════════════════════════════════════════════════
   FOOTER global
   ════════════════════════════════════════════════════════════════ */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3rem 2rem 1.5rem;
  margin-top: auto;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}
.footer-brand .brand img { height: 28px; }
.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: #94a3b8;
  margin-bottom: 1rem;
}
.footer-brand .empresa-info {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #94a3b8;
}
.footer-brand .empresa-info a { color: #cbd5e1; }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  margin-bottom: 0.85rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.45rem; }
.footer-col a {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #64748b;
}
.footer-bottom a { color: #cbd5e1; text-decoration: none; }

/* ════════════════════════════════════════════════════════════════
   Animación de aparición
   ════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════════
   MENÚ RESPONSIVE — Hamburguesa + panel lateral
   Añadido automáticamente por assets/js/header.js
   ════════════════════════════════════════════════════════════════ */

/* Botón hamburguesa: oculto en desktop por defecto */
.tpvr-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--color-primary, #1a1a2e);
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
  flex-shrink: 0;
}
.tpvr-menu-toggle:hover {
  background: var(--color-surface, #f8fafc);
  border-color: var(--color-accent, #2563eb);
  color: var(--color-accent, #2563eb);
}
.tpvr-menu-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Backdrop oscuro detrás del panel */
.tpvr-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.tpvr-menu-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Panel lateral deslizable desde la derecha */
.tpvr-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(85vw, 340px);
  background: white;
  box-shadow: -10px 0 32px rgba(15, 23, 42, 0.15);
  z-index: 1100;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tpvr-menu-panel.is-open {
  transform: translateX(0);
}

/* Cabecera dentro del panel */
.tpvr-menu-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  min-height: 72px;
  flex-shrink: 0;
}
.tpvr-menu-panel-header .logo-container {
  pointer-events: none; /* no necesitamos que el logo sea clicable dentro del panel */
}
.tpvr-menu-brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary, #1a1a2e);
  letter-spacing: -0.02em;
}

/* Botón cerrar (X) */
.tpvr-menu-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--color-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.tpvr-menu-close:hover {
  background: var(--color-surface, #f8fafc);
  color: var(--color-primary, #1a1a2e);
}
.tpvr-menu-close svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Lista de enlaces del panel */
.tpvr-menu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 1rem 1.25rem;
  flex: 1;
}
.tpvr-menu-links a.nav-link {
  display: block;
  padding: 0.85rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text, #1e293b);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.tpvr-menu-links a.nav-link:hover {
  background: var(--color-accent-light, #eff6ff);
  color: var(--color-accent, #2563eb);
}
.tpvr-menu-links a.btn-header {
  margin-top: 0.5rem;
  padding: 0.85rem 1.15rem;
  justify-content: center;
  font-size: 0.95rem;
  width: 100%;
  text-align: center;
}
/* En el panel, los botones ocupan todo el ancho */
.tpvr-menu-links a.btn-header.btn-secondary {
  background: transparent;
  color: var(--color-accent, #2563eb);
  border: 1.5px solid var(--color-accent, #2563eb);
}
.tpvr-menu-links a.btn-header.btn-primary {
  background: var(--color-accent, #2563eb);
  color: #fff;
}
/* ────────────────────────────────────────────────────────────────
   Marco de imagen / placeholder
   ──────────────────────────────────────────────────────────────── */
.modulo-imagen {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #f1f5f9
}
.modulo-imagen img {
  width: 100%;
  height: 100%;
  
  display: block;
}


/* ─── Breakpoint móvil: < 768px ─── */
@media (max-width: 768px) {
  /* Mostrar la hamburguesa */
  .tpvr-menu-toggle {
    display: inline-flex;
  }
  /* Ocultar el nav original */
  .site-header .header-nav {
    display: none;
  }
  /* El header se queda solo con logo + hamburguesa */
  .site-header {
    padding: 0.75rem 1rem;
  }
}

/* Respetar prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .tpvr-menu-panel,
  .tpvr-menu-backdrop {
    transition: none;
  }
}