.consiglio-section * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


.card-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 16px;
}


.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.flip-card {
  perspective: 1000px;
  cursor: pointer;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 340px;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.flip-card.flipped .flip-inner {
  transform: rotateY(180deg);
}

.flip-card.flipped:hover .flip-inner {
  transform: rotateY(180deg) translateY(-6px);
}

.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 20px;
  backface-visibility: hidden;
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.flip-card:hover .flip-inner {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.card-container .flip-front img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 15px;
}

.card-container .flip-front h2,
.card-container .flip-back h2 {
  margin-bottom: 8px;
  font-size: 18px;
  color: #242424;
}

.card-container .flip-front p,
.card-container .flip-back p {
  margin-bottom: 10px;
  font-size: 14px;
  color: #555;
  text-align: center;
}

.card-container .flip-front a {
  display: block;
  color: #005ea2;
  text-decoration: none;
  margin: 4px 0;
  font-size: 14px;
  word-break: break-word;
}

.more-info {
margin-top: 20px;
  font-size: 13px;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #333;
  background-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.more-info:hover {
  background-color: #333;
  color: #fff;
}

.flip-back {
  transform: rotateY(180deg);
  padding: 25px;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 1.5em;
  color: #999;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #333;
}

.first-section {
position: relative;
  height: 350px;
  background-image: url('/assets/uploads/consiglio.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.first-section h1 {
z-index: 2;
    color: white;
    font-size: 40px;
    font-weight: bold;
    position: relative;
    margin: 0;
    padding-top: 30px;
}

.flip-card-section {
margin-top:80px;
margin-bottom:100px
}

/* Responsive */

@media (max-width: 768px) {
  .first-section {
background-attachment: unset;
    height: 250px;
  }

.first-section h1 {
z-index: 2;
    color: white;
    font-size: 33px;
    font-weight: bold;
    position: relative;
    margin: 0;
    padding-top: 45px;
}
.flip-card-section {
margin-top: 50px;
}
}