/*
Theme Name: Nordik Marketing
Theme URI: https://nordikmarketing.es
Author: Alfonso Gómez
Description: Tema escandinavo minimalista para Agencia PrestaShop.
Version: 1.0
*/

/* ------------------------------
   Variables (paleta nórdica)
--------------------------------*/
:root {
    --bg: #f7f8fa;         /* blanco ártico */
    --paper: #ffffff;      /* nieve */
    --ink: #0f172a;        /* azul pizarra */
    --muted: #6B7280;      /* gris fiordo */
    --line: #e5e7eb;       /* bruma */
    --accent: #0ea5e9;     /* azul glacial */
    --accent-ink: #075985; /* azul profundo */
    --basalt: #111827;     /* basalto */
    --shadow-sm: 0 10px 28px rgba(2,6,23,.04);
    --shadow-md: 0 20px 50px rgba(2,6,23,.08);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --wrap: 1200px;
    --header-h: 64px;
}

/* ------------------------------
   Reset + base tipográfica
--------------------------------*/
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* Títulos */
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-family: Domine, Georgia, serif; font-size: 48px; }
h2 { font-family: Domine, Georgia, serif; font-size: 34px; }
h3 { font-weight: 700; font-size: 20px; }
h4 { font-weight: 700; font-size: 16px; }

/* Texto secundario */
.sub { color: var(--muted); }

/* Links */
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Focus visible accesible */
:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 3px;
}

/* ------------------------------
   Header / Nav
--------------------------------*/
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--ink);
  font-size: 26px;
}
.brand-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3rem;
  
}

.brand-link:hover {
  text-decoration: none;
}

.brand-link .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: var(--ink); font-size: 15px; text-decoration: none; }
.nav-links a:hover { color: var(--basalt); text-decoration: none; }
.nav-links .cta {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* Breadcrumbs */
.breadcrumbs{font-size:.875rem;color:#6b7280;margin:.5rem 0 0}
.breadcrumbs ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap}
.breadcrumbs li{display:flex;align-items:center}
.breadcrumbs li+li::before{content:"›";margin:0 .5rem;opacity:.6}
.breadcrumbs a{text-decoration:none;color:inherit}
.breadcrumbs a:hover{text-decoration:underline}
.breadcrumbs [aria-current="page"]{font-weight:600;color:#111827}
.hero .sub{margin-bottom:.5rem}

/* ------------------------------
   Secciones
--------------------------------*/
section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

/* ------------------------------
   Hero
--------------------------------*/
.hero { position: relative; overflow: hidden; }
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  min-height: calc(72vh - var(--header-h));
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 52%;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(14,165,233,.08) 0 25%, transparent 26%),
    linear-gradient(135deg, rgba(17,24,39,.06) 12%, transparent 12% 50%, rgba(17,24,39,.06) 50% 62%, transparent 62%);
  background-size: 220px 220px, 28px 28px;
  background-repeat: repeat;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent);
          mask-image: linear-gradient(to bottom, black, transparent);
}
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 24px; }

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 14px;
}
.tagline { font-size: 14px !important; color: var(--muted) !important; }

/* Variante compacta de hero para páginas internas o blog */
section.hero--compact {
  padding: 32px 0;       
  border-bottom: 1px solid var(--line);
}

.hero--compact + section {
  padding-top: 40px;     
}


.hero--compact .wrap {
  display: block;               
  min-height: auto;             
  gap: 0;
  padding-top: 2rem;
  padding-bottom: 1rem;
}
.hero--compact h1 {
  margin-bottom: .25rem;
  line-height: 1.15;
}
.hero--compact .sub {
  margin: 0;
}
.hero--compact .breadcrumbs {
  margin-top: .25rem;
}

/* =========================================================
   HERO VISUAL – BLOQUE PRESTASHOP
   ========================================================= */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 320px;
}
.visual-bar {
  position: absolute;
  inset: 0;
  /* background: linear-gradient(90deg, #f0f2f5, #f7f8fa); */
  z-index: 0;
}
.visual-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 3rem 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.visual-presta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  filter: saturate(0.8) brightness(1.05);
  opacity: 0.9;
}
.visual-presta img {
  width: 140px;
  height: auto;
  opacity: 0.95;
}
.visual-presta .tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #555;
  letter-spacing: 0.02em;
  margin: 0;
}

/* ------------------------------
   Botones
--------------------------------*/
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, opacity .2s ease;
  box-shadow: 0 6px 16px rgba(14,165,233,.25);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: transparent;
  color: var(--basalt);
  border-color: var(--line);
  box-shadow: none;
}

/* === Botón LinkedIn / Identidad profesional === */
.btn.linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #0A66C2; /* color corporativo LinkedIn */
  border: 1px solid #0A66C2;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.btn.linkedin:hover {
  background: #0A66C2;
  color: #fff;
  transform: translateY(-1px);
}

.btn.linkedin svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ------------------------------
   Grids / Tarjetas
--------------------------------*/
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-6 { display: grid; grid-template-columns: repeat(6,1fr); gap: 16px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card p { margin: 0; color: var(--muted); }

.service {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.service h4 { margin: 8px 0 6px; font-size: 16px; }
.service p { margin: 0; color: var(--muted); font-size: 14px; }

/* ------------------------------
   Casos de éxito
--------------------------------*/
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.case {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.case .img { background: linear-gradient(90deg,#e5e7eb,#f3f4f6); height: 180px; }
.case .body { padding: 18px; }

/* ------------------------------
   Diferenciales / Iconos
--------------------------------*/
.icons { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.iconitem {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

/* ------------------------------
   Tecnología
--------------------------------*/
.logo-row {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    align-items: center;
    color: #4b5563;
}
.logo {
    background: var(--paper);
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
}

/* ------------------------------
   Testimonios
--------------------------------*/
.testis { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.quote {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
}

/* ------------------------------
   Autor - Wrap SEO
--------------------------------*/
.author-link {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color .2s ease, text-decoration-thickness .2s ease;
}

.author-link:hover,
.author-link:focus {
    color: var(--accent-hover, var(--accent));
    text-decoration-thickness: 2px;
}

/* =========================================================
   PRESENCIA LOCAL (HOME)
   ========================================================= */
#presencia-local .local-links,
#presencia-internacional .local-links{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
#presencia-local .local-links a,
#presencia-internacional .local-links a{
  display: inline-block;
  padding: .5rem .75rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  text-decoration: none;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
#presencia-local .local-links a:hover,
#presencia-internacional .local-links a:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: #fafafa;
}


/* =========================================================
   CTA / FORMULARIO DE CONTACTO
   ========================================================= */

/* Contenedor general a dos columnas: texto izq. / formulario dcha. */
.cta.two-col {
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: start;
  gap: 3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
}

/* Columna izquierda (título + copy + mensajes globales) */
.cta-header { max-width: 600px; }
.cta-header h2 { margin-bottom: 0.25rem; }
.cta-header .sub { margin-bottom: 0.25rem; }
.cta-header .note { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }

/* Formulario (columna derecha) */
.form-contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #374151;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #111827;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: #475569;
  box-shadow: 0 0 0 3px rgba(71,85,105,0.15);
  outline: none;
}

/* Checkbox consentimiento en línea */
.form-field.checkbox label {
  display: block;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: #374151;
}

.form-field.checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--accent);
}

.consent-error {
  color: #b91c1c;
  font-size: 12px;
  margin-left: 1.5rem;
}

/* Botón */
.form-contact .btn {
  align-self: flex-start;
}

/* Cursor pointer cuando el botón está activo */
.form-contact .btn:not([disabled]):hover {
  cursor: pointer;
}

/* Estado disabled del botón */
button[disabled],
.btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
  box-shadow: none;
}

/* Mensajes de feedback */
.form-response,
.form-success,
.form-fail {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  display: inline-block;
}

.form-response.info { color:#475569; background:#f1f5f9; border:1px solid #e2e8f0; }
.form-response.success,
.form-success { color:#065f46; background:#d1fae5; border:1px solid #10b981; }
.form-response.error,
.form-fail { color:#991b1b; background:#fee2e2; border:1px solid #ef4444; }

/* Ocultar elementos hidden */
[hidden],
.form-success[hidden],
.form-fail[hidden],
.form-response[hidden] {
  display: none !important;
  visibility: hidden;
  opacity: 0;
}

/* Transición suave */
.form-success,
.form-fail,
.form-response {
  transition: opacity 0.25s ease;
  opacity: 1;
  visibility: visible;
}

/* Estados de validación por accesibilidad (usa aria-invalid) */
.form-field [aria-invalid="true"] {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}
.form-field [aria-invalid="false"]:not(:placeholder-shown) {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12) !important;
}

/* Mensajes de error bajo cada campo */
.form-field .error {
  color: #b91c1c;
  font-size: 12px;
  min-height: 16px; /* evita salto cuando aparece */
}

/* Añade un asterisco rojo a todos los label de campos requeridos */
.form-contact label::after {
  content: '*';
  color: #dc2626; /* rojo Tailwind 600 */
  margin-left: 4px;
  font-weight: 700;
}

/* No mostrar el asterisco en el checkbox de consentimiento */
.form-field.checkbox label::after {
  content: none;
}

.form-contact .honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-contact .honeypot input {
  opacity: 0;
  pointer-events: none;
}

/* Responsivo */
@media (max-width: 780px) {
  .cta.two-col { grid-template-columns: 1fr; gap: 2rem; }
}


/* ------------------------------
   SEO footer
--------------------------------*/
.seo { font-size: 14px; color: var(--muted); }

/* ------------------------------
   Micro-sección islandesa
--------------------------------*/
.icelandic {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 16px;
  margin-top: 10px;
}
.icelandic .tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}
.icelandic .is { font-size: 13px; color: #334155; font-weight: 700; letter-spacing: .3px; }
.icelandic .is small { display: block; color: var(--muted); font-weight: 500; }

/* ------------------------------
   Footer
--------------------------------*/
footer {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  background: transparent;
}
footer .footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
footer .links { color: var(--muted); }

/* ------------------------------
   Utilidades
--------------------------------*/
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }

/* ------------------------------
   Responsivo
--------------------------------*/
@media (max-width: 1100px) {
  .grid-6 { grid-template-columns: repeat(3,1fr); }
  .hero .wrap { grid-template-columns: 1fr; }
  h1 { font-size: 40px; }
}
@media (max-width: 860px) {
  .icons { grid-template-columns: repeat(2,1fr); }
  .cases { grid-template-columns: 1fr; }
  .testis { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-6 { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 34px; }
  h2 { font-size: 28px; }
  section { padding: 56px 0; }
  .icelandic { grid-template-columns: 1fr; }
}

/* ====== Brand / Logo responsive ====== */
.brand img {
  height: clamp(24px, 4.5vw, 32px);
  width: auto;
}
.brand { font-size: clamp(18px, 2.6vw, 26px); }

/* ============================
   BLOG – base y tarjeta genérica
   ============================ */

/* margen superior propio del listado del blog */
#blog {
  padding-top: 30px;
}

/* grid genérico de tarjetas (para listados) */
#blog .grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* tarjeta base */
#blog .card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: transform .2s ease, box-shadow .2s ease;
}
#blog .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* imagen dentro de tarjeta */
#blog .card .thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
#blog .card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
#blog .card:hover .thumb img {
  transform: scale(1.05);
}

/* cuerpo de tarjeta */
#blog .card .body {
  padding: 1.2rem 1.4rem 1.4rem;
}

/* título de tarjeta */
#blog .card h2 {
  font-size: 1.15rem;
  margin: 0 0 .25rem;
  line-height: 1.3;
}
#blog .card h2 a {
  color: #111827;
  text-decoration: none;
  transition: color .2s ease;
}
#blog .card h2 a:hover {
  color: #0EA5E9;
}

/* meta (fecha) en tarjeta */
#blog .card .meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 .6rem;
  letter-spacing: .02em;
}

/* texto de tarjeta */
#blog .card p {
  margin: 0 0 .8rem;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* etiquetas en tarjeta */
#blog .card .tags {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
#blog .card .tag {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background .2s, color .2s;
}
#blog .card .tag:hover {
  background: #111827;
  color: #fff;
}

/* ============================
   BLOG – portada (layout + variantes)
   ============================ */

/* fila superior: destacado + columna derecha */
#blog .blog-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .8fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
  align-items: stretch; /* mismas alturas */
}

/* tarjeta destacada (izquierda) */
#blog .card--featured {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 1.5rem;
  min-height: 260px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  height: 100%;
}
#blog .card--featured .thumb {
  aspect-ratio: auto;
  height: 100%;
  min-height: 220px;
}
#blog .card--featured .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#blog .card--featured .body {
  padding: 1.3rem 1.4rem 1.4rem 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
#blog .card--featured h2 {
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.25;
}
#blog .card--featured .meta {
  margin-bottom: .25rem;
}

/* columna derecha (2 últimos) */
#blog .blog-top__right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

/* tarjetas pequeñas de la derecha */
#blog .card--latest {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.1rem 1.2rem;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .2s ease, box-shadow .2s ease;
}
#blog .card--latest:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
#blog .card--latest h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: .35rem 0 .6rem;
  line-height: 1.35;
  font-family: Domine, Georgia, serif;
}
#blog .card--latest h3 a {
  color: #111827;
  text-decoration: none;
  transition: color .2s ease;
}
#blog .card--latest h3 a:hover {
  color: #0EA5E9;
}
#blog .card--latest .meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: .35rem;
}

/* fila inferior 80 / 20 */
#blog .blog-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 300px;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* lista vertical de posts (columna ancha) */
#blog .blog-bottom__main .card--row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
#blog .blog-bottom__main .card--row .thumb {
  aspect-ratio: auto;
  height: 100%;
  min-height: 170px;
}
#blog .blog-bottom__main .card--row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================
   POST INDIVIDUAL
   ============================ */

/* Breadcrumbs en línea dentro de la hero */
.hero .breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.hero .breadcrumbs li {
  display: flex;
  align-items: center;
}
.hero .breadcrumbs li+li::before {
  content: "›";
  opacity: .6;
  margin: 0 .25rem;
}

/* Imagen destacada full-bleed optimizada */
.featured-bleed {
  margin: 0;
  line-height: 0;
  overflow: hidden;
  max-height: 600px;
  position: relative;
}
.featured-bleed img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}

/* layout del post */
#post .post-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 320px;
  gap: 2rem;
  padding: 1.5rem 0 2rem;
}
#post .post-date {
  font-size: .9rem;
  color: #6b7280;
  margin: 0 0 2rem;
  letter-spacing: .02em;
}
#post .post-sub {
  font-size: 1.05rem;
  color: #374151;
  margin: .25rem 0 1rem;
  line-height: 1.6;
}
#post .post-content p {
  margin: 1rem 0;
  color: #111827;
  line-height: 1.75;
  /*font-family: Domine, Georgia, serif;*/
}

/* tags del post */
#post .post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.25rem 0;
}
#post .post-tags .tag {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  font-size: .85rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  text-decoration: none;
}
#post .post-tags .tag:hover {
  background: #111827;
  color: #fff;
}

/* navegación anterior/siguiente */
#post .post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}
#post .post-nav .prev,
#post .post-nav .next {
  flex: 1;
}
#post .post-nav .prev a,
#post .post-nav .next a {
  display: block;
  text-decoration: none;
  color: #111827;
  padding: .75rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
#post .post-nav .prev a:hover,
#post .post-nav .next a:hover {
  background: #111827;
  color: #fff;
  transform: translateY(-2px);
}
#post .post-nav .k {
  display: block;
  font-size: .75rem;
  opacity: .7;
  margin-bottom: .25rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
#post .post-nav strong {
  font-weight: 600;
  line-height: 1.35;
}

/* CTA al final del post */
#post .cta {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

/* headings dentro del contenido */
#post .post-content h2,
#post .post-content h3,
#post .post-content h4 {
  color: #111827;
  line-height: 1.25;
  font-weight: 600;
}
#post .post-content h2 {
  font-size: 1.5rem;
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}
#post .post-content h3 {
  font-size: 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: .75rem;
}
#post .post-content h4 {
  font-size: 1.05rem;
  margin-top: 1.25rem;
  margin-bottom: .5rem;
}

/* listas dentro del post */
#post .post-content ul,
#post .post-content ol {
  margin: 0 0 1.25rem 1.25rem;
  padding-left: 1.25rem;
}
#post .post-content li {
  margin-bottom: .35rem;
}

/* blockquotes del markdown */
#post blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  border-radius: .5rem;
  color: #1f2937;
}
#post blockquote p:last-child {
  margin-bottom: 0;
}

/* notas personalizadas */
#post .note {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: #f3f4f6;
  border-left: 4px solid #0f172a;
  border-radius: .5rem;
}

/* tablas dentro del contenido */
#post .post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
#post .post-content thead th {
  background: #f3f4f6;
  text-align: left;
  font-weight: 600;
}
#post .post-content th,
#post .post-content td {
  border: 1px solid #e5e7eb;
  padding: .6rem .75rem;
}
#post .post-content tr:nth-child(even) {
  background: #f9fafb;
}

/* contenedor horizontal que metes en el .md */
#post .post-content > div[style*="overflow-x"] {
  margin: 1.25rem 0 1.5rem;
}

/* código */
#post .post-content code {
  background: rgba(15, 23, 42, .05);
  padding: .15rem .4rem;
  border-radius: .25rem;
  font-size: .85em;
}
#post .post-content pre {
  background: #0f172a;
  color: #fff;
  padding: 1rem 1.25rem;
  border-radius: .75rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: .85rem;
}
#post .post-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 980px) {
  #blog .blog-top,
  #blog .blog-bottom {
    grid-template-columns: 1fr;
  }
  #blog .card--featured {
    grid-template-columns: 1fr;
    height: auto;
  }
  #blog .card--featured .body {
    padding: 1.4rem;
  }
  #blog .card--featured .thumb {
    min-height: 200px;
  }
  #blog .blog-top__right {
    height: auto;
  }
  #blog .card--latest {
    flex: none;
  }
  #blog .blog-bottom__main .card--row {
    grid-template-columns: 1fr;
  }
  #post .post-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .featured-bleed { max-height: 360px; }
  .featured-bleed img { object-position: center 45%; }
}


/* ====== NAV: botón hamburguesa ====== */
.nav-toggle {
  display: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px;
  margin-left: auto;
  cursor: pointer;
  line-height: 0;
}
.nav-toggle-box {
  display: inline-block;
  width: 26px;
  height: 22px;
  position: relative;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--ink);
  content: "";
  transition: transform .2s ease, opacity .2s ease, top .2s ease, bottom .2s ease;
}
.nav-toggle-bar { top: 10px; }
.nav-toggle-bar::before { top: -8px; }
.nav-toggle-bar::after  { bottom: -8px; }

/* Icono en X cuando está abierto */
header.is-open .nav-toggle-bar { background: transparent; }
header.is-open .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
header.is-open .nav-toggle-bar::after  { bottom: 0; transform: rotate(-45deg); }

/* ====== NAV: comportamiento móvil ====== */
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }

  /* Dropdown móvil: centrado, ancho limitado y flotante */
  .nav-links {
    position: absolute;
    top: calc(var(--header-h) + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    width: min(90%, 380px);
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 60;
  }

  header.is-open .nav-links {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  /* Enlaces con mejor tocabilidad y legibilidad */
  .nav-links a {
    display: block;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--basalt);
    border-radius: 10px;
    text-align: center;
    background: transparent;
    transition: background .2s ease, color .2s ease;
  }
  .nav-links a:hover { background: #f8fafc; color: var(--ink); }

  /* CTA destacado pero limpio */
  .nav-links .cta {
    margin-top: 4px;
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 14px rgba(14,165,233,.25);
  }

  /* Asegura contexto de posicionamiento */
  nav { position: relative; }
}

/* ====== NAV: comportamiento escritorio ====== */
@media (min-width: 961px) {
  .nav-links {
    position: static;
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 0;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}

/* Opcional: baja la altura del header en móvil si lo ves alto */
@media (max-width: 960px) {
  :root { --header-h: 56px; }
}


/* Opcional: mejora del sticky en iOS/Android con superposición */
@supports (backdrop-filter: blur(8px)) {
  header { background: rgba(255,255,255,.75); }
}

/* ============================
   PÁGINAS LOCALES
   ============================ */
#proces .card,
#proceso .card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 15px;
}   

/* ------------------------------
   Preferencias de movimiento
--------------------------------*/
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------
   Modo impresión (resumen)
--------------------------------*/
@media print {
  header, .cta, .logo-row, .testis { display: none !important; }
  section { border: 0; padding: 24px 0; }
  .wrap { max-width: 100%; padding: 0; }
  a { color: #000; text-decoration: none; }
}
