* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #111;
  background-color: #fff;
}

.container {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR DESKTOP */
.sidebar {
  width: 320px;
  padding: 40px 30px;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  background: #fff;
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: #111;
}

.toggle-btn {
  background: #000;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

/* BOTTONE FLOTTANTE PER RIAPRIRE LA SIDEBAR SU DESKTOP */
.open-sidebar-btn {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  background: #000;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
  z-index: 99;
}

.container.full-width .open-sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.meta-info {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 15px;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.social-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  text-decoration: none;
  transition: color 0.2s;
}

.social-links a:hover {
  color: #000;
}

.nav-menu ul {
  list-style: none;
}

.nav-menu li a {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  text-decoration: none;
  color: #666;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid #f2f2f2;
  transition: color 0.2s;
}

.nav-menu li a.active,
.nav-menu li a:hover {
  color: #111;
}

.nav-menu li a span {
  color: #999;
  font-size: 0.8rem;
  font-weight: 400;
}

.sidebar-footer {
  font-size: 0.75rem;
  color: #c44040;
  line-height: 1.4;
  margin-top: auto;
  padding-top: 20px;
}

/* TOPBAR MOBILE */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: #fff;
  border-bottom: 1px solid #eee;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  z-index: 100;
}

.hamburger-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #111;
}

/* CONTENUTO PRINCIPALE */
.main-content {
  margin-left: 320px;
  padding: 40px;
  width: calc(100% - 320px);
  transition: margin-left 0.3s ease, width 0.3s ease;
}

.container.full-width .main-content {
  margin-left: 0;
  width: 100%;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 25px;
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #111;
  padding-bottom: 8px;
}

.section-title span {
  color: #999;
  font-weight: 400;
}

/* FOTO SINGOLA IN HOME PAGE */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px);
}

.hero-image-wrapper {
  width: 100%;
  max-width: 1100px;
}

.hero-image {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

/* GRIGLIA MASONRY PER LE GALLERIE */
.masonry-grid {
  column-count: 3;
  column-gap: 20px;
}

.grid-item {
  break-inside: avoid;
  margin-bottom: 20px;
}

.grid-item img {
  width: 100%;
  display: block;
  border-radius: 4px;
  cursor: zoom-in;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.grid-item img:hover {
  transform: scale(1.01);
  opacity: 0.95;
}

/* PAGINA BIO E CONTATTI */
.page-text {
  max-width: 700px;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.page-text p {
  margin-bottom: 20px;
}

/* LIGHTBOX INTERATTIVO CON FRECCE */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 85%;
  max-height: 85vh;
  border-radius: 4px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  user-select: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  font-size: 2.5rem;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  user-select: none;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    width: 300px;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .mobile-topbar {
    display: flex;
  }
  .open-sidebar-btn {
    display: none !important;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 80px 20px 20px 20px;
  }
  .masonry-grid {
    column-count: 1;
  }
  .lightbox-nav {
    padding: 10px 15px;
    font-size: 1.8rem;
  }
}