/* ============================================================
   MAIN LAYOUT & TITOLI
============================================================ */
main {
  max-width: 1320px;
  margin: 0 auto 6rem;
  box-sizing: border-box;
}

h1.page-title {
  font-weight: 300;
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 10px;
  margin: 0 auto 5rem;
  color: #111;
  text-align: center;
}

/* ============================================================
   FILTER BUTTON & PANEL
============================================================ */
button#filter-toggle {
  position: fixed;
  bottom: 30px;
  left: 20px;
  z-index: 1100;
  background-color: #000;
  color: #fff;
  padding: 6px 20px;
  border-radius: 22px;
  border: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.25s ease;
}

button#filter-toggle:hover {
  background-color: #444;
}

#filter-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 0;
  overflow-y: hidden;
  padding: 50px 20px 20px 20px;
  background: transparent;
  transition: all 0.5s ease;
  z-index: 1050;
  box-sizing: border-box;
}

#filter-panel.active {
  height: 45%;
  max-height: 480px;
  background: #fff;
  padding: 50px 30px;
  overflow-y: auto;
}

#filter-close {
  display: none;
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #222;
  font-size: 1.6rem;
  font-weight: bold;
  transition: color 0.3s ease;
}

#filter-panel.active #filter-close {
  display: block;
}

#filter-close:hover {
  color: #000;
}

.filters-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 10px 0;
}

.filter-group label {
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #444;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-option {
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.filter-option:hover,
.filter-option.active {
  background-color: #f5f5f5;
  color: #000;
}

/* ============================================================
   GRIGLIA PROGETTI
============================================================ */
.project-grid {
  display: grid;
grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem 1.8rem;
  width: 100%;
  margin: 10rem auto 0;
}

.project-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 1.6s ease, transform 1.6s ease;
}


.project-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-item:hover img {
  transform: scale(1.02);
}

.project-info {
  padding: 0.6rem 0 2.5rem 0;
  color: #222;
}

.project-info h2 {
  margin: 0 0 6px;
  font-weight: 400;
  font-size: 1rem;
  color: #111;
  line-height: 1.25;
}

.project-info h2:hover{
  text-shadow:
    0.3px 0 0 currentColor,
   -0.3px 0 0 currentColor;  
}


.project-info p {
  margin: 0;
  font-weight: 300;
  font-size: 0.95rem;
  color: #4e4e4e;
}

/* ==============================
   RESPONSIVE
============================== */

/* ---- TABLET (max-width: 1024px) ---- */
@media (max-width: 1024px) {

  h1.page-title {
    font-size: 2.2rem;
    letter-spacing: 8px;
  }

  .project-info h2 {
    font-size: 1.2rem;
  }

  .filters-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 7rem;
  }
}

/* ---- MOBILE (max-width: 600px) ---- */
@media (max-width: 600px) {

  main {
    padding: 16px;
    margin-bottom: 2rem;
  }

  h1.page-title {
    font-size: 1.6rem;
    letter-spacing: 5px;
    margin-bottom: 2.5rem;
  }

  .project-item {
    gap: 6px;
    margin-bottom: 0.35rem;
  }

  .project-info {
    padding-top: 0.25rem;
  }

  .project-info h2 {
    font-size: 1rem;
    margin-bottom: 2px;
  }

  .project-info p {
    font-size: 0.9rem;
  }

  #filter-panel.active {
    height: 45%;
    max-height: 45vh;
    padding: 60px 24px 24px 24px;
  }

  .filters-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 4rem;
  }
}

