﻿/* --- CONFIGURAZIONE ROOT --- */
:root {
  --main-bg: #cfa946;         /* Oro per il menu principale */
  --sub-bg: #1a1a1a;          /* Nero per i sottomenu */
  --text-main: #000000;       /* Testo nero su fondo oro */
  --text-sub: #ffffff;        /* Testo bianco su fondo nero */
  --transition: all 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
}

/* --- RESET & BODY LOCK --- */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body:has(#menu-toggle:checked) {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}

/* --- NAVBAR --- */
.navbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background-color: var(--main-bg);
  padding: 15px 25px;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 75px;
}

.menu-checkbox, .sub-checkbox { display: none !important; }

/* --- ICONA HAMBURGER --- */
.hamburger-icon {
  width: 30px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 10001;
}

/* Lineette dell'hamburger (Nere per contrasto su Navbar Oro) */
.hamburger-icon span {
  height: 3px;
  width: 100%;
  background-color: #000; 
  border-radius: 3px;
  transition: var(--transition);
}

#menu-toggle:checked ~ .hamburger-icon span {
  background-color: #000; /* Restano nere anche all'apertura */
}

#menu-toggle:checked ~ .hamburger-icon span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
#menu-toggle:checked ~ .hamburger-icon span:nth-child(2) { opacity: 0; }
#menu-toggle:checked ~ .hamburger-icon span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* --- OVERLAY MENU (SFONDO ORO) --- */
.nav-overlay {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%; 
  max-width: 550px;
  height: 100vh;
  background-color: var(--main-bg); /* TUTTO IL MENU ORO */
  padding: 100px 0 60px 0;
  transition: var(--transition);
  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  z-index: 10000;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

#menu-toggle:checked ~ .nav-overlay {
  right: 0;
}

/* --- LISTA LINK PRINCIPALI --- */
.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links > li {
  border-bottom: 1px solid rgba(0,0,0,0.05); /* Linea sottile scura su oro */
}

.nav-links a, .menu-item {
  color: var(--text-main) !important; /* TESTO NERO */
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 400;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  
}

/* --- SOTTOMENU (SFONDO NERO) --- */
.submenu {
  max-height: 0;
  overflow: hidden;
  list-style: none;
  background-color: var(--sub-bg); /* SFONDO NERO PER I SUBMENU */
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

.sub-checkbox:checked ~ .submenu {
  max-height: 2000px;
}

.submenu li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.submenu li a {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-sub) !important; /* TESTO BIANCO SU NERO */
  text-transform: none;
  padding: 12px 45px;
  display: block;
}

/* --- FRECCETTA --- */
.arrow {
  font-size: 1.2rem;
  transition: transform 0.3s;
  display: inline-block;
  color: #000;
}

.sub-checkbox:checked ~ .menu-item .arrow {
  transform: rotate(180deg);
}

@media (max-width: 480px) {
  .nav-overlay { width: 100%; max-width: 100%; }
}