:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --gray-subtle: #777777;
  --gray-border: #e8e8e8;
  --sidebar-width: 320px;
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* Sidebar Desktop */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: #fbfbfb;
  border-right: 1px solid var(--gray-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px 30px;
  z-index: 100;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.logo {
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  color: var(--text-color);
  letter-spacing: -0.3px;
}

.toggle-btn {
  background: #111;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
}

/* Pulsante Riapertura (Desktop) */
.reopen-btn {
  position: fixed;
  top: 40px;
  left: 20px;
  z-index: 90;
  background: #111;
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Data e Ora su due righe */
.meta-box {
  margin-bottom: 25px;
}

.meta-date {
  font-size: 12px;
  color: var(--text-color);
  font-weight: 500;
  margin-bottom: 4px;
}

.meta-time {
  font-size: 12px;
  color: var(--gray-subtle);
}

.meta-time .tz {
  font-weight: 600;
  color: var(--text-color);
}

/* Icone Social Minimal */
.social-links {
  display: flex;
  gap: 16px;
  margin-bottom: 35px;
}

.social-links a {
  color: var(--text-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.social-links a:hover {
  opacity: 0.5;
}

.social-links svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Nav Menu */
.nav-menu ul {
  list-style: none;
}

.nav-menu li {
  margin-bottom: 16px;
}

.nav-menu a {
  text-decoration: none;
  color: #555;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--text-color);
}

.nav-menu span {
  color: #aaa;
  font-size: 12px;
}

/* Footer Sidebar (2 righe) */
.sidebar-footer {
  font-size: 12px;
  color: var(--gray-subtle);
  line-height: 1.6;
  border-top: 1px solid var(--gray-border);
  padding-top: 20px;
}

/* Contenuto Principale & Foto Scalata (Homepage) */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  width: calc(100vw - var(--sidebar-width));
  height: 100vh;
  padding: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  transition: margin-left 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bg-color);
}

.main-content.expanded {
  margin-left: 0;
  width: 100vw;
}

.hero-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Contenuto scorrevole per Gallerie e About */
.scrollable-content {
  overflow-y: auto !important;
  display: block !important;
  padding: 40px !important;
}

/* Griglia Editoriale a Colonne Fluide (Masonry nativo - Nessun taglio, proporzioni originali intatte) */
.gallery-grid-clean {
  column-count: 3;
  column-gap: 24px;
  width: 100%;
  max-width: 1400px;
}

@media (max-width: 1200px) {
  .gallery-grid-clean {
    column-count: 2;
  }
}

@media (max-width: 768px) {
  .gallery-grid-clean {
    column-count: 1;
  }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 24px;
  cursor: pointer;
  background: transparent;
}

.gallery-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
  transition: opacity 0.3s ease;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.gallery-item:hover .gallery-img {
  opacity: 0.85;
}

/* Lightbox Modal & Protezione */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 2010;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  padding: 16px;
  z-index: 2010;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.privacy-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease;
  z-index: 2020;
  pointer-events: none;
}

.lightbox.obscured .privacy-overlay {
  opacity: 1;
  visibility: visible;
}

/* Stili specifici per la pagina About */
.about-wrapper {
  max-width: 600px;
  width: 100%;
  padding: 40px 0;
}

.about-wrapper h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.about-intro {
  font-size: 15px;
  color: var(--gray-subtle);
  line-height: 1.6;
  margin-bottom: 40px;
}

.contact-details {
  border-top: 1px solid var(--gray-border);
  padding-top: 30px;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 14px;
}

.contact-item .label {
  color: var(--gray-subtle);
}

.contact-item a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* Mobile Header & Responsive */
.mobile-header {
  display: none;
}

@media (max-width: 991px) {
  .reopen-btn {
    display: none !important;
  }

  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 110;
    border-bottom: 1px solid var(--gray-border);
  }

  .hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #111;
    border-radius: 2px;
  }

  .sidebar {
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    transform: translateY(-100%);
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: none;
    z-index: 105;
    padding: 90px 30px 40px 30px;
  }

  .sidebar.open-mobile {
    transform: translateY(0);
  }

  .toggle-btn {
    display: flex;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100vw !important;
    padding: 90px 20px 20px 20px;
    height: 100vh;
  }
}