:root {
        --navy: #003764;
        --navy-deep: #00294a;
        --red: #ea0029; --red-claro: #ff6f89;
        --red-dark: #c00021;
        --bg: #f8fafc;
        --fg: #10213a;
        --muted: #5b6b80;
        --border: #e2e8f0;
        --radius: 16px;
        --shadow: 0 2px 10px rgba(0, 41, 74, 0.08);
        --shadow-lg: 0 14px 40px rgba(0, 41, 74, 0.14);
        --font-head: "Outfit", "Segoe UI", system-ui, sans-serif;
        --font-body: "Work Sans", system-ui, -apple-system, sans-serif;
      }
      * { box-sizing: border-box; margin: 0; }
      html { scroll-behavior: smooth; }
      html, body { overflow-x: clip; }
      body {
        font-family: var(--font-body); font-size: 17px; line-height: 1.6;
        color: var(--fg); background: var(--bg); max-width: 100%;
      }
      img { max-width: 100%; height: auto; display: block; }
      a { color: inherit; text-decoration: none; }
      h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; }
      .wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

      .btn {
        display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
        font: 600 15.5px/1 var(--font-head); padding: 14px 26px; border-radius: 999px;
        border: 0; text-decoration: none; transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
      }
      .btn svg { width: 18px; height: 18px; }
      .btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 22px rgba(234, 0, 41, 0.35); }
      .btn-red:hover { background: var(--red-dark); transform: translateY(-2px); }
      .btn-navy { background: var(--navy); color: #fff; }
      .btn-navy:hover { background: var(--navy-deep); transform: translateY(-2px); }
      /* Magic UI: shimmer-button portado a CSS */
      .btn-shine { position: relative; overflow: hidden; }
      .btn-shine::after {
        content: ""; position: absolute; inset: 0; border-radius: inherit;
        background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
        transform: translateX(-120%); transition: none; animation: shine 3.2s ease-in-out infinite;
      }
      @keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
      .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(234, 0, 41, 0.5); outline-offset: 3px; }
      /* Botón LinkedIn */
      .btn-linked { display: inline-flex; align-items: center; gap: 9px; font: 600 15px/1 var(--font-head); background: #0a66c2; color: #fff; padding: 13px 24px; border-radius: 999px; transition: background 0.2s, transform 0.2s; }
      .btn-linked:hover { background: #084d92; transform: translateY(-2px); }
      .btn-linked svg { width: 19px; height: 19px; fill: currentColor; }

      /* Barra de progreso de scroll (Magic UI: scroll-progress) */
      .scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3.5px; z-index: 60; pointer-events: none; }
      .scroll-progress span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--red), #ff5c72); box-shadow: 0 0 10px rgba(234, 0, 41, 0.5); will-change: transform; }
      /* NAV (compartida con la home) */
      .nav {
        position: sticky; top: 0; z-index: 50; background: rgba(248, 250, 252, 0.86);
        backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); transition: box-shadow 0.25s;
      }
      .nav.scrolled { box-shadow: 0 6px 24px rgba(0, 41, 74, 0.08); }
      .nav-in { display: flex; align-items: center; gap: 22px; height: 68px; }
      .nav-logo img { height: 34px; width: auto; }
      /* Botón hamburguesa (solo móvil) */
      .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; margin-left: auto; width: 44px; height: 44px; padding: 10px; background: transparent; border: 0; cursor: pointer; border-radius: 10px; transition: background 0.2s; }
      .nav-toggle:hover { background: rgba(0, 41, 74, 0.06); }
      .nav-toggle span { display: block; height: 2.5px; width: 100%; border-radius: 2px; background: var(--navy); transition: transform 0.28s, opacity 0.2s; }
      .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
      .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
      .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
      .nav-links { display: none; flex-direction: column; gap: 2px; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 10px 20px 22px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
      .nav-links.open { display: flex; }
      .nav-links a { font: 500 16px/1 var(--font-head); color: var(--fg); padding: 15px 4px; border-bottom: 1px solid var(--border); position: relative; transition: color 0.2s; }
      .nav-links a.active, .nav-links a:hover { color: var(--red); }
      .nav-links-cta { margin-top: 16px; justify-content: center; border-bottom: 0 !important; color: #fff !important; padding: 15px 24px; }
      .nav-cta { display: none; margin-left: auto; padding: 11px 20px; font-size: 14.5px; }
      @media (min-width: 940px) {
        .nav-toggle { display: none; }
        .nav-links { display: flex; flex-direction: row; gap: 26px; margin-left: auto; position: static; background: none; padding: 0; border: 0; box-shadow: none; }
        .nav-links a { padding: 6px 2px; border-bottom: 0; font-size: 15px; }
        .nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--red); border-radius: 2px; }
        .nav-links-cta { display: none; }
        .nav-cta { display: inline-flex; margin-left: 0; }
      }

      /* HERO editorial con dot-pattern (Magic UI) */
      .news-hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; padding: 74px 0 60px; }
      .news-hero::before {
        content: ""; position: absolute; inset: 0;
        background-image: radial-gradient(rgba(255,255,255,0.16) 1.4px, transparent 1.4px);
        background-size: 22px 22px;
        -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 40%, transparent 78%);
        mask-image: radial-gradient(120% 90% at 50% 0%, #000 40%, transparent 78%);
      }
      .news-hero::after {
        content: ""; position: absolute; top: -120px; right: -80px; width: 340px; height: 340px; border-radius: 50%;
        background: radial-gradient(circle, rgba(234,0,41,0.35), transparent 62%); filter: blur(8px);
      }
      .news-hero .wrap { position: relative; z-index: 1; }
      .eyebrow {
        display: inline-flex; align-items: center; gap: 10px; text-transform: uppercase;
        letter-spacing: 0.14em; font: 600 12.5px/1 var(--font-head); color: var(--red-claro); margin-bottom: 16px;
      }
      .eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--red); border-radius: 2px; }
      .news-hero h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 700; letter-spacing: -0.01em; }
      .news-hero h1 em { color: var(--red-claro); font-style: normal; }
      .news-hero p { margin-top: 16px; font-size: 18.5px; color: rgba(255,255,255,0.78); max-width: 600px; }
      .news-hero-cta { margin-top: 26px; position: relative; z-index: 1; }

      /* Filtros por categoría */
      .filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 4px; position: relative; z-index: 1; }
      .filter {
        font: 500 14.5px/1 var(--font-head); color: #fff; cursor: pointer;
        background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22);
        padding: 10px 18px; border-radius: 999px; transition: background 0.2s, border-color 0.2s, color 0.2s;
      }
      .filter:hover { background: rgba(255,255,255,0.16); }
      .filter.active { background: #fff; color: var(--navy); border-color: #fff; }

      /* Sección de tarjetas */
      .news-wrap { padding: 54px 0 40px; }
      .bento { display: grid; gap: 24px; grid-template-columns: 1fr; }
      @media (min-width: 720px) { .bento { grid-template-columns: 1fr 1fr; } }
      @media (min-width: 1024px) { .bento { grid-template-columns: repeat(3, 1fr); } }

      .post {
        background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
        box-shadow: var(--shadow); display: flex; flex-direction: column;
        transition: transform 0.25s, box-shadow 0.25s; position: relative;
      }
      .post:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
      .post-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); }
      .post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
      .post:hover .post-media img { transform: scale(1.04); }
      .post-media.ph { display: grid; place-items: center; }
      .post-media.ph svg { width: 64px; height: 64px; color: rgba(255,255,255,0.5); }
      .cat {
        position: absolute; top: 12px; left: 12px; z-index: 2;
        font: 600 11.5px/1 var(--font-head); text-transform: uppercase; letter-spacing: 0.06em;
        color: #fff; padding: 7px 12px; border-radius: 999px; background: var(--red);
      }
      .cat.cert { background: #0b8a5b; }
      .cat.maq { background: var(--red); }
      .cat.evento { background: #6d28d9; }
      .cat.comunidad { background: var(--navy); }
      .cat.empresa { background: linear-gradient(120deg, var(--navy), var(--red)); }
      .post-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
      .post-date { font: 500 13px/1 var(--font-head); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
      .post-body h3 { font-size: 20px; color: var(--navy); }
      .post-body p { font-size: 15px; color: var(--muted); flex: 1; }
      .post-more { font: 600 14.5px/1 var(--font-head); color: var(--red); display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
      .post-more svg { width: 15px; height: 15px; transition: transform 0.2s; }
      .post:hover .post-more svg { transform: translateX(4px); }

      /* Featured (bento grande) + border-beam (Magic UI) */
      @media (min-width: 720px) { .post.feat { grid-column: span 2; grid-row: span 1; } }
      @media (min-width: 1024px) { .post.feat { grid-column: span 2; } }
      @media (min-width: 720px) { .post.feat { flex-direction: row; } .post.feat .post-media { flex: 1 1 52%; aspect-ratio: auto; } .post.feat .post-body { flex: 1 1 48%; justify-content: center; } }
      .post.feat .post-body h3 { font-size: clamp(22px, 2.6vw, 28px); }
      .post.feat::before {
        content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1.5px; pointer-events: none;
        background: conic-gradient(from var(--beam-a, 0deg), transparent 0 62%, var(--red) 72%, #ff8496 82%, transparent 92%);
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor; mask-composite: exclude; animation: beam 6s linear infinite;
      }
      @property --beam-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
      @keyframes beam { to { --beam-a: 360deg; } }

      .empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px 0; display: none; }

      /* Banner: seguir en LinkedIn */
      .li-follow { background: var(--bg); padding: 0 0 76px; }
      .li-card { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 30px; }
      .li-ic { width: 54px; height: 54px; border-radius: 14px; background: rgba(10,102,194,0.1); color: #0a66c2; display: grid; place-items: center; flex: 0 0 auto; }
      .li-ic svg { width: 30px; height: 30px; fill: currentColor; }
      .li-txt { flex: 1; min-width: 220px; }
      .li-txt b { display: block; font: 700 19px/1.2 var(--font-head); color: var(--navy); }
      .li-txt span { font-size: 15px; color: var(--muted); }

      /* Publicaciones en vivo desde LinkedIn (iframes oficiales) */
      .li-live { background: var(--bg); padding: 6px 0 8px; }
      .li-live-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
      .li-live-head .li-ic { width: 44px; height: 44px; border-radius: 12px; }
      .li-live-head .li-ic svg { width: 24px; height: 24px; }
      .li-live-head h2 { font-size: clamp(22px, 3vw, 30px); color: var(--navy); }
      .li-live p.sub { font-size: 15.5px; color: var(--muted); margin-bottom: 26px; }
      /* Feed masonry: respeta la altura real de cada publicación */
      .li-embeds { column-count: 2; column-gap: 24px; max-width: 1060px; margin: 0 auto; }
      @media (max-width: 820px) { .li-embeds { column-count: 1; max-width: 504px; } }
      .li-embed { break-inside: avoid; margin: 0 0 24px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
      .li-embed iframe { display: block; width: 100%; border: 0; }

      /* CTA final */
      .news-cta { background: var(--bg); padding: 0 0 90px; }
      .cta-card {
        background: linear-gradient(120deg, var(--navy), var(--navy-deep)); color: #fff; border-radius: 22px;
        padding: 52px 40px; text-align: center; position: relative; overflow: hidden;
      }
      .cta-card::before {
        content: ""; position: absolute; inset: 0;
        background-image: radial-gradient(rgba(255,255,255,0.12) 1.3px, transparent 1.3px); background-size: 20px 20px;
        -webkit-mask-image: radial-gradient(90% 120% at 50% 0%, #000 35%, transparent 75%);
        mask-image: radial-gradient(90% 120% at 50% 0%, #000 35%, transparent 75%);
      }
      .cta-card > * { position: relative; z-index: 1; }
      .cta-card h2 { font-size: clamp(26px, 3.4vw, 36px); }
      .cta-card p { color: rgba(255,255,255,0.8); margin: 12px auto 26px; max-width: 520px; }

      /* Reveal blur-fade (Magic UI) */
      [data-reveal] { opacity: 0; transform: translateY(22px); filter: blur(6px); transition: opacity 0.55s ease-out, transform 0.55s ease-out, filter 0.55s ease-out; }
      [data-reveal].in { opacity: 1; transform: none; filter: none; }

      /* FOOTER (igual a la home) */
      footer.site { background: var(--navy); color: rgba(255,255,255,0.82); padding: 60px 0 0; }
      .foot-grid { display: grid; gap: 40px; grid-template-columns: 1fr; }
      @media (min-width: 760px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
      footer.site img { height: 40px; width: auto; margin-bottom: 16px; background: #fff; padding: 8px 12px; border-radius: 10px; }
      footer.site p { font-size: 15px; line-height: 1.6; }
      footer.site h4 { font: 600 15px/1 var(--font-head); color: #fff; margin-bottom: 10px; }
      footer.site a:hover { color: #fff; }
      .social { display: flex; gap: 12px; margin-top: 12px; }
      .social a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,0.1); display: grid; place-items: center; transition: background 0.2s; }
      .social a:hover { background: var(--red); }
      .social svg { width: 20px; height: 20px; fill: #fff; }
      .foot-legal { border-top: 1px solid rgba(255,255,255,0.14); margin-top: 48px; padding: 20px 0; }
      .foot-legal .wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13.5px; color: rgba(255,255,255,0.6); }

      /* Volver arriba + hint chat (igual a la home) */
      .to-top {
        position: fixed; left: 20px; bottom: 20px; z-index: 40; width: 46px; height: 46px; border-radius: 50%;
        background: var(--navy); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center;
        box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(10px);
        transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.2s;
      }
      .to-top.show { opacity: 1; visibility: visible; transform: none; }
      .to-top:hover { background: var(--red); }
      .to-top svg { width: 22px; height: 22px; }


      @media (prefers-reduced-motion: reduce) {
        [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
        html { scroll-behavior: auto; }
        .btn-shine::after, .post.feat::before { animation: none; }
        .btn-shine::after { display: none; }
      }
      /* ===== Newsletter ===== */

      /* ===== Menú móvil: centrado + entrada con stagger (UX: 150-300ms, ease-out) ===== */
      @keyframes navDrop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
      @keyframes navItem { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
      @media (max-width: 939px) {
        .nav-links { text-align: center; padding-top: 14px; padding-bottom: 26px; }
        .nav-links.open { animation: navDrop 0.3s cubic-bezier(0.16, 0.84, 0.44, 1); }
        .nav-links a { justify-content: center; text-align: center; }
        .nav-links.open a { animation: navItem 0.42s cubic-bezier(0.16, 0.84, 0.44, 1) both; }
        .nav-links.open a:nth-child(1) { animation-delay: 0.04s; }
        .nav-links.open a:nth-child(2) { animation-delay: 0.08s; }
        .nav-links.open a:nth-child(3) { animation-delay: 0.12s; }
        .nav-links.open a:nth-child(4) { animation-delay: 0.16s; }
        .nav-links.open a:nth-child(5) { animation-delay: 0.20s; }
        .nav-links.open a:nth-child(6) { animation-delay: 0.24s; }
        .nav-links.open a:nth-child(7) { animation-delay: 0.28s; }
        .nav-links.open a:nth-child(8) { animation-delay: 0.32s; }
        .nav-links.open a:nth-child(9) { animation-delay: 0.36s; }
      }
      @media (prefers-reduced-motion: reduce) { .nav-links.open, .nav-links.open a { animation: none; } }

      /* Selector de idioma ES / EN */
      .lang-switch { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: #fff; }
      .lang-switch a { font: 600 12.5px/1 var(--font-head); letter-spacing: 0.03em; text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 999px; transition: background 0.2s, color 0.2s; border-bottom: 0 !important; }
      .lang-switch a.active { background: var(--navy); color: #fff; }
      .lang-switch a:hover:not(.active) { color: var(--navy); background: #f1f5f9; }
      @media (max-width: 919px) { .nav-links .lang-switch { align-self: center; margin: 18px auto 0; } }

      /* nav-fix: CTA en una sola línea */
      .btn { white-space: nowrap; }
      .nav-cta { flex: 0 0 auto; white-space: nowrap; }
      @media (min-width: 920px) { .nav-links { gap: 22px; } }
    
      /* >>> noticias-orden */
      /* --- Tarjetas: mismo ritmo en todas --- */
      .bento { gap: 26px; }
      .post-body { gap: 12px; }
      /* El texto se recorta a un largo fijo; la nota completa vive en su
         página o en LinkedIn. Sin esto cada tarjeta pesa distinto. */
      .post-body h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
      .post-body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 0 0 auto; }
      /* El enlace siempre abajo, alineado entre tarjetas. */
      .post-more { margin-top: auto; padding-top: 4px; }
      .post.feat .post-body h3 { -webkit-line-clamp: 3; }
      .post.feat .post-body p { -webkit-line-clamp: 5; }

      /* --- LinkedIn: banda propia, con la marca de LinkedIn --- */
      .li-live { background: linear-gradient(180deg, #e4eef9 0%, #d8e6f6 100%); border-top: 1px solid #c2d8ef; border-bottom: 1px solid #c2d8ef; padding: 58px 0 62px; margin-top: 76px; }
      .li-live-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
      .li-live-head .li-ic { width: 52px; height: 52px; border-radius: 14px; background: #0a66c2; color: #fff; }
      .li-live-head .li-ic svg { width: 28px; height: 28px; }
      .li-live-head h2 { font-size: clamp(24px,3.2vw,32px); color: var(--navy); margin: 0; }
      /* El botón de seguir va aquí arriba, no escondido al final. */
      .li-live-head .btn-linked { margin-left: auto; box-shadow: 0 8px 20px rgba(10,102,194,0.3); }
      .li-live p.sub { font-size: 16px; color: #46617f; margin-bottom: 30px; max-width: 640px; }

      /* Retícula pareja en vez de mampostería: cuatro publicaciones del mismo
         alto se leen como un feed; con alturas distintas, como un desorden. */
      .li-embeds { column-count: auto; display: grid; gap: 22px; grid-template-columns: 1fr; max-width: 1060px; margin: 0 auto; }
      @media (min-width: 820px) { .li-embeds { grid-template-columns: 1fr 1fr; } }
      .li-embed { margin: 0; border-color: #d4e2f4; box-shadow: 0 4px 16px rgba(10,54,100,0.1); transition: transform 0.25s, box-shadow 0.25s; }
      .li-embed:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(10,54,100,0.16); }
      .li-embed iframe { height: 600px; }
      @media (max-width: 520px) { .li-embed iframe { height: 540px; } }
      @media (prefers-reduced-motion: reduce) { .li-embed { transition: none; } .li-embed:hover { transform: none; } }
      /* La barra .li-follow se retiró: su llamado subió al encabezado. */
      .li-follow, .li-card, .li-txt { display: none; }
      /* <<< noticias-orden */
