/* ================= BODY & FONT ================= */
body {
  font-family: "cofo-sans-pixel", sans-serif;
  font-weight: 400;
  font-style: normal;
  background: #fff;
  color: #111;
  margin: 0;
  padding: 0;
}

/* ================= HEADER ================= */
header {
  display: flex;
  justify-content: space-between; /* logo a sinistra, menu/hamburger a destra */
  align-items: center;
  padding: 25px 20px;
  position: fixed;
  top: 0;
  width: 98%;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid #ddd;
}

.logo {
  font-size: 1.5rem;
  letter-spacing: 2px;
}

/* ================= MENU & SUBMENU ================= */
.dropdown-menu ul {
  list-style: none;
  display: flex;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.dropdown-menu a {
  text-decoration: none;
  color: #111;
  font-size: 1rem;
  font-weight: 400;
  transition: color 0.3s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
  font-weight: 400;
}

.has-submenu {
  position: relative;
}

.has-submenu > .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 10px 0;
  list-style: none;
  min-width: 150px;
  z-index: 20;
}

.has-submenu > .submenu li a {
  display: block;
  padding: 8px 20px;
  color: #111;
  text-decoration: none;
}

.has-submenu > .submenu li a:hover {
  background: #f0f0f0;
}

@media(min-width: 769px) {
  .has-submenu:hover > .submenu {
    display: block;
  }
}

/* Bottone hamburger */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 100;
  position: relative;
  color: #111; /* mai blu */
}

/* ================= WORKS SECTION ================= */
.works-section {
  display: flex;
  padding: 140px 40px 60px; /* spazio per header fisso */
  gap: 40px;
}

/* Colonna testo a sinistra */
.works-text {
  flex: 1;
  max-width: 300px;
}

/* ================= WORKS GALLERY ================= */
.works-gallery {
  flex: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 colonne su desktop */
  grid-gap: 20px;
  justify-content: center;
}

.works-gallery img {
  width: 100%;
  display: block;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.works-gallery img:hover {
  transform: scale(1.05);
}

/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 30px 20px;
  font-weight: 400;
  font-size: 0.9rem;
  color: #555;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1024px) {
  .works-section {
    flex-direction: column;
    align-items: center;
  }

  .works-gallery {
    grid-template-columns: repeat(2, 1fr); /* tablet: 2 colonne */
    width: 100%;
  }

  .works-text {
    max-width: 100%;
    text-align: center;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  /* Logo più a sinistra */
  .logo {
    margin-left: 10px;
  }

  /* Bottone hamburger visibile */
  .menu-toggle {
    display: block;
    position: absolute;
    right: 50px;
    top: 20px;
  }

  /* Menu mobile */
  .dropdown-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 70px;
    right: 0;
    left: 0;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    padding: 15px 20px;
    z-index: 99;
  }

  .dropdown-menu.show {
    display: flex;
  }

  .dropdown-menu ul {
    flex-direction: column;
    gap: 15px;
  }

  .has-submenu > .submenu {
    position: relative;
    top: 0;
    left: 0;
    display: none;
    padding-left: 15px;
  }

  .has-submenu > .submenu.show {
    display: block;
  }

  /* Works-gallery in colonna unica su mobile */
  .works-gallery {
    grid-template-columns: 1fr; /* mobile: 1 colonna */
  }

  .works-section {
    padding: 120px 20px 40px; /* più compatto su mobile */
  }

  .works-text {
    text-align: left;
    margin-bottom: 20px;
  }
}
