/*
Theme Name: NerdWire
Theme URI: https://example.com/nerdwire
Author: Francesco Grano
Author URI: https://francescograno.com
Description: Tema WordPress magazine/news dark-mode nativo per siti nerd (videogiochi, anime, cinema, serie TV, tech, fumetti). Layout a griglia, hero post in evidenza, badge colorati per tipologia di contenuto, palette scura con accenti neon.
Version: 1.3.5
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: nerdwire
Tags: dark-mode, news, blog, grid-layout, custom-colors, custom-menu, featured-images, translation-ready
*/

/* =========================================================
   0. DESIGN TOKENS (CSS Custom Properties)
   ========================================================= */
:root {
  /* Palette base - dark mode nativa */
  --nw-bg: #0b0d10;
  --nw-bg-elevated: #14171c;
  --nw-bg-card: #191d23;
  --nw-border: #262b33;
  --nw-text: #e7e9ec;
  --nw-text-muted: #9aa1ac;
  --nw-text-dim: #6b7280;

  /* Accenti neon */
  --nw-neon-magenta: #ff2ec4;
  --nw-neon-violet: #a855f7;
  --nw-neon-cyan: #35e6e6;
  --nw-gold: #f6af0a;
  --nw-red: #c70606;
  --nw-contrast-dark: #252525;

  /* Colore primario accento (usato per link, focus, badge di default) */
  --nw-accent: var(--nw-gold);
  --nw-accent-contrast: var(--nw-contrast-dark);

  /* Sfondo "brand" per hero e blocchi in evidenza (sezione, non l'intera pagina) */
  --nw-hero-bg: var(--nw-gold);
  --nw-hero-text: var(--nw-contrast-dark);

  /* Header: sfondo giallo brand invece dello scuro di contrasto */
  --nw-header-bg: var(--nw-gold);
  --nw-header-text: var(--nw-contrast-dark);
  --nw-header-text-muted: color-mix(in srgb, var(--nw-contrast-dark) 70%, transparent);

  /* Badge per categoria/tipo contenuto */
  --nw-badge-news: #35e6e6;
  --nw-badge-recensione: var(--nw-red);
  --nw-badge-anteprima: #a855f7;
  --nw-badge-approfondimento: var(--nw-gold);
  --nw-badge-guida: var(--nw-gold);
  --nw-badge-intervista: #ff8a3d;

  /* Tipografia */
  --nw-font-heading: 'Rajdhani', 'Inter', sans-serif;
  --nw-font-body: 'Inter', system-ui, sans-serif;

  /* Layout */
  --nw-maxw: 1280px;
  --nw-radius: 10px;
  --nw-gap: 1.5rem;
  --nw-header-h: 72px;
}

/* =========================================================
   1. RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  background: var(--nw-bg);
  color: var(--nw-text);
  font-family: var(--nw-font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--nw-text);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--nw-accent); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--nw-accent);
  outline-offset: 2px;
}

h1, h2, h3, h4, h5 {
  font-family: var(--nw-font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}

p { margin: 0 0 1em; }

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

.container {
  width: 100%;
  max-width: var(--nw-maxw);
  margin-inline: auto;
  padding-inline: 1.25rem;
  min-width: 0;
}

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden; position: absolute !important;
  word-wrap: normal !important;
}

/* =========================================================
   2. HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nw-header-h);
  display: flex;
  align-items: center;
  background: var(--nw-header-bg);
  border-bottom: 1px solid var(--nw-header-bg);
  transition: box-shadow .25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 10px 30px -14px rgba(0,0,0,.45);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

/* Desktop: logo a sinistra, categorie centrate nell'header, ricerca a destra. */
@media (min-width: 783px) {
  .site-header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
  }
  .site-branding { justify-self: start; }
  .main-navigation { justify-self: center; }
  .header-actions { justify-self: end; }
}

.site-branding { display: flex; align-items: center; gap: .6rem; }

.site-title {
  margin: 0;
  font-size: 1.4rem;
  font-family: var(--nw-font-heading);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.site-title a { color: var(--nw-header-text); }
.site-title a:hover { color: var(--nw-bg); }
.site-title .accent { color: var(--nw-red); }

.site-logo img {
  width: var(--nw-logo-width, 220px);
  max-width: 100%;
  height: auto;
  max-height: 58px;
  object-fit: contain;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}

.main-navigation a {
  font-family: var(--nw-font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nw-header-text-muted);
  position: relative;
  padding: .3rem 0;
  transition: color .18s ease;
}
.main-navigation a:hover {
  color: var(--nw-red);
}
.main-navigation .current-menu-item > a {
  color: var(--nw-header-text);
}
.main-navigation a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--nw-red);
  transition: width .2s ease;
}
.main-navigation .current-menu-item > a::after { width: 100%; }
.main-navigation a:hover::after { width: 100%; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nw-social-icons {
  display: flex;
  gap: .75rem;
}
.nw-social-icons a {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nw-header-text-muted);
  font-family: var(--nw-font-heading);
  font-weight: 600;
}
.nw-social-icons a:hover { color: var(--nw-header-text); }

.search-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  background: color-mix(in srgb, var(--nw-contrast-dark) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--nw-contrast-dark) 30%, transparent);
  border-radius: 50%;
  color: var(--nw-header-text);
  padding: 0;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.search-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.search-toggle:hover {
  border-color: var(--nw-contrast-dark);
  background: color-mix(in srgb, var(--nw-contrast-dark) 16%, transparent);
  transform: scale(1.06);
}

.header-search-panel {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--nw-contrast-dark);
  border-bottom: 1px solid var(--nw-border);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.55);
  padding-block: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease, padding .25s ease;
}
.header-search-panel.is-open {
  max-height: 130px;
  padding-block: 1.5rem;
}
.header-search-panel .search-form {
  display: flex;
  gap: .6rem;
  max-width: 640px;
  margin-inline: auto;
}
.header-search-panel input[type="search"] {
  flex: 1;
  background: var(--nw-bg-card);
  border: 1px solid var(--nw-border);
  border-radius: 999px;
  color: var(--nw-text);
  padding: .65rem 1.2rem;
  font-size: 1rem;
}
.header-search-panel input[type="search"]:focus { border-color: var(--nw-accent); outline: none; }
.header-search-panel button[type="submit"] {
  background: var(--nw-accent);
  color: var(--nw-accent-contrast);
  border: none;
  border-radius: 999px;
  padding: .65rem 1.4rem;
  font-family: var(--nw-font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  cursor: pointer;
  transition: filter .15s ease;
}
.header-search-panel button[type="submit"]:hover { filter: brightness(1.08); }

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid color-mix(in srgb, var(--nw-contrast-dark) 30%, transparent);
  border-radius: 6px;
  color: var(--nw-header-text);
  padding: .4rem .6rem;
  cursor: pointer;
}

/* =========================================================
   3. BADGES / TAG ETICHETTA
   ========================================================= */
.nw-badge {
  display: inline-block;
  font-family: var(--nw-font-heading);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .25em .65em;
  border-radius: 4px;
  background: rgba(255,255,255,.06);
  border: 1px solid currentColor;
  line-height: 1.6;
}

.nw-badge--news         { color: var(--nw-badge-news); }
.nw-badge--recensione   { color: var(--nw-badge-recensione); }
.nw-badge--anteprima    { color: var(--nw-badge-anteprima); }
.nw-badge--approfondimento { color: var(--nw-badge-approfondimento); }
.nw-badge--guida        { color: var(--nw-badge-guida); }

/* =========================================================
   4. HOMEPAGE / HERO + GRID
   ========================================================= */
.home-layout {
  padding-block: 2rem 3rem;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2.5rem;
}

.hero-post {
  position: relative;
  border-radius: var(--nw-radius);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  background: var(--nw-bg-elevated);
  border: 1px solid var(--nw-border);
}

.hero-post .hero-media {
  position: absolute;
  inset: 0;
}
.hero-post .hero-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-post .hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(11,13,16,.95) 5%, rgba(11,13,16,.4) 55%, rgba(11,13,16,.1) 100%);
}

.hero-post .hero-content,
.hero-slide .hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 2.5rem;
  max-width: 800px;
  background: var(--nw-hero-bg);
  color: var(--nw-hero-text);
  border-radius: 0 var(--nw-radius) 0 0;
}

.hero-content .nw-badge {
  margin-bottom: .8rem;
  background: rgba(0,0,0,.1);
  color: var(--nw-contrast-dark) !important;
  border-color: var(--nw-contrast-dark);
}

.hero-content h1,
.hero-content h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: .5rem;
  color: var(--nw-hero-text);
}
.hero-content h1 a, .hero-content h2 a { color: var(--nw-hero-text); }
.hero-content h1 a:hover, .hero-content h2 a:hover { text-decoration: underline; }

.hero-content .excerpt {
  color: color-mix(in srgb, var(--nw-hero-text) 75%, transparent);
  font-size: 1.05rem;
  max-width: 65ch;
}

.hero-content .entry-meta,
.hero-content .entry-meta a {
  color: color-mix(in srgb, var(--nw-hero-text) 65%, transparent);
}

@media (max-width: 782px) {
  .hero-post .hero-content { max-width: 100%; }
}

.entry-meta {
  font-size: .82rem;
  color: var(--nw-text-dim);
  display: flex;
  gap: .8rem;
  align-items: center;
  margin-top: .6rem;
}
.entry-meta a { color: var(--nw-text-dim); }
.entry-meta a:hover { color: var(--nw-accent); }

/* Griglia articoli */
.section-heading {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.section-heading h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--nw-red);
  margin: 0;
}
.section-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--nw-border);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--nw-gap);
}

.post-card {
  background: var(--nw-bg-card);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--nw-accent);
  box-shadow: 0 8px 30px -12px color-mix(in srgb, var(--nw-accent) 60%, transparent);
}

.post-card .card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--nw-bg-elevated);
}
.post-card .card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s ease;
}
.post-card:hover .card-media img { transform: scale(1.05); }

.post-card .card-body {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
}

.post-card .nw-badge { align-self: flex-start; }

.post-card h3 {
  font-size: 1.05rem;
  margin: 0;
}
.post-card h3 a { color: var(--nw-text); }
.post-card h3 a:hover { color: var(--nw-accent); }

.post-card .excerpt {
  color: var(--nw-text-muted);
  font-size: .9rem;
  margin: 0;
}

/* =========================================================
   5. ARCHIVE / CATEGORY
   ========================================================= */
.archive-header {
  padding-block: 2.5rem 1.5rem;
  border-bottom: 1px solid var(--nw-border);
  margin-bottom: 2rem;
}
.archive-header .eyebrow {
  color: var(--nw-red);
  font-family: var(--nw-font-heading);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .85rem;
}
.archive-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}
.archive-header .archive-description {
  color: var(--nw-text-muted);
  max-width: 65ch;
}

.archive-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .archive-layout { grid-template-columns: 1fr; }
}

/* =========================================================
   6. SINGLE POST
   ========================================================= */
.single-post-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  padding-block: 2.5rem 4rem;
  align-items: start;
}
@media (max-width: 900px) {
  .single-post-wrap { grid-template-columns: 1fr; }
}

.single-header { margin-bottom: 1.5rem; }
.single-header .nw-badge { margin-bottom: .8rem; }
.single-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  overflow-wrap: anywhere;
}

.single-featured-image {
  border-radius: var(--nw-radius);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--nw-border);
}
.single-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.entry-content {
  font-size: 1.05rem;
  color: var(--nw-text);
  min-width: 0;
}
.entry-content p { margin-bottom: 1.3em; }
.entry-content h2, .entry-content h3 { margin-top: 1.8em; overflow-wrap: anywhere; }
.entry-content a { color: var(--nw-accent); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.entry-content blockquote {
  border-left: 3px solid var(--nw-accent);
  margin: 1.5em 0;
  padding: .5em 1.2em;
  color: var(--nw-text-muted);
  background: var(--nw-bg-elevated);
  border-radius: 0 6px 6px 0;
}
.entry-content img,
.entry-content figure,
.entry-content table,
.entry-content iframe { max-width: 100%; }
.entry-content img { border-radius: var(--nw-radius); margin-block: 1em; height: auto; }
.entry-content figure { margin-inline: 0; }
.entry-content pre, .entry-content code {
  background: var(--nw-bg-elevated);
  border: 1px solid var(--nw-border);
  border-radius: 6px;
}
.entry-content pre { padding: 1rem; overflow-x: auto; max-width: 100%; }
.entry-content code { padding: .15em .4em; font-size: .9em; overflow-wrap: anywhere; }

.entry-tags {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--nw-border);
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.entry-tags a {
  font-size: .8rem;
  padding: .3em .7em;
  border: 1px solid var(--nw-border);
  border-radius: 4px;
  color: var(--nw-text-muted);
}
.entry-tags a:hover { border-color: var(--nw-accent); color: var(--nw-accent); }

/* Sidebar */
.widget-area .widget {
  background: var(--nw-bg-card);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.widget-area .widget-title {
  font-family: var(--nw-font-heading);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .95rem;
  color: var(--nw-red);
  margin-bottom: 1rem;
}

/* Pagination */
.nw-pagination {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.nw-pagination a, .nw-pagination span {
  padding: .5em .9em;
  border: 1px solid var(--nw-border);
  border-radius: 6px;
  color: var(--nw-text-muted);
  font-size: .9rem;
}
.nw-pagination .current {
  border-color: var(--nw-accent);
  color: var(--nw-accent);
}
.nw-pagination a:hover { border-color: var(--nw-accent); color: var(--nw-accent); }

/* =========================================================
   7. FOOTER
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--nw-border);
  background: var(--nw-bg-elevated);
  margin-top: 3rem;
}
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-block: 3rem;
}
.footer-widgets .widget-title {
  font-family: var(--nw-font-heading);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .9rem;
  color: var(--nw-red);
  margin-bottom: 1rem;
}
.footer-widgets .widget a { color: var(--nw-text-muted); }
.footer-widgets .widget a:hover { color: var(--nw-accent); }

.footer-bottom {
  border-top: 1px solid var(--nw-border);
  padding-block: 1.25rem;
  font-size: .85rem;
  color: var(--nw-text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .75rem;
}
.footer-bottom .footer-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  order: 1;
}
.footer-bottom > p {
  order: 2;
  margin: 0;
}
.footer-bottom a { color: var(--nw-text-dim); }
.footer-bottom a:hover { color: var(--nw-accent); }
.footer-bottom .neon-dot { color: var(--nw-neon-magenta); }


/* Quattro anteprime Manga & Fumetti in una griglia 2x2 desktop. */
.manga-panel { min-width: 0; }
.manga-panel .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Contenuti creati con Gutenberg/HTML non devono forzare la larghezza su smartphone. */
.page-wrap,
.single-page,
.entry-content,
.archive-layout,
.archive-main,
.single-post-wrap,
.single-article,
.widget-area,
.wp-block-group,
.wp-block-column { min-width: 0; }
.entry-content,
.single-page { overflow-wrap: anywhere; }
.entry-content > *,
.single-page > * { max-width: 100%; }
.entry-content .wp-block-columns { flex-wrap: wrap; }
.entry-content .wp-block-table { overflow-x: auto; max-width: 100%; }
.entry-content iframe,
.entry-content video,
.entry-content embed { max-width: 100%; }


/* Video embed ripristinati automaticamente dagli URL YouTube/Vimeo. */
.entry-content .nerdwire-video-embed {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0 2rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--nw-radius);
  background: #000;
}
.entry-content .nerdwire-video-embed iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  border: 0;
}

/* Rete di sicurezza extra: copre anche i contenitori generici (div) che
   script di terze parti - ad es. gli annunci automatici di Google AdSense -
   possono inserire dinamicamente via JS dentro l'articolo, spesso con una
   larghezza fissa in pixel impostata inline. !important serve a vincere
   su quello stile inline. */
.entry-content * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.entry-content ins.adsbygoogle,
.entry-content .adsbygoogle,
.entry-content .google-auto-placed {
  display: block;
  margin-block: 1.5em;
  overflow: hidden;
}

@media (max-width: 782px) {
  .container { padding-inline: 1rem; }
  .home-layout { gap: 1.5rem; padding-block: 1rem 2rem; }
  .home-split { gap: 1.5rem; }
  .home-feature-slider .hero-slide { min-height: 300px; }
  .hero-slide .hero-content { max-width: 100%; padding: 1rem 1.15rem; }
  .hero-slide .hero-content h3 { font-size: 1.35rem; }
  .page-wrap { padding-block: 1.5rem 2.5rem; }
  .archive-header { padding-block: 1.5rem; }
  .single-post-wrap { padding-block: 1.5rem 2.5rem; gap: 1.5rem; }
  .single-header h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .single-header .entry-meta { flex-wrap: wrap; }
}

/* =========================================================
   8. RESPONSIVE
   ========================================================= */
@media (max-width: 782px) {
  .site-header {
    min-height: var(--nw-header-h);
    height: auto;
  }

  .site-header .container {
    min-width: 0;
  }

  .site-branding {
    min-width: 0;
    flex: 1 1 auto;
  }

  .site-logo img {
    width: min(var(--nw-logo-width, 220px), 48vw);
    max-height: 52px;
  }

  .header-actions {
    flex-shrink: 0;
    gap: .5rem;
  }

  .search-toggle {
    width: 2.55rem;
    height: 2.55rem;
  }
  .search-toggle svg {
    width: 1.3rem;
    height: 1.3rem;
  }

  .nw-social-icons {
    display: none;
  }

  .main-navigation { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; gap: .4rem; }

  .main-navigation.is-open {
    display: block;
    position: absolute;
    top: var(--nw-header-h);
    left: 0; right: 0;
    background: var(--nw-header-bg);
    border-bottom: 1px solid color-mix(in srgb, var(--nw-contrast-dark) 20%, transparent);
  }
  .main-navigation.is-open ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    gap: 1rem;
  }

  .hero-post { min-height: 340px; }
  .hero-post .hero-content { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .post-grid { grid-template-columns: 1fr; }
  .manga-panel .post-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   9. HERO SLIDER (homepage)
   ========================================================= */
.hero-slider {
  position: relative;
  border-radius: var(--nw-radius);
  overflow: hidden;
  border: 1px solid var(--nw-border);
}

.hero-slider-track {
  display: flex;
  transition: transform .45s ease;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  background: var(--nw-bg-elevated);
}

.hero-slide .hero-media { position: absolute; inset: 0; }
.hero-slide .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide .hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(11,13,16,.5) 0%, rgba(11,13,16,0) 45%);
}

.hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(11,13,16,.6);
  border: 1px solid var(--nw-border);
  color: var(--nw-text);
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.hero-slider-arrow:hover { border-color: var(--nw-accent); color: var(--nw-accent); }
.hero-slider-arrow--prev { left: 1rem; }
.hero-slider-arrow--next { right: 1rem; }

.hero-slider-dots {
  position: absolute;
  z-index: 3;
  bottom: 1rem;
  right: 1.5rem;
  display: flex;
  gap: .5rem;
}
.hero-slider-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid var(--nw-text-dim);
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.hero-slider-dot.is-active { background: var(--nw-accent); border-color: var(--nw-accent); }

@media (max-width: 782px) {
  .hero-slide { min-height: 340px; }
}

/* =========================================================
   10. CATEGORY ROW (righe orizzontali homepage)
   ========================================================= */
.category-row { margin-top: 1rem; }

.section-heading .section-link {
  font-size: .8rem;
  color: var(--nw-text-dim);
  font-family: var(--nw-font-heading);
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.section-heading .section-link:hover { color: var(--nw-accent); }

.category-row-scroll {
  display: flex;
  gap: var(--nw-gap);
  overflow-x: auto;
  padding-bottom: .5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--nw-border) transparent;
}
.category-row-scroll .post-card {
  min-width: 260px;
  max-width: 260px;
  scroll-snap-align: start;
}
.category-row-scroll::-webkit-scrollbar { height: 6px; }
.category-row-scroll::-webkit-scrollbar-thumb { background: var(--nw-border); border-radius: 3px; }

@media (max-width: 480px) {
  .category-row-scroll .post-card { min-width: 220px; max-width: 220px; }
}

/* =========================================================
   11. WIDGET "CATEGORIA IN EVIDENZA" (es. interviste)
   ========================================================= */
.nw-featured-cat-list { display: flex; flex-direction: column; gap: .9rem; }

.nw-featured-cat-item {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.nw-featured-cat-thumb {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--nw-border);
}
.nw-featured-cat-thumb img { width: 100%; height: 100%; object-fit: cover; }

.nw-featured-cat-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--nw-text);
  line-height: 1.35;
}
.nw-featured-cat-title:hover { color: var(--nw-accent); }

/* =========================================================
   12. RELATED POSTS / PAGINE STATICHE
   ========================================================= */
.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--nw-border);
}

.page-wrap { max-width: 780px; margin-inline: auto; padding-block: 2.5rem 4rem; }

.home-more-link {
  display: flex;
  justify-content: center;
  padding-top: .5rem;
}

/* =========================================================
   13. HOMEPAGE - PANNELLI PER CATEGORIA
   ========================================================= */

/* Contenitore scuro "a riquadro" per ogni sezione della home */
.home-panel {
  background: var(--nw-bg-elevated);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  padding: 1.5rem;
}
.home-panel .section-heading:last-child { margin-bottom: 0; }

/* Riga divisa in due: Cinema (slider in evidenza) + Anime (griglia compatta) */
.home-split {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr 1fr;
  gap: var(--nw-gap);
  align-items: start;
}
.home-split .home-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  height: fit-content;
}

.home-split-main,
.home-split-col {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2rem;
}

.home-split-main > .home-panel,
.home-split-col > .home-panel {
  min-width: 0;
}

.home-split > .home-panel {
  min-width: 0;
}

.home-split .post-grid { flex: 1; }

@media (max-width: 900px) {
  .home-split { grid-template-columns: 1fr; }
  .home-split-main,
  .home-split-col { gap: 1.5rem; }
}

/* Mini-slider "in evidenza per categoria" dentro un pannello (riusa lo stile hero-slider) */
.home-feature-slider .hero-slide { min-height: 440px; }
.home-feature-slider .hero-content { padding: 1.5rem 1.75rem; }
@media (max-width: 900px) {
  .home-feature-slider .hero-slide { min-height: 320px; }
}

/* Riga a tre colonne: Serie TV / Videogiochi / Cultura Pop (liste compatte) */
.home-list-row {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--nw-gap);
  align-items: start;
}
@media (max-width: 900px) {
  .home-list-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .home-list-row { grid-template-columns: 1fr; }
}

.home-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.home-list-item {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
}

.home-list-thumb {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--nw-bg-card);
  border: 1px solid var(--nw-border);
}
.home-list-thumb img { width: 100%; height: 100%; object-fit: cover; }

.home-list-body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }

.home-list-cat {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--nw-text-dim);
  font-family: var(--nw-font-heading);
  font-weight: 600;
}
.home-list-cat a { color: var(--nw-text-dim); }
.home-list-cat a:hover { color: var(--nw-accent); }

.home-list-title {
  font-size: .95rem;
  margin: 0;
  line-height: 1.3;
}
.home-list-title a { color: var(--nw-text); }
.home-list-title a:hover { color: var(--nw-accent); }

.home-list-meta {
  font-size: .78rem;
  color: var(--nw-text-dim);
  display: flex;
  gap: .6rem;
}

@media (max-width: 782px) {
  .footer-bottom .footer-menu {
    gap: .65rem;
  }

  .footer-bottom {
    padding-inline: .75rem;
  }
}


/* =========================================================
   14. MOBILE HARDENING + COOKIE CONSENT
   ========================================================= */

/* Le immagini del category slider devono restare visibili anche su mobile. */
.home-feature-slider .hero-media {
  display: block;
  background-color: var(--nw-bg-elevated);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.home-feature-slider .hero-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-feature-slider .hero-slide {
  overflow: hidden;
}
@media (max-width: 782px) {
  .home-feature-slider .hero-slide {
    min-height: 320px;
  }
  .home-feature-slider .hero-media {
    min-height: 320px;
  }
}

/* Pagine statiche: stesso contenitore del tema e nessun overflow laterale. */
.site-page-container {
  width: 100%;
  min-width: 0;
}
.site-page {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--nw-bg-elevated);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  padding-inline: clamp(1rem, 3vw, 2rem);
}
.site-page .entry-content {
  min-width: 0;
  width: 100%;
}
.site-page .entry-content img,
.site-page .entry-content figure,
.site-page .entry-content table,
.site-page .entry-content pre,
.site-page .entry-content code,
.site-page .entry-content iframe {
  max-width: 100%;
}
.site-page .entry-content figure {
  margin-inline: 0;
}
@media (max-width: 782px) {
  .site-page {
    border-radius: 8px;
    padding-inline: .9rem;
  }
  .site-page .single-header {
    padding-top: .5rem;
  }
  .site-page .single-header h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    overflow-wrap: anywhere;
  }
  .site-page .entry-content .wp-block-columns {
    display: flex;
    flex-direction: column;
  }
  .site-page .entry-content .wp-block-column {
    width: 100%;
    flex-basis: auto !important;
  }
}

/* Footer: il menu resta sempre dentro la viewport e centrato su smartphone. */
.footer-bottom {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}
.footer-bottom .footer-menu {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.footer-bottom .footer-menu li {
  min-width: 0;
  max-width: 100%;
  text-align: center;
}
.footer-bottom .footer-menu a {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .footer-bottom {
    padding-inline: .25rem;
  }
  .footer-bottom .footer-menu {
    gap: .45rem .8rem;
    padding-inline: .25rem;
  }
  .footer-bottom .footer-menu li {
    flex: 0 1 auto;
  }
  .footer-bottom > p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

/* Cookie consent: popup centrato, leggibile e responsive. */
.nw-cookie-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(2px);
}
.nw-cookie-popup {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(680px, calc(100vw - 2rem));
  color: var(--nw-text);
  background: var(--nw-bg-card);
  border: 1px solid var(--nw-border);
  border-radius: 12px;
  box-shadow: 0 18px 55px rgba(0,0,0,.45);
}
.nw-cookie-popup[hidden],
.nw-cookie-backdrop[hidden] {
  display: none !important;
}
.nw-cookie-popup__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
}
.nw-cookie-popup__content {
  flex: 1 1 auto;
  min-width: 0;
}
.nw-cookie-popup__content h2 {
  margin: 0 0 .35rem;
  font-size: 1.25rem;
}
.nw-cookie-popup__content p {
  margin: 0 0 .45rem;
  font-size: .88rem;
  color: var(--nw-text-muted);
}
.nw-cookie-popup__policy {
  color: var(--nw-accent);
  font-size: .82rem;
  font-weight: 600;
}
.nw-cookie-popup__actions {
  display: flex;
  flex: 0 0 auto;
  gap: .55rem;
}
.nw-cookie-btn {
  border: 1px solid var(--nw-border);
  border-radius: 7px;
  padding: .65rem .9rem;
  cursor: pointer;
  font-family: var(--nw-font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.nw-cookie-btn--primary {
  background: var(--nw-accent);
  border-color: var(--nw-accent);
  color: var(--nw-accent-contrast);
}
.nw-cookie-btn--secondary {
  background: transparent;
  color: var(--nw-text);
}
@media (max-width: 600px) {
  .nw-cookie-popup {
    bottom: .75rem;
    width: calc(100vw - 1rem);
  }
  .nw-cookie-popup__inner {
    flex-direction: column;
    align-items: stretch;
    gap: .9rem;
    padding: 1rem;
  }
  .nw-cookie-popup__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .nw-cookie-btn {
    width: 100%;
  }
}


/* =========================================================
   15. HERO SLIDER REFINEMENT 1.1.4
   ========================================================= */

/* Desktop: keep the featured image dominant and limit the yellow panel. */
.hero-slider .hero-slide .hero-content {
  width: min(56%, 720px);
  max-width: 56%;
  padding: 1.5rem 2rem;
}

.hero-slider .hero-slide .hero-content h1 {
  font-size: clamp(1.65rem, 2.8vw, 2.45rem);
  line-height: 1.08;
}

/* Mobile: show the featured image as a real, separate area above the yellow text. */
@media (max-width: 782px) {
  .hero-slider .hero-slide {
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-slider .hero-slide .hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    flex: 0 0 auto;
    overflow: hidden;
  }

  .hero-slider .hero-slide .hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hero-slider .hero-slide .hero-media::after {
    display: none;
  }

  .hero-slider .hero-slide .hero-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 1rem 1.1rem 1.15rem;
    border-radius: 0;
  }

  .hero-slider .hero-slide .hero-content h1 {
    font-size: clamp(1.45rem, 6.5vw, 2rem);
    line-height: 1.08;
    margin-bottom: .45rem;
  }

  .hero-slider .hero-slide .hero-content .excerpt {
    font-size: .92rem;
    line-height: 1.45;
    margin-bottom: .35rem;
  }

  .hero-slider .hero-slide .hero-content .entry-meta {
    font-size: .75rem;
  }

  .hero-slider .hero-slide .hero-content .nw-badge {
    margin-bottom: .55rem;
  }

  .hero-slider .hero-slider-arrow {
    top: calc((100vw - 2rem) * 9 / 32);
  }

  .hero-slider .hero-slider-dots {
    bottom: auto;
    top: calc((100vw - 2rem) * 9 / 16 - 1.4rem);
    right: .8rem;
  }
}


/* =========================================================
   16. SOCIAL BAR + EDITORIAL REVIEW BLOCKS 1.1.5
   ========================================================= */
.nw-social-bar {
  border-top: 1px solid var(--nw-border);
  border-bottom: 1px solid var(--nw-border);
  padding: .8rem 0;
  background: var(--nw-bg);
}
.nw-social-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  flex-wrap: wrap;
  min-width: 0;
}
.nw-social-bar__label {
  font-family: var(--nw-font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  color: var(--nw-text-dim);
  margin-right: .25rem;
}
.nw-social-bar__list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nw-social-bar__list a,
.nw-social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--nw-border);
  border-radius: 50%;
  color: var(--nw-header-text-muted);
  transition: .2s ease;
}
.nw-social-bar__list a:hover,
.nw-social-icons a:hover {
  color: var(--nw-accent);
  border-color: var(--nw-accent);
  transform: translateY(-1px);
}
.nw-social-bar__list svg,
.nw-social-icons svg { width: 1rem; height: 1rem; fill: currentColor; }
.nw-social-icons a { font-size: 0; }

.nw-review-rating {
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--nw-border);
  border-left: 3px solid var(--nw-accent);
  background: var(--nw-bg-elevated);
  border-radius: 8px;
}
.nw-review-rating__label {
  margin: 0 0 .45rem;
  font-family: var(--nw-font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .9rem;
}
.nw-review-rating__stars { display: flex; align-items: center; gap: .08rem; }
.nw-review-rating__star { font-size: 1.65rem; line-height: 1; }
.nw-review-rating__star.is-on { color: var(--nw-accent); }
.nw-review-rating__star.is-off { color: var(--nw-border); }
.nw-review-rating__value { margin-left: .55rem; color: var(--nw-text-muted); font-size: .85rem; }

.nw-pros-cons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.nw-pros-cons__box {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--nw-border);
  border-radius: 8px;
  background: var(--nw-bg-elevated);
  min-width: 0;
}
.nw-pros-cons__title {
  margin: 0 0 .65rem;
  font-family: var(--nw-font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .95rem;
}
.nw-pros-cons__box--pros { border-top: 3px solid #6fbe44; }
.nw-pros-cons__box--cons { border-top: 3px solid var(--nw-red); }
.nw-pros-cons__content { color: var(--nw-text-muted); }
.nw-pros-cons__content > :first-child { margin-top: 0; }
.nw-pros-cons__content > :last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .nw-social-bar__inner { gap: .55rem; }
  .nw-social-bar__label { width: 100%; text-align: center; margin: 0; }
  .nw-pros-cons { grid-template-columns: 1fr; }
}

/* =========================================================
   17. BARRA "ULTIME NOTIZIE" (ticker homepage)
   ========================================================= */
.nw-ticker {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: var(--nw-bg-elevated);
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  padding: .55rem .9rem;
  margin-top: 1.5rem;
  overflow: hidden;
}
.nw-ticker__label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--nw-red);
  color: #fff;
  font-family: var(--nw-font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .78rem;
  padding: .4em .8em;
  border-radius: 999px;
}
.nw-ticker__label .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: nw-ticker-pulse 1.4s ease-in-out infinite;
}
@keyframes nw-ticker-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.nw-ticker__viewport {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.nw-ticker__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: nw-ticker-scroll 32s linear infinite;
}
.nw-ticker:hover .nw-ticker__track,
.nw-ticker:focus-within .nw-ticker__track {
  animation-play-state: paused;
}
.nw-ticker__track a {
  font-size: .9rem;
  color: var(--nw-text-muted);
  white-space: nowrap;
}
.nw-ticker__track a:hover { color: var(--nw-accent); }
@keyframes nw-ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .nw-ticker__track { animation: none; }
  .nw-ticker__viewport { overflow-x: auto; }
}
@media (max-width: 600px) {
  .nw-ticker { gap: .7rem; padding: .5rem .7rem; }
  .nw-ticker__label span:not(.dot) { display: none; }
}

/* =========================================================
   18. HOMEPAGE - "IN EVIDENZA" (articoli sticky in cima alla home)
   ========================================================= */
.home-highlights .section-heading h2 { color: var(--nw-gold); }

.post-card { position: relative; }

.post-card .card-rank {
  position: absolute;
  top: .6rem;
  left: .6rem;
  z-index: 2;
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--nw-gold);
  color: var(--nw-contrast-dark);
  font-family: var(--nw-font-heading);
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,.5);
}

/* =========================================================
   19. FOOTER - ICONE SOCIAL, MENU E CREDIT IN GIALLO
   ========================================================= */
.nw-social-bar__label { color: var(--nw-gold); }

.nw-social-bar__list a {
  color: var(--nw-gold);
  border-color: color-mix(in srgb, var(--nw-gold) 35%, var(--nw-border));
}
.nw-social-bar__list a:hover {
  color: var(--nw-red);
  border-color: var(--nw-red);
  transform: translateY(-1px);
}

.footer-bottom,
.footer-bottom .footer-menu a,
.footer-bottom > p {
  color: var(--nw-gold);
}
.footer-bottom a:hover { color: var(--nw-text); }


/* =========================================================
   16. MOBILE / DEVICE ROBUSTNESS 1.2.1
   ========================================================= */
@media (max-width: 782px) {
  .home-layout,
  .home-split,
  .home-split-main,
  .home-split-col,
  .home-list-row,
  .home-panel,
  .hero-slider,
  .hero-slider-track {
    min-width: 0;
    max-width: 100%;
  }

  .home-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .home-split-main,
  .home-split-col,
  .home-split > .home-panel {
    width: 100%;
  }

  /* Lo stacking immagine + testo su mobile per gli slider di categoria è
     già gestito correttamente dalla sezione 15 (Hero Slider Refinement);
     qui va solo evitato l'overflow orizzontale del testo. */
  .home-feature-slider .hero-content {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .post-grid {
    min-width: 0;
  }

  .site-header,
  .site-header .container,
  #main-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* =========================================================
   17. MEDIA / SLIDER + VIDEO ROBUSTNESS 1.3.3
   ========================================================= */
.hero-slider .hero-media,
.home-feature-slider .hero-media {
  overflow: hidden;
  background: var(--nw-bg-elevated);
}
.hero-slider .hero-media img.hero-image,
.home-feature-slider .hero-media img.hero-image {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
}

/*
 * Trailer: struttura 16:9 stabile su desktop e mobile.
 * Il wrapper mantiene la geometria; l'iframe occupa esattamente lo spazio
 * disponibile. Gli attributi width/height dell'iframe forniscono inoltre
 * un rapporto intrinseco di 16:9 ai browser mobili.
 */
.entry-content .nerdwire-video-embed {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  margin: 1.5rem 0 2rem !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #000 !important;
  border-radius: var(--nw-radius);
  box-sizing: border-box !important;
}

.entry-content .nerdwire-video-embed::before {
  content: none !important;
  display: none !important;
}

.entry-content .nerdwire-video-embed iframe {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 782px) {
  .hero-slider .hero-slide .hero-media,
  .home-feature-slider .hero-slide .hero-media {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    flex: 0 0 auto;
  }

  .hero-slider .hero-slide .hero-media img.hero-image,
  .home-feature-slider .hero-slide .hero-media img.hero-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
  }

  .entry-content .nerdwire-video-embed {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9 !important;
    margin: 1.25rem 0 1.75rem !important;
  }

  .entry-content .nerdwire-video-embed iframe {
    width: 100% !important;
    height: 100% !important;
  }
}

/* =========================================================
   20. MOBILE OVERFLOW HARDENING 1.3.5
   Chrome Mobile can expose horizontal overflow from Gutenberg blocks,
   intrinsic media dimensions, flex/grid children or inline widths even
   when the main container itself is fluid. Keep article descendants
   constrained without altering the desktop layout.
   ========================================================= */
@media (max-width: 782px) {
  html,
  body,
  #main-content,
  .single-post-wrap,
  .single-article,
  .entry-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .single-post-wrap > *,
  .single-article > *,
  .entry-content > *,
  .entry-content .wp-block-group,
  .entry-content .wp-block-columns,
  .entry-content .wp-block-column,
  .entry-content .wp-block-media-text,
  .entry-content .wp-block-cover,
  .entry-content .wp-block-embed,
  .entry-content .wp-block-video,
  .entry-content .wp-block-gallery,
  .entry-content .wp-block-image,
  .entry-content .wp-block-table {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .entry-content img,
  .entry-content video,
  .entry-content iframe,
  .entry-content embed,
  .entry-content object,
  .entry-content canvas,
  .entry-content svg {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .entry-content img {
    width: auto;
    height: auto !important;
  }

  .entry-content figure,
  .entry-content figcaption,
  .entry-content p,
  .entry-content li,
  .entry-content h1,
  .entry-content h2,
  .entry-content h3,
  .entry-content h4,
  .entry-content h5,
  .entry-content h6,
  .entry-content blockquote {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .entry-content .wp-block-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .entry-content pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Keep wide/full-width Gutenberg blocks inside the actual article box. */
  .entry-content .alignwide,
  .entry-content .alignfull {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Prevent inline styles such as width: 800px from creating a mobile
     layout wider than the article column. */
  .entry-content [style*="width"] {
    max-width: 100% !important;
  }
}

