/*
Theme Name: MC.MB Blog
Theme URI: https://blog.mcmb.it
Author: MC.MB SAS
Author URI: https://www.mcmb.it
Description: Tema WordPress leggero per il blog tecnico MC.MB SAS.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: mcmb-blog
*/

:root {
  --mcmb-ink: #10161f;
  --mcmb-muted: #5d6876;
  --mcmb-line: #dce5ec;
  --mcmb-soft: #f3f8fa;
  --mcmb-white: #ffffff;
  --mcmb-green: #00a36f;
  --mcmb-green-dark: #067854;
  --mcmb-blue: #1268b3;
  --mcmb-blue-dark: #0b345f;
  --mcmb-shadow: 0 18px 48px rgba(16, 22, 31, 0.1);
  --mcmb-radius: 8px;
  --mcmb-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--mcmb-ink);
  background: var(--mcmb-white);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

a {
  color: var(--mcmb-blue);
  text-decoration: none;
}

a:hover {
  color: var(--mcmb-green-dark);
}

.mcmb-container {
  width: min(var(--mcmb-max), calc(100% - 40px));
  margin: 0 auto;
}

.mcmb-skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--mcmb-ink);
  color: var(--mcmb-white);
  border-radius: var(--mcmb-radius);
}

.mcmb-skip-link:focus {
  top: 16px;
}

.mcmb-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--mcmb-line);
  backdrop-filter: blur(12px);
}

.mcmb-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 84px;
}

.mcmb-brand img {
  width: 224px;
  max-width: 42vw;
}

.mcmb-main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.mcmb-main-nav a,
.mcmb-header-link {
  color: var(--mcmb-ink);
  font-size: 15px;
  font-weight: 650;
}

.mcmb-button,
.wp-block-button__link,
.mcmb-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 0;
  border-radius: var(--mcmb-radius);
  background: var(--mcmb-green);
  color: var(--mcmb-white);
  font-weight: 750;
  box-shadow: 0 10px 22px rgba(0, 163, 111, 0.22);
}

.mcmb-button:hover,
.wp-block-button__link:hover,
.mcmb-header-cta:hover {
  background: var(--mcmb-green-dark);
  color: var(--mcmb-white);
}

.mcmb-button.secondary {
  background: var(--mcmb-white);
  color: var(--mcmb-ink);
  border: 1px solid var(--mcmb-line);
  box-shadow: none;
}

.mcmb-button.secondary:hover {
  color: var(--mcmb-blue-dark);
  border-color: var(--mcmb-blue);
}

.mcmb-mobile-toggle {
  display: none;
  margin-left: auto;
  padding: 10px 12px;
  border: 1px solid var(--mcmb-line);
  border-radius: var(--mcmb-radius);
  background: var(--mcmb-white);
  color: var(--mcmb-ink);
  font-weight: 750;
}

.mcmb-hero {
  padding: 74px 0 50px;
  background: linear-gradient(180deg, #f7fbfd 0%, #ffffff 100%);
}

.mcmb-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.72fr);
  gap: 44px;
  align-items: center;
}

.mcmb-kicker {
  margin: 0 0 14px;
  color: var(--mcmb-green-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0 0 16px;
  color: var(--mcmb-ink);
  line-height: 1.12;
}

h1 {
  max-width: 870px;
  font-size: clamp(42px, 6vw, 76px);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(30px, 4vw, 46px);
}

h3 {
  font-size: 23px;
}

.mcmb-lead {
  max-width: 760px;
  margin: 0 0 30px;
  color: var(--mcmb-muted);
  font-size: 21px;
}

.mcmb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.mcmb-hero-media {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--mcmb-radius);
  box-shadow: var(--mcmb-shadow);
  background: var(--mcmb-soft);
}

.mcmb-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.mcmb-section {
  padding: 72px 0;
}

.mcmb-section.soft {
  background: var(--mcmb-soft);
}

.mcmb-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.mcmb-section-head p {
  max-width: 650px;
  margin: 0;
  color: var(--mcmb-muted);
}

.mcmb-grid {
  display: grid;
  gap: 24px;
}

.mcmb-grid.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mcmb-grid.categories {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mcmb-card,
.mcmb-category-card,
.mcmb-author-box,
.mcmb-cta-panel,
.mcmb-toc,
.mcmb-search-panel {
  border: 1px solid var(--mcmb-line);
  border-radius: var(--mcmb-radius);
  background: var(--mcmb-white);
}

.mcmb-card {
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(16, 22, 31, 0.06);
}

.mcmb-card-image {
  background: #e8f1f4;
}

.mcmb-card-image img,
.mcmb-card-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.mcmb-card-placeholder {
  display: grid;
  place-items: center;
  color: var(--mcmb-blue-dark);
  background: linear-gradient(135deg, rgba(0, 163, 111, 0.16), rgba(18, 104, 179, 0.16));
  font-weight: 800;
}

.mcmb-card-body {
  padding: 22px;
}

.mcmb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
  color: var(--mcmb-muted);
  font-size: 14px;
  font-weight: 650;
}

.mcmb-pill {
  color: var(--mcmb-green-dark);
}

.mcmb-card h3 {
  font-size: 22px;
}

.mcmb-card p {
  margin: 0 0 18px;
  color: var(--mcmb-muted);
}

.mcmb-read-more {
  font-weight: 800;
}

.mcmb-category-card {
  min-height: 212px;
  padding: 22px;
}

.mcmb-category-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: var(--mcmb-radius);
  background: rgba(0, 163, 111, 0.12);
  color: var(--mcmb-green-dark);
  font-weight: 900;
}

.mcmb-category-card p {
  margin: 0;
  color: var(--mcmb-muted);
  font-size: 15px;
}

.mcmb-cta-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 34px;
  background: var(--mcmb-ink);
  color: var(--mcmb-white);
}

.mcmb-cta-panel h2,
.mcmb-cta-panel p {
  color: var(--mcmb-white);
}

.mcmb-cta-panel p {
  margin: 0;
  opacity: 0.84;
}

.mcmb-page-hero {
  padding: 54px 0 34px;
  background: var(--mcmb-soft);
}

.mcmb-breadcrumb {
  margin-bottom: 16px;
  color: var(--mcmb-muted);
  font-size: 14px;
}

.mcmb-breadcrumb a {
  color: var(--mcmb-muted);
  font-weight: 650;
}

.mcmb-archive-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 28px;
  align-items: start;
}

.mcmb-search-panel {
  position: sticky;
  top: 108px;
  padding: 20px;
}

.mcmb-search-panel input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--mcmb-line);
  border-radius: var(--mcmb-radius);
}

.mcmb-search-panel ul {
  padding-left: 18px;
}

.mcmb-article {
  max-width: 820px;
  margin: 0 auto;
}

.mcmb-article-cover {
  margin: 26px 0;
  overflow: hidden;
  border-radius: var(--mcmb-radius);
}

.mcmb-article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.mcmb-toc {
  padding: 20px;
  margin: 30px 0;
  background: var(--mcmb-soft);
}

.mcmb-toc strong {
  display: block;
  margin-bottom: 10px;
}

.mcmb-toc ol {
  margin: 0;
  padding-left: 22px;
}

.mcmb-entry-content {
  font-size: 18px;
}

.mcmb-entry-content h2,
.mcmb-entry-content h3 {
  scroll-margin-top: 110px;
  margin-top: 42px;
}

.mcmb-entry-content p,
.mcmb-entry-content ul,
.mcmb-entry-content ol {
  margin-bottom: 22px;
}

.mcmb-author-box {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 18px;
  align-items: center;
  margin: 44px 0;
  padding: 22px;
}

.mcmb-author-logo {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  border-radius: var(--mcmb-radius);
  background: var(--mcmb-soft);
}

.mcmb-author-logo img {
  width: 62px;
}

.mcmb-footer {
  padding: 58px 0 24px;
  background: var(--mcmb-ink);
  color: rgba(255, 255, 255, 0.78);
}

.mcmb-footer h2,
.mcmb-footer h3,
.mcmb-footer a {
  color: var(--mcmb-white);
}

.mcmb-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.15fr;
  gap: 30px;
}

.mcmb-footer-logo {
  width: 220px;
  margin-bottom: 18px;
}

.mcmb-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mcmb-footer li {
  margin-bottom: 9px;
}

.mcmb-small-print {
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 14px;
}

@media (max-width: 980px) {
  .mcmb-mobile-toggle {
    display: inline-flex;
  }

  .mcmb-main-nav {
    display: none;
    position: absolute;
    left: 20px;
    right: 20px;
    top: 84px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 16px;
    border: 1px solid var(--mcmb-line);
    border-radius: var(--mcmb-radius);
    background: var(--mcmb-white);
    box-shadow: var(--mcmb-shadow);
  }

  .mcmb-main-nav.is-open {
    display: flex;
  }

  .mcmb-main-nav a {
    padding: 10px;
  }

  .mcmb-hero-grid,
  .mcmb-archive-layout,
  .mcmb-cta-panel,
  .mcmb-footer-grid {
    grid-template-columns: 1fr;
  }

  .mcmb-grid.cards,
  .mcmb-grid.categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mcmb-search-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .mcmb-container {
    width: min(100% - 28px, var(--mcmb-max));
  }

  .mcmb-header-inner {
    min-height: 74px;
  }

  .mcmb-main-nav {
    top: 74px;
  }

  .mcmb-hero {
    padding-top: 46px;
  }

  h1 {
    font-size: 40px;
  }

  .mcmb-lead {
    font-size: 18px;
  }

  .mcmb-grid.cards,
  .mcmb-grid.categories {
    grid-template-columns: 1fr;
  }

  .mcmb-section {
    padding: 50px 0;
  }

  .mcmb-section-head {
    display: block;
  }

  .mcmb-author-box {
    grid-template-columns: 1fr;
  }
}
