/* Reset e base */
* {
  margin: 0; padding: 0; box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, #f9f7f1, #d9cab3);
  color: #0077b6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Tema scuro */
body.dark-theme {
  background: linear-gradient(135deg, #1a1a1a, #3a3a3a);
  color: #0077b6;
}

/* Container generico */
.container {
  width: min(90%, 1200px);
  margin: 0 auto;
}

/* Navbar */
.header {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgb(0 0 0 / 0.15);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: background-color 0.3s ease;
}

body.dark-theme .header {
  background: rgba(30, 30, 30, 0.95);
  box-shadow: 0 4px 15px rgb(255 255 255 / 0.15);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.logo-nav {
  color: #0077b6;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}

body.dark-theme .logo {
  color: #0077b6;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.8rem;
}

.nav-links a {
  text-decoration: none;
  color: #0077b6;
  font-weight: 600;
  position: relative;
  transition: color 0.3s ease;
}

body.dark-theme .nav-links a {
  color: #0077b6;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  height: 2px;
  width: 0%;
  background: #0077b6;
  transition: width 0.3s ease;
}

body.dark-theme .nav-links a::after {
  background: #0077b6;
}

.nav-links a:hover,
.nav-links a:focus {
  color: #0077b6;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

/* Bottone toggle tema */
#toggle-theme {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #654321;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

body.dark-theme #toggle-theme {
  color: #0077b6;
}

/* HERO */
.hero {
  background-image: url('immagini/taranto.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 3rem 1rem 4rem;
}

/* Su schermi piccoli, aumenta altezza per far sembrare l'hero più "lunga" */
@media (max-width: 600px) {
  .hero {
    min-height: 600px; /* aumenta altezza minima */
    padding-top: 4rem;
    padding-bottom: 6rem;
    background-position: center center; /* per mantenere centrata */
  }
}

@media (max-width: 600px) {
  .logo-circle {
    width: 150px;        /* larghezza più piccola */
    height: auto;        /* altezza proporzionata automaticamente */
    margin: 0 auto;      /* centra orizzontalmente */
    display: block;
  }

  .logo-circle img {
    width: 100%;         /* l'immagine riempie la larghezza del contenitore */
    height: auto;        /* mantiene proporzioni */
    display: block;      /* elimina spazi bianchi sotto l'immagine */
  }
}



.features ul li i {
  color: #0077b6;
}

.hero-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Titolo Hero */
.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #0077b6;
  text-align: center;
  font-family: 'Playfair Display', serif;
  margin-top: 0;
}

/* MAIN CONTENT */
.main-content {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 1rem;
}

/* INTRO TEXT - testo centrato */
.intro-text {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #333;
}

.intro-text h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #222;
}

/* GALLERY */
.gallery-section h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  text-align: center;
  margin-bottom: 1.5rem;
}

.gallery {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery img {
  width: 280px;
  height: 180px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* FEATURES - cosa ti aspetta */
.features {
  margin-top: 3rem;
  text-align: center;
}

.features h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 1.5rem;
}

/* Lista con quadrati/box centrati */
.features ul {
  max-width: 400px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.features li {
  flex: 1 1 45%;
  background-color: #f9f6f1;
  padding: 1.2rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #555;
  justify-content: flex-start;
}

.features i {
  color: #b88b4a;
  font-size: 1.4rem;
}

/* FOOTER */
footer {
  background-color: #222;
  color: #ccc;
  padding: 2rem 1rem;
  font-size: 0.95rem;
}

footer .container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

footer p {
  margin-bottom: 0.5rem;
}

footer a {
  color: #ccc;
  margin-left: 0.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #b88b4a;
}

/* LIGHTBOX MODAL */
.lightbox {
  position: fixed;
  display: none;
  z-index: 2000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(255,255,255,0.6);
  user-select: none;
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.prev-next {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1.5rem;
  transform: translateY(-50%);
}

.prev, .next {
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

.prev:hover, .next:hover {
  color: #b88b4a;
}

/* Responsive */
@media (max-width: 700px) {
  .features li {
    flex: 1 1 100%;
  }

  .gallery img {
    width: 100%;
    height: auto;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .logo-circle {
    width: 120px;
    height: 120px;
  }
}

/* Lightbox: container per frecce */
.lightbox:hover .prev,
.lightbox:hover .next {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}

/* Frecce nascoste inizialmente */
.prev, .next {
  position: absolute;
  top: 50%;
  font-size: 2.8rem;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  user-select: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.8);
}

.prev {
  left: 20px;
}

.next {
  right: 20px;
}

.prev:hover,
.next:hover {
  background-color: rgba(255, 255, 255, 0.8);
  color: #000;
}

.language-selector {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.language-selector span {
  margin-bottom: 0.3rem;
}

.language-selector a img {
  margin-right: 5px;
  border-radius: 3px;
  transition: transform 0.2s;
}

.language-selector a img:hover {
  transform: scale(1.1);
}

.language-dropdown {
  position: relative;
}

.language-dropdown button {
  color: #0077b6;
  background: none;
  border: none;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.language-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border: 1px solid #0077b6;
  border-radius: 0.5rem;
  padding: 0.5rem;
  list-style: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 100;
}

.language-menu li {
  padding: 0.3rem 0.6rem;
}

.language-menu li a {
  text-decoration: none;
  color: #0077b6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-menu li a:hover {
  background-color: white;
  border-radius: 0.3rem;
}

/* Stile di default del menu a tendina */
.language-menu {
  background-color: white;
  color: black;
  border: 1px solid #ccc;
  padding: 10px;
  list-style: none;
  position: absolute;
  z-index: 1000;
}

/* Tema scuro */
body.dark-theme .language-menu {
  background-color: #0077b6;
  color: #0077b6;
  border-color: #0077b6;
}

/* Cambia colore anche ai link nel menu */
body.dark-theme .language-menu a {
  color: #0077b6;
}

/* Aggiungi effetto al passaggio */
body.dark-theme .language-menu a:hover {
  background-color: #0077b6;
}

.features ul li {
  color: black !important;
}

/* Tema chiaro di default */
body {
  background-color: white;
  color: black;
}

/* Tema scuro */
body.dark-theme {
  background-color: #0077b6;
  color: #0077b6;
}

body.dark-theme .navbar,
body.dark-theme footer {
  background-color: #1e1e1e;
}

body.dark-theme a {
  color: #0077b6;
}

#toggle-theme {
  color: #0077b6;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.features li {
  flex: 1 1 45%;
  background-color: #f9f6f1;
  padding: 1.2rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #555;
  justify-content: flex-start;
}

.features i {
  color: #b88b4a;
  font-size: 1.4rem;
}

/* FOOTER */
footer {
  background-color: #222;
  color: #ccc;
  padding: 2rem 1rem;
  font-size: 0.95rem;
}

footer .container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

footer p {
  margin-bottom: 0.5rem;
}

footer a {
  color: #ccc;
  margin-left: 0.5rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #b88b4a;
}

/* LIGHTBOX MODAL */
.lightbox {
  position: fixed;
  display: none;
  z-index: 2000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(255,255,255,0.6);
  user-select: none;
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.prev-next {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 1.5rem;
  transform: translateY(-50%);
}

.prev, .next {
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease;
}

.prev:hover, .next:hover {
  color: #b88b4a;
}

/* Responsive */
@media (max-width: 700px) {
  .features li {
    flex: 1 1 100%;
  }

  .gallery img {
    width: 100%;
    height: auto;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .logo-circle {
    width: 120px;
    height: 120px;
  }
}



/* Lightbox: container per frecce */
.lightbox:hover .prev,
.lightbox:hover .next {
  opacity: 1;
  transform: translateY(-50%) scale(1);
  pointer-events: auto;
}

/* Frecce nascoste inizialmente */
.prev, .next {
  position: absolute;
  top: 50%;
  font-size: 2.8rem;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 0.5rem 1rem;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  user-select: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.8);
}

.prev {
  left: 20px;
}

.next {
  right: 20px;
}

.prev:hover,
.next:hover {
  background-color: rgba(255, 255, 255, 0.8);
  color: #000;
}

.language-selector {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.language-selector span {
  margin-bottom: 0.3rem;
}

.language-selector a img {
  margin-right: 5px;
  border-radius: 3px;
  transition: transform 0.2s;
}

.language-selector a img:hover {
  transform: scale(1.1);
}

.language-dropdown {
  position: relative;
}

.language-dropdown button {
	color: #0077b6;
  background: none;
  border: none;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.language-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border: 1px solid #0077b6;
  border-radius: 0.5rem;
  padding: 0.5rem;
  list-style: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 100;
}

.language-menu li {
  padding: 0.3rem 0.6rem;
}

.language-menu li a {
  text-decoration: none;
  color: #0077b6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.language-menu li a:hover {
  background-color: white;
  border-radius: 0.3rem;
}

/* Stile di default del menu a tendina */
.language-menu {
  background-color: white;
  color: black;
  border: 1px solid #0077b6;
  padding: 10px;
  list-style: none;
  position: absolute;
  z-index: 1000;
}

/* Tema scuro */
body.dark-theme .language-menu {
  background-color: #0077b6;
  color: #0077b6;
  border-color: #0077b6;
}

/* Cambia colore anche ai link nel menu */
body.dark-theme .language-menu a {
  color: #0077b6;
}

/* Aggiungi effetto al passaggio */
body.dark-theme .language-menu a:hover {
  background-color: #0077b6;
}

body.dark-theme #language-toggle {
  color: #0077b6; /* marroncino chiaro */
}

body.dark-theme #language-toggle i {
  color: #0077b6;
}
/* Tema chiaro: colore di default */
body {
  background-color: #0077b6;
  color: #0077b6;
}

/* Tema scuro attivo */
body.dark-theme {
  background-color: #0077b6;
  color: #0077b6;
}

body.dark-theme .navbar,
body.dark-theme footer {
  background-color: #1e1e1e;
}

body.dark-theme a {
  color: #0077b6;
}

#toggle-theme {
  color: white;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Tema chiaro di default */
body {
  background-color: white;
  color: black;
}

/* Tema scuro */
body.dark-theme {
  background-color: #0077b6;
  color: #0077b6;
}


/* Bottone toggle tema */
#toggle-theme {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #0077b6;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

body.dark-theme #toggle-theme {
  color: #0077b6;
}

.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: #0077b6;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Cambia anche i titoli, paragrafi, link, e testi dei menu */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme p,
body.dark-theme li,
body.dark-theme a,
body.dark-theme .language-dropdown button {
  color: #0077b6;
}

body {
  transition: background-color 0.3s, color 0.3s;
}

/* Stile di default del menu a tendina */
.language-menu {
  background-color: white;
  color: black;
  border: 1px solid #ccc;
  padding: 10px;
  list-style: none;
  position: absolute;
  z-index: 1000;
}

/* Tema scuro */
body.dark-theme .language-menu {
  background-color: #0077b6;
  color: #0077b6;
  border-color: #0077b6;
}

/* Cambia colore anche ai link nel menu */
body.dark-theme .language-menu a {
  color: #0077b6;
}

/* Aggiungi effetto al passaggio */
body.dark-theme .language-menu a:hover {
  background-color: #0077b6;
}

.features ul li {
  color: black !important;
}

/* Hamburger base */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #654321;
  border-radius: 3px;
  transition: all 0.3s ease;
}

body.dark-theme .hamburger span {
  background: #e4cfa1;
}

/* Hamburger animato quando attivo */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Menu mobile a tendina */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgb(181 131 90 / 0.4);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  list-style: none;
  z-index: 1000;
  min-width: 180px;
  font-weight: 600;
}

body.dark-theme .mobile-menu {
  background: rgba(30, 30, 30, 0.95);
  box-shadow: 0 8px 20px rgb(181 131 90 / 0.25);
}

.mobile-menu li {
  margin-bottom: 1rem;
}

.mobile-menu li:last-child {
  margin-bottom: 0;
}

.mobile-menu li a {
  color: #654321;
  text-decoration: none;
  font-size: 1.1rem;
  display: block;
  transition: color 0.3s ease;
}

body.dark-theme .mobile-menu li a {
  color: #e4cfa1;
}

.mobile-menu li a:hover,
.mobile-menu li a:focus {
  color: #b5835a;
}

/* Mostra hamburger su schermi piccoli */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

/* Mostra menu mobile quando attivo */
.mobile-menu.show {
  display: block;
}

/* Mostra hamburger su mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    display: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }

  body.dark-theme .nav-links {
    background-color: #1e1e1e;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 0.5rem 0;
  }
}

/* Linee dell'hamburger */
.hamburger span {
  width: 100%;
  height: 3px;
  background: #654321;
  transition: all 0.3s ease;
}

body.dark-theme .hamburger span {
  background: #e4cfa1;
}
body.dark-theme #hamburger {
  color: #cfa45d; /* oro scuro / goldenrod */
  /* oppure usa un marroncino chiaro tipo #a67c00 o #cfa45d */
}

/* Nascondi nav-links su mobile */
.nav-links {
  display: none;
  flex-direction: column;
  gap: 1rem;
}

/* Hamburger attivo */
.hamburger.active i {
  color: #007bff; /* colore icona attiva */
}

/* Quando hamburger attivo, mostra nav */
.nav-links.active {
  display: flex;
  position: absolute;
  top: 60px; /* sotto navbar */
  right: 0;
  background: white;
  width: 200px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
}

/* Media query desktop: nav sempre visibile e hamburger nascosto */
@media (min-width: 768px) {
  .nav-links {
    display: flex !important;
    position: static;
    flex-direction: row;
    gap: 2rem;
    box-shadow: none;
    background: transparent;
    width: auto;
    padding: 0;
  }
  .hamburger {
    display: none;
  }
}
