/* ===============================================
   GRIGLIA DESTINAZIONI
   =============================================== */

.destinations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-top: 60px;
}

.dest-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  aspect-ratio: 1;
}

.dest-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.dest-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.dest-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.dest-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.dest-card:hover .dest-image img {
  transform: scale(1.08);
}

.dest-category {
  position: absolute;
  top: 25px;
  left: 25px;
  background: rgba(255, 255, 255, 0.95);
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 3;
}

.dest-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 25px;
  text-align: center;
  color: white;
  z-index: 2;
}

.dest-card:hover .dest-overlay {
  opacity: 1;
}

.dest-overlay-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(25px);
  transition: all 0.4s ease 0.15s;
  color: white;
}

.dest-overlay-text {
  font-size: 0.95rem;
  max-width: 85%;
  opacity: 0;
  transform: translateY(25px);
  transition: all 0.4s ease 0.25s;
  color: white;
  line-height: 1.5;
}

.dest-card:hover .dest-overlay-title,
.dest-card:hover .dest-overlay-text {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================================
   RESPONSIVE BREAKPOINTS - MOBILE FIRST
   =============================================== */

@media (max-width: 480px) {
  .destinations-section {
    padding: 50px 0 40px;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .destinations-grid {
    gap: 25px;
    margin-top: 40px;
  }

  .dest-category {
    top: 20px;
    left: 20px;
    padding: 6px 14px;
    font-size: 0.75rem;
  }

  .dest-overlay-title {
    font-size: 1.3rem;
  }

  .dest-overlay-text {
    font-size: 0.9rem;
    max-width: 90%;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .destinations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 35px;
  }

  .section-title {
    font-size: 2.2rem;
  }
}

@media (min-width: 768px) {
  .destinations-section {
    padding: 80px 0 60px;
  }

  .destinations-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
  }

  .section-title {
    font-size: 3rem;
  }

  .dest-overlay-title {
    font-size: 1.7rem;
  }

  .dest-category {
    padding: 10px 18px;
    font-size: 0.85rem;
  }
}

/* Touch devices: overlay sempre visibile */
@media (hover: none) {
  .dest-overlay {
    opacity: 0.9;
  }

  .dest-overlay-title,
  .dest-overlay-text {
    opacity: 1;
    transform: translateY(0);
  }

  .dest-card:active {
    transform: translateY(-8px) scale(1.01);
  }
}

/* Focus accessibility */
.dest-link:focus-visible {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}
