/* ============================================
   NAVBAR STYLING
   ============================================ */

/* Navbar text color */
.navbar,
.navbar .navbar-nav .nav-link,
.navbar .navbar-brand,
.navbar .form-control,
.navbar .btn {
  color: #cccccc !important;
  font-weight: normal !important;
}

/* Testo nero nel bottone search GO */
.navbar .btn-warning,
.navbar .btn-warning:hover,
.navbar .btn-warning:focus,
.navbar .btn-warning:active {
  color: #000 !important;
}

/* Testo nero nel campo di ricerca */
.navbar #search-input {
  color: #222222 !important;
}

/* Placeholder grigio per contrast */
.navbar #search-input::placeholder {
  color: #6c757d !important;
  opacity: 0.7;
}

/* Separatore tra categorie nel menu */
.navbar-nav.me-auto .nav-item:not(:last-child) .nav-link::after {
  content: " | " !important;
  color: #6c757d !important;
  margin-left: 0.75rem !important;
  display: inline !important;
}

/* Override Bootstrap hover/focus states */
.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #ffffff !important;
  font-weight: normal !important;
}

/* Optional: placeholder text in search input */
.navbar .form-control::placeholder {
  color: #cccccc;
}

/* Optional: remove bold from brand logo text */
.navbar-brand {
  font-weight: normal !important;
}

/* ============================================
   GLOBAL TYPOGRAPHY & COLORS
   ============================================ */

/* Colore testo globale */
body {
  color: #cccccc;
  font-size: 1.2rem;
}

/* Override per elementi specifici */
p, span, div, h1, h2, h3, h4, h5, h6, li, td, th, label {
  color: #cccccc;
}

/* Links */
a {
  color: #ffc107;
  font-weight: normal;
  text-decoration: none;
}

a:hover,
a:focus {
  color: #ffffff;
  text-decoration: none;
}

/* Headings */
h1 {
  color: #cccccc;
  font-size: 3rem;
}

h2 {
  color: #cccccc;
  font-size: 2.5rem;
}

h3 {
  color: #cccccc;
  font-size: 2rem;
}

h4 {
  color: #cccccc;
  font-size: 1.75rem;
}

h5 {
  color: #cccccc;
  font-size: 1.5rem;
}

h6 {
  color: #cccccc;
  font-size: 1.25rem;
}

/* ============================================
   ROLLO HERO - ORACLE PATTERN STYLE
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
  /* Colori principali */
  --rollo-black: #1a1a1a;
  --rollo-red: #b91c1c;
  --rollo-yellow: #fbbf24;
  --rollo-gray: #64748b;
  --rollo-light: #f8fafc;
  
  /* Typography */
  --rollo-font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --rollo-font-headline: Georgia, "Times New Roman", serif;
  
  /* Spacing */
  --rollo-spacing-xl: 8rem;
  --rollo-spacing-lg: 4rem;
  --rollo-spacing-md: 2rem;
  --rollo-spacing-sm: 1rem;
}

/* --- RESET MARGINI HERO --- */
.rollo-hero-wrapper,
.rollo-hero + *,
* + .rollo-hero {
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset margini su elementi comuni */
header + .rollo-hero,
nav + .rollo-hero,
.navbar + .rollo-hero,
.topbar + .rollo-hero {
  margin-top: 0 !important;
}

/* --- HERO SECTION --- */
.rollo-hero {
  background-color: var(--rollo-black);
  
  /* Background image con overlay */
  background-image: 
    radial-gradient(circle at center, rgba(26, 26, 26, 0.5), rgba(26, 26, 26, 0.75)),
    url('/bl-content/uploads/hero.png');
  
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  
  color: var(--rollo-light);
  
  /* Position absolute per uscire dal flusso */
  position: absolute;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  
  margin: 0 !important;
  
  /* Padding-top per compensare navbar */
  padding-top: calc(100px + 3rem);
  padding-bottom: 2rem;
  
  /* Altezza 100vh */
  height: 100vh;
  max-height: 100vh;
  
  width: 100vw !important;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  z-index: 1;
  box-sizing: border-box;
}

/* FIX: Classe specifica per il primo container dopo la hero */
.rollo-content-after-hero {
  margin-top: 100vh !important;
}

/* Container Bootstrap - mantieni standard */
.container {
  max-width: 1140px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* Responsive container widths */
@media (max-width: 1200px) {
  .container {
    max-width: 960px !important;
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 720px !important;
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 540px !important;
  }
}

@media (max-width: 576px) {
  .container {
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* Container centrale hero */
.rollo-hero__container {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--rollo-spacing-md);
  width: 100%;
  box-sizing: border-box;
}

/* --- HEADLINE PRINCIPALE --- */
.rollo-hero__headline {
  font-family: var(--rollo-font-headline);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--rollo-light);
  animation: fadeInUp 0.8s ease-out;
  text-shadow: 2px 2px 4px rgba(100, 116, 139, 0.5);
}

/* --- SUBHEADLINE --- */
.rollo-hero__subheadline {
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.rollo-hero__intro {
  font-family: var(--rollo-font-primary);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.4;
  color: var(--rollo-light) !important;
  margin-bottom: 1.25rem;
  font-weight: 600 !important;
}

.rollo-hero__mission {
  font-family: var(--rollo-font-primary);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.5;
  color: var(--rollo-light) !important;
  font-weight: 600 !important;
}

/* Accent text */
.rollo-hero__accent {
  color: var(--rollo-light) !important;
  font-weight: 600 !important;
}

/* --- CTA BUTTON --- */
.rollo-hero__cta {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.rollo-hero__btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: var(--rollo-font-primary);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rollo-light) !important;
  background-color: transparent;
  border: 2px solid var(--rollo-yellow);
  border-radius: 0;
  text-decoration: none;
  transition: all 0.3s ease;
  animation: none !important;
}

.rollo-hero__btn--chat {
  cursor: pointer;
  font-family: var(--rollo-font-primary);
}

.rollo-hero__btn:hover {
  background-color: var(--rollo-yellow);
  color: var(--rollo-black) !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
  animation: none !important;
}


/* --- SCROLL INDICATOR --- */
.rollo-hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.6;
}

.rollo-hero__scroll-text {
  font-family: var(--rollo-font-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rollo-light) !important;
  font-weight: 600 !important;
}

.rollo-hero__scroll-arrow {
  color: var(--rollo-yellow);
}

/* --- ANIMAZIONI --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* --- RESPONSIVE HERO BUTTONS --- */
@media (max-width: 768px) {
  .rollo-hero__cta {
    flex-direction: column;
    gap: 1.25rem;
  }
  
  .rollo-hero__btn {
    width: 100%;
    max-width: 250px;
  }
}

/* --- RESPONSIVE HERO --- */
@media (max-width: 768px) {
  .rollo-hero {
    padding: 1.5rem var(--rollo-spacing-sm) 1.5rem;
    margin-top: 60px !important;
    height: calc(100vh - 60px);
    max-height: calc(100vh - 60px);
    background-attachment: scroll;
  }
  
  .rollo-content-after-hero {
    margin-top: calc(100vh - 60px) !important;
  }
  
  .rollo-hero__headline {
    margin-bottom: 1.5rem;
  }
  
  .rollo-hero__subheadline {
    margin-bottom: 1.25rem;
  }
  
  .rollo-hero__cta {
    margin-bottom: 1.25rem;
  }
  
  .rollo-hero__scroll {
    bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .rollo-hero {
    padding: 1rem var(--rollo-spacing-sm) 1rem;
    margin-top: 56px !important;
    height: calc(100vh - 56px);
    max-height: calc(100vh - 56px);
  }
  
  .rollo-content-after-hero {
    margin-top: calc(100vh - 56px) !important;
  }
  
  .rollo-hero__intro br,
  .rollo-hero__mission br,
  .rollo-hero__cta-text br {
    display: none;
  }
  
  .rollo-hero__headline {
    margin-bottom: 1rem;
  }
  
  .rollo-hero__subheadline {
    margin-bottom: 1rem;
  }
  
  .rollo-hero__cta {
    margin-bottom: 1rem;
  }
}

/* --- DARK MODE SUPPORT --- */
@media (prefers-color-scheme: dark) {
  .rollo-hero {
    background-color: #0a0a0a;
  }
}

/* --- PRINT STYLES --- */
@media print {
  .rollo-hero {
    display: none;
  }
}

/* ============================================
   PAGINATION BUTTONS CUSTOM STYLE
   ============================================ */

.btn-pagination {
  background-color: var(--rollo-yellow) !important;
  color: #000 !important;
  border: 2px solid var(--rollo-yellow) !important;
  font-weight: 600 !important;
  padding: 0.5rem 1.5rem !important;
  transition: all 0.3s ease !important;
}

.btn-pagination:hover,
.btn-pagination:focus {
  background-color: transparent !important;
  color: var(--rollo-yellow) !important;
  border: 2px solid var(--rollo-yellow) !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3) !important;
}

/* Rimuovi animazione translateY dal bottone hero */
.rollo-hero__btn:hover {
  background-color: var(--rollo-yellow);
  color: var(--rollo-black) !important;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
  /* transform rimosso */
}

/* ============================================
   LIGHT/DARK MODE SYSTEM
   ============================================ */

/* Variabili Dark Mode (default) */
:root {
  --bg-primary: #212529;
  --bg-secondary: #343a40;
  --text-primary: #cccccc;
  --text-secondary: #6c757d;
  --card-bg: #343a40;
  --link-color: #ffc107;
  --link-hover: #ffffff;
}

/* Variabili Light Mode */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #222222;
  --text-secondary: #6c757d;
  --card-bg: #ffffff;
  --link-color: #d39e00;
  --link-hover: #000000;
}

/* Applica variabili */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.bg-dark {
  background-color: var(--bg-secondary) !important;
}

.card.bg-dark {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--text-secondary);
}

.text-secondary {
  color: var(--text-secondary) !important;
}

a {
  color: var(--link-color);
}

a:hover,
a:focus {
  color: var(--link-hover);
}

/* Navbar in light mode */
[data-theme="light"] .navbar.navbar-dark {
  background-color: #d9d9d9 !important;
  border-bottom: 1px solid #dee2e6;
}
[data-theme="light"] .navbar,
[data-theme="light"] .navbar .navbar-nav .nav-link,
[data-theme="light"] .navbar .navbar-brand {
  color: #212529 !important;
}

[data-theme="light"] .navbar .nav-link:hover,
[data-theme="light"] .navbar .nav-link:focus {
  color: #000000 !important;
}

/* Separatore categorie in light mode */
[data-theme="light"] .navbar-nav.me-auto .nav-item:not(:last-child) .nav-link::after {
  color: #6c757d !important;
}

/* Theme toggle button*/
.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(204, 204, 204, 0.3);
  color: #cccccc;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
  font-size: 1.3rem;
}

.theme-toggle:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: var(--rollo-yellow);
  color: var(--rollo-yellow);
  transform: rotate(180deg);
}

/* Toggle in light mode */
[data-theme="light"] .theme-toggle {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(33, 37, 41, 0.2);
  color: #212529;
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: var(--rollo-yellow);
  color: var(--rollo-yellow);
}

/* Responsive theme toggle */
@media (max-width: 991px) {
  .theme-toggle {
    margin-left: 0;
    margin-top: 1rem;
  }
}
/* Card titles in light mode */
[data-theme="light"] .card-title {
  color: #222222 !important;
}

/* Card text in light mode */
[data-theme="light"] .card-text {
  color: #222222 !important;
}

/* Headings in light mode */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #222222 !important;
}

/* Paragraphs and general text in light mode */
[data-theme="light"] p,
[data-theme="light"] span,
[data-theme="light"] div {
  color: #222222 !important;
}

/* Hero text sempre bianco in entrambi i temi */
[data-theme="light"] .rollo-hero__headline,
[data-theme="light"] .rollo-hero__intro,
[data-theme="light"] .rollo-hero__mission,
[data-theme="light"] .rollo-hero__accent,
[data-theme="light"] .rollo-hero__scroll-text {
  color: var(--rollo-light) !important;
}

/* Hero button sempre con stile originale */
[data-theme="light"] .rollo-hero__btn {
  color: var(--rollo-light) !important;
  border-color: var(--rollo-yellow);
}

[data-theme="light"] .rollo-hero__btn:hover {
  background-color: var(--rollo-yellow);
  color: var(--rollo-black) !important;
}

/* Scroll arrow sempre gialla */
[data-theme="light"] .rollo-hero__scroll-arrow {
  color: var(--rollo-yellow);
}
/* ============================================
   CARD GRADIENT - OPZIONE 3 BLU-GRIGIO FREDDO
   ============================================ */

/* Dark mode (default) - Gradiente blu-grigio freddo */
.card.bg-dark {
  background: linear-gradient(180deg, #2a2d32 0%, #1a1c20 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  transition: all 0.3s ease !important;
}

.card.bg-dark:hover {
  background: linear-gradient(180deg, #32363c 0%, #22252a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Light mode - mantiene stile chiaro */
[data-theme="light"] .card.bg-dark {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .card.bg-dark:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f1f3f4 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Teaser nelle card di home e categorie, piu piccolo del testo degli articoli (novembre 2026) */
.card-body .card-text {
  font-size: 1rem;
  line-height: 1.5;
}

/* Titoli delle card piu piccoli, categoria e data a 12px (novembre 2026) */
.card-body .card-title {
  font-size: 1.5rem;
  line-height: 1.25;
}
.card-footer small {
  font-size: 12px;
}

/* Card con bordo grigio chiaro e angoli arrotondati (novembre 2026) */
.card.bg-dark,
[data-theme="light"] .card.bg-dark {
  border: 1px solid #d3d3d3 !important;
  border-radius: 12px;
  overflow: hidden;
}
.card.bg-dark:hover,
[data-theme="light"] .card.bg-dark:hover {
  border: 1px solid #b8b8b8 !important;
}

/* Prima riga della home con due card affiancate (novembre 2026) */
@media (min-width: 768px) {
  .rollo-home-first > .col:nth-child(-n+2) {
    flex: 0 0 auto;
    width: 50%;
  }
}

/* Topbar piu scura nel tema scuro; nel tema chiaro resta #d9d9d9 (novembre 2026) */
.navbar.navbar-dark {
  background-color: #222222 !important;
}

/* Footer a tutta larghezza, sempre a fondo pagina, stesso colore della topbar */
body > .container-fluid {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.rollo-footer {
  margin-top: auto;
  margin-left: calc(var(--bs-gutter-x, 1.5rem) * -.5);
  margin-right: calc(var(--bs-gutter-x, 1.5rem) * -.5);
  padding-top: 0;
  background-color: #222222;
}
.rollo-footer .container {
  margin-top: 0 !important;
}
[data-theme="light"] .rollo-footer {
  background-color: #d9d9d9;
}
[data-theme="light"] .rollo-footer .text-secondary {
  color: #333333 !important;
}

/* Ombra sotto la hero, come topbar e card (novembre 2026) */
.rollo-hero {
  box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .55);
}

/* Spazio tra il contenuto e il footer */
.rollo-footer-spacer {
  height: 40px;
  flex-shrink: 0;
}

/* Testi del footer a 14px */
.rollo-footer small,
.rollo-footer a {
  font-size: 14px;
}

/* Previous e Next separati */
.btn-group.rounded-pill {
  gap: 20px;
}
.btn-group.rounded-pill > .btn-pagination {
  border-radius: 50rem !important;
}
.btn-group.rounded-pill > .btn-pagination + .btn-pagination {
  margin-left: 0 !important;
}

/* Separatori tra le voci del footer, come nella topbar */
.rollo-footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
}
.rollo-footer-links a:not(:last-child)::after {
  content: "|";
  display: inline-block;
  color: #6c757d;
  margin: 0 .6rem;
}

/* La hero occupa la larghezza visibile senza creare scroll orizzontale */
.rollo-hero {
  width: auto !important;
}

/* Tabelle nel testo delle pagine (cookie policy e simili) */
.rollo-page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 1rem;
}
.rollo-page-content th,
.rollo-page-content td {
  padding: .65rem .9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.rollo-page-content thead th {
  color: #e9ecef;
  font-weight: 600;
  background-color: rgba(255, 255, 255, .06);
  border-bottom: 2px solid rgba(255, 255, 255, .2);
}
.rollo-page-content td:first-child {
  white-space: nowrap;
  font-family: SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
}
[data-theme="light"] .rollo-page-content th,
[data-theme="light"] .rollo-page-content td {
  border-bottom-color: rgba(0, 0, 0, .12);
}
[data-theme="light"] .rollo-page-content thead th {
  color: #212529;
  background-color: rgba(0, 0, 0, .04);
  border-bottom-color: rgba(0, 0, 0, .2);
}
@media (max-width: 767px) {
  .rollo-page-content table {
    display: block;
    overflow-x: auto;
  }
}

/* Privacy e cookie: niente titolo e data del tema, il titolo e quello del testo */
.rollo-legal {
  padding-top: 1.5rem;
}
.rollo-legal h1 {
  color: #f8f9fa;
  font-weight: 700;
  margin-bottom: .5rem;
}
.rollo-legal h2 {
  color: #e9ecef;
  margin-top: 2rem;
  margin-bottom: .75rem;
}
[data-theme="light"] .rollo-legal h1,
[data-theme="light"] .rollo-legal h2 {
  color: #212529;
}

/* Banner e preferenze cookie: testi grigio medio, pulsanti e spunta gialli */
#cookieModal .modal-content,
#cookieModal .modal-body,
#cookieModal .form-check-label {
  color: #6c757d !important;
}
#cookieModal .modal-title {
  color: #212529 !important;
}
#cookie-disclaimer .text-dark {
  color: #495057 !important;
}
#cookie-disclaimer a,
#cookie-disclaimer .btn-link {
  color: #6c757d !important;
  text-decoration: underline !important;
}
#cookie-disclaimer .btn-primary,
#cookieModal .btn-primary {
  background-color: var(--rollo-yellow, #ffc107) !important;
  border-color: var(--rollo-yellow, #ffc107) !important;
  color: #000 !important;
  font-weight: 600;
}
#cookie-disclaimer .btn-primary:hover,
#cookieModal .btn-primary:hover {
  filter: brightness(.92);
}
#cookieModal .form-check-input:checked {
  background-color: var(--rollo-yellow, #ffc107);
  border-color: var(--rollo-yellow, #ffc107);
}
#cookieModal .form-check-input:focus {
  border-color: var(--rollo-yellow, #ffc107);
  box-shadow: 0 0 0 .25rem rgba(255, 193, 7, .25);
}
#cookieModal p {
  color: #6c757d !important;
}

/* Tema chiaro: elenchi e celle di tabella scuri come i paragrafi */
[data-theme="light"] li,
[data-theme="light"] td {
  color: #222222;
}

/* Avatar dell'autore nel piede delle card */
.rollo-card-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d3d3d3;
  flex-shrink: 0;
}

/* Pagina articolo: condivisione sotto il titolo, senza script esterni */
.rollo-share a {
  text-decoration: none;
}
.rollo-share a:hover {
  text-decoration: underline;
}
.rollo-share a:not(:last-child)::after {
  content: "|";
  display: inline-block;
  color: #6c757d;
  margin: 0 .5rem;
}
.rollo-share .text-secondary {
  margin-right: .4rem;
}
.rollo-post-cover img {
  width: 100%;
}

/* Foto dell'articolo con angoli e ombra come le card */
.rollo-post-cover img {
  border-radius: 12px !important;
  box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .45);
}
[data-theme="light"] .rollo-post-cover img {
  box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .18);
}
