html { scroll-behavior: smooth; }
body { background-color: #111111; color: #FFFFFF; }

/* Questa regola dice al sito di nascondere davvero gli elementi */
.hidden {
  display: none !important;
}

/* Buttons */
.btn-blue {
  background: linear-gradient(135deg, #41B3E7 0%, #6BC9F0 100%);
  transition: all 0.25s ease;
  color: #111111;
}
.btn-blue:hover { transform: translateY(-1px); box-shadow: 0 8px 25px -5px rgba(65, 179, 231, 0.45); }

.btn-white-outline {
  border: 2px solid white;
  color: white;
  transition: all 0.25s ease;
}
.btn-white-outline:hover { background: white; color: #111111; }

.btn-gray { background: #374151; color: white; transition: all 0.25s ease; }
.btn-gray:hover { background: #4B5563; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #1a1a1a;
  border-top: 1px solid #333;
  z-index: 1000;
  padding: 1rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.55);
}
.cookie-banner.hidden { display: none; }

/* Language Selector */
.language-selector {
  position: relative;
}

.lang-btn {
  background: rgba(65, 179, 231, 0.15);
  border: 1px solid rgba(65, 179, 231, 0.35);
  color: #41B3E7;
  transition: all 0.25s ease;
}

.lang-btn:hover {
  background: rgba(65, 179, 231, 0.25);
  border-color: rgba(65, 179, 231, 0.55);
}

.lang-btn.active {
  background: rgba(65, 179, 231, 0.3);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 100;
  animation: langDropdownIn 0.2s ease;
}

@keyframes langDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: #1a1a1a;
  border-left: 1px solid #333;
  border-top: 1px solid #333;
  transform: rotate(45deg);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.lang-option:hover {
  background: rgba(65, 179, 231, 0.15);
}

.lang-option.active {
  background: rgba(65, 179, 231, 0.25);
}

.lang-flag {
  font-size: 18px;
  line-height: 1;
}

.lang-name {
  flex: 1;
  font-weight: 500;
}

.lang-code {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 600;
}

/* Mobile Language Selector */
.lang-btn-mobile {
  background: rgba(65, 179, 231, 0.1);
  border: 1px solid rgba(65, 179, 231, 0.25);
  transition: all 0.25s ease;
}

.lang-btn-mobile:hover {
  background: rgba(65, 179, 231, 0.2);
}

.lang-dropdown-mobile {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 100px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 100;
  animation: langDropdownIn 0.2s ease;
}

.lang-option-mobile {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-weight: 500;
}

.lang-option-mobile:hover {
  background: rgba(65, 179, 231, 0.15);
}

.lang-option-mobile.active {
  background: rgba(65, 179, 231, 0.25);
}

/* Map shell layout */
.map-shell {
  display: flex;
  flex-direction: column;
  height: 620px;
}
@media (min-width: 1024px) {
  .map-shell { flex-direction: row; height: 620px; }
}
.station-sidebar { width: 100%; height: 260px; }
@media (min-width: 1024px) {
  .station-sidebar { width: 380px; height: 100%; }
}

.station-list { height: calc(100% - 74px); overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.map-area { flex: 1; min-height: 360px; }
@media (min-width: 1024px) { .map-area { min-height: 0; } }

.map-canvas { width: 100%; height: 100%; }

/* Map overlay only on the map area */
.map-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 20px;
}
.map-overlay.hidden { display: none; }

/* Map buttons */
.map-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(17,17,17,0.85);
  border: 1px solid #2b2b2b;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.35);
  transition: all 0.2s ease;
}
.map-btn:hover { color: #41B3E7; transform: translateY(-1px); }

/* Station list item */
.station-item {
  background: rgba(30,30,30,0.85);
  border: 1px solid #2b2b2b;
  border-radius: 18px;
  padding: 12px;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.station-item:hover { transform: translateY(-1px); border-color: rgba(65,179,231,0.55); }
.station-item.active { border-color: rgba(65,179,231,0.9); background: rgba(25,25,25,0.9); }

.station-meta { color: #9ca3af; font-size: 12px; line-height: 1.35; }
.station-title { color: white; font-weight: 700; font-size: 14px; }

.station-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.station-pill {
  font-size: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid #2b2b2b;
  color: #d1d5db;
}
.station-directions {
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(65,179,231,0.18);
  border: 1px solid rgba(65,179,231,0.35);
  color: #41B3E7;
  text-decoration: none;
  white-space: nowrap;
}
.station-directions:hover { background: rgba(65,179,231,0.24); }

/* Station card overlay */
.station-card {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: 360px;
  max-width: calc(100% - 24px);
  background: #ffffff;
  color: #111111;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.45);
  z-index: 30;
}
.station-card.hidden { display: none; }

@media (max-width: 640px) {
  .station-card {
    top: auto;
    bottom: 14px;
    transform: translateX(-50%);
  }
}

.card-close {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.card-close:hover { background: #ffffff; }

.card-directions {
  margin-top: 16px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 12px 14px;
  font-weight: 800;
  color: white;
  background: #3b82f6;
  text-decoration: none;
}
.card-directions:hover { filter: brightness(0.96); }

/* FAQ accordion */
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease-out, padding 0.25s ease; padding-top: 0; }
.faq-item.active .faq-answer { max-height: 240px; padding-top: 12px; }
.faq-item.active .faq-icon { transform: rotate(180deg); }

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 10px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(0,0,0,0.15); border-radius: 999px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 999px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }
