.viaggi-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.viaggi-filter-container {
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(8, 5, 64, 0.08);
  height: fit-content;
  position: sticky;
  top: 45px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.filter-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #080540;
  text-transform: uppercase;
}

.filter-count {
  font-size: 14px;
  color: #666;
  background: #f8f9fa;
  padding: 4px 10px;
  border-radius: 12px;
}

.filter-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
  color: black;
}

.filter-section:last-child {
  border-bottom: none;
}

.filter-section h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: #080540;
}

.filter-section select,
.filter-section input[type="text"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.filter-section select:focus,
.filter-section input[type="text"]:focus {
  border-color: #29afd5;
  outline: none;
}

.checkbox-group {
  max-height: max-content;
  overflow-y: auto;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  padding-left: 30px;
}

.checkbox-group input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  transition: all 0.3s;
}

.checkbox-group input[type="checkbox"]:checked ~ .checkmark {
  background-color: #29afd5;
  border-color: #29afd5;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-group input[type="checkbox"]:checked ~ .checkmark:after {
  display: block;
}

.count {
  color: #888;
  margin-left: auto;
  font-size: 13px;
}

.filter-buttons {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.filter-buttons button {
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  flex: 1;
}

.filter-submit {
  background-color: #29afd5;
  color: white;
}

.filter-submit:hover {
  background-color: #080540;
  transform: translateY(-1px);
}

.filter-reset {
  background-color: #f8f9fa;
  color: #666;
  border: 1px solid #ddd !important;
}

.filter-reset:hover {
  background-color: #e9ecef;
  color: #666;
}

.viaggi-results-container {
  position: relative;
}

.viaggi-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 100;
  display: flex;
  align-items: self-start;
  justify-content: center;
  border-radius: 8px;
}

.viaggi-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
  padding: 0;
}

.viaggio-card.skeleton {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(8, 5, 64, 0.1);
}

.skeleton-image {
  height: 180px;
  background: #e0e0e0;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-content {
  padding: 15px;
}

.skeleton-line {
  height: 12px;
  background: #e0e0e0;
  margin-bottom: 10px;
  border-radius: 2px;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-line:last-child {
  width: 60%;
}

.skeleton-buttons {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.skeleton-button {
  height: 35px;
  flex: 1;
  background: #e0e0e0;
  border-radius: 4px;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    opacity: 0.6;
  }
}

.viaggi-results-grid,
.viaggi-latest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
}

.viaggio-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(8, 5, 64, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #f0f0f0;
}

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

.viaggio-image {
  display: block;
  overflow: hidden;
  position: relative;
}

.viaggio-image .tumbi-img {
  width: 100%;
  height: 200px !important;
  object-fit: cover;
  transition: transform 0.5s;
}

.viaggio-card:hover .viaggio-image .tumbi-img {
  transform: scale(1.05);
}

.viaggio-content {
  padding: 20px;
}

.viaggio-categories {
  margin-bottom: 12px;
}

.viaggio-category {
  display: inline-block;
  background: #29afd5;
  color: white;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  margin-right: 8px;
  font-weight: 600;
}

.viaggio-title {
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #080540;
  font-weight: 700;
  line-height: 1.3;
}
p.viaggio-descrizione {
  color: #080540;
}
.viaggio-details {
  margin-bottom: 15px;
}

.viaggio-detail {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 5px;
}

.viaggio-detail .icon {
  font-size: 14px;
  color: #29afd5;
}

.viaggio-features {
  margin: 15px 0;
}

.viaggio-feature {
  display: inline-block;
  background: #e8f7fc;
  color: #080540;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 4px;
  margin-right: 8px;
  margin-bottom: 8px;
  font-weight: 500;
}

.viaggio-feature .icon {
  margin-right: 4px;
}

.viaggio-kpi {
  background: #f8f9ff;
  padding: 15px;
  border-radius: 6px;
  margin: 15px 0;
  border-left: 4px solid #29afd5;
}

.viaggio-kpi-title {
  font-size: 14px;
  font-weight: 600;
  color: #080540;
  margin-bottom: 8px;
}

.viaggio-kpi-value {
  font-size: 16px;
  font-weight: 700;
  color: #29afd5;
}

.viaggio-buttons {
  display: flex;
  margin-top: 20px;
}

.viaggio-button {
  padding: 12px 15px;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.viaggio-button.scopri {
  background-color: white;
  color: #29afd5;
  border: 1px solid #29afd5;
  width: 100%;
}

.viaggio-button.scopri:hover {
  background-color: #29afd5;
  transform: translateY(-2px);
  color: white;
}

.viaggio-button.contatta {
  background-color: #080540;
  color: white;
  border: 1px solid #080540;
}

.viaggio-button.contatta:hover {
  background-color: #29afd5;
  border-color: #29afd5;
  transform: translateY(-2px);
}

.viaggio-button.risultati {
  background-color: #29afd5;
  color: white;
  border: 1px solid #29afd5;
}

.viaggio-button.risultati:hover {
  background-color: #080540;
  border-color: #080540;
  transform: translateY(-2px);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 40px;
  font-size: 18px;
  color: #666;
  background: #f8f9fa;
  border-radius: 10px;
}

/* Mobile Responsive */
.mobile-filter-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: white;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.sort-filter-buttons {
  display: flex;
  gap: 10px;
}

button#close-filters {
  position: fixed;
  right: 0px;
  top: 0;
  color: black;
  font-size: 20px;
  font-weight: 600;
  padding: 0;
  width: 15%;
  border-radius: 0 !important;
  border: none !important;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: self-start;
  background: #00000038;
}

span.inner-clode {
  width: 100%;
  padding: 17px;
  color: white;
  font-size: 25px;
}

.mobile-filter-btn,
.mobile-filter-btn:hover {
  padding: 8px 15px;
  background: #29afd5;
  border: 1px solid #29afd5;
  border-radius: 6px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: white;
}

@media (max-width: 968px) {
  .viaggi-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
  }

  .viaggi-filter-container {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(8, 5, 64, 0.1);
    border-radius: 0 !important;
  }

  .viaggi-filter-container.active {
    left: 0;
  }

  .mobile-filter-header {
    display: flex;
    position: sticky;
    top: 62px;
    z-index: 99;
    box-shadow: 0px 10px 15px 0px #0000002e;
    padding: 10px 5%;
  }
  .sort-filter-buttons {
    display: none;
  }
  .viaggi-results-grid,
  .viaggi-latest-grid,
  .viaggi-skeleton {
    grid-template-columns: 1fr;
  }

  .filter-buttons {
    flex-direction: column;
  }

  .viaggio-buttons {
    grid-template-columns: 1fr;
  }
}

a.viaggio-button {
  text-transform: uppercase;
}

@media (min-width: 969px) and (max-width: 1200px) {
  .viaggi-container {
    grid-template-columns: 280px 1fr;
    gap: 20px;
  }

  .viaggi-results-grid,
  .viaggi-latest-grid {
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
  }
}

/* Results header and sorting */
.viaggi-results-header {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  position: sticky;
  top: 70px;
  z-index: 888;
  border: 1px solid #0000001c;
  box-shadow: 7px -10px 0px 28px #ffffff;
}

.results-count {
  font-size: 16px;
  font-weight: 600;
  color: #080540;
}

.sort-options {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-options label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  width: 100px;
}

.sort-options select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.sort-options select:focus {
  border-color: #29afd5;
  outline: none;
}

/* Latest projects container */
.viaggi-latest-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.viaggi-latest-container .viaggi-results-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Mobile responsive for results header */
@media (max-width: 768px) {
  .viaggi-results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .sort-options {
    width: 100%;
    justify-content: space-between;
  }

  .sort-options select {
    flex: 1;
    margin-left: 10px;
  }
}

.project-badge {
  display: inline-block;
  background: #29afd5;
  color: white;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  margin-right: 5px;
  margin-bottom: 5px;
}

.kpi-highlight {
  color: #29afd5;
  font-weight: 500;
  font-size: 14px;
}

.important-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: white;
  color: #333;
  border-radius: 44px;
  font-size: 16px;
  font-weight: bold;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.viaggio-image {
  position: relative;
}

.viaggio-image img {
  display: block;
  width: 100%;
  height: auto;
}

span.project-badge.tipologia_progetto {
  cursor: pointer;
}

/* Pagination Styles */
.portfolio-pagination {
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid #e0e0e0;
}

.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 10px 20px;
  border: 2px solid #29afd5;
  background: white;
  color: #29afd5;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 120px;
}

.pagination-btn:hover:not(:disabled) {
  background: #29afd5;
  color: white;
  border-color: #29afd5;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: #ccc;
  color: #ccc;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 15px;
}

.pagination-number {
  padding: 8px 15px;
  border: 2px solid #e0e0e0;
  background: white;
  color: #333;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  min-width: 45px;
}

.pagination-number:hover,
.pagination-number.active {
  background: #29afd5;
  color: white;
  border-color: #29afd5;
}

.pagination-dots {
  padding: 8px 5px;
  color: #666;
  font-weight: 500;
}

/* Loading states */
.portfolio-pagination.loading,
#portfolio-results.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .pagination-container {
    gap: 10px;
  }

  .pagination-btn {
    min-width: 100px;
    padding: 8px 15px;
    font-size: 14px;
  }

  .pagination-number {
    padding: 6px 12px;
    min-width: 40px;
    font-size: 14px;
  }

  .pagination-numbers {
    margin: 0 10px;
    gap: 5px;
  }
}


/* Tags for corsi */
.viaggio-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.viaggio-tag {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(8, 5, 64, 0.15);
    background: rgba(8, 5, 64, 0.03);
    font-weight: 500;
}

/* Calendario corsi */
.corsi-calendar {
    margin-bottom: 20px;
}

.corsi-calendar-months {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.corsi-calendar-month {
    border: 1px solid rgba(8, 5, 64, 0.15);
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
}

.corsi-calendar-month.active,
.corsi-calendar-month:hover {
    background: #080540;
    color: #fff;
}
