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

body, html {
  height: 100%;
  font-family: 'Arial', sans-serif;
  display: flex;
  flex-direction: column;
  background-color: #fffaf5;
}

/* HEADER */
header {
  background-color: #a67c52;
  color: white;
  padding: 0.5rem 1rem;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.header-left, .header-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.header-left {
  justify-content: flex-start;
}

.header-right {
  justify-content: flex-end;
}

.logo {
  max-height: 60px;
  width: auto;
  max-width: 132px;
  object-fit: contain;
  display: block;
}

/* MENU TOGGLE */
.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

/* NAVIGATION – fisarmonica */
#main-nav {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #8e6844;
  position: absolute;
  top: 70px;
  left: 0;
  width: 100%;
  z-index: 99;
}

#main-nav.open {
  max-height: 500px;
}

#main-nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 1rem;
  text-align: center;
  transition: background-color 0.2s;
}

#main-nav a:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
}
.cookie-banner {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #fff5e0;
  color: #333;
  border-top: 1px solid #ccc;
  padding: 1rem;
  display: none;
  justify-content: space-between;
  align-items: center;
  z-index: 9999;
  font-size: 14px;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
  flex-wrap: wrap;
  gap: 1rem;
}

.cookie-banner a {
  color: #a67c52;
  text-decoration: underline;
  margin-left: 5px;
}

.cookie-banner button {
  background-color: #a67c52;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}


/* IFRAME AREA */
main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  margin-top: 80px;
  margin-bottom: 80px;
  padding: 0 1rem;
}

iframe#content-frame {
  width: 100%;
  max-width: 1000px;
  height: calc(100vh - 160px);
  border: none;
  display: block;
  margin: 0 auto;
  box-sizing: border-box;
}

/* CENTRATURA + SPAZIATURA TESTI */
.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* FOOTER */
footer {
  background-color: #222;
  padding: 0.5rem 1rem;
  text-align: center;
  position: fixed;
  bottom: 0;
  width: 100%;
  line-height: 1.2;
  transition: transform 0.3s ease-in-out;
}

.footer-credit {
  font-size: 0.8rem;
  color: #bbb;
  margin: 0.2rem 0;
}

.footer-credit a {
  color: #f6d55c;
  text-decoration: none;
}

.footer-credit a:hover {
  text-decoration: underline;
}

.framed {
  border: 1px solid #444;
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* MOBILE SUPPORT */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  #main-nav {
    align-items: center;
  }
}

/* 🧲 Aggiunta: visualizzazione desktop del menu */
@media (min-width: 769px) {
  #main-nav {
    max-height: none;
    position: static;
    flex-direction: row;
    background-color: transparent;
    width: auto;
  }
  #main-nav a {
    color: white;
    padding: 0 1rem;
    text-align: center;
  }
  .header-right .menu-toggle {
    display: none;
  }
}

/* 👑 Aggiunta: centra testo in pagina iframe */
iframe#content-frame {
  text-align: center;
}
