/* STYLE.CSS - F.M. GROUP 
  Versione: Contatti & Navigation + Galleria
*/

:root {
  --yellow: #5ef500;
  --black: #111111;
  --mint: hsl(97, 70%, 60%);
  --gray: #f4f4f4;
  --white: #ffffff;
  --font-heading: "Playfair Display", serif;
  --font-body: "DM Sans", sans-serif;
  --transition: all 0.3s ease;
}

/* 1. RESET & BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background-color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

/* 2. TYPOGRAPHY */
h1,
h2,
h3,
h4,
.serif {
  font-family: var(--font-heading);
  font-weight: 600;
}
h2 {
  line-height: 1;
}

.label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
  margin-bottom: 1rem;
  display: block;
}

/* 3. LAYOUT UTILITIES */
.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-padding {
  padding: 6rem 0;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 4. NAVIGATION & MOBILE MENU */
nav {
  padding: 1rem 0;
  border-bottom: 1px solid #2a2a2a;
  background-color: var(--black);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--white);
}

.nav-content {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.nav-links {
  display: flex;
  gap: 3.5rem;
  align-items: center;
  color: #cccccc;
}

.nav-links a {
  color: #cccccc;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-contact {
  display: flex;
  gap: 1.125rem;
}

.icon-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--white);
}

.icon-link:hover {
  background-color: var(--yellow);
  color: var(--black);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1000;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--white);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.contact-link:hover {
  background-color: var(--yellow);
}

/* 5. GALLERY */
.gallery {
  padding-bottom: 6rem;
}

.gallery-header {
  padding: 4rem 2rem 3rem;
  text-align: center;
}

.gallery-header h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  color: var(--black);
}

.gallery-header p {
  color: #555;
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.gallery-columns {
  column-count: 3;
  column-gap: 1rem;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.gallery-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* 6. LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.75rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  font-size: 2.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.lightbox-prev {
  left: 1.25rem;
}
.lightbox-next {
  right: 1.25rem;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* 7. FOOTER */
footer {
  background-color: var(--black);
  color: #888;
  padding: 4rem 0 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links h4 {
  color: var(--white);
  margin-bottom: 1.25rem;
  font-family: var(--font-body);
}

.footer-links ul li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: var(--yellow);
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 2rem;
  text-align: center;
}

/* 8. RESPONSIVE BREAKPOINTS */

/* Mobile Navigation (< 991px) */
@media (max-width: 991px) {
  .menu-toggle {
    display: flex;
  }

  .nav-content {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(17, 17, 17, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem;
    gap: 2rem;
    border-bottom: 1px solid #2a2a2a;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
  }

  .nav-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    font-size: 1.2rem;
  }

  .nav-contact {
    justify-content: center;
    width: 100%;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Gallery: 2 colonne su tablet */
  .gallery-columns {
    column-count: 2;
  }

  .lightbox-prev {
    left: 0.5rem;
  }
  .lightbox-next {
    right: 0.5rem;
  }
}

/* Tablet (>= 768px) */
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

/* Mobile (< 600px) */
@media (max-width: 600px) {
  /* Gallery: 1 colonna su mobile */
  .gallery-columns {
    column-count: 1;
  }
}
