body {font-family: Arial, sans-serif;margin-bottom: 40px;}
.header {
  background-color: #FFFF00;
  color: black;
  padding: 1px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.header_centrato {
  display: flex;
  align-items: center;
  width: 99%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  font-weight: bold;
}
.header_testi {
  display: flex;
  flex-direction: column;
}
.header_testo1 {
  font-size: 1.1rem;
}
.header_testo2 {
  font-size: 0.6rem;
}
.header_logo {
  margin-right: 10px;
}
.content {
  padding: 0 20px;
}
.sidebar {
  background-color: #f8f9fa;
  padding: 15px;
  border-right: 2px solid #ddd;
  margin-left: -15px;
  text-align: center;
  max-width: 150px;
  width: 100%;
}
.sidebar img {
  max-height: 111px;
  margin-bottom: 5px;
  border-radius: 5px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.sidebar p {
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1;
}
.footer {
  background-color: #FFFF00;
  color: black;
  text-align: center;
  padding: 5px;
  position: fixed;
  bottom: 0;
  width: 100%;
  border-bottom: 5px solid blue;
}
.titoli_blu {
  text-align: center;
  font-size: 24pt;
  color: #3333ff;
  font-weight: bolder;
}
.login-box, .register-box {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.card-row {
  border: 1px solid black;
  display: flex;
  transition: background-color 0.3s;
}
.card-row:hover {
  background-color: #f0f0f0;
  cursor: pointer;
}
.card-col {
  padding: 10px;
}
.card-col:first-child {
  border-right: 1px solid black;
  width: 35%;
}
.card-col:last-child {
  width: 65%;
}
.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.img-fluid {
  max-width: 100%;
}
.popup-img {
  cursor: zoom-in;
}
.data_attivita {
  background-color: #ffcc00;
  padding: 5px;
  text-align: center;
  font-weight: bold;
}
.citta_attivita {
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  font-weight: bold;
  font-size: 30px;
}
.descrizione_attivita {
  padding: 15px;
  color: red;
  font-size: 24px;
}
.navbar-brand {
  color: #8c8cff !important;
}
.navbar-brand:hover,
.navbar-brand:focus {
  color: white !important;
}
.image-container {
  position: relative;
  width: 176px;
  height: 176px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #ccc;
}
.image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.img-lista-articoli {
  max-height: 300px;
  width: auto;
  height: auto;
  margin-bottom: 5px;
}
.delete-button {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(214, 214, 214, 0.7);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 0.8rem;
  color: #dc3545;
  line-height: 1;
}
.delete-button:hover {
  background: rgba(255, 255, 255, 0.9);
}
.cursor-pointer { cursor: pointer; }
.hover-border-primary:hover { border-color: #0d6efd !important; }
.form-check-circle {
  width: 20px;
  height: 20px;
  border: 2px solid #dee2e6;
  border-radius: 50%;
  display: inline-block;
}
.form-check-input:checked + .form-check-label .form-check-circle {
  border-color: #0d6efd;
  background-color: #0d6efd;
  box-shadow: inset 0 0 0 4px #fff;
}
.form-check-input:checked + .form-check-label .border-light {
  border-color: #0d6efd !important;
}
.required::after {
  content: " *";
  color: red;
}
.nav-link {
  color: aqua;
}
.navbar-brand {
  color: aqua !important;
}
.no-click {
  pointer-events: none;
  cursor: default;
  color: white !important;
}

/* =============================================
   STILI PER LE CARD ATTIVITÀ MODERNE
   ============================================= */

.activity-header {
  padding: 20px 0;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 30px;
}

.activity-title {
  color: #0d6efd;
  line-height: 1.3;
  margin-bottom: 0;
}

.activity-date-badge .badge {
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: 20px;
}

.activity-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.activity-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.activity-img, .activity-card img {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: cover;
  transition: transform 0.4s ease;
  cursor: zoom-in;
  padding: 5px;
  box-sizing: border-box;
}

.activity-card:hover .activity-img {
  transform: scale(1.03);
}

.activity-text {
  padding: 25px 30px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #333;
  text-align: justify;
}

.activity-text-full {
  padding: 30px 35px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #333;
  text-align: justify;
}

/* Didascalia immagine */
.image-caption {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 8px;
  background: #e5e5e5;
  border-radius: 4px;
  margin: 0 4px 8px 4px;
}

/* Immagini con stretch (orizzontali) */
.img-stretch {
  height: 250px;
}

/* Immagini verticali - non distorcere e centrare */
.popup-img:not(.img-stretch) {
  width: auto;
  max-width: 100%;
  display: block;
  margin: 0 auto;
}

/* =============================================
   MEDIA QUERY
   ============================================= */
/* Media query per schermi fino a 768px di larghezza */
@media (max-width: 768px) {
  body {margin-bottom: 80px;}
  .header_testo1 {font-size: 0.9rem;}
  .header_testo2 {font-size: 0.5rem;}
  .header_logo {max-height: 100px;max-width: 100px;}
  .copyright {text-align: left;}
  .content {padding: 0}
  
  .activity-card {
    margin-bottom: 20px !important;
  }
  .activity-text,
  .activity-text-full {
    padding: 20px;
    font-size: 1rem;
  }
  .activity-title {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 1039px) {
  .sidebar {display: none;}
}

/* Per schermi medi (es. tablet) */
@media (min-width: 768px) {
  .header_centrato {width: 88%;}
}

/* Per schermi più grandi */
@media (min-width: 992px) {
  .header_centrato {width: 80%;}
  .navbar {height: 40px;}
}

/* Per schermi più grandi (es. desktop) */
@media (min-width: 1200px) {
  .header_centrato {width: 65%;}
}