/* ============================================
   FOOTER ISTITUZIONALE – BARRA BLU FINALE
   ============================================ */
footer {
  background: var(--pc-blue);
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  border-top: 5px solid var(--pc-yellow);
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* ============================================
   PALETTE ISTITUZIONALE
   ============================================ */
:root {
  --pc-blue: #0033a0;
  --pc-yellow: #ffcc00;
  --dark: #222;
  --light: #f9f9f9;
}

/* ============================================
   STRUTTURA GENERALE
   ============================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #ffffff;
  color: var(--dark);
}

main {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
}

h1, h2 {
  color: var(--pc-blue);
}

p {
  line-height: 1.5;
}

ul {
  padding-left: 20px;
}

/* ============================================
   HEADER + MENU
   ============================================ */
header {
  background: var(--pc-blue);
  color: white;
  padding: 20px;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  height: 70px;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

nav a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

nav a:hover {
  color: var(--pc-yellow);
}

/* ============================================
   BANNER ISTITUZIONALE
   ============================================ */
.banner-istituzionale img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 5px solid var(--pc-blue);
}

/* ============================================
   GALLERY GENERICA
   ============================================ */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 20px;
}

.gallery img {
  width: calc(33.333% - 10px);
  border-radius: 6px;
  border: 3px solid var(--pc-blue);
}

/* ============================================
   FOTO VIEWER
   ============================================ */
.foto-viewer {
  display: flex;
  gap: 30px;
  margin-top: 40px;
}

.foto-container img {
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  border: 4px solid var(--pc-blue);
}

.foto-info {
  flex: 1;
}

.foto-controls {
  margin-top: 20px;
  display: flex;
  gap: 15px;
}

.foto-controls button {
  flex: 1;
  padding: 12px;
  background: var(--pc-blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.foto-controls button:hover {
  background: var(--pc-yellow);
  color: var(--dark);
}

/* Effetto fade */
.fade-out {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fade-in {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  margin: 40px 0;
  border-left: 4px solid var(--pc-blue);
  padding-left: 30px;
}

.timeline-item {
  margin-bottom: 40px;
  position: relative;
}

.timeline-item::before {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--pc-blue);
  border-radius: 50%;
  position: absolute;
  left: -42px;
  top: 5px;
}

.timeline-year {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--pc-blue);
  margin-bottom: 5px;
}

.timeline-content h3 {
  margin: 0;
  color: var(--pc-blue);
}

.timeline-content p {
  margin-top: 5px;
  line-height: 1.5;
}

/* ============================================
   CONTATTI – LAYOUT A DUE COLONNE
   ============================================ */
.contatti-due-colonne {
  display: flex;
  gap: 30px;
  margin: 40px auto;
  max-width: 1100px;
  padding: 20px;
}

.colonna-immagine {
  flex: 1;
}

.colonna-immagine img {
  width: 100%;
  border-radius: 8px;
  border: 4px solid var(--pc-blue);
}

.colonna-modulo {
  flex: 1;
  background: white;
  padding: 25px;
  border-radius: 8px;
  border: 3px solid var(--pc-blue);
}

.colonna-modulo h2 {
  margin-bottom: 10px;
}

.colonna-modulo p {
  margin-bottom: 20px;
}

/* ============================================
   FORM CONTATTI
   ============================================ */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  font-weight: bold;
}

input,
select,
textarea {
  padding: 10px;
  border: 2px solid var(--pc-blue);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--light);
}

button {
  background: var(--pc-blue);
  color: white;
  padding: 14px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  transition: 0.3s ease;
}

button:hover {
  background: var(--pc-yellow);
  color: var(--dark);
}

/* ============================================
   DIRETTIVO – BOX SOTTO IMMAGINE (CONTATTI)
   ============================================ */
.direttivo-box {
  margin-top: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 3px solid var(--pc-blue);
}

.direttivo-box h2 {
  margin-top: 0;
  color: var(--pc-blue);
}

.direttivo-membro {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--pc-blue);
}

.direttivo-membro h3 {
  margin: 0;
  color: var(--pc-blue);
}

.direttivo-membro p {
  margin: 3px 0;
  font-size: 0.95rem;
}

/* ============================================
   DIRETTIVO – PAGINA DEDICATA
   ============================================ */
.direttivo-titolo {
  text-align: center;
  color: var(--pc-blue);
  margin-top: 40px;
  margin-bottom: 20px;
}

.direttivo-griglia {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin-top: 30px;
}

.direttivo-card {
  width: 280px;
  background: white;
  border: 3px solid var(--pc-blue);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: 0.3s ease;
}

.direttivo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
}

.direttivo-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--pc-blue);
  margin-bottom: 15px;
}

.direttivo-card h3 {
  margin: 10px 0 5px 0;
  color: var(--pc-blue);
  font-size: 1.3rem;
}

.direttivo-card .ruolo {
  font-weight: bold;
  color: var(--pc-yellow);
  margin-bottom: 10px;
}

.direttivo-card .contatti {
  margin-top: 10px;
  text-align: left;
  display: inline-block;
}

/* ============================================
   ICONCINE ISTITUZIONALI
   ============================================ */
.icona {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
  background-size: contain;
  background-repeat: no-repeat;
  filter: brightness(0) saturate(100%) invert(14%) sepia(93%) saturate(2000%) hue-rotate(200deg) brightness(90%) contrast(95%);
}

.icona-tel {
  background-image: url('assets/icons/telefono.svg');
}

.icona-ruolo {
  background-image: url('assets/icons/ruolo.svg');
}

.icona-mail {
  background-image: url('assets/icons/email.svg');
}
