/*
Theme Name: Tabloid Parent
Theme URI: https://iltabloid.it
Author: EO Factory Lab
Author URI: https://eofactory.it
Description: Tema parent per i verticali del network Il Tabloid
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: tabloid-parent
Tags: news, magazine, editorial
*/

:root {
  --color-accent: #007AAE;
  --color-topbar: #FFA000;
  --color-badge: #FFA000;
  --color-badge-text: #ffffff;
  --color-bg: #ffffff;
  --color-footer-bg: #007AAE;
  --color-footer-text: #ffffff;
  --color-text: #1a1a1a;
  --color-meta: #888888;
  --color-border: #e5e5e5;
  --font-primary: 'Open Sans', sans-serif;
  --container-width: 1200px;
  --grid-gap: 20px;
  --border-radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-primary); font-size: 15px; color: var(--color-text); background: var(--color-bg); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.tbl-container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

.tbl-topbar { background: var(--color-topbar); padding: 6px 0; }
.tbl-topbar__inner { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.tbl-topbar__inner a { color: #ffffff; font-size: 14px; display: flex; align-items: center; }
.tbl-topbar__inner a:hover { opacity: 0.8; text-decoration: none; }

.tbl-header { background: var(--color-accent); padding: 14px 0; }
.tbl-header__inner { display: flex; justify-content: space-between; align-items: center; }
.tbl-header__logo img { height: 50px; width: auto; }
.tbl-header__logo a:hover { opacity: 0.9; text-decoration: none; }

.tbl-menu-toggle { background: none; border: none; cursor: pointer; padding: 4px; display: flex; flex-direction: column; gap: 5px; }
.tbl-menu-toggle span { display: block; width: 28px; height: 3px; background: var(--color-topbar); border-radius: 2px; transition: all 0.3s; }

.tbl-nav { display: none; background: var(--color-accent); border-top: 1px solid rgba(255,255,255,0.2); }
.tbl-nav.is-open { display: block; }
.tbl-nav ul { list-style: none; }
.tbl-nav ul li a { display: block; padding: 12px 20px; color: #ffffff; font-size: 14px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,0.1); text-transform: uppercase; letter-spacing: 0.5px; }
.tbl-nav ul li a:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

.tbl-page-title { text-align: center; padding: 30px 0 20px; }
.tbl-page-title h1 { font-size: 22px; font-weight: 700; color: var(--color-accent); text-transform: uppercase; letter-spacing: 1px; }

.tbl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--grid-gap); padding: 20px 0 30px; }

.tbl-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--border-radius); overflow: hidden; transition: box-shadow 0.2s; }
.tbl-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
.tbl-card__thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.tbl-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tbl-card:hover .tbl-card__thumb img { transform: scale(1.03); }
.tbl-card__badge { position: absolute; top: 10px; right: 10px; background: var(--color-badge); color: var(--color-badge-text); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 8px; border-radius: 2px; }
.tbl-card__body { padding: 14px; }
.tbl-card__title { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--color-text); margin-bottom: 10px; }
.tbl-card__title a { color: inherit; }
.tbl-card__title a:hover { color: var(--color-accent); text-decoration: none; }
.tbl-card__meta { font-size: 12px; color: var(--color-meta); display: flex; align-items: center; gap: 8px; }
.tbl-card__meta .sep::before { content: '•'; }

.tbl-loadmore { text-align: center; padding: 10px 0 40px; }
.tbl-loadmore__btn { background: var(--color-accent); color: #fff; border: none; padding: 10px 30px; font-size: 14px; font-weight: 600; border-radius: var(--border-radius); cursor: pointer; transition: opacity 0.2s; }
.tbl-loadmore__btn:hover { opacity: 0.85; }

.tbl-layout { display: grid; grid-template-columns: 1fr 300px; gap: 30px; padding: 30px 0; align-items: start; }
.tbl-main { min-width: 0; }
.tbl-sidebar { min-width: 0; }

.tbl-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--color-border); }
.tbl-row:first-child { border-top: 1px solid var(--color-border); }
.tbl-row__thumb { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--border-radius); }
.tbl-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tbl-row__cat { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--color-accent); margin-bottom: 6px; letter-spacing: 0.5px; }
.tbl-row__title { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.tbl-row__title a { color: var(--color-text); }
.tbl-row__title a:hover { color: var(--color-accent); text-decoration: none; }
.tbl-row__excerpt { font-size: 13px; color: #555; line-height: 1.5; margin-bottom: 8px; }
.tbl-row__meta { font-size: 12px; color: var(--color-meta); }

.tbl-single__cat { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--color-accent); margin-bottom: 10px; letter-spacing: 0.5px; }
.tbl-single__title { font-size: 26px; font-weight: 800; line-height: 1.3; color: var(--color-text); margin-bottom: 12px; }
.tbl-single__meta { font-size: 13px; color: var(--color-meta); display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--color-border); }
.tbl-single__thumb { margin-bottom: 24px; border-radius: var(--border-radius); overflow: hidden; }
.tbl-single__thumb img { width: 100%; height: auto; }

.tbl-share { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.tbl-share__btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--border-radius); font-size: 12px; font-weight: 700; color: #fff; text-decoration: none; transition: opacity 0.2s; }
.tbl-share__btn:hover { opacity: 0.85; text-decoration: none; color: #fff; }
.tbl-share__btn--fb { background: #1877f2; }
.tbl-share__btn--tw { background: #000000; }
.tbl-share__btn--li { background: #0a66c2; }
.tbl-share__btn--wa { background: #25d366; }
.tbl-share__btn--pi { background: #e60023; }

.tbl-single__content { font-size: 16px; line-height: 1.8; color: var(--color-text); }
.tbl-single__content h2 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.tbl-single__content h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.tbl-single__content p { margin-bottom: 18px; }
.tbl-single__content ul, .tbl-single__content ol { margin: 0 0 18px 24px; }
.tbl-single__content li { margin-bottom: 6px; }
.tbl-single__content blockquote { border-left: 4px solid var(--color-accent); padding: 12px 20px; margin: 24px 0; background: #f9f9f9; font-style: italic; color: #555; }
.tbl-single__content img { border-radius: var(--border-radius); margin: 20px 0; }

.tbl-tags { margin: 24px 0; }
.tbl-tags span { font-size: 13px; font-weight: 700; margin-right: 8px; }
.tbl-tags a { display: inline-block; padding: 4px 10px; background: #f0f0f0; border-radius: 20px; font-size: 12px; color: var(--color-text); margin: 3px 3px 3px 0; }
.tbl-tags a:hover { background: var(--color-accent); color: #fff; text-decoration: none; }

.tbl-author { display: flex; align-items: center; gap: 16px; padding: 20px; background: #f7f7f7; border-radius: var(--border-radius); margin: 30px 0; }
.tbl-author__avatar img { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; }
.tbl-author__name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.tbl-author__link { font-size: 13px; color: var(--color-accent); }

.tbl-related { margin-top: 30px; }
.tbl-related__title { font-size: 18px; font-weight: 700; padding-bottom: 10px; border-bottom: 2px solid var(--color-accent); margin-bottom: 20px; }
.tbl-related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tbl-related__item__thumb { aspect-ratio: 16/10; overflow: hidden; border-radius: var(--border-radius); margin-bottom: 8px; }
.tbl-related__item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tbl-related__item__cat { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--color-accent); margin-bottom: 4px; }
.tbl-related__item__title { font-size: 13px; font-weight: 700; line-height: 1.4; }
.tbl-related__item__title a { color: var(--color-text); }
.tbl-related__item__title a:hover { color: var(--color-accent); text-decoration: none; }
.tbl-related__item__date { font-size: 11px; color: var(--color-meta); margin-top: 4px; }

.tbl-widget { margin-bottom: 28px; }
.tbl-widget__title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; background: var(--color-accent); color: #fff; padding: 8px 12px; margin-bottom: 12px; border-radius: var(--border-radius) var(--border-radius) 0 0; }
.tbl-widget__post { display: grid; grid-template-columns: 80px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.tbl-widget__post:last-child { border-bottom: none; }
.tbl-widget__post__thumb { aspect-ratio: 1; overflow: hidden; border-radius: 2px; }
.tbl-widget__post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tbl-widget__post__title { font-size: 12px; font-weight: 700; line-height: 1.4; }
.tbl-widget__post__title a { color: var(--color-text); }
.tbl-widget__post__title a:hover { color: var(--color-accent); text-decoration: none; }
.tbl-widget__post__date { font-size: 11px; color: var(--color-meta); margin-top: 4px; }

.tbl-footer { background: var(--color-footer-bg); color: var(--color-footer-text); padding: 40px 0 0; margin-top: 40px; }
.tbl-footer__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.tbl-footer__col-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; color: var(--color-footer-text); text-align: center; }
.tbl-footer__nav { list-style: none; text-align: center; }
.tbl-footer__nav li { margin-bottom: 6px; }
.tbl-footer__nav a { color: rgba(255,255,255,0.85); font-size: 13px; }
.tbl-footer__nav a:hover { color: #fff; text-decoration: none; }
.tbl-footer__logo { display: block; margin: 0 auto 12px; max-height: 50px; width: auto; }
.tbl-footer__info { font-size: 12px; line-height: 1.8; color: rgba(255,255,255,0.85); text-align: center; }

.tbl-newsletter { display: flex; gap: 8px; margin-top: 10px; }
.tbl-newsletter input[type="email"] { flex: 1; padding: 8px 12px; border: none; border-radius: var(--border-radius); font-size: 13px; }
.tbl-newsletter button { background: var(--color-topbar); color: #fff; border: none; padding: 8px 18px; font-size: 13px; font-weight: 700; border-radius: var(--border-radius); cursor: pointer; text-transform: uppercase; }
.tbl-newsletter button:hover { opacity: 0.9; }

.tbl-footer__social { list-style: none; margin-top: 14px; }
.tbl-footer__social li { margin-bottom: 6px; }
.tbl-footer__social a { color: rgba(255,255,255,0.85); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.tbl-footer__social a:hover { color: #fff; text-decoration: none; }

.tbl-footer__bottom { border-top: 1px solid rgba(255,255,255,0.2); padding: 14px 0; margin-top: 10px; }
.tbl-footer__bottom__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.tbl-footer__bottom__links { display: flex; gap: 20px; }
.tbl-footer__bottom__links a { color: rgba(255,255,255,0.85); font-size: 12px; }
.tbl-footer__bottom__links a:hover { color: #fff; text-decoration: none; }
.tbl-footer__bottom__copy { font-size: 12px; color: rgba(255,255,255,0.7); }

@media (max-width: 900px) {
  .tbl-layout { grid-template-columns: 1fr; }
  .tbl-sidebar { display: none; }
  .tbl-grid { grid-template-columns: repeat(2, 1fr); }
  .tbl-related__grid { grid-template-columns: repeat(2, 1fr); }
  .tbl-footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .tbl-grid { grid-template-columns: 1fr; }
  .tbl-row { grid-template-columns: 1fr; }
  .tbl-row__thumb { aspect-ratio: 16/9; }
  .tbl-single__title { font-size: 20px; }
  .tbl-related__grid { grid-template-columns: 1fr; }
  .tbl-footer__bottom__inner { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   HERO BLOCK HOMEPAGE
   ============================================================ */
.tbl-hero {
    display: grid;
    grid-template-columns: 1fr 1fr 300px;
    grid-template-rows: auto;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 10px;
}
.tbl-hero__main {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.tbl-hero__title {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    margin: 8px 0 10px;
}
.tbl-hero__title a { color: var(--color-text); }
.tbl-hero__title a:hover { color: var(--color-accent); text-decoration: none; }
.tbl-hero__meta { font-size: 12px; color: var(--color-meta); margin-bottom: 10px; }
.tbl-hero__excerpt { font-size: 14px; color: #555; line-height: 1.6; }
.tbl-hero__thumb {
    grid-column: 2;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--border-radius);
}
.tbl-hero__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tbl-hero__ad {
    grid-column: 3;
}

.tbl-grid--border {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 24px;
    margin-bottom: 10px;
}

.tbl-banner-full {
    margin: 10px 0;
    text-align: center;
}

.tbl-ad-placeholder {
    background: #f0f0f0;
    border: 1px dashed #ccc;
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
    border-radius: var(--border-radius);
}

.tbl-widget__post--large { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--color-border); }
.tbl-widget__post--large:last-child { border-bottom: none; }
.tbl-widget__post__thumb--large { aspect-ratio: 16/10; overflow: hidden; border-radius: var(--border-radius); margin-bottom: 6px; }
.tbl-widget__post__thumb--large img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 900px) {
    .tbl-hero { grid-template-columns: 1fr; }
    .tbl-hero__thumb { grid-column: 1; }
    .tbl-hero__ad { grid-column: 1; }
}

/* ============================================================
   FOOTER OVERRIDE
   ============================================================ */
.tbl-footer {
    border-top: 4px solid var(--color-topbar);
}
.tbl-footer__col-title {
    color: var(--color-topbar);
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-topbar);
}
.tbl-footer__nav li { text-align: left; }
.tbl-footer__social a {
    color: var(--color-topbar);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tbl-footer__social a:hover { color: #fff; text-decoration: none; }
.tbl-newsletter { border-bottom: 1px solid var(--color-topbar); padding-bottom: 14px; margin-bottom: 14px; }
.tbl-footer__social-title {
    color: var(--color-topbar);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-topbar);
}
.tbl-footer__info { text-align: left; }

/* Footer col2 title fix */
.tbl-footer__col2-title {
    color: var(--color-topbar) !important;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-topbar);
    display: block;
}

/* ============================================================
   FOOTER BILANCIAMENTO COLONNE
   ============================================================ */
.tbl-footer__grid {
    align-items: start;
    padding-top: 30px;
}
.tbl-footer__nav li { margin-bottom: 8px; }
.tbl-footer__nav a { font-size: 14px; color: rgba(255,255,255,0.90); }
.tbl-footer__nav a:hover { color: #fff; }
.tbl-footer__info { font-size: 14px !important; line-height: 2 !important; }
.tbl-footer__social li { margin-bottom: 10px; }
.tbl-footer__social a { font-size: 14px; gap: 10px; }
.tbl-footer__social svg { width: 18px; height: 18px; flex-shrink: 0; }
.tbl-footer__social-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-topbar);
    margin: 16px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-topbar);
}
.tbl-footer__logo-wrap img {
    max-height: 80px !important;
    width: auto;
    margin-bottom: 16px;
}

/* Newsletter layout verticale */
.tbl-newsletter {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--color-topbar);
    padding-bottom: 16px;
    margin-bottom: 16px;
}
.tbl-newsletter input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: none;
    border-radius: var(--border-radius);
}
.tbl-newsletter button {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--color-topbar);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
}
.tbl-newsletter button:hover { opacity: 0.9; }

/* Footer nav voci più compatte */
.tbl-footer__nav li { margin-bottom: 4px; }
.tbl-footer__nav a { font-size: 13px; }

/* Footer logo spacing */
.tbl-footer__grid > div:nth-child(2) img {
    margin-top: 16px;
    margin-bottom: 20px;
}

/* Footer nav voci ancora più compatte */
.tbl-footer__nav li { margin-bottom: 1px !important; }
.tbl-footer__nav a { font-size: 13px; line-height: 1.4; }

/* Row: testo sinistra, immagine destra */
.tbl-row {
    grid-template-columns: 1fr 200px;
}

/* Row: inverti ordine - testo sx, foto dx */
.tbl-row { grid-template-columns: 1fr 280px; }
.tbl-row__thumb { order: 2; }
.tbl-row__body { order: 1; }

/* Layout più largo, sidebar più stretta */
.tbl-layout { grid-template-columns: 1fr 260px; gap: 24px; }
.tbl-row { grid-template-columns: 1fr 240px; gap: 20px; }
.tbl-row__thumb { aspect-ratio: 16/10; }

/* Layout: sidebar più larga */
.tbl-layout { grid-template-columns: 1fr 350px; gap: 30px; }

/* Widget più letti: nascondi thumb */
.tbl-widget__post .tbl-widget__post__thumb { display: none; }
.tbl-widget__post { grid-template-columns: 1fr; }

/* Righe separatrici più scure e più spesse */
.tbl-row { border-bottom: 2px solid #cccccc; }
.tbl-row:first-child { border-top: 2px solid #cccccc; }

/* Hero: riga verticale tra foto e pub, riga orizzontale sotto */
.tbl-hero {
    border-bottom: 2px solid #cccccc;
    padding-bottom: 24px;
}
.tbl-hero__ad {
    border-left: 2px solid #cccccc;
    padding-left: 20px;
}

/* Griglia: riga sotto */
.tbl-grid--border {
    border-bottom: 2px solid #cccccc;
}

/* Sidebar single: widget post con thumb */
.tbl-widget__post--sidebar {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}
.tbl-widget__post--sidebar:last-child { border-bottom: none; }
.tbl-widget__post--sidebar .tbl-widget__post__thumb {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 2px;
}
.tbl-widget__post--sidebar .tbl-widget__post__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sidebar correlati: foto grande + cat + data + titolo */
.tbl-sidebar-card {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}
.tbl-sidebar-card:last-child { border-bottom: none; margin-bottom: 0; }
.tbl-sidebar-card__thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: var(--border-radius);
    margin-bottom: 8px;
}
.tbl-sidebar-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tbl-sidebar-card__cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-accent);
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.tbl-sidebar-card__date {
    font-size: 11px;
    color: var(--color-meta);
    margin-bottom: 5px;
}
.tbl-sidebar-card__title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}
.tbl-sidebar-card__title a { color: var(--color-text); }
.tbl-sidebar-card__title a:hover { color: var(--color-accent); text-decoration: none; }

/* ============================================================
   TOC
   ============================================================ */
.tbl-toc {
    background: #f9f9f9;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    margin: 24px 0;
}
.tbl-toc__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
}
.tbl-toc__toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-accent);
}
.tbl-toc__list {
    margin: 0;
    padding-left: 20px;
}
.tbl-toc__list li {
    margin-bottom: 6px;
    font-size: 14px;
}
.tbl-toc__list a { color: var(--color-accent); }
.tbl-toc__list a:hover { text-decoration: underline; }
.tbl-toc__sub { padding-left: 16px; font-size: 13px; }

/* TOC header celeste */
.tbl-toc { padding: 0; overflow: hidden; }
.tbl-toc__header {
    background: var(--color-accent);
    color: #ffffff;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.tbl-toc__toggle { color: #ffffff; }
.tbl-toc__list { padding: 14px 20px 14px 36px; }

/* Correlati e sidebar: font più grandi */
.tbl-related__item__title { font-size: 15px !important; }
.tbl-related__item__cat { font-size: 12px !important; }
.tbl-related__item__date { font-size: 12px !important; }
.tbl-sidebar-card__title { font-size: 15px !important; }
.tbl-sidebar-card__cat { font-size: 12px !important; }
.tbl-sidebar-card__date { font-size: 12px !important; }

/* Sidebar sticky */
.tbl-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: none;
}
.tbl-sidebar::-webkit-scrollbar { display: none; }

/* Sidebar sticky fix */
.tbl-sidebar {
    position: sticky;
    top: 20px;
    max-height: none !important;
    overflow-y: visible !important;
}

/* Topbar più alta + logo più grande */
.tbl-topbar { padding: 10px 0; }
.tbl-topbar__inner { gap: 16px; }
.tbl-topbar__inner a { color: #ffffff; }
.tbl-topbar__inner a:hover { opacity: 0.8; }
.tbl-header__logo img { height: 70px !important; width: auto; }

/* Topbar icone social celesti */
.tbl-topbar__inner a { color: var(--color-accent) !important; }
.tbl-topbar__inner a:hover { opacity: 0.8; }


/* ============================================================
   DRAWER MENU LATERALE
   ============================================================ */
.tbl-nav {
    display: block !important;
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    height: 100vh;
    background: var(--color-accent);
    z-index: 9999;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 50px 24px 20px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
}
.tbl-nav.is-open { right: 0; }

.tbl-nav__close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}
.tbl-nav__close:hover { opacity: 0.7; }

.tbl-nav__logo {
    margin-top: 40px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.tbl-nav__logo img { max-height: 60px; width: auto; }

.tbl-nav ul { list-style: none; }
.tbl-nav ul li a {
    display: block;
    padding: 14px 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    text-transform: none;
    letter-spacing: 0;
}
.tbl-nav ul li a:hover { color: var(--color-topbar); text-decoration: none; }

.tbl-nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
}
.tbl-nav-overlay.is-open { display: block; }

/* Drawer: spazio interno */
#tbl-nav { padding-top: 60px !important; }
#tbl-nav-close { top: 20px !important; }

/* Sticky solo su single, non su homepage */
.single .tbl-sidebar {
    position: sticky;
    top: 20px;
}
.home .tbl-sidebar,
.page .tbl-sidebar {
    position: static !important;
}

/* ============================================================
   PAGE STATICA
   ============================================================ */
.tbl-page-content {
    max-width: 860px;
    margin: 40px auto;
    padding: 0 20px;
}
.tbl-page-content__title {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-accent);
}
.tbl-page-content__body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text);
}
.tbl-page-content__body h2 { font-size: 20px; font-weight: 700; margin: 28px 0 12px; }
.tbl-page-content__body h3 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.tbl-page-content__body p { margin-bottom: 16px; }
.tbl-page-content__body ul, .tbl-page-content__body ol { margin: 0 0 16px 24px; }
.tbl-page-content__body li { margin-bottom: 6px; }
.tbl-page-content__body a { color: var(--color-accent); }

/* ============================================================
   404
   ============================================================ */
.tbl-404 {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent) url('') center center / cover no-repeat;
}
.tbl-404__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 100, 150, 0.55);
}
.tbl-404__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px;
    max-width: 700px;
}
.tbl-404__number {
    font-size: 160px;
    font-weight: 900;
    color: var(--color-topbar);
    line-height: 1;
    margin-bottom: 20px;
}
.tbl-404__text {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 30px;
    line-height: 1.6;
}
.tbl-404__search {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
}
.tbl-404__search input {
    flex: 1;
    padding: 14px 20px;
    font-size: 15px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    outline: none;
}
.tbl-404__search button {
    background: var(--color-topbar);
    color: #fff;
    border: none;
    padding: 14px 20px;
    cursor: pointer;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    display: flex;
    align-items: center;
}
.tbl-404__search button:hover { opacity: 0.9; }

/* 404: niente spazio bianco sotto */
.error404 .tbl-404 { margin-bottom: 0; }
.error404 .tbl-footer { margin-top: 0; }

/* ============================================================
   ADS DESKTOP / MOBILE
   ============================================================ */
.tbl-ad-desktop { display: block; }
.tbl-ad-mobile  { display: none; }

@media (max-width: 600px) {
    .tbl-ad-desktop { display: none !important; }
    .tbl-ad-mobile  { display: block; }
}
