/*
Theme Name: Clashroom Oltre Aniene
Theme URI: https://clashroomoltreaniene.it
Author: Clashroom Editorial Team
Description: Tema editoriale per testata politica indipendente. Layout brutalist con barra laterale nera destra e logo CLASH ROOM in alto a sinistra.
Version: 1.1.0
License: GPL v2 or later
Text Domain: clashroom
Tags: news, magazine, editorial, multilingual, custom-colors, custom-logo, custom-menu, featured-image-header, featured-images, post-formats, threaded-comments, translation-ready
*/

:root {
  --clash-primary: #C8102E;          /* rosso CLASH */
  --clash-primary-dark: #8B0A1F;
  --clash-accent: #F5A623;
  --clash-text: #0F0F14;
  --clash-text-light: #52525E;
  --clash-text-muted: #8A8A96;
  --clash-bg: #FFFFFF;
  --clash-bg-alt: #F7F5F2;
  --clash-bg-dark: #000000;
  --clash-border: rgba(15,15,20,0.08);
  --clash-shadow: 0 14px 30px -22px rgba(15,15,20,0.15);

  --clash-sidebar-width: 160px;      /* larghezza barra laterale destra (stretta, hug del testo) */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--clash-text);
  background: var(--clash-bg);
  -webkit-font-smoothing: antialiased;

  /* lascia spazio per la barra laterale destra */
  padding-right: var(--clash-sidebar-width);
  position: relative;
}

/* ============================================================
   BARRA LATERALE DESTRA (sfondo nero a tutta altezza + CLASHROOM verticale)
   ============================================================
   La scritta verticale è un'immagine PNG generata scomponendo il logo
   originale nelle singole lettere e impilandole — stesso stile grafico,
   con stella e freccia preservate.
   ============================================================ */
.clash-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--clash-sidebar-width);
  height: 100vh;
  background: var(--clash-bg-dark) url("assets/images/clashroom-vertical.png") no-repeat center center;
  /* Lettere larghe quasi quanto la sidebar (hug stretto) */
  background-size: 100% auto;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Su schermi alti riduci proporzionalmente */
@media (min-height: 1400px) {
  .clash-sidebar { background-size: auto 92vh; }
}

/* Su schermi bassi le lettere sono cropped: ridimensiona */
@media (max-height: 900px) {
  .clash-sidebar { background-size: auto 100vh; }
}

/* Su mobile la sidebar diventa una banda rossa sottile in alto */
@media (max-width: 880px) {
  body { padding-right: 0; padding-top: 6px; }
  .clash-sidebar {
    width: 100%;
    height: 6px;
    background: var(--clash-primary);
  }
}

/* Nasconde lo span testuale (lo manteniamo solo per screen reader) */
.clash-sidebar-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

a { color: var(--clash-primary); text-decoration: none; }
a:hover { color: var(--clash-primary-dark); text-decoration: underline; }

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }

/* ============================================================
   HEADER (logo in alto a sinistra, grosso)
   ============================================================ */
.site-header {
  border-bottom: 3px solid var(--clash-bg-dark);
  background: var(--clash-bg);
  position: sticky; top: 0; z-index: 50;
}
.site-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 24px;
}
.site-logo {
  display: flex; align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img {
  height: 68px; width: auto;     /* logo orizzontale composto dalle lettere */
  display: block;
  transition: transform .2s ease;
  max-width: 100%;
}
@media (max-width: 720px) {
  .site-logo img { height: 48px; }
}
.site-logo:hover img { transform: scale(1.03); }

.site-nav ul {
  display: flex; gap: 22px; list-style: none; margin: 0; padding: 0;
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.site-nav a { color: var(--clash-text); }
.site-nav a:hover { color: var(--clash-primary); text-decoration: none; }
.site-nav .current-menu-item > a { color: var(--clash-primary); }

.lang-switcher { display: flex; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.lang-switcher a { color: var(--clash-text-muted); padding: 4px 6px; border-radius: 4px; }
.lang-switcher a.active, .lang-switcher a:hover { color: var(--clash-primary); background: rgba(200,16,46,0.08); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 40px 0 28px;
  background: var(--clash-bg-alt);
  border-bottom: 1px solid var(--clash-border);
}
.hero-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 28px;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-featured {
  background: var(--clash-bg); border-radius: 0; overflow: hidden;
  box-shadow: var(--clash-shadow);
  border-left: 6px solid var(--clash-primary);
}
.hero-featured .image-wrap { aspect-ratio: 16/9; overflow: hidden; }
.hero-featured img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.hero-featured:hover img { transform: scale(1.03); }
.hero-featured .meta { padding: 18px 22px 24px; }
.hero-featured .category-label {
  display: inline-block; background: var(--clash-primary); color: #fff;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em;
  padding: 4px 9px; margin-bottom: 10px;
}
.hero-featured h1 a, .hero-featured h2 a {
  color: var(--clash-text); font-family: 'Impact', 'Arial Black', Georgia, serif; font-weight: 700;
  font-size: 32px; line-height: 1.1; letter-spacing: -0.01em;
}
.hero-featured .byline { color: var(--clash-text-muted); font-size: 13px; margin-top: 10px; }

.hero-side { display: flex; flex-direction: column; gap: 14px; }
.hero-side .card { background: var(--clash-bg); border-left: 4px solid var(--clash-primary); padding: 14px; }
.hero-side .card .category-label { color: var(--clash-primary); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; }
.hero-side .card h3 a { color: var(--clash-text); font-family: 'Impact', 'Arial Black', Georgia, serif; font-size: 19px; line-height: 1.2; font-weight: 700; }
.hero-side .card .byline { color: var(--clash-text-muted); font-size: 12px; margin-top: 6px; }

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 48px 0 20px; padding-bottom: 12px;
  border-bottom: 3px solid var(--clash-bg-dark);
}
.section-title h2 {
  margin: 0; font-family: 'Impact', 'Arial Black', Georgia, serif; font-size: 32px; font-weight: 700;
  letter-spacing: 0; color: var(--clash-text); text-transform: uppercase;
}
.section-title a.more { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--clash-primary); }

/* ============================================================
   ARTICLE GRID
   ============================================================ */
.article-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
@media (max-width: 1100px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .article-grid { grid-template-columns: 1fr; } }

.article-card {
  background: var(--clash-bg); border-top: 4px solid var(--clash-primary);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.article-card:hover { transform: translateY(-3px); box-shadow: var(--clash-shadow); }
.article-card .image-wrap { aspect-ratio: 16/10; overflow: hidden; background: var(--clash-bg-alt); }
.article-card .image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.article-card .content { padding: 16px 18px 20px; display: flex; flex-direction: column; flex-grow: 1; }
.article-card .category-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--clash-primary); margin-bottom: 8px; }
.article-card h3 { margin: 0 0 8px; font-family: 'Impact', 'Arial Black', Georgia, serif; font-size: 21px; line-height: 1.15; font-weight: 700; text-transform: uppercase; }
.article-card h3 a { color: var(--clash-text); }
.article-card .excerpt { color: var(--clash-text-light); font-size: 14px; line-height: 1.55; flex-grow: 1; }
.article-card .byline { margin-top: 12px; color: var(--clash-text-muted); font-size: 12px; }
.article-card .byline strong { color: var(--clash-text); }

/* ============================================================
   SINGLE ARTICLE
   ============================================================ */
.single-article {
  max-width: 760px; margin: 0 auto; padding: 40px 28px 60px;
  position: relative; z-index: 2;
}
.single-article .category-label { display: inline-block; background: var(--clash-primary); color: #fff; padding: 4px 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 14px; }
.single-article h1 { font-family: 'Impact', 'Arial Black', Georgia, serif; font-size: 42px; line-height: 1.05; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 14px; text-transform: uppercase; }
.single-article .byline { color: var(--clash-text-muted); font-size: 14px; margin-bottom: 28px; }
.single-article .byline strong { color: var(--clash-text); }
.single-article .cover-image { margin: 0 -28px 28px; aspect-ratio: 16/9; overflow: hidden; }
.single-article .cover-image img { width: 100%; height: 100%; object-fit: cover; }
.single-article .article-body { font-size: 17px; line-height: 1.75; }
.single-article .article-body p { margin: 0 0 18px; }
.single-article .article-body h2 { font-family: 'Impact', 'Arial Black', Georgia, serif; font-size: 28px; margin-top: 32px; text-transform: uppercase; }
.single-article .article-body h3 { font-family: 'Impact', 'Arial Black', Georgia, serif; font-size: 22px; margin-top: 24px; text-transform: uppercase; }
.single-article .article-body blockquote { border-left: 4px solid var(--clash-primary); padding-left: 18px; color: var(--clash-text-light); font-style: italic; margin: 24px 0; font-size: 19px; }
.single-article .article-body img { margin: 18px 0; }
.single-article .article-body figcaption { font-size: 13px; color: var(--clash-text-muted); text-align: center; margin-top: 8px; }

/* Toolbar articolo (PDF, condivisione) */
.article-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border: 2px solid var(--clash-bg-dark);
  background: var(--clash-bg); margin: 28px 0;
}
.article-toolbar .btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--clash-bg); border: 1px solid var(--clash-bg-dark); color: var(--clash-text);
  cursor: pointer; text-decoration: none;
}
.article-toolbar .btn:hover { background: var(--clash-bg-dark); color: #fff; text-decoration: none; }
.article-toolbar .btn-primary { background: var(--clash-primary); color: #fff; border-color: var(--clash-primary); }
.article-toolbar .btn-primary:hover { background: var(--clash-primary-dark); border-color: var(--clash-primary-dark); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clash-bg-dark); color: #B8B8C0;
  padding: 50px 0 24px; margin-top: 60px;
  position: relative; z-index: 2;
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-brand { font-family: 'Impact', 'Arial Black', Georgia, serif; font-size: 26px; color: var(--clash-primary); font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 8px; font-size: 14px; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #8A8A96; }
.social-row { display: flex; gap: 14px; }
.social-row a { color: #B8B8C0; font-size: 18px; }
.social-row a:hover { color: var(--clash-primary); }

/* ============================================================
   STATUS BADGE
   ============================================================ */
.article-status {
  display: inline-block; padding: 3px 8px; font-size: 10.5px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
}
.article-status.bozza { background: #E5E5EA; color: #6B7280; }
.article-status.in-revisione { background: #FEF3C7; color: #92400E; }
.article-status.approvato { background: #D1FAE5; color: #065F46; }
.article-status.pubblicato { background: var(--clash-primary); color: #fff; }
