/* ============================================
   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);
}