/* ========================= */
/* Variabili Globali         */
/* ========================= */
:root {
  --color-background: #0f0f0f; /* Nero profondo per contrasto premium */
  --color-text: #f0f0f0; /* Bianco sporco per leggibilità */
  --color-highlight: #daa520; /* Oro classico */
  --color-gold-gradient: linear-gradient(135deg, #b8860b 0%, #daa520 50%, #ffd700 100%); /* Gradiente Oro */
  --color-glass-bg: rgba(255, 255, 255, 0.05); /* Sfondo vetro */
  --color-glass-border: rgba(255, 255, 255, 0.1); /* Bordo vetro */
  --color-shadow: rgba(0, 0, 0, 0.7);
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Montserrat', sans-serif;
  --navbar-height: 90px; /* Altezza stimata Navbar Desktop */
}

/* ========================= */
/* Stile Generale            */
/* ========================= */
body {
  font-family: var(--font-body);
  text-align: center;
  padding-top: var(--navbar-height); /* Spingi giù il contenuto */
  margin: 0;
  background-color: var(--color-background);
  background-image: radial-gradient(circle at top, #2a2a2a 0%, #0f0f0f 100%); /* Sfondo con profondità */
  color: var(--color-text);
  line-height: 1.8;
  overflow-x: hidden; /* Previene scroll orizzontale accidentale */
}

/* ========================= */
/* Navbar                    */
/* ========================= */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 40px; /* Increased padding */
  background: rgba(30, 30, 30, 0.95); /* Lighter and more opaque for contrast */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 2px solid var(--color-highlight); /* Thicker Gold Border */
  z-index: 100; /* High z-index */
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5); /* Stronger shadow */
  transition: all 0.3s ease;
}

#main-nav.scrolled {
  padding: 10px 30px;
  background: rgba(15, 15, 15, 0.95);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-brand {
    font-family: var(--font-heading);
    color: var(--color-highlight);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: #ffffff; /* Pure white for max contrast */
    text-decoration: none;
    font-weight: 600; /* Bolder */
    font-size: 1.1rem; /* Larger */
    transition: color 0.3s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px;
    border-radius: 5px;
}

.nav-links a:hover {
    color: var(--color-highlight);
    text-shadow: 0 0 10px rgba(218, 165, 32, 0.4);
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-text);
    cursor: pointer;
}

/* Mobile Nav Styles */
@media (max-width: 768px) {
  :root {
      --navbar-height: 70px; /* Altezza stimata Navbar Mobile */
  }
    #main-nav {
        padding: 15px 20px;
    }
    
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: var(--navbar-height); /* Below navbar */
        left: 0;
        width: 100%;
        background: rgba(15, 15, 15, 0.98);
        flex-direction: column;
        padding: 20px 0;
        gap: 20px;
        border-bottom: 1px solid var(--color-highlight);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 99;
    }

    .nav-links.active {
        transform: translateY(0);
    }
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--color-highlight);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 25px;
  font-weight: 700;
}

h3 {
  color: #e0e0e0;
  font-weight: 400;
  font-style: italic;
  font-size: 1.2rem;
}

strong {
  color: #fff;
  font-weight: 600;
}

em {
  color: var(--color-highlight);
}

/* ========================= */
/* Glassmorphism Utilities   */
/* ========================= */
.glass-panel {
  background: var(--color-glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-glass-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  padding: 30px;
  margin: 20px auto;
}

/* ========================= */
/* Header & Hero             */
/* ========================= */
header {
    width: 100%;
    margin-bottom: 30px;
    position: relative;
    z-index: 10;
    height: 70vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}



.header-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

@media (max-width: 768px) {
    header {
        height: 90vh;
        min-height: 350px;
    }
    
    .header-logo {
        border-radius: 0;
    }
}

.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-highlight);
    font-size: 2.5rem;
    animation: bounce 2s infinite;
    z-index: 15;
    cursor: pointer;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-15px);
  }
  60% {
    transform: translateX(-50%) translateY(-7px);
  }
}

/* ========================= */
/* Intro Text                */
/* ========================= */
.intro-text {
  max-width: 800px;
  font-size: 1.1rem;
  /* Glass Effect */
  background: var(--color-glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--color-glass-border);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  
  position: relative;
  z-index: 20; /* Fixed overlap: Higher than header to sit on top */
  margin: -50px auto 40px; /* Overlap effect */
  padding: 40px;
}

@media (max-width: 768px) {
  .intro-text {
    margin: 20px auto;
    width: 90%;
    padding: 20px;
  }
}

/* ========================= */
/* Counter Section           */
/* ========================= */
.counter-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 40px;
  /* Glassmorphism */
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(5px);
  border-radius: 20px;
  border: 1px solid rgba(218, 165, 32, 0.1); /* Bordo dorato sottile */
}

.counter-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  align-items: center;
  gap: 30px;
}

.counter-item {
  flex: 1 1 150px;
}

.counter {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  background: var(--color-gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: 5px;
}

.unique-party h2 {
    font-size: 2.5rem;
    line-height: 1.2;
    background: var(--color-gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    border-bottom: 2px solid var(--color-highlight);
    display: inline-block;
    padding-bottom: 10px;
}

/* ========================= */
/* Buttons Grid (Schools)    */
/* ========================= */
.form-buttons-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 50px auto;
  padding: 0 20px;
}

.form-buttons-grid button {
  flex: 1 1 350px;
  max-width: 450px;
  background: rgba(30, 30, 30, 0.8);
  border: 1px solid rgba(218, 165, 32, 0.3);
  border-radius: 20px;
  padding: 30px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.form-buttons-grid button::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(45deg, transparent, rgba(218, 165, 32, 0.1), transparent);
  transform: translateX(-100%);
  transition: 0.5s;
}

.form-buttons-grid button:hover::before {
  transform: translateX(100%);
}

.form-buttons-grid button:hover {
  transform: translateY(-10px);
  border-color: var(--color-highlight);
  box-shadow: 0 20px 40px rgba(218, 165, 32, 0.2);
}

.form-buttons-grid button h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--color-text); /* Override red */
}

.form-buttons-grid button img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #333;
}

/* ========================= */
/* Forms                     */
/* ========================= */
.form-container {
  max-width: 600px;
  width: 90%;
  margin: 40px auto;
  /* Glass Style */
  background: var(--color-glass-bg);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.5);
  display: none; /* Hidden by default */
  animation: slideUp 0.6s ease-out;
}

.form-container.active {
    display: block;
}

input, select {
  width: 100%;
  padding: 15px;
  margin: 10px 0 25px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #444;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: 0.3s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--color-highlight);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 15px rgba(218, 165, 32, 0.2);
}

button[type="submit"] {
  background: var(--color-gold-gradient);
  color: #000;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 18px 40px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 5px 20px rgba(218, 165, 32, 0.4);
  width: 100%;
  margin-top: 10px;
}

button[type="submit"]:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(218, 165, 32, 0.6);
}

/* Checkbox Customization */
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-highlight);
  margin-right: 10px;
  vertical-align: middle;
}

label {
  display: block;
  text-align: left;
  margin-bottom: 5px;
  color: #ccc;
  font-size: 0.95rem;
}

/* ========================= */
/* Gallery                   */
/* ========================= */
.gallery-section {
    background: transparent;
    padding: 60px 20px;
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.album-card {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.album-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-highlight);
}

/* ========================= */
/* Hero Section with Overlay */
/* ========================= */
.hero {
    width: 100%;
    height: 70vh;
    min-height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 40px 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-overlay {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 900;
    color: #ffffff !important;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    padding: 0;
    text-shadow: 
        0 0 20px rgba(218, 165, 32, 0.8),
        0 0 40px rgba(218, 165, 32, 0.6),
        0 0 60px rgba(218, 165, 32, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: glow 2s ease-in-out infinite alternate;
    line-height: 1.1;
    font-family: var(--font-heading);
    position: relative;
    z-index: 11;
}

.hero-subtitle {
    font-size: clamp(1.8rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #daa520 !important;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 20px 0 0 0;
    padding: 0;
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 0.6),
        0 0 30px rgba(255, 255, 255, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.8);
    animation: pulse 3s ease-in-out infinite;
    line-height: 1.1;
    font-family: var(--font-heading);
    position: relative;
    z-index: 11;
}

@keyframes glow {
    from {
        text-shadow: 
            0 0 20px rgba(218, 165, 32, 0.8),
            0 0 40px rgba(218, 165, 32, 0.6),
            0 0 60px rgba(218, 165, 32, 0.4),
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
    to {
        text-shadow: 
            0 0 30px rgba(218, 165, 32, 1),
            0 0 50px rgba(218, 165, 32, 0.8),
            0 0 70px rgba(218, 165, 32, 0.6),
            2px 2px 4px rgba(0, 0, 0, 0.8);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 90vh;
        min-height: 350px;
        margin: 20px 0;
    }
    
    .hero-overlay {
        padding: 20px 15px;
    }
    
    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
        letter-spacing: 0.05em;
    }
    
    .hero-subtitle {
        font-size: clamp(1.5rem, 8vw, 2.5rem);
        letter-spacing: 0.04em;
        margin-top: 15px;
    }
}

.album-cover {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.album-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 20px;
    text-align: left;
}

/* ========================= */
/* Modals & Lightbox         */
/* ========================= */
.gallery-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(5px);
}

.gallery-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.gallery-modal-content {
    background: #1a1a1a;
    border: 1px solid var(--color-highlight);
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(218, 165, 32, 0.2);
}

.gallery-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 2rem;
    color: var(--color-highlight);
    cursor: pointer;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-grid img {
    width: 100%;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

.lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border: 2px solid var(--color-highlight);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(218, 165, 32, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
    color: var(--color-highlight);
    cursor: pointer;
    padding: 20px;
    user-select: none;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
    position: absolute;
    bottom: 20px; left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 1.2rem;
}

/* ========================= */
/* Footer                    */
/* ========================= */
footer {
    background: #0a0a0a;
    padding: 50px 20px;
    border-top: 1px solid #333;
    margin-top: 80px;
}

footer p {
    color: #888;
    font-size: 0.9rem;
}

footer a {
    color: var(--color-highlight);
    text-decoration: none;
    transition: 0.3s;
}

footer a:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--color-highlight);
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 15px;
    color: #555;
}

.social-links a:hover {
    color: var(--color-highlight);
    transform: scale(1.2);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .unique-party h2 { font-size: 1.8rem; }
    .counter { font-size: 2.5rem; }
    
    .form-buttons-grid button {
        padding: 20px;
    }

    .form-container {
        padding: 25px;
        width: 95%;
    }
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================= */
/* Expandable Sections       */
/* ========================= */
.expandable-section {
    padding: 60px 20px;
    background: transparent;
}

.expandable-section .container {
    max-width: 900px;
    margin: 0 auto;
}

.accordion-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.accordion-wrapper:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 12px 40px rgba(218, 165, 32, 0.2);
}

.accordion-header {
    width: 100%;
    padding: 30px 40px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.accordion-header:hover {
    background: rgba(212, 175, 55, 0.1);
}

.accordion-header h2 {
    color: var(--color-highlight);
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.accordion-icon {
    font-size: 2.5rem;
    color: var(--color-highlight);
    font-weight: 300;
    transition: transform 0.3s ease;
    line-height: 1;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease, visibility 0.5s;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

.accordion-content > div {
    overflow: hidden;
    min-height: 0; /* Critical for grid collapse */
}

.accordion-header[aria-expanded="true"] + .accordion-content {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
}

.accordion-items, .faq-list {
    padding: 30px 40px 40px; /* Added top padding */
}

/* What Awaits Items */
.accordion-items .info-item {
    margin-bottom: 25px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--color-highlight);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.accordion-items .info-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.accordion-items .info-item h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-highlight);
    margin-bottom: 12px;
    font-family: var(--font-body);
}

.accordion-items .info-item p {
    color: #e0e0e0;
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
}

/* FAQ Items */
.faq-item {
    margin-bottom: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--color-highlight);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-question {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-highlight);
    margin-bottom: 15px;
    font-family: var(--font-body);
}

.faq-answer {
    color: #e0e0e0;
    line-height: 1.8;
    opacity: 0.95;
    font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .expandable-section {
        padding: 40px 10px;
    }

    .accordion-header {
        padding: 20px;
    }
    
    .accordion-header h2 {
        font-size: 1.5rem;
    }

    .accordion-icon {
        font-size: 2rem;
    }
    
    .accordion-items, .faq-list {
        padding: 0 20px 20px;
    }

    .accordion-items .info-item,
    .faq-item {
        padding: 20px;
        margin-bottom: 20px;
    }

    .accordion-items .info-item h3,
    .faq-question {
        font-size: 1.1rem;
    }

    .accordion-items .info-item p,
    .faq-answer {
        font-size: 0.95rem;
    }
}

