/* Blog ED Solution Tech - stile self-contained (tema scuro coerente col sito) */
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Keep these public-blog tokens aligned with src/app/globals.css. */
  --bg: #101722;
  --bg-soft: #162131;
  --surface: #1c2a3b;
  --surface-2: #233348;
  --border: #34445a;
  --border-soft: #29394e;
  --foreground: #f2f5fa;
  --muted: #b0bed0;
  --faint: #9bacc2;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-solid: #2563eb;
  --cyan: #85b2ff;
  --font-heading: "Sora", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--foreground);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.b-skip {
  position: fixed; top: 0.5rem; left: 0.5rem; z-index: 60; padding: 0.65rem 1rem;
  border-radius: 0.5rem; background: var(--foreground); color: var(--bg); font-weight: 600;
  transform: translateY(-150%); transition: transform .15s ease-out;
}
.b-skip:focus { transform: translateY(0); }
.wrap { width: 100%; max-width: 104rem; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .wrap { padding: 0 2rem; } }
@media (min-width: 1280px) { .wrap { padding-left: 3.5rem; padding-right: 3.5rem; } }

/* Header */
.b-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16,23,34,0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.b-header .row { display: flex; align-items: center; justify-content: space-between; }
.b-mainrow { height: 64px; }

/* Barra contatti (come nel sito) */
.b-topbar { display: none; border-bottom: 1px solid var(--border-soft); }
@media (min-width: 1024px) { .b-topbar { display: block; } }
.b-topbar .row { height: 36px; font-size: 12px; color: var(--muted); }
.b-contact { display: flex; gap: 1.25rem; }
.b-contact a { display: inline-flex; align-items: center; gap: 0.4rem; transition: color .2s; }
.b-contact a:hover { color: var(--foreground); }
.b-contact svg { width: 14px; height: 14px; color: var(--cyan); }
.b-socials { display: flex; align-items: center; gap: 0.85rem; }
.b-socials a { color: var(--muted); transition: color .2s; display: inline-flex; }
.b-socials a:hover { color: var(--cyan); }
.b-socials svg { width: 16px; height: 16px; }

.b-logo { display: flex; flex-shrink: 0; align-items: center; }
.b-logo img { width: auto; height: 44px; object-fit: contain; }
.b-nav { display: none; align-items: center; gap: 0; font-size: 13px; }
.b-nav a {
  padding: 0.5rem 0.375rem; border-radius: 0.5rem; color: var(--muted);
  transition: color .15s, background-color .15s; white-space: nowrap;
}
.b-nav a:hover { background: var(--surface-2); color: var(--foreground); }
.b-nav a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; background: var(--surface-2); color: var(--foreground); }
@media (min-width: 1024px) { .b-nav { display: flex; } }
@media (min-width: 1280px) {
  .b-nav { gap: 0.125rem; font-size: 14px; }
  .b-nav a { padding-left: 0.625rem; padding-right: 0.625rem; }
}

/* Hamburger mobile (CSS-only, niente JS) */
.b-burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: auto; margin-right: 0.6rem;
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--foreground); cursor: pointer;
}
.b-burger-cb { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.b-burger-cb:focus-visible + .b-burger { outline: 2px solid var(--cyan); outline-offset: 2px; }
.b-burger svg { width: 20px; height: 20px; }
.b-burger .ic-close { display: none; }
@media (min-width: 1024px) { .b-burger { display: none; } }
.b-burger-cb:checked ~ .b-burger .ic-open { display: none; }
.b-burger-cb:checked ~ .b-burger .ic-close { display: block; }
.b-burger-cb:checked ~ .b-nav {
  display: flex; flex-direction: column; gap: 0;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface); border-bottom: 1px solid var(--border-soft);
  padding: 0.5rem 1.25rem; z-index: 50;
}
.b-burger-cb:checked ~ .b-nav a { padding: 0.7rem 0; border-radius: 0; font-size: 15px; }
.b-burger-cb:checked ~ .b-nav a:hover { background: transparent; transform: none; }
.b-cta {
  background: var(--accent-solid); color: #fff; font-size: 14px; font-weight: 600;
  padding: 0.55rem 1.1rem; border-radius: 9999px; transition: background .2s; white-space: nowrap;
}
.b-cta:hover { background: var(--accent-hover); }
@media (prefers-reduced-motion: reduce) {
  .b-nav a { transition: none; }
}

/* Hero blog */
.b-hero { border-bottom: 1px solid var(--border-soft); padding: 4rem 0 3rem; }
.b-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan);
}
.b-eyebrow::before { content: ""; width: 28px; height: 1px; background: rgba(37,99,235,.5); }
.b-hero h1 { font-size: 2.25rem; font-weight: 600; letter-spacing: -0.02em; margin: 1.25rem 0 0; line-height: 1.1; }
@media (min-width: 640px) { .b-hero h1 { font-size: 3rem; } }
.b-hero p { color: var(--muted); max-width: 36rem; margin: 1.25rem 0 0; font-size: 1.05rem; }

/* Strumenti: ricerca + filtri */
.b-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; padding: 2.5rem 0 0; }
.b-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 0; }
.b-search svg { position: absolute; left: 0.85rem; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.b-search input[type="search"] {
  flex: 1; min-width: 0; background: var(--surface); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 9999px;
  padding: 0.6rem 6.5rem 0.6rem 2.4rem; font: inherit; font-size: 14px; outline: none;
  transition: border-color .2s;
}
.b-search input[type="search"]::placeholder { color: var(--faint); }
.b-search input[type="search"]:focus { border-color: rgba(37,99,235,.5); }
.b-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.b-search button {
  position: absolute; right: 4px; background: var(--accent-solid); color: #fff; border: 0;
  border-radius: 9999px; padding: 0.4rem 1.1rem; font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.b-search button:hover { background: var(--accent-hover); }
.b-filters {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem;
  padding: 0.375rem; border: 1px solid var(--border); border-radius: 9999px;
  background: rgba(28,42,59,.7);
}
.b-fchip {
  padding: 0.5rem 1.25rem; border: 0; border-radius: 9999px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color .2s, background-color .2s, box-shadow .2s; white-space: nowrap;
}
.b-fchip:hover { color: var(--foreground); }
.b-fchip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; color: var(--foreground); }
.b-fchip.is-active {
  color: #fff; background: linear-gradient(to right, var(--accent), var(--cyan));
  box-shadow: 0 8px 24px -10px rgba(37,99,235,.8);
}
@media (max-width: 639px) {
  .b-filters { width: 100%; border-radius: 1.25rem; }
  .b-fchip { flex: 1 1 auto; padding-right: 0.9rem; padding-left: 0.9rem; text-align: center; }
}
.b-results { margin: 1.75rem 0 -1rem; font-size: 14px; color: var(--muted); }
.b-results strong { color: var(--foreground); }
.b-results a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }

/* Paginazione */
.b-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4rem; padding: 0 0 5rem; }
.b-page {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px;
  padding: 0 0.75rem; font-size: 14px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 0.5rem; background: rgba(28,42,59,.55);
  transition: color .2s, border-color .2s, background .2s;
}
.b-page:hover { color: var(--foreground); border-color: rgba(37,99,235,.4); }
.b-page.is-active { color: #fff; background: var(--accent-solid); border-color: var(--accent-solid); }
.b-page.is-disabled { color: var(--faint); opacity: 1; pointer-events: none; }

/* Lista articoli */
.b-grid { display: grid; gap: 1.5rem; padding: 2.5rem 0 3.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .b-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .b-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1440px) { .b-grid { grid-template-columns: repeat(4, 1fr); } }
.b-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: 1rem; background: rgba(28,42,59,.7);
  transition: transform .2s ease-out, border-color .2s, box-shadow .2s;
}
.b-card:hover { transform: translateY(-4px); border-color: rgba(37,99,235,.45); box-shadow: 0 28px 60px -34px rgba(37,99,235,.45); }
.b-card .thumb { aspect-ratio: 16/9; overflow: hidden; border-bottom: 1px solid var(--border-soft); background: var(--surface-2); }
.b-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease-out; }
.b-card:hover .thumb img { transform: scale(1.05); }
.b-card .body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.b-cat { font-size: 12px; font-weight: 500; color: var(--cyan); }
.b-card h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; margin: 0.5rem 0 0; }
.b-card p { font-size: 13px; color: var(--muted); margin: 0.6rem 0 0; flex: 1; }
.b-meta { font-size: 12px; color: var(--faint); margin-top: 0.9rem; }

/* Articolo singolo */
.b-post-hero { border-bottom: 1px solid var(--border-soft); padding: 3.5rem 0 2rem; }
.b-back { display: inline-flex; align-items: center; gap: .4rem; font-size: 14px; color: var(--muted); }
.b-back:hover { color: var(--cyan); }
.b-tags { display: flex; align-items: center; gap: 0.75rem; font-size: 12px; color: var(--faint); margin-top: 1.5rem; flex-wrap: wrap; }
.b-chip { border: 1px solid rgba(37,99,235,.3); background: rgba(37,99,235,.1); color: var(--cyan); padding: 0.25rem 0.65rem; border-radius: 9999px; font-weight: 500; }
.b-post-hero h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; max-width: 48rem; margin: 1rem 0 0; }
@media (min-width: 640px) { .b-post-hero h1 { font-size: 2.5rem; } }
.b-cover { aspect-ratio: 16/9; max-width: 42rem; margin: 2rem auto 0; border-radius: 1rem; overflow: hidden; border: 1px solid var(--border-soft); }
.b-cover img { width: 100%; height: 100%; object-fit: cover; }

.b-content { max-width: 42rem; margin: 0 auto; padding: 3.5rem 0; font-size: 15px; color: var(--muted); }
.b-content > * + * { margin-top: 1.25rem; }
.b-content h2 { color: var(--foreground); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; margin-top: 2.25rem; }
.b-content h3 { color: var(--foreground); font-size: 1.2rem; font-weight: 600; margin-top: 1.75rem; }
.b-content p { line-height: 1.75; }
.b-content a { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.b-content strong { color: var(--foreground); font-weight: 600; }
.b-content ul, .b-content ol { padding-left: 1.25rem; }
.b-content ul { list-style: disc; }
.b-content ol { list-style: decimal; }
.b-content li { margin-top: 0.5rem; line-height: 1.7; }
.b-content li::marker { color: var(--cyan); }
.b-content blockquote { border-left: 2px solid var(--cyan); padding-left: 1rem; color: var(--foreground); font-style: italic; }
.b-content img { border-radius: 0.75rem; border: 1px solid var(--border); margin: 1.5rem 0; }
.b-content code { background: var(--surface); border: 1px solid var(--border); border-radius: 0.375rem; padding: 0.1rem 0.35rem; font-size: 0.875em; }
.b-content pre { background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; padding: 1rem; overflow-x: auto; }
.b-content pre code { border: 0; padding: 0; background: none; }
.b-content hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.b-cta-box { max-width: 42rem; margin: 0 auto 4rem; border: 1px solid rgba(37,99,235,.3); background: linear-gradient(135deg, rgba(37,99,235,.1), var(--bg)); border-radius: 1rem; padding: 2rem; text-align: center; }
.b-cta-box h3 { margin: 0; font-size: 1.15rem; }
.b-cta-box a.btn { display: inline-flex; margin-top: 1rem; background: var(--accent-solid); color: #fff; font-weight: 600; font-size: 14px; padding: 0.7rem 1.5rem; border-radius: 9999px; }
.b-cta-box a.btn:hover { background: var(--accent-hover); }

/* Footer: stessa struttura e proporzioni del sito Next.js. */
.b-footer { border-top: 1px solid var(--border-soft); background: var(--bg-soft); margin-top: 2rem; }
.b-footer > .wrap { padding-top: 4rem; padding-bottom: 4rem; }
.b-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
.b-footer-company { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; color: var(--muted); font-size: 14px; }
.b-footer-company p { max-width: 20rem; margin: 0.5rem 0; line-height: 1.7; }
.b-footer-company address { margin: 0 0 0.25rem; color: var(--muted); font-style: normal; line-height: 1.6; }
.b-footer-company small { color: var(--faint); }
.b-footer-logo { display: inline-flex; align-items: center; margin-bottom: 0.5rem; }
.b-footer-logo img { width: auto; height: 46px; object-fit: contain; }
.b-footer a { color: var(--muted); transition: color .15s; }
.b-footer a:hover { color: var(--cyan); }
.b-footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 0.625rem; }
.b-footer-column strong { margin-bottom: 0.375rem; color: var(--foreground); font-size: 14px; }
.b-footer-column a { font-size: 14px; }
.b-footer-bottom { display: flex; flex-direction: column; gap: 2rem; margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--border-soft); }
.b-foot-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 12px; }
.b-footer-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; color: var(--faint); font-size: 12px; }
.b-rating { margin-left: auto; color: var(--cyan); }
@media (max-width: 767px) {
  .b-footer-grid { grid-template-columns: 1fr; gap: 3rem; }
  .b-footer-meta { flex-wrap: wrap; justify-content: flex-start; }
  .b-rating { margin-left: 0; }
}

.b-empty { padding: 5rem 0; text-align: center; color: var(--muted); }

/* Stessa gerarchia del sito principale; i font sono serviti localmente. */
.b-hero h1, .b-post-hero h1, .b-related h2, .b-content h2, .b-content h3,
.b-card h2, .b-card h3, .b-cta-box h2, .b-cta-box h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  text-wrap: balance;
}

.b-hero h1, .b-post-hero h1 { letter-spacing: -0.035em; }
.b-related h2, .b-content h2, .b-cta-box h2 { letter-spacing: -0.025em; }
.b-content h3, .b-card h2, .b-card h3, .b-cta-box h3 { letter-spacing: -0.015em; }

.b-content code, .b-content pre, .b-content kbd, .b-content samp { font-family: var(--font-mono); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .b-card, .b-card .thumb img { transition: none; }
  .b-card:hover, .b-card:hover .thumb img { transform: none; }
}
