/* ============================================
   ATTIVITÀ PAGES — Dropdown + Card Grid
   ============================================ */

/* --- Dropdown hover behavior (desktop ≥1062px) --- */
@media all and (min-width: 1062px) {
  .navbar .nav-item #attivita-dropdown + .dropdown-menu {
    display: none;
    margin-top: 0;
  }
  .navbar .nav-item:hover #attivita-dropdown + .dropdown-menu {
    display: block;
  }
  #attivita-dropdown + .dropdown-menu {
    background-color: #ffb618;
  }
  body:has(#attivita-dropdown + .dropdown-menu:hover) #attivita-dropdown {
    color: #ffb618;
  }
}

/* --- Attività page layout --- */
.attivita-section {
  padding: 2% 7% 5%;
}

.attivita-section h1 {
  margin-bottom: 40px;
}

/* --- Card grid --- */
.attivita-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* --- Individual card --- */
.attivita-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.attivita-card:hover {
  transform: translateY(-4px);
}

.attivita-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.attivita-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.attivita-card-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 4px;
  padding: 0;
  color: #212529;
}

.attivita-card-body h5 {
  font-size: 0.9rem;
  font-weight: 400;
  font-style: italic;
  color: #666;
  margin: 0 0 12px;
}

.attivita-card-body p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
  text-align: left;
  flex-grow: 1;
  margin-bottom: 16px;
}

/* --- DETTAGLI button --- */
.dettagli-btn {
  display: inline-block;
  padding: 8px 24px;
  border: 2px solid #a20101;
  border-radius: 8px;
  color: #a20101;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  text-align: center;
  letter-spacing: 1px;
  transition: background-color 0.2s, color 0.2s;
  align-self: center;
}

.dettagli-btn:hover {
  background-color: #a20101;
  color: #fff;
}

/* --- Responsive --- */
@media (max-width: 680px) {
  .attivita-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .attivita-card img {
    height: 180px;
  }
}
