/* ============================================
   MediaPost Theme
   Identità Agrigento Post — MediaPost Network
   ============================================ */

/* --- Custom Properties --- */
:root {
  --mp-primary: #1b67dd;
  --mp-primary-90: #1b67dde6;
  --mp-secondary: #ffe66b;
  --mp-dark: #071c3d;
  --mp-bg: #ffffff;
  --mp-bg-alt: #f8f9fa;
  --mp-text: #111111;
  --mp-text-light: #6b7280;
  --mp-border: #e8e8e8;
  --mp-link: #1b67dd;
  --mp-link-hover: #0d47a1;

  --mp-font-heading: 'Bitter', Georgia, serif;
  --mp-font-body: 'Work Sans', 'Helvetica Neue', sans-serif;

  --mp-radius: 16px;
  --mp-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  --mp-shadow-hover: 0 20px 30px -5px rgba(0,0,0,0.15);
  --mp-max-width: 1200px;
  --mp-gap: 20px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--mp-font-body);
  font-weight: 400;
  color: var(--mp-text);
  background: var(--mp-bg-alt);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--mp-link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--mp-link-hover); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--mp-font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--mp-text);
}
h1 { font-size: 38px; }
h2 { font-size: 32px; }
h3 { font-size: 21px; }
h4 { font-size: 16px; }
h5 { font-size: 15px; }
h6 { font-size: 14px; font-weight: 600; }

/* --- Container --- */
.mp-container {
  max-width: var(--mp-max-width);
  margin: 0 auto;
  padding: 0 var(--mp-gap);
}

/* ========================================
   3D CARD SYSTEM (effetto sollevamento)
   ======================================== */
.mp-card {
  background: #fff;
  border-radius: var(--mp-radius);
  box-shadow: var(--mp-shadow);
  padding: 15px;
  margin-bottom: var(--mp-gap);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}
.mp-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--mp-shadow-hover);
  z-index: 5;
}

.mp-card__thumb {
  position: relative;
  border-radius: var(--mp-radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.mp-card__thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform 0.3s;
}
.mp-card:hover .mp-card__thumb img { transform: scale(1.03); }

.mp-card__cat {
  display: inline-block;
  font-family: var(--mp-font-body);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--mp-primary);
  margin-bottom: 6px;
}

.mp-card__title {
  font-family: var(--mp-font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}
.mp-card__title a { color: var(--mp-text); }
.mp-card__title a:hover { color: var(--mp-primary); }

.mp-meta {
  font-family: var(--mp-font-body);
  font-weight: 300;
  font-size: 12px;
  color: var(--mp-text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.mp-meta .mp-meta__author { font-weight: 600; }
.mp-meta__sep::before { content: '\00B7'; font-family: Arial, sans-serif; font-size: 16px; line-height: 1; }

/* ========================================
   HEADER
   ======================================== */
.mp-topbar {
  background: var(--mp-dark);
  color: #fff;
  padding: 8px 0;
}
.mp-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--mp-max-width);
  margin: 0 auto;
  padding: 0 var(--mp-gap);
  position: relative;
}
.mp-topbar__social { display: flex; gap: 12px; }
.mp-topbar__social a { color: rgba(255,255,255,0.7); font-size: 14px; }
.mp-topbar__social a:hover { color: #fff; }

.mp-topbar__logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.mp-topbar__logo img { max-height: 100px; width: auto; }

.mp-topbar__right { display: flex; align-items: center; gap: 12px; }

/* Search toggle */
.mp-search-btn {
  background: none; border: none; color: rgba(255,255,255,0.7);
  cursor: pointer; font-size: 18px; padding: 4px; transition: color 0.2s;
}
.mp-search-btn:hover { color: #fff; }

/* Search overlay */
.mp-search-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.9); z-index: 9999;
  align-items: center; justify-content: center;
}
.mp-search-overlay.is-active { display: flex; }
.mp-search-overlay__form { width: 90%; max-width: 600px; }
.mp-search-overlay__input {
  width: 100%; padding: 16px 24px; font-size: 24px;
  font-family: var(--mp-font-heading); border: none;
  border-bottom: 3px solid var(--mp-primary);
  background: transparent; color: #fff; outline: none;
}
.mp-search-overlay__close {
  position: absolute; top: 30px; right: 30px;
  background: none; border: none; color: #fff; font-size: 36px; cursor: pointer;
}

/* Navbar */
.mp-navbar {
  background: var(--mp-bg);
  border-bottom: 3px solid var(--mp-primary);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.3s ease;
}
.mp-navbar__inner {
  display: flex; align-items: center; justify-content: center;
  max-width: var(--mp-max-width); margin: 0 auto; padding: 0 var(--mp-gap);
}
.mp-navbar__menu { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; }
.mp-navbar__menu > li { position: relative; }
.mp-navbar__menu > li > a {
  display: block; padding: 12px 14px;
  font-family: var(--mp-font-body); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--mp-text); transition: color 0.2s;
}
.mp-navbar__menu > li > a:hover,
.mp-navbar__menu > li.current-menu-item > a { color: var(--mp-primary); }

/* Dropdown */
.mp-navbar__menu .sub-menu {
  list-style: none; position: absolute; top: 100%; left: 0;
  min-width: 200px; background: var(--mp-bg);
  border-top: 3px solid var(--mp-primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all 0.25s ease; z-index: 100;
}
.mp-navbar__menu > li:hover > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.mp-navbar__menu .sub-menu a {
  display: block; padding: 8px 16px; font-size: 13px;
  color: var(--mp-text); border-bottom: 1px solid var(--mp-border);
}
.mp-navbar__menu .sub-menu a:hover { background: var(--mp-bg-alt); color: var(--mp-primary); }

/* Hamburger */
.mp-hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px;
}
.mp-hamburger span { display: block; width: 24px; height: 2px; background: var(--mp-text); transition: all 0.3s; }

/* ========================================
   TICKER
   ======================================== */
.mp-ticker {
  background: var(--mp-bg);
  border-bottom: 1px solid var(--mp-border);
  padding: 8px 0;
  font-family: var(--mp-font-body);
  font-size: 14px;
}
.mp-ticker__inner {
  display: flex; align-items: center;
  max-width: var(--mp-max-width); margin: 0 auto; padding: 0 var(--mp-gap);
}
.mp-ticker__label {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mp-secondary); color: #071c3d;
  padding: 4px 12px; border-radius: 4px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; flex-shrink: 0; margin-right: 16px;
}
.mp-ticker__label::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  background: #071c3d; border-radius: 50%;
  animation: mp-pulse 1.2s ease-in-out infinite;
}
@keyframes mp-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.mp-ticker__track { overflow: hidden; flex: 1; position: relative; height: 1.5em; }
.mp-ticker__items {
  display: flex; gap: 60px;
  animation: mp-scroll 35s linear infinite;
  white-space: nowrap; position: absolute;
}
.mp-ticker__items a { color: var(--mp-text); font-weight: 600; white-space: nowrap; }
.mp-ticker__items a:hover { color: var(--mp-primary); }
@keyframes mp-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================
   LAYOUT GRID SYSTEM
   ======================================== */
.mp-row {
  display: flex;
  gap: var(--mp-gap);
  margin-bottom: var(--mp-gap);
}
.mp-col-66 { width: 66.666%; }
.mp-col-33 { width: 33.333%; }
.mp-col-50 { width: 50%; }
.mp-col-25 { width: 25%; }
.mp-col-100 { width: 100%; }

.mp-grid {
  display: grid;
  gap: var(--mp-gap);
}
.mp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.mp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.mp-grid--4 { grid-template-columns: repeat(4, 1fr); }
.mp-grid--5 { grid-template-columns: repeat(5, 1fr); }

/* ========================================
   HERO OVERLAY
   ======================================== */
.mp-overlay {
  position: relative;
  border-radius: var(--mp-radius);
  overflow: hidden;
  margin-bottom: var(--mp-gap);
}
.mp-overlay img {
  width: 100%; height: 100%; min-height: 400px;
  object-fit: cover; display: block;
}
.mp-overlay__content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 30px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  color: #fff;
}
.mp-overlay__content .mp-card__cat {
  background: var(--mp-primary); color: #fff;
  padding: 3px 10px; border-radius: 3px;
  margin-bottom: 10px;
}
.mp-overlay__content .mp-card__title {
  font-size: 28px; color: #fff;
}
.mp-overlay__content .mp-card__title a { color: #fff; }
.mp-overlay__content .mp-card__title a:hover { color: var(--mp-primary); }
.mp-overlay__content .mp-meta { color: rgba(255,255,255,0.7); }

/* ========================================
   SECTION HEADING
   ======================================== */
.mp-heading {
  display: flex; align-items: center;
  margin-bottom: 20px; padding-bottom: 10px;
  border-bottom: 3px solid var(--mp-border);
  position: relative;
}
.mp-heading::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 80px; height: 3px; background: var(--mp-primary);
}
.mp-heading__title {
  font-family: var(--mp-font-body);
  font-weight: 700; font-size: 16px;
  text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--mp-text);
}
.mp-heading__title a { color: var(--mp-text); }
.mp-heading__title a:hover { color: var(--mp-primary); }

/* ========================================
   CLASSIC CARD (immagine + titolo + meta)
   ======================================== */
.mp-classic {
  margin-bottom: var(--mp-gap);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}
.mp-classic:hover { transform: translateY(-4px); }
.mp-classic__thumb {
  border-radius: var(--mp-radius); overflow: hidden; margin-bottom: 10px;
}
.mp-classic__thumb img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  transition: transform 0.3s;
}
.mp-classic:hover .mp-classic__thumb img { transform: scale(1.03); }
.mp-classic__title {
  font-family: var(--mp-font-heading); font-weight: 700;
  font-size: 21px; line-height: 1.3; margin-bottom: 6px;
}
.mp-classic__title a { color: var(--mp-text); }
.mp-classic__title a:hover { color: var(--mp-primary); }

/* ========================================
   LIST ITEMS (thumb left/right + text)
   ======================================== */
/* Large list */
.mp-list-item {
  display: flex; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--mp-border);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.mp-list-item:hover { transform: translateY(-3px); }
.mp-list-item:last-child { border-bottom: none; }
.mp-list-item--right { flex-direction: row-reverse; }

.mp-list-item__thumb {
  width: 260px; flex-shrink: 0;
  border-radius: var(--mp-radius); overflow: hidden;
}
.mp-list-item__thumb img {
  width: 100%; height: 100%; min-height: 140px;
  object-fit: cover;
}
.mp-list-item__body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.mp-list-item__title {
  font-family: var(--mp-font-heading); font-weight: 700;
  font-size: 18px; line-height: 1.3; margin-bottom: 6px;
}
.mp-list-item__title a { color: var(--mp-text); }
.mp-list-item__title a:hover { color: var(--mp-primary); }

/* Small list */
.mp-list-small {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--mp-border);
  transition: transform 0.2s;
}
.mp-list-small:hover { transform: translateX(4px); }
.mp-list-small:last-child { border-bottom: none; }
.mp-list-small--right { flex-direction: row-reverse; }

.mp-list-small__thumb {
  width: 80px; height: 80px; flex-shrink: 0;
  border-radius: calc(var(--mp-radius) - 4px); overflow: hidden;
}
.mp-list-small__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mp-list-small__title {
  font-family: var(--mp-font-heading); font-weight: 700;
  font-size: 14px; line-height: 1.35;
}
.mp-list-small__title a { color: var(--mp-text); }
.mp-list-small__title a:hover { color: var(--mp-primary); }

/* ========================================
   BOX GRID (card con sfondo bianco, ombra, border-radius)
   ======================================== */
/* Usato per Siciliabedda, sezioni territoriali, ecc. */
.mp-box {
  background: #fff;
  border-radius: var(--mp-radius);
  box-shadow: var(--mp-shadow);
  padding: 15px;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}
.mp-box:hover {
  transform: translateY(-7px);
  box-shadow: var(--mp-shadow-hover);
  z-index: 5;
}
.mp-box__thumb {
  border-radius: calc(var(--mp-radius) - 4px);
  overflow: hidden; margin-bottom: 10px;
}
.mp-box__thumb img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover;
  transition: transform 0.3s;
}
.mp-box:hover .mp-box__thumb img { transform: scale(1.03); }
.mp-box__title {
  font-family: var(--mp-font-heading); font-weight: 700;
  font-size: 15px; line-height: 1.35; margin-bottom: 4px;
}
.mp-box__title a { color: var(--mp-text); }
.mp-box__title a:hover { color: var(--mp-primary); }

/* ========================================
   SINGLE ARTICLE
   ======================================== */
.mp-article { padding: 30px 0; }
.mp-article__header { margin-bottom: 24px; }
.mp-article__cat {
  display: inline-block; background: var(--mp-primary); color: #fff;
  padding: 4px 12px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-radius: 4px; margin-bottom: 12px;
}
.mp-article__title {
  font-size: 32px; line-height: 1.2; margin-bottom: 12px;
}
.mp-article__meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--mp-text-light);
  padding-bottom: 16px; border-bottom: 1px solid var(--mp-border);
}
.mp-article__meta img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.mp-article__meta a { color: var(--mp-primary); font-weight: 600; }

.mp-article__featured {
  margin-bottom: 24px; border-radius: var(--mp-radius); overflow: hidden;
}
.mp-article__featured figcaption {
  font-size: 13px; color: var(--mp-text-light); padding: 8px 0; font-style: italic;
}

/* Article body */
.mp-content { font-size: 17px; line-height: 1.85; }
.mp-content p { margin-bottom: 20px; }
.mp-content h2 { font-size: 26px; margin: 32px 0 16px; }
.mp-content h3 { font-size: 21px; margin: 24px 0 12px; }
.mp-content blockquote {
  border-left: 4px solid var(--mp-primary); padding: 16px 24px;
  margin: 24px 0; background: var(--mp-bg-alt);
  font-style: italic; font-size: 18px;
}
.mp-content ul, .mp-content ol { margin: 16px 0 20px 24px; }
.mp-content li { margin-bottom: 6px; }
.mp-content figure { margin: 24px 0; }
.mp-content figcaption {
  font-size: 13px; color: var(--mp-text-light); margin-top: 6px; text-align: center;
}
.mp-content img { border-radius: var(--mp-radius); }

/* Layout articolo: share | contenuto | sidebar */
.mp-article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  align-items: start;
}

/* Share buttons */
.mp-share { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.mp-share a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: #fff; font-size: 14px; transition: transform 0.2s;
}
.mp-share a:hover { transform: scale(1.15); color: #fff; }
.mp-share--fb { background: #1877f2; }
.mp-share--tw { background: #000; }
.mp-share--wa { background: #25d366; }
.mp-share--tg { background: #0088cc; }
.mp-share--mail { background: #6b7280; }

/* Tags */
.mp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0; padding-top: 16px; border-top: 1px solid var(--mp-border); }
.mp-tags a {
  background: var(--mp-bg-alt); color: var(--mp-text-light);
  padding: 4px 12px; border-radius: var(--mp-radius); font-size: 12px;
  transition: all 0.2s;
}
.mp-tags a:hover { background: var(--mp-primary); color: #fff; }

/* Author box */
.mp-author-box {
  display: flex; gap: 16px; padding: 20px;
  background: var(--mp-bg-alt); border-radius: var(--mp-radius);
  margin: 24px 0; border-left: 4px solid var(--mp-primary);
}
.mp-author-box__avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mp-author-box__name { font-family: var(--mp-font-heading); font-weight: 700; margin-bottom: 4px; }
.mp-author-box__bio { font-size: 14px; color: var(--mp-text-light); line-height: 1.5; }

/* Related */
.mp-related { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--mp-border); }

/* ========================================
   SIDEBAR
   ======================================== */
.mp-sidebar { position: sticky; top: 80px; }
.mp-widget {
  background: #fff; border-radius: var(--mp-radius);
  box-shadow: var(--mp-shadow); padding: 20px; margin-bottom: var(--mp-gap);
}
.mp-widget__title {
  font-family: var(--mp-font-body); font-weight: 700; font-size: 14px;
  text-transform: uppercase; padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 3px solid var(--mp-border); position: relative;
}
.mp-widget__title::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 50px; height: 3px; background: var(--mp-primary);
}

/* ========================================
   FOOTER
   ======================================== */
.mp-footer {
  background: var(--mp-dark); color: rgba(255,255,255,0.75);
  padding: 40px 0 20px; margin-top: 40px;
}
.mp-footer__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 30px; margin-bottom: 30px;
}
.mp-footer__col h4 {
  color: #fff; font-family: var(--mp-font-heading); font-size: 16px;
  margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--mp-primary);
}
.mp-footer__col p { font-size: 14px; line-height: 1.6; }
.mp-footer__col ul { list-style: none; }
.mp-footer__col ul li { padding: 4px 0; }
.mp-footer__col ul a { color: rgba(255,255,255,0.7); font-size: 14px; }
.mp-footer__col ul a:hover { color: var(--mp-primary); }
.mp-footer__social { display: flex; gap: 10px; margin-top: 12px; }
.mp-footer__social a { color: rgba(255,255,255,0.7); font-size: 16px; }
.mp-footer__social a:hover { color: var(--mp-primary); }
.mp-footer__bottom {
  text-align: center; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px; color: rgba(255,255,255,0.4);
}
.mp-footer__bottom a { color: rgba(255,255,255,0.5); }
.mp-footer__bottom a:hover { color: var(--mp-primary); }

/* ========================================
   BANNER
   ======================================== */
.mp-banner { text-align: center; margin: var(--mp-gap) 0; }
.mp-banner img { max-width: 100%; height: auto; margin: 0 auto; border-radius: var(--mp-radius); }
.mp-banner--leaderboard { max-width: 728px; margin: var(--mp-gap) auto; }

/* ========================================
   PAGINATION
   ======================================== */
.mp-pagination { display: flex; justify-content: center; gap: 4px; padding: 30px 0; }
.mp-pagination a, .mp-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: 8px; font-weight: 600; font-size: 14px;
}
.mp-pagination a { background: #fff; color: var(--mp-text); box-shadow: var(--mp-shadow); }
.mp-pagination a:hover { background: var(--mp-primary); color: #fff; }
.mp-pagination .current { background: var(--mp-primary); color: #fff; }

/* ========================================
   404
   ======================================== */
.mp-404 { text-align: center; padding: 60px var(--mp-gap); }
.mp-404__code { font-size: 96px; font-weight: 900; color: var(--mp-primary); font-family: var(--mp-font-heading); line-height: 1; }

/* Main content area - sfondo opaco per coprire il parallasse */
.mp-main {
  position: relative;
  z-index: 2;
  background: var(--mp-bg-alt);
}

/* Banner placeholder (visibile quando non c'è banner configurato) */
.mp-banner-slot {
  background: #eef1f5;
  border: 2px dashed #d0d5dd;
  border-radius: var(--mp-radius);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-family: var(--mp-font-body);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: var(--mp-gap) auto;
  max-width: 728px;
}
.mp-banner-slot--sidebar {
  max-width: 100%;
  min-height: 250px;
}

/* ========================================
   BREADCRUMB
   ======================================== */
.mp-breadcrumb {
  font-size: 12px; color: var(--mp-text-light);
  font-family: var(--mp-font-body); font-weight: 700;
  padding: 12px 0;
}
.mp-breadcrumb a { color: var(--mp-text-light); }
.mp-breadcrumb a:hover { color: var(--mp-primary); }

/* ========================================
   COMMENTS
   ======================================== */
.mp-comments { margin-top: 30px; }
.mp-comments .comment-list { list-style: none; }
.mp-comments .comment { padding: 16px 0; border-bottom: 1px solid var(--mp-border); }
.mp-comments .comment-author { font-weight: 700; font-family: var(--mp-font-heading); }
.mp-comments .comment-metadata { font-size: 12px; color: var(--mp-text-light); }
.mp-comments .comment-form label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.mp-comments .comment-form input[type="text"],
.mp-comments .comment-form input[type="email"],
.mp-comments .comment-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--mp-border);
  border-radius: 8px; font-family: var(--mp-font-body); font-size: 15px; margin-bottom: 16px;
}
.mp-comments .comment-form input:focus,
.mp-comments .comment-form textarea:focus { outline: none; border-color: var(--mp-primary); }
.mp-comments .submit {
  background: var(--mp-primary); color: #fff; border: none;
  padding: 10px 24px; font-size: 14px; font-weight: 700;
  border-radius: 8px; cursor: pointer;
}
.mp-comments .submit:hover { background: var(--mp-dark); }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .mp-article-layout { grid-template-columns: 1fr; }
  .mp-sidebar { position: static; }
  .mp-row { flex-wrap: wrap; }
  .mp-col-66, .mp-col-33, .mp-col-50 { width: 100%; }
  .mp-grid--5 { grid-template-columns: repeat(3, 1fr); }
  .mp-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .mp-overlay img { min-height: 280px; }
  .mp-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --mp-gap: 12px; }

  .mp-navbar__menu {
    display: none; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--mp-bg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); z-index: 999;
  }
  .mp-navbar__menu.is-open { display: flex; }
  .mp-navbar__menu > li > a { border-bottom: 1px solid var(--mp-border); }
  .mp-navbar__menu .sub-menu {
    position: static; box-shadow: none; border-top: none;
    opacity: 1; visibility: visible; transform: none; background: var(--mp-bg-alt);
  }
  .mp-hamburger { display: flex; }

  .mp-grid--5, .mp-grid--3, .mp-grid--2 { grid-template-columns: 1fr; }
  .mp-grid--4 { grid-template-columns: 1fr; }
  .mp-col-25 { width: 100%; }
  .mp-overlay img { min-height: 220px; }
  .mp-overlay__content .mp-card__title { font-size: 20px; }
  .mp-article__title { font-size: 24px; }
  .mp-list-item { flex-direction: column !important; }
  .mp-list-item__thumb { width: 100%; }
  .mp-footer__grid { grid-template-columns: 1fr; }
  .mp-topbar__logo img { max-height: 60px; }
}

/* ========================================
   UTILITY
   ======================================== */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
}
.mp-section { margin-bottom: 30px; }

@media print {
  .mp-topbar, .mp-navbar, .mp-ticker, .mp-sidebar,
  .mp-share, .mp-footer, .mp-banner, .mp-related { display: none !important; }
  .mp-article-layout { grid-template-columns: 1fr !important; }
}
/* ============================================
   NUOVI TEMPLATE — Contatti, Redazione, Legale, Autore
   Aggiungere in coda a assets/css/mediapost.css
   ============================================ */

/* ========================================
   FORM NATIVO (Contatti)
   ======================================== */
.mp-contact-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 30px;
  align-items: start;
}
.mp-form label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--mp-text);
}
.mp-form input[type="text"],
.mp-form input[type="email"],
.mp-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--mp-border);
  border-radius: 8px;
  font-family: var(--mp-font-body);
  font-size: 15px;
  background: var(--mp-bg);
  transition: border-color 0.2s;
}
.mp-form input:focus,
.mp-form textarea:focus {
  outline: none;
  border-color: var(--mp-primary);
  box-shadow: 0 0 0 3px rgba(19, 83, 180, 0.08);
}
.mp-form__field {
  margin-bottom: 16px;
}
.mp-form__row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.mp-btn {
  display: inline-block;
  background: var(--mp-primary);
  color: #fff;
  border: none;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--mp-font-body);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.mp-btn:hover {
  background: var(--mp-dark);
}
.mp-notice {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}
.mp-notice--ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.mp-notice--err {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.mp-contact__list {
  list-style: none;
}
.mp-contact__list li {
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.5;
  border-bottom: 1px solid var(--mp-border);
}
.mp-contact__list li:last-child {
  border-bottom: none;
}

/* ========================================
   TEAM / REDAZIONE
   ======================================== */
.mp-team__card {
  text-align: center;
  padding: 24px 20px;
}
.mp-team__avatar {
  margin-bottom: 12px;
}
.mp-team__img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  border: 3px solid var(--mp-bg-alt);
}
.mp-team__name {
  font-size: 16px;
  margin-bottom: 2px;
}
.mp-team__name a {
  color: var(--mp-text);
}
.mp-team__name a:hover {
  color: var(--mp-primary);
}
.mp-team__role {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mp-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.mp-team__bio {
  font-size: 13px;
  color: var(--mp-text-light);
  line-height: 1.5;
  margin-bottom: 10px;
}
.mp-team__link {
  font-size: 13px;
  font-weight: 600;
  color: var(--mp-primary);
}

/* ========================================
   PAGINA LEGALE (Layout + TOC 3D + data update)
   ======================================== */
.mp-legal__header {
  margin-bottom: 24px;
}
.mp-legal__update {
  font-size: 13px;
  color: var(--mp-text-light);
  margin-top: 4px;
}

/* Layout: TOC a sinistra + contenuto a destra */
.mp-legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
  align-items: start;
}
.mp-legal-layout--notoc {
  grid-template-columns: 1fr;
}

/* TOC sidebar sticky */
.mp-toc-sidebar {
  position: sticky;
  top: 80px;
}

/* TOC box — 3D card arrotondata */
.mp-toc {
  background: #fff;
  border-radius: var(--mp-radius);
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 10px 20px -2px rgba(0,0,0,0.08);
  border-left: 4px solid var(--mp-primary);
  transition: box-shadow 0.3s ease;
}
.mp-toc:hover {
  box-shadow: 0 8px 16px -2px rgba(0,0,0,0.08), 0 20px 30px -5px rgba(0,0,0,0.12);
}
.mp-toc__title {
  font-family: var(--mp-font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--mp-border);
  color: var(--mp-text);
}
.mp-toc__list {
  list-style: none;
  padding-left: 0;
  counter-reset: toc;
}
.mp-toc__list li {
  counter-increment: toc;
  padding: 0;
  margin: 0;
}
.mp-toc__link {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--mp-text-light);
  border-radius: 6px;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}
.mp-toc__link::before {
  content: counter(toc) ". ";
  font-weight: 700;
  color: var(--mp-primary);
  opacity: 0.5;
}
.mp-toc__link:hover {
  background: var(--mp-bg-alt);
  color: var(--mp-primary);
  border-left-color: var(--mp-primary);
}
.mp-toc__link.is-active {
  background: var(--mp-bg-alt);
  color: var(--mp-primary);
  font-weight: 600;
  border-left-color: var(--mp-primary);
}
.mp-toc__link.is-active::before {
  opacity: 1;
}

/* Contenuto legale */
.mp-legal__content {
  min-width: 0;
}

/* ========================================
   PROFILO AUTORE (author.php)
   ======================================== */
.mp-author-profile {
  display: flex;
  gap: 24px;
  padding: 28px;
  background: #fff;
  border-radius: var(--mp-radius);
  box-shadow: var(--mp-shadow);
  border-left: 4px solid var(--mp-primary);
  margin-bottom: 10px;
}
.mp-author-profile__img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.mp-author-profile__name {
  font-size: 28px;
  margin-bottom: 4px;
}
.mp-author-profile__role {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--mp-primary);
  padding: 2px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.mp-author-profile__bio {
  font-size: 15px;
  color: var(--mp-text-light);
  line-height: 1.6;
  margin-bottom: 12px;
}
.mp-author-profile__stats {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--mp-text-light);
  margin-bottom: 8px;
}
.mp-author-profile__stats strong {
  color: var(--mp-text);
}
.mp-author-profile__website {
  font-size: 13px;
  font-weight: 600;
}

/* ========================================
   RESPONSIVE — Nuovi template
   ======================================== */
@media (max-width: 1024px) {
  .mp-contact-layout {
    grid-template-columns: 1fr;
  }
  .mp-legal-layout {
    grid-template-columns: 1fr;
  }
  .mp-toc-sidebar {
    position: static;
  }
  .mp-toc {
    margin-bottom: 24px;
  }
}
@media (max-width: 768px) {
  .mp-form__row--2 {
    grid-template-columns: 1fr;
  }
  .mp-author-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .mp-author-profile__stats {
    justify-content: center;
  }
  .mp-author-profile__name {
    font-size: 22px;
  }
  .mp-grid--3 .mp-team__card {
    max-width: 100%;
  }
}

/* Nessun segnaposto pubblicitario quando uno spazio non è configurato. */
.mp-banner-slot--empty { display: none !important; }

/* SFONDO BIANCO HEADER E FOOTER — MediaPost Network */
.mp-topbar {
  background: #fff !important;
  color: #27313f !important;
  border-bottom: 1px solid #e5e7eb;
}
.mp-topbar__social a,
.mp-search-btn {
  color: #4b5563 !important;
}
.mp-topbar__social a:hover,
.mp-search-btn:hover {
  color: #111827 !important;
}
.mp-topbar__logo > a:not(.custom-logo-link) {
  color: var(--mp-primary) !important;
}
.mp-footer {
  background: #fff !important;
  color: #3f4854 !important;
  border-top: 1px solid #e5e7eb;
}
.mp-footer__col h4 {
  color: #171c24 !important;
}
.mp-footer__col p,
.mp-footer__col ul a,
.mp-footer__col a,
.mp-footer__bottom,
.mp-footer__bottom a {
  color: #3f4854 !important;
}
.mp-footer__col p strong {
  color: #171c24;
}
.mp-footer__col a:hover,
.mp-footer__bottom a:hover {
  color: #000 !important;
}
.mp-footer__social a {
  background: #edf0f3 !important;
  color: #27313f !important;
}
.mp-footer__social a:hover {
  background: #27313f !important;
  color: #fff !important;
}
.mp-footer__bottom {
  border-top-color: #e5e7eb !important;
}
/* FINE SFONDO BIANCO HEADER E FOOTER */

/* FIX MENU MOBILE SOPRA I CONTENUTI — MediaPost Network */
#mpn-ad-spacer ~ .mp-navbar {
  position: sticky;
  z-index: 1000;
}
@media (max-width: 768px) {
  #mpn-ad-spacer ~ .mp-navbar .mp-navbar__menu.is-open {
    justify-content: flex-start;
    flex-wrap: nowrap;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  #mpn-ad-spacer ~ .mp-navbar .mp-navbar__menu.is-open > li {
    flex-shrink: 0;
  }
}
