/* ===== Reset minimo ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #ffffff;
  color: #1a1a1a;
  font-family: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== Header ===== */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 3vw;
}

.logo {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  display: block;
  height: 55px;
  width: auto;
  min-width: 110px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  grid-column: 2;
  justify-content: center;
}

.main-nav a {
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
  padding: 0 0.85rem;
  transition: color 0.2s ease;
}

.main-nav a:not(:last-child) {
  border-right: 1px solid #ccc;
}

.main-nav a:hover {
  color: #1a1a1a;
}

.main-nav a.is-active {
  color: #1a1a1a;
  font-weight: 600;
}

.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown__toggle {
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555;
  padding: 0 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-dropdown__toggle:hover {
  color: #1a1a1a;
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.6rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  min-width: 140px;
  z-index: 100;
  flex-direction: column;
}

.nav-dropdown__menu--open {
  display: flex;
}

.nav-dropdown__menu a {
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #555;
  padding: 0.7rem 1rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-dropdown__menu a:hover {
  background: #f8f8f8;
  color: #1a1a1a;
}

/* ===== Homepage hero ===== */
.hero-home {
  display: flex;
  justify-content: center;
  padding: 8vh 3vw 6vh;
}

.hero-passepartout {
  background: #f8f8f8;
  padding: 1.2rem;
  display: inline-flex;
}

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

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .site-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    row-gap: 0.6rem;
  }
}

/* ===== Griglia categoria ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 2vh 3vw 6vh;
}

.grid-item {
  position: relative;
  display: block;
  overflow: hidden;
  background: #ffffff;
  aspect-ratio: 4 / 3;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

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

.grid-item__title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.6rem 0.75rem;
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.grid-item:hover .grid-item__title {
  opacity: 1;
}

@media (max-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Pagina foto singola ===== */
.photo-single {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 3vw 6vh;
}

.photo-single__header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 1.5rem;
}

.back-link {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
  transition: color 0.2s ease;
  grid-column: 1;
  justify-self: start;
}

.back-link:hover {
  color: #1a1a1a;
}

.photo-single__title {
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  text-align: center;
  margin-top: 1.2rem;
}

.photo-single__viewer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.photo-single__nav {
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
  font-size: 1.5rem;
  color: #ccc;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.2s ease;
  user-select: none;
  width: 2rem;
  text-align: center;
}

.photo-single__nav:hover {
  color: #1a1a1a;
}

.photo-single__nav--disabled {
  visibility: hidden;
}

.photo-single__image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.photo-single__image img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
}

@media (max-width: 700px) {
  .photo-single__nav {
    font-size: 1.2rem;
    width: 1.5rem;
  }
}

/* ===== Lightbox ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(80, 80, 80, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox--open {
  display: flex;
}

.lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  padding: 1.2rem 1.2rem 0.8rem;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__content img {
  max-width: 85vw;
  max-height: 75vh;
  width: auto;
  height: auto;
  display: block;
}

.lightbox__title {
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #555;
  margin-top: 0.6rem;
  text-align: left;
  width: 100%;
}

.lightbox__close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: #ccc;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease;
}

.lightbox__close:hover {
  color: #fff;
}

.lightbox__nav {
  background: none;
  border: none;
  color: #ccc;
  font-size: 3rem;
  cursor: pointer;
  padding: 0 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.2s ease;
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
}

.lightbox__nav:hover {
  color: #fff;
}

/* ===== Pagina Chi Sono ===== */
.about-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4vh 3vw 8vh;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.about-page__image {
  flex: 0 1 38%;
  min-width: 0;
}

.about-page__image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-page__text {
  flex: 1 1 58%;
  font-family: Optima, "Lucida Grande", sans-serif;
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.5;
  color: #333;
}

.about-page__text p {
  margin: 0;
  white-space: nowrap;
}

.about-page__text p.about-page__closing {
  margin-top: 1.6rem;
  white-space: normal;
}

@media (max-width: 900px) {
  .about-page {
    flex-direction: column;
    gap: 2rem;
  }

  .about-page__image,
  .about-page__text {
    flex: 1 1 100%;
  }

  .about-page__text p {
    white-space: normal;
  }
}

/* ===== Pagina Contatti ===== */
.contact-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 14vh 3vw 14vh;
  text-align: center;
}

.contact-page__lead {
  font-family: Optima, "Lucida Grande", sans-serif;
  font-style: italic;
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 1.2rem;
}

.contact-page__email {
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: #1a1a1a;
  transition: color 0.2s ease;
}

.contact-page__email:hover {
  color: #555;
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 3rem 3vw 2.5rem;
}

.site-footer p {
  font-family: Futura, "Futura PT", "Century Gothic", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #999;
  margin: 0.2rem 0;
}

/* ===== Lightbox: freccette overlay solo su mobile verticale ===== */
@media (max-width: 700px) and (orientation: portrait) {
  .lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    font-size: 1.8rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
  }

  .lightbox__nav--prev {
    left: 0.5rem;
  }

  .lightbox__nav--next {
    right: 0.5rem;
  }
}
