/* ===== RESTYLING MODERNO 2025 - NON TOCCARE main.css ===== */
/* Fix: Overlay ridotto (20%) + dark mode disattivato + bg chiaro */

:root {
  --primary: #5e5b5a;
  --primary-hover: #ff4500;
  --secondary: #ffd800;
  --bg-body: #f8fafc; /* Chiaro di default */
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode COMMENTATO - Attivalo solo se vuoi (rimuovi /* e */ ) */
/*
@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #334155;
  }
}
*/

body {
  background: var(--bg-body) !important;
  color: var(--text-primary);
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.7;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
a:hover {
  color: var(--secondary);
  border-bottom-color: currentColor;
  transform: translateY(-1px);
}

.row {
  --gutter: 1.5rem;
  margin: calc(-1 * var(--gutter)) !important;
}
.row > * {
  padding: var(--gutter) !important;
}

@media (min-width: 768px) { .row { --gutter: 2rem; } }
@media (min-width: 1024px) { .row { --gutter: 2.5rem; } }

.container {
  max-width: 1200px;
  width: min(75%, 1200px);
  margin: 0 auto;
}

input[type="text"], input[type="password"], input[type="email"], textarea {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
}
input:focus {
  border-color: var(--primary);
  box-shadow: var(--shadow-md), 0 0 0 3px rgb(30 64 175 / 0.1);
  outline: none;
}

.button, input[type="submit"], button {
  background: linear-gradient(135deg, var(--primary), #ff6600);
  border: none;
  border-radius: var(--radius);
  color: white;
  padding: 0.875rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  min-height: 48px;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 8px 25px rgb(0 0 0 / 0.15);
}

#header {
  background: var(--bg-card) !important;
  box-shadow: var(--shadow-md);
  padding: 1.5rem 0 !important;
}
#nav {
  background: var(--primary) !important;
  border-radius: var(--radius);
  margin: 1rem;
}
#nav > ul > li a {
  padding: 0.75rem 1.5rem !important;
  border-radius: 8px;
  transition: var(--transition);
}
#nav > ul > li:hover a {
  background: rgba(255,255,255,0.1);
  color: orange!important;
}

#banner {
  background-image: url("https://ital-cer.com/images/bannerjason.jpg") !important; /* URL ASSOLUTO - Testato */
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-color: #ffe4cc !important; /* Fallback blu chiaro (non scuro) */
  height: clamp(20em, 50vh, 28em) !important; /* Scalabile */
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  position: relative !important;
  text-align: center !important;
}

#banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2); /* Overlay LEGGERO (20% nero) - Cambia 0.2 per regolare o rimuovi tutto questo blocco */
  z-index: 1;
  border-radius: var(--radius);
}

#banner * {
  position: relative;
  z-index: 2; /* Testo sopra overlay */
}

#banner header {
  background: rgba(27, 27, 27, 0.75) !important; /* Overlay testo in basso */
}

.wrapper {
  background: var(--bg-card) !important;
  border-radius: var(--radius);
  padding: 3rem 1rem !important;
  box-shadow: var(--shadow-sm);
  margin: 2rem 0;
}

.box, article, section {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.icon.major {
  background: linear-gradient(135deg, var(--secondary), #ff8c00) !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: 50% !important;
}

table.default thead {
  background: linear-gradient(135deg, var(--primary), #ff6600) !important;
}

/* Dark mode COMMENTATO - Non attivo */
/*
@media (prefers-color-scheme: dark) {
  body { background: #0f172a; }
  .box, .wrapper, #header { background: #1e293b; }
  a { color: var(--secondary); }
}
*/

.image img {
  border-radius: var(--radius);
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .row { --gutter: 1rem; }
  #banner { height: 20rem !important; }
}