/* =============================== */
/* Font Anton per titoli */
@font-face {
  font-family: 'Anton';
  src: url('fonts/Anton-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* =============================== */
/* Stile base body */
body {
  font-family: Georgia, serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #111;
  background-color: #fff;
}

/* =============================== */
/* Titoli "sovietici" */
h1, h2, h3, h4, h5 {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #BA1212;
}

/* =============================== */
/* Sottotitolo */
.quarto-title-block p.subtitle {
  font-style: italic;
  font-family: Arial, sans-serif;
  font-size: 1.2rem;
  color: #BA1212;
  margin-top: 0;
}

/* =============================== */
/* Nascondi autore */
.quarto-title-meta {
  display: none !important;
}

/* =============================== */
/* Contenitore principale titolo */
.quarto-title-block {
  position: relative;
  padding-left: 240px;
  border-bottom: 3px solid #BA1212;
  margin-bottom: 2rem;
}

/* Logo a sinistra */
.quarto-title-block::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 200px;
  height: 200px;
  background-image: url(rproletari.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
}

/* Wrapper testo */
.quarto-title-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 800px;
}

/* Titolo principale */
.quarto-title-block h1.title {
  font-family: 'Anton', sans-serif;
  color: #BA1212;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 2.5rem;
  margin-bottom: 0.2rem;
}

/* Description */
.description {
  font-family: Arial, sans-serif;
  font-size: 1rem;
  color: #444;
  margin-top: 0.5rem;
  display: block;
}

/* Nasconde link "other formats" */
.quarto-navigation-tools {
  display: none !important;
}

/* Copyright */
.copyright {
  display: block !important;
  text-align: center !important;
  margin-top: 1rem !important;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  color: #666;
}

.copyright a {
  color: #BA1212;
  text-decoration: none;
  font-weight: bold;
}

.copyright a:hover {
  text-decoration: underline;
}

/* Tabelle scrollabili */
body > table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

table {
  min-width: 500px;
  width: auto;
  table-layout: auto;
  border-collapse: collapse;
}

th, td {
  min-width: 90px;
  white-space: normal;
  word-wrap: break-word;
  padding: 6px 12px;
}

/* Dropdown menu soviet-style */
.navbar .dropdown-menu {
  background-color: #BA1212;
  color: #fada5e;
  border: none;
}

.navbar .dropdown-menu a {
  color: #fada5e;
}

.navbar .dropdown-menu a:hover {
  background-color: #9c0f0f;
  color: #ffffff;
}

/* Blockquote sovietico */
blockquote {
  border-left: 4px solid #BA1212;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #BA1212;
  font-weight: 600;
  font-family: "Arial", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

blockquote p { margin: 0.2rem 0; }
blockquote footer { color: #BA1212; font-weight: 400; font-size: 0.9rem; margin-top: 0.3rem; }

/* Callout sovietico */
.callout-warning {
  border-left: 6px solid #BA1212 !important;
  background-color: #fff5f5 !important;
  color: #660000 !important;
  font-weight: 500;
  box-shadow: 0 0 6px rgba(204, 0, 0, 0.15);
  border-radius: 8px;
}

.callout-warning h2, 
.callout-warning h3 {
  color: #BA1212 !important;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.callout-warning p:last-child { margin-bottom: 0; }

/* =============================== */
/* BLOCCO SEARCH SOVIET STYLE */

/* Bordo rosso form di ricerca */
.aa-Form {
  border-color: #BA1212 !important; /* MODIFICATO: era blu, ora rosso sovietico */
  color: #BA1212 !important;
}

/* Bordo rosso focus */
.aa-Form:focus-within {
  box-shadow: 0 0 0 1px #BA1212 !important; /* MODIFICATO */
  border-color: #BA1212 !important;        /* MODIFICATO */
}

/* Pulsante cancella */
.aa-DetachedCancelButton:hover {
  box-shadow: 0 0 0 1px #BA1212 !important; /* MODIFICATO */
}

/* Box risultato selezionato */
li.aa-Item[aria-selected="true"] .search-item {
  background-color: #BA1212 !important; /* MODIFICATO */
  color: #ffffff !important;
  border: 1px solid #BA1212 !important;
}

/* Titolo, testo e section del box selezionato */
li.aa-Item[aria-selected="true"] .search-result-title-container,
li.aa-Item[aria-selected="true"] .search-result-text-container,
li.aa-Item[aria-selected="true"] .search-result-text,
li.aa-Item[aria-selected="true"] .search-result-section {
  background-color: #BA1212 !important; /* MODIFICATO */
  color: #ffffff !important;
}

/* Box non selezionato */
li.aa-Item[aria-selected="false"] .search-item {
  background-color: #ffffff !important;
  color: #BA1212 !important;
}

/* Evidenziazione testo trovato */
mark.search-match {
  background-color: #660000 !important; /* MODIFICATO */
  color: #ffffff !important;           /* MODIFICATO */
}

/* Input di ricerca */
#quarto-search input {
  color: #BA1212 !important;           /* MODIFICATO */
  border-color: #BA1212 !important;    /* MODIFICATO */
}

#quarto-search input::placeholder {
  color: #BA1212 !important;           /* MODIFICATO */
  opacity: 0.8;
}

/* Selezione testo col mouse */
::selection {
  background-color: #BA1212; /* MODIFICATO */
  color: white;
}

/* =============================== */
/* Colore URL nel contenuto */
main a, .content a {
  color: #BA1212 !important;        /* rosso sovietico */
  text-decoration: none !important; /* rimuove sottolineatura di default */
}

main a:hover, .content a:hover {
  color: #ffffff !important;        /* bianco su hover */
  background-color: #BA1212 !important; /* evidenzia il link selezionato */
  text-decoration: underline !important; /* opzionale */
}