:root {
  --blue-900: #0d47a1;
  --blue-600: #1976d2;
  --muted: #6b7280;
  --card-bg: #ffffff;
  --page-bg: #f6fbff;
  --radius: 10px;
  --gap: 1rem;
  --max-width: 1100px;
  --shadow: 0 6px 18px rgba(13,71,161,0.08);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #1f2937;
}

* { box-sizing: border-box; }

/* Commented out to prevent conflict with Bootstrap
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: #1f2937;
}
*/

.novedad {
  font-family: Futura, sans-serif;
  width: 100%;   
  margin: 0 auto;
  text-align: center;
  color: #C00000;
  font-size: 15px;
  font-weight: bold;
  -webkit-animation: colorchange 15s infinite alternate;
}

/* Permitimos que el main crezca y deje al footer al final */
main.site-main {
  flex: 1;
}

/* Contenedor centrado y con padding */
.container-verifactu {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* HEADER */
header.site-header {
  background: linear-gradient(90deg, var(--blue-900), var(--blue-600));
  color: white;
  padding: 18px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}

.site-header .logo {
  width: 140px;
  max-width: 30%;
  display: flex;
  align-items: center;
}

.site-header img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
}

.site-header .title { flex: 1; }

.site-header h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.2px;
}

.site-header p {
  margin: 4px 0 0;
  font-size: 0.95rem;
  opacity: 0.95;
}

/* MAIN / CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--gap);
}

.card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 4px 14px rgba(16,24,40,0.06);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(16,24,40,0.10);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--blue-900);
}

.card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.card .actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.btn {
  display: inline-block;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  color: white;
  background: var(--blue-600);
  border: 0;
  cursor: pointer;
}

.btn.secondary {
  background: transparent;
  color: var(--blue-900);
  border: 1px solid rgba(13,71,161,0.10);
}

.sinnumerar {
  list-style: none; /* ya lo tienes */
  padding: 0;
  margin: 0;
}

.sinnumerar li {
  display: flex;
  align-items: flex-start; /* alinea la primera línea del texto con el icono */
  gap: 8px; /* espacio entre icono y texto */
  margin-bottom: 8px; /* opcional, espacio entre elementos */
}

/* LISTAS PDF */
ul.pdf-list {
  list-style: none;
  padding: 0;
  max-width: 700px;
  margin: 0 auto;
}

ul.pdf-list li {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  transition: background 0.2s, transform 0.2s;
}

ul.pdf-list li:hover {
  background: #f0f8ff;
  transform: translateY(-2px);
}

ul.pdf-list.magest li:first-child {
  border-left: 6px solid #B14C84;
  background-color: #f9e7f5;
  font-weight: bold;
}

ul.pdf-list.lexnext li:first-child {
  border-left: 6px solid #007bff;
  background-color: #e7f1ff;
  font-weight: bold;
}

ul.pdf-list.phoshability li:first-child {
  border-left: 6px solid #00c0ff;
  background-color: #e0f7ff;
  font-weight: bold;
}

ul.pdf-list a {
  color: #007bff;
  text-decoration: none;
  flex: 1;
}

ul.pdf-list a:hover {
  text-decoration: underline;
}

.no-files {
  text-align: center;
  color: #777;
  margin-top: 2rem;
}

.cards.single {
  display: grid !important;
  grid-template-columns: 1fr !important;
  justify-items: stretch;
}

.cards.single .card {
  width: 100%;
  max-width: none;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
}
.badge-magest { background-color: #B14C84; }
.badge-lexnext { background-color: #007bff; }
.badge-phoshability { background-color: #00c0ff; }

/* === Estilos FAQ === */
.faq-section {
  width: 90%;
  margin: 5px auto;
  padding: 0 20px;
}

.faq-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8rem;
  color: var(--text-color, #333);
}

.faq-item {
  background: var(--card-bg, #f9f9f9);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
  padding: 20px;
  transition: background-color 0.3s;
  cursor: pointer;
}

.faq-item:hover {
  background: #f0f4ff;
}

.faq-question {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-button {
  background: var(--button-bg, #005bbb);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 0.9rem;
}

.faq-button:hover {
  background: #0041a3;
}

.faq-answer {
  display: none;
  margin-top: 10px;
  color: var(--muted, #555);
  line-height: 1.5;
  text-align: justify;      /* Justifica todo el texto */
  text-align-last: left;    /* Última línea alineada a la izquierda */
}
  
.faq-item.active .faq-answer {
  display: block;
}

/* Contenedor alineado a la izquierda */
.cta-button-container-left {
  text-align: left;
  margin: 5px 0;
}

/* Botón pequeño y discreto */
.cta-button-small {
  display: inline-block;
  background-color: #e0e0e0;
  color: #005bbb;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: background-color 0.2s, transform 0.1s;
}

.cta-button-small:hover {
  background-color: #d0d0d0;
  transform: translateY(-1px);
}
/* centrar icono con texto */
.centrariconotexto {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  gap: 6px; 
  vertical-align: middle;
}

/* === LÍNEA DE TIEMPO MEJORADA === */
.timeline-list {
  list-style: none;
  padding: 0;
  margin: 30px auto;
  max-width: 800px;
  position: relative;
}

.timeline-list li {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 22px;
  padding-left: 70px;
}
/*
.timeline-list li::before {
  content: "";
  position: absolute;
  left: 34px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d0d8e8;
}*/

.timeline-list .icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  /*background: linear-gradient(145deg, #1976d2, #0d47a1);*/
 /* border-radius: 50%;*/
  display: flex;
  align-items: center;
  justify-content: center;
  /*color: white;*/
  font-size: 1rem;
  /*box-shadow: 0 0 0 3px #ffffff, 0 3px 6px rgba(0,0,0,0.1);*/
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 90%;
}

.timeline-content strong {
  font-size: 0.95rem;
  color: #0d47a1;
  white-space: nowrap;
}

.timeline-content span {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.45;
}

/* === FOOTER === */
.site-footer {
  background: #111111;
  border-radius: 0;
  padding: 20px 24px;
  box-shadow: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.92rem;
  color: #bbbbbb;
  border-top: none;
  position: relative;
  /*overflow: hidden;*/
  overflow: visible;
  margin-top: auto;
  z-index: 10;
}

/* degradado superior fino */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-900), var(--blue-600));
  opacity: 0.7;
}

/* izquierda - caja azul suave */
.footer-left {
  font-weight: 500;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
}
/* centro: gris por defecto, con efectos en hover (underline animada) */
.footer-center {
    flex: 1;
    text-align: center;
	color: #bbbbbb;
	font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; 
}
/* enlaces: gris base, con línea azul y fondo sutil al hover */
.footer-center a {
  color: #bbbbbb;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.15s ease;
  font-weight: 500;
  position: relative;
  flex: 0 0 calc(25% - 12px); 
  text-align: center;
}
/* linea animada debajo del enlace (inicialmente 0 width) */
.footer-center a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--blue-600);
  transition: width 0.28s cubic-bezier(.2,.9,.2,1);
  transform: translateX(-50%);
  border-radius: 2px;
}

/* hover: color azul, fondo sutil y underline se expande */
.footer-center a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.footer-center a:hover::after {
  width: 68%;
}

/* derecha: contacto */
.footer-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #bbbbbb;
}

/* mail en footer */
.footer-right a[href^="mailto:"] {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-right a[href^="mailto:"]:hover {
  color: var(--blue-600);
  text-decoration: underline;
}

.phone {
  font-weight: 500;
  color: #ffffff;
}

/* === Responsive === */
@media (min-width:720px){
  .cards{ grid-template-columns: repeat(2, 1fr); }
  .site-header h1{ font-size:1.35rem; }
}

@media (min-width:1024px){
  .cards{ grid-template-columns: repeat(3, 1fr); }
  .site-header .logo{ max-width:160px; }
  .container-verifactu { padding: 32px; }
}

@media (max-width: 768px) {
  .site-footer {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 16px;
  }

  .footer-center {
    order: 3;
    width: 100%;
    margin-top: 8px;
  }

  .footer-center a {
    margin: 0 4px;
    padding: 4px 8px;
    font-size: 0.85rem;
  }

  .footer-left,
  .footer-right {
    width: 100%;
    text-align: center;
  }

  .footer-right {
    order: 2;
  }
}
/* LISTA VERI o NO VERI */

.verificable-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 32px;
}

.verificable-cards .card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 30px;
  max-width: 450px;
  width: 100%;
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.8s ease;
}

.verificable-cards h2 {
  font-size: 1.2rem;
  margin: 0 0 12px; /* <-- poner margen top 0 para que no baje */
  color: var(--blue-900);
  text-align: center;
}

.verificable-cards ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1 0 auto; /* <-- ocupa el espacio disponible y empuja li hacia arriba */
  display: flex;
  flex-direction: column;
  gap: 6px; /* espacio entre li */
}

.verificable-cards li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
}


/* Iconos con parpadeo lineal */
.verificable-cards i {
  flex-shrink: 0;
  font-size: 1.2rem;
  animation: blink 3s linear infinite; /* transición lineal */
}

/* Verificable: verde */
.verificable-cards li i.fa-certificate {
  color: #16a34a;
}

/* No verificable: rojo */
.verificable-cards li i.fa-circle-xmark {
  color: #dc2626;
}

/* Parpadeo muy sutil e imperceptible */
@keyframes blink {
  0%, 49%, 51%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Fade-in de las cards */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 680px) {
  .verificable-cards {
    flex-direction: column;
    align-items: center;
  }

  .verificable-cards .card {
    max-width: 90%;
  }
}
/* Mantener tamaño correcto de los SVG (sin deformarse ni reducirse) */
.verificable-cards li svg,
.card.verificable li svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  min-width: 24px;
  min-height: 24px;
  max-width: 24px;
  max-height: 24px;
  display: block;
  object-fit: contain;
  vertical-align: middle;
}

/* === FIX: Evitar desbordes de texto en pantallas pequeñas === */
@media (max-width: 500px) {
  .card {
    padding: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .card h3,
  .card p,
  .card li,
  .card span,
  .card strong {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Asegura que listas y textos largos no rompan el layout */
  .card ul,
  .card ol {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Reduce levemente el tamaño de texto para pantallas ultra pequeñas */
  .card h3 { font-size: 0.95rem; }
  .card p,
  .card li,
  .card span { font-size: 0.9rem; }
}
/* Ajuste fino de alineación del texto que sigue a un icono */
.alinear-texto {
  position: relative;
  top: 2px; /* ↓ baja ligeramente el texto para alinearlo visualmente */
  /*display: inline-block;*/
}
/* CSS para la comparativa entre VERIFACTU y NO VERIFACTU */

/* Bloque de estilos aislado */
.comparativa {
  --color-borde: #d1d5db;
  --color-fondo: #f9fafb;
  --color-header: #0556ad;
  --color-texto: #111827;
  --color-alt: #eaf1ff;
  font-family: system-ui, sans-serif;
  margin: 2rem auto;
  max-width: 900px;
  padding: 1rem;
}

.comparativa-titulo {
  text-align: center;
  font-size: 1.5rem;
  color: var(--color-header);
  margin-bottom: 1rem;
}

/* Contenedor grid: 3 columnas */
.comparativa-grid {
  display: grid;
  grid-template-columns: 1fr 0.8fr 1.4fr;
  border: 1px solid var(--color-borde);
  border-radius: 8px;
  overflow: hidden;
}

/* Cabeceras */
.comparativa-header {
  background-color: var(--color-header);
  color: white;
  font-weight: 600;
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-borde);
}

/* Centrado horizontal/vertical en columnas 2 y 3 */
.comparativa-header:nth-child(3n-1),
.comparativa-header:nth-child(3n) {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Cabecera columna 1 (características) */
.comparativa-header:nth-child(3n-2) {
  text-align: left;
}

/* Filas y celdas */
.comparativa-row {
  display: contents; /* permite que los items sigan el grid */
}

.comparativa-item {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-borde);
  border-right: 1px solid var(--color-borde);
  color: var(--color-texto);
  font-weight: 500;
}

/* Sin borde derecho en última columna */
.comparativa-item:nth-child(3n) {
  border-right: none;
}

/* ✅ Centrar columnas 2 y 3 (contenido) */
.comparativa-item:nth-child(3n-1),
.comparativa-item:nth-child(3n) {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Columna 1 alineada a la izquierda */
.comparativa-item:nth-child(3n-2) {
  text-align: left;
}

/* Alternancia de color de filas completas */
.comparativa-row:nth-child(odd) .comparativa-item {
  background-color: var(--color-fondo); /* filas impares */
}

.comparativa-row:nth-child(even) .comparativa-item {
  background-color: var(--color-alt); /* filas pares */
}

/* --- Responsivo --- */
@media (max-width: 700px) {
  .comparativa-grid {
    grid-template-columns: 1fr;
  }

  .comparativa-header {
    display: block !important;
    text-align: left !important;
  }

  .comparativa-item {
    display: block !important;
    text-align: left !important;
    border-right: none;
    padding-left: 1.25rem;
  }

  .comparativa-item::before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    color: var(--color-header);
    margin-bottom: 0.25rem;
  }
}
/* === VF — Panel comparativo VeriFactu (RESTAURADO) === */
.vf-panel {
  --vf-border: var(--color-borde, #d1d5db);
  --vf-accent: var(--blue-900, #0556ad);

  width: 100%;
  max-width: 900px;
  margin: 1.5rem auto;
  border: 1px solid var(--vf-border);
  border-radius: 8px;
  overflow: hidden;           /* evita cajas cortadas */
  background: var(--color-fondo, #f9fafb); /* fondo gris claro coherente */
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  box-sizing: border-box;
}

/* fila = icono | título | texto */
.vf-row {
  display: grid;
  grid-template-columns: 60px 170px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

/* Separador: línea fina que diferencia secciones */
.vf-sep {
  height: 1px;
  background: var(--vf-border);
  width: 100%;
  margin: 0;
}

/* icono: caja fija y svg forzado a 24x24 */
.vf-icon {
  display:flex;
  align-items:center;
  justify-content:center;
  width:60px;
  height:60px;
  flex-shrink:0;
}
.vf-icon svg {
  width:24px !important;
  height:24px !important;
  min-width:24px;
  min-height:24px;
  display:block;
  object-fit:contain;
  vertical-align:middle;
}

/* título centrado */
.vf-title {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  line-height:1.15;
  color: var(--vf-accent);
  font-weight:600;
  font-size:1rem;
}
.vf-title .vf-sub {
  font-size:0.85rem;
  font-weight:500;
  color:#444;
}

/* texto descriptivo */
.vf-text {
  text-align: justify;
  color: #111827;
  font-size:0.95rem;
  line-height:1.45;
}

/* protección contra reglas globales que puedan romperlo */
.vf-panel *, .vf-panel *::before, .vf-panel *::after {
  box-sizing: border-box;
  margin: 0;
  border: 0;
  -webkit-font-smoothing: inherit;
  -moz-osx-font-smoothing: inherit;
}

/* responsive: apilar sin romper anchos ni cortar fondos */
@media (max-width: 700px) {
  .vf-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 10px;
    padding: 12px;
  }
  .vf-icon {
    width:44px;
    height:44px;
    margin: 0 auto;
  }
  .vf-title { align-items:center; }
  .vf-text { text-align: justify; padding: 0 6px; }
}

/* Errores VERIFACTU */
.collapsible{
  cursor:pointer;
  color:var(--accent);
  font-weight:600;
  margin:8px 0;
  padding:8px;
  border-radius:6px;
  background:#fff;
  border:1px solid #eee;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.collapsible.open{
  background:#eef4ff;
  border-color:#cfe0ff;
}
.collapsible .meta{color:#666;}

.hint{color:#666;font-size:0.9rem;margin-left:6px;}

.search-wrap{
  position:relative;
  display:flex;
  align-items:center;
}
#clearSearch{
  position:absolute;
  right:8px;
  background:none;
  border:none;
  color:#888;
  cursor:pointer;
  font-size:14px;
  display:none;
}
#clearSearch:hover{color:#000;}

@media (max-width:700px){
  .code{display:block;width:auto;}
  .card{flex-direction:column;}
}
/* === Dropdown footer (Manual) === */
.footer-dropdown {
  position: relative;
  display: inline-block;
}

.footer-dropdown-menu {
  position: absolute;
  bottom: 110%;               /* aparece encima del footer */
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: #1a1a1a;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  border: 1px solid #333333;
  display: none;
  flex-direction: column;
  z-index: 50;
  overflow: hidden;
}

.footer-dropdown-menu a {
  padding: 10px 14px;
  text-decoration: none;
  color: #bbbbbb;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  flex: none;
  width: 100%;
  text-align: left;
}

.footer-dropdown-menu a:hover {
  background: #333333;
  color: #ffffff;
}

/* Mostrar dropdown al hover */
.footer-dropdown:hover .footer-dropdown-menu {
  display: flex;
}

/* Indicador visual */
.footer-dropdown-toggle::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.75rem;
}

/* --- Responsive: en móvil se abre hacia abajo --- */
@media (max-width: 768px) {
  .footer-dropdown-menu {
    bottom: auto;
    top: 110%;
  }
}

/* Sombreado debajo de la imagen principal (Masthead) */
header.masthead {
  position: relative !important;
  z-index: 2 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
}
