/* ==========================================================================
   BREVE STORIA DELLA SCRITTURA â€” Custom Stylesheet (Vanilla CSS3)
   ========================================================================== */

/* --- Design System & CSS Variables --- */
:root {
  --bg-primary: #000000;
  --bg-secondary: #080808;
  --bg-tertiary: #121212;
  
  /* Gold Color Scheme */
  --gold-bright: #ffea7a;
  --gold-theme: #d4af37;
  --gold-dim: #c5a880;
  --gold-dark: #8c6f23;
  --gold-visited: #bd9a3c; /* Giallo oro antico per hyperlink visitati (differente da --gold-theme) */
  --gold-glow: rgba(212, 175, 55, 0.35);
  --gold-glow-strong: rgba(212, 175, 55, 0.6);
  
  /* Text Colors */
  --text-light: #f9f6f0;
  --text-gray: #a6a29a;
  --text-dim: #6d6a64;
  
  /* Responsive Circle Radius */
  --radius: 230px;
  
  /* Borders and Glass */
  --glass-bg: rgba(12, 12, 12, 0.85);
  --glass-border: rgba(212, 175, 55, 0.15);
  --glass-border-hover: rgba(212, 175, 55, 0.4);
}

/* --- Base Reset & Typography --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-light);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  scroll-behavior: smooth;
  min-height: 100vh;
  width: 100%;
}

/* --- Inline Text Hyperlinks (Paragraphs, lists, and content) --- */
p a, li a, .subpage-content a, .project-intro-text a, .mappa-container a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

p a:visited, li a:visited, .subpage-content a:visited, .project-intro-text a:visited, .mappa-container a:visited {
  color: var(--gold-visited) !important; /* Forziamo l'override di eventuali stili inline o di base */
}

p a:hover, li a:hover, .subpage-content a:hover, .project-intro-text a:hover, .mappa-container a:hover {
  color: #ffffff !important;
  text-shadow: 0 0 10px var(--gold-glow);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-theme);
}

/* Helper Class for hiding elements */
.hidden {
  display: none !important;
}

/* ==========================================================================
   GLOBAL AUDIO CONTROL BUTTON
   ========================================================================== */
.audio-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 0.5rem 1rem;
  color: var(--text-gray);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
}

/* Shift audio button to the left when main menu is active to avoid overlap with "APPROFONDIMENTI" */
body.menu-active .audio-btn {
  top: 2rem;
  right: calc(2rem + 185px);
}

/* ==========================================================================
   GLOBAL CORNER NAVIGATION FRAME
   ========================================================================== */
.corner-nav-btn {
  position: absolute;
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: var(--text-gray);
  padding: 0.6rem 1.2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.corner-nav-btn:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
  background: rgba(255, 234, 122, 0.03);
}

.corner-nav-group.top-left, .corner-nav-btn.top-left {
  top: 2rem;
  left: 2rem;
}

.corner-nav-btn.top-right {
  top: 2rem;
  right: 2rem;
}

.corner-nav-group.bottom-left, .corner-nav-btn.bottom-left {
  bottom: 2rem;
  left: 2rem;
}

.corner-nav-group.bottom-right, .corner-nav-btn.bottom-right {
  bottom: 2rem;
  right: 2rem;
}


.audio-btn:hover {
  border-color: var(--glass-border-hover);
  color: var(--gold-bright);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
}

.audio-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-btn .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.audio-btn:active .icon {
  transform: scale(0.85);
}

/* ==========================================================================
   1. INTRO SCROLLYTELLING SECTION
   ========================================================================== */
.intro-scroll-container {
  position: relative;
  width: 100%;
  height: 450vh; /* Extremely scrollable to drive the scrollytelling progress */
  background-color: var(--bg-primary);
  z-index: 100;
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s;
}

.sticky-viewport {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Delicate background light during scrollytelling */
.intro-background-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 60vh;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.03) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 1;
}

.scroll-sentences {
  position: relative;
  width: 80%;
  max-width: 850px;
  height: 200px;
  display: grid;
  place-items: center;
  grid-template-areas: "overlap";
  z-index: 2;
}

.sentence {
  grid-area: overlap;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1.6;
  color: var(--text-light);
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 1s cubic-bezier(0.25, 1, 0.5, 1);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Interactive States Managed by Scroll Progress JS */
.sentence.active {
  opacity: 1;
  transform: translateY(0px);
}

.sentence.past {
  opacity: 0;
  transform: translateY(-30px);
}

/* Scroll indicator widget */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 2;
  transition: opacity 0.5s ease;
}

.mouse-icon {
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--text-dim);
  border-radius: 20px;
  position: relative;
  display: flex;
  justify-content: center;
}

.mouse-icon .wheel {
  width: 3px;
  height: 8px;
  background: var(--gold-theme);
  border-radius: 2px;
  margin-top: 8px;
  animation: scroll-wheel 1.6s infinite ease-in-out;
}

@keyframes scroll-wheel {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateY(6px);
    opacity: 0.3;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.scroll-text {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-gray);
  animation: text-pulse 2s infinite ease-in-out;
}

@keyframes text-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ==========================================================================
   2. CIRCULAR MAIN MENU SECTION ("The Clock Hub")
   ========================================================================== */
.menu-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  background-color: var(--bg-secondary);
  overflow: hidden;
  padding: 5rem 2rem 3rem 2rem;
  z-index: 90;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-section.visible {
  opacity: 1;
}

/* Aurora visual background ambient glow */
.menu-background-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.aurora-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
}

.glow-1 {
  top: -10%;
  left: 15%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, var(--gold-theme) 0%, rgba(0, 0, 0, 0) 70%);
}

.glow-2 {
  bottom: -15%;
  right: 10%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--gold-dark) 0%, rgba(0, 0, 0, 0) 70%);
}

/* Hub Header */
.hub-header {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
}

.hub-main-title {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 2.2rem;
    letter-spacing: 0.05em;
    color: var(--text-light);
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
}

.hub-subtitle {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Clock Geometry Wrapper */
.clock-hub-wrapper {
  position: relative;
  width: 580px;
  height: 580px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Decorative Rings */
.clock-circle-deco {
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.inner-ring {
  width: calc(var(--radius) * 2);
  height: calc(var(--radius) * 2);
  border: 1px solid rgba(212, 175, 55, 0.12);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.outer-ring {
  width: calc(var(--radius) * 2 + 50px);
  height: calc(var(--radius) * 2 + 50px);
  border: 1px dashed rgba(212, 175, 55, 0.06);
  animation: clock-spin 120s linear infinite;
}

.dots-ring {
  width: calc(var(--radius) * 2 - 40px);
  height: calc(var(--radius) * 2 - 40px);
  border: 1.5px dotted rgba(212, 175, 55, 0.08);
  animation: clock-spin-reverse 90s linear infinite;
}

@keyframes clock-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes clock-spin-reverse {
  from { transform: translate(-50%, -50%) rotate(360deg); }
  to { transform: translate(-50%, -50%) rotate(0deg); }
}

/* Clock Wheel node container */
.clock-wheel {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* Interactive Node Styling (Trigonometry position) */
.clock-node {
  position: absolute;
  left: 50%;
  top: 50%;
  /* Trigonometric distribution: Moves from center using rotation, offset by --radius, then counters rotation to keep text vertical */
  transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle)));
  
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-dim);
  background: var(--bg-tertiary);
  color: var(--text-light);
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
  
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              border-color 0.3s ease,
              background-color 0.3s ease,
              box-shadow 0.3s ease;
}
}

.node-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-num {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.visited-indicator {
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  color: var(--gold-bright);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.check-icon {
  width: 100%;
  height: 100%;
}

/* Hover State */
.clock-node:hover {
  transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle))) scale(1.22);
  border-color: var(--gold-bright);
  background-color: var(--bg-primary);
  box-shadow: 0 0 25px var(--gold-glow-strong), inset 0 0 8px rgba(255, 234, 122, 0.3);
}

/* Visited progress state */
.clock-node.visited {
  border-color: var(--gold-dark);
  background-color: rgba(20, 18, 14, 0.9);
  opacity: 0.75;
}

.clock-node.visited:hover {
  opacity: 1;
  border-color: var(--gold-bright);
}

.clock-node.visited .node-num {
  opacity: 0.35;
  transform: scale(0.85);
}

.clock-node.visited .visited-indicator {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Tooltip floating label on hover */
.node-tooltip {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}

.clock-node:hover .node-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   CENTRAL INFORMATION PREVIEW PANEL
   ========================================================================== */
.center-preview {
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 
              inset 0 0 25px rgba(212, 175, 55, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  overflow: hidden;
}

.clock-hub-wrapper:hover .center-preview {
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 
              inset 0 0 35px rgba(212, 175, 55, 0.08);
}

.center-content-wrapper {
  width: 86%;
  height: 86%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Default state layout */
.center-default-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: opacity 0.4s ease;
}

.center-icon {
  color: var(--gold-dim);
  width: 44px;
  height: 44px;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}

.compass-icon {
  width: 100%;
  height: 100%;
  animation: compass-breathe 8s ease-in-out infinite;
}

@keyframes compass-breathe {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.05) rotate(45deg); opacity: 1; }
}

.center-main-title {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}

.center-main-desc {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-gray);
  margin-bottom: 0.75rem;
}

.progress-status {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold-theme);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

/* Active Hovered state layout */
.center-active-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  animation: active-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes active-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.center-date-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(255, 234, 122, 0.3);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.center-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.center-desc {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-gray);
  margin-bottom: 0.75rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.center-play-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-bright);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: play-pulse 2s infinite ease-in-out;
}

.play-arrow {
  font-size: 0.7rem;
}

@keyframes play-pulse {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); text-shadow: 0 0 10px rgba(255, 234, 122, 0.5); }
}

/* Hub bottom progress bar bar */
.hub-progress-bar-container {
    width: 100%;
    max-width: 500px;
    text-align: center;
    z-index: 10;
    margin-bottom: 1.5rem;
    margin-top: 0px;
}

.progress-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.5rem;
}

.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-theme) 50%, var(--gold-bright) 100%);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.menu-footer {
  font-size: 0.72rem;
  font-weight: 300;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 0.05em;
  margin-top: 1rem;
  z-index: 10;
}

/* ==========================================================================
   3. FULL-SCREEN VIDEO PLAYER OVERLAY
   ========================================================================== */
.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-primary);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.6s;
}

.video-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(18, 18, 18, 0.1) 0%, rgba(0, 0, 0, 0.95) 90%);
  pointer-events: none;
}

/* Close button overlay styling */
.close-video-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1100;
  background: rgba(10, 10, 10, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.close-video-btn .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.4s ease;
}

.close-video-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--glass-border-hover);
  color: var(--gold-bright);
}

.close-video-btn:hover .icon {
  transform: rotate(90deg);
}

/* Responsive Video Container */
.video-wrapper {
  position: relative;
  width: 90%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  overflow: hidden;
  z-index: 1010;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Fallback Interactive Simulation Card --- */
.video-fallback-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #090909 0%, #121212 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1020;
}

.fallback-glow {
  position: absolute;
  width: 130%;
  height: 130%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, rgba(0, 0, 0, 0) 65%);
  animation: glow-pulse 10s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes glow-pulse {
  from { opacity: 0.6; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.1); }
}

.fallback-content {
  width: 85%;
  max-width: 550px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.fallback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 0.75rem;
}

.fallback-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(255, 234, 122, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fallback-file-info {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-family: monospace;
}

.fallback-title {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

/* Oscilloscope screen mock visualizer */
.fallback-player-screen {
  position: relative;
  width: 100%;
  height: 180px;
  background: #040404;
  border: 1.5px solid rgba(212, 175, 55, 0.15);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.radial-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.025) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center;
  pointer-events: none;
}

.oscillator-lines {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wave-svg {
  width: 100%;
  height: 100%;
}

.wave-path {
  animation: wave-motion 4s linear infinite;
  transform-origin: center;
}

.wave-path-1 {
  stroke-dasharray: 400;
  animation: wave-dash 5s linear infinite;
}

.wave-path-2 {
  opacity: 0.5;
  animation: wave-motion-rev 6s linear infinite;
}

@keyframes wave-motion {
  0% { transform: scaleY(0.7) rotate(0deg); }
  50% { transform: scaleY(1.3) rotate(0.5deg); }
  100% { transform: scaleY(0.7) rotate(0deg); }
}

@keyframes wave-motion-rev {
  0% { transform: scaleY(1.2) rotate(0deg); }
  50% { transform: scaleY(0.6) rotate(-0.5deg); }
  100% { transform: scaleY(1.2) rotate(0deg); }
}

@keyframes wave-dash {
  0% { stroke-dashoffset: 800; }
  100% { stroke-dashoffset: 0; }
}

.playback-timer {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--text-gray);
  letter-spacing: 0.05em;
}

.playback-status-pulse {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold-theme);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.playback-status-pulse::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold-bright);
  animation: dot-blink 1.2s infinite ease-in-out;
}

@keyframes dot-blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.fallback-text {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}

.fallback-actions {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.fallback-btn {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gold-theme);
  border: 1px solid var(--gold-theme);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  box-shadow: 0 0 15px rgba(255, 234, 122, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-gray);
}

.btn-secondary:hover {
  border-color: var(--glass-border-hover);
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.03);
}

.btn-icon {
  font-size: 0.9rem;
}

/* Floating Timeline under video wrapper */
.video-timeline-container {
  width: 90%;
  max-width: 960px;
  margin-top: 1rem;
  z-index: 1010;
}

.video-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.video-progress-fill {
  height: 100%;
  background: var(--gold-theme);
  border-radius: 10px;
  width: 0%;
  transition: width 0.1s linear;
}

/* ==========================================================================
   RESPONSIVENESS AND TABLET/MOBILE ADAPTATIONS
   ========================================================================== */

/* --- Tablet Mode (max-width: 768px) --- */
@media (max-width: 768px) {
  :root {
    --radius: 180px; /* Squeeze circle for tablets */
  }
  
  body.menu-active .audio-btn {
    top: 1.2rem;
    right: calc(1.2rem + 155px);
  }

  .corner-nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
  }

  .corner-nav-group.top-left, .corner-nav-btn.top-left {
    top: 1.2rem;
    left: 1.2rem;
  }

  .corner-nav-btn.top-right {
    top: 1.2rem;
    right: 1.2rem;
  }

  .corner-nav-group.bottom-left, .corner-nav-btn.bottom-left {
    bottom: 1.2rem;
    left: 1.2rem;
  }

  .corner-nav-group.bottom-right, .corner-nav-btn.bottom-right {
    bottom: 1.2rem;
    right: 1.2rem;
  }
  
  .hub-main-title {
    font-size: 1.8rem;
  }
  
  .clock-hub-wrapper {
    width: 480px;
    height: 480px;
  }
  
  .clock-node {
    width: 48px;
    height: 48px;
    font-size: 0.9rem;
  }
  
  .center-preview {
    width: 250px;
    height: 250px;
  }
  
  .center-title {
    font-size: 1.15rem;
  }
  
  .center-desc {
    font-size: 0.72rem;
    -webkit-line-clamp: 3;
  }
  
  .sentence {
    font-size: 1.4rem;
  }
}

/* --- Mobile Mode (max-width: 520px) --- */
@media (max-width: 520px) {
  :root {
    --radius: 120px; /* Small radius for mobile viewports */
  }
  
  body.menu-active .audio-btn {
    top: 0.8rem;
    right: calc(0.8rem + 115px);
  }

  .corner-nav-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.65rem;
    border-width: 1px;
  }

  .corner-nav-group.top-left, .corner-nav-btn.top-left {
    top: 0.8rem;
    left: 0.8rem;
  }

  .corner-nav-btn.top-right {
    top: 0.8rem;
    right: 0.8rem;
  }

  .corner-nav-group.bottom-left, .corner-nav-btn.bottom-left {
    bottom: 0.8rem;
    left: 0.8rem;
  }

  .corner-nav-group.bottom-right, .corner-nav-btn.bottom-right {
    bottom: 0.8rem;
    right: 0.8rem;
  }

  .audio-btn {
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.8rem;
  }
  
  .audio-label {
    display: none; /* Hide label text on mobile, just show speaker button */
  }
  
  .hub-header {
    margin-bottom: 1rem;
  }
  
  .hub-main-title {
    font-size: 1.45rem;
  }
  
  .hub-subtitle {
    font-size: 0.75rem;
  }
  
  .clock-hub-wrapper {
    width: 330px;
    height: 330px;
    margin: 1.5rem auto;
  }
  
  .clock-node {
    width: 38px;
    height: 38px;
    font-size: 0.78rem;
  }
  
  .clock-node:hover {
    /* Scale down hover scale factor to avoid overlaps */
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle))) scale(1.12);
  }
  
  .node-tooltip {
    display: none !important; /* Tooltips behave poorly on mobile tap */
  }
  
  .center-preview {
    width: 175px;
    height: 175px;
    border-width: 0.5px;
  }
  
  .center-icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0.4rem;
  }
  
  .center-main-title {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }
  
  .center-main-desc {
    font-size: 0.65rem;
    line-height: 1.3;
    margin-bottom: 0.4rem;
  }
  
  .progress-status {
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
  }
  
  .center-date-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    margin-bottom: 0.3rem;
  }
  
  .center-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
  }
  
  .center-desc {
    font-size: 0.6rem;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    line-height: 1.35;
    margin-bottom: 0.3rem;
  }
  
  .center-play-button {
    font-size: 0.6rem;
  }
  
  .sentence {
    font-size: 1.15rem;
    line-height: 1.5;
  }
  
  .fallback-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
  }
  
  .fallback-player-screen {
    height: 120px;
    margin-bottom: 1rem;
  }
  
  .fallback-text {
    font-size: 0.7rem;
    margin-bottom: 1rem;
  }
  
  .fallback-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .fallback-btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   GLOBAL SUBPAGE HEADER BAR
   ========================================================================== */
.subpage-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 65px;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3rem;
  z-index: 999;
}


.header-nav-left {
  display: flex;
  align-items: center;
}

.header-nav-back {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-theme);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
}

.header-nav-back:hover {
  color: var(--gold-bright);
  text-shadow: 0 0 10px var(--gold-glow);
}

.header-nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-gray);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-nav-link:hover {
  color: var(--gold-bright);
}

.header-nav-sep {
  color: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  user-select: none;
  pointer-events: none;
}

@media (max-width: 768px) {
  .subpage-header {
    padding: 0 1.5rem;
    height: 55px;
  }
  .header-nav-right {
    gap: 0.75rem;
  }
  .header-nav-link, .header-nav-back {
    font-size: 0.68rem;
  }
}

/* ==========================================================================
   NAVIGATION DROPDOWN STYLING
   ========================================================================== */
.navbar-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(189, 154, 60, 0.3);
  border-radius: 6px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  padding: 0.5rem 0;
}

.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background-color: rgba(15, 15, 15, 0.95);
  border-left: 1px solid rgba(189, 154, 60, 0.3);
  border-top: 1px solid rgba(189, 154, 60, 0.3);
}

.menu-map-btn,
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  height: 40px;
  box-sizing: border-box;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  gap: 0.25rem;
  
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-gray);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-dropdown-toggle:hover {
  color: var(--gold-bright);
}

.dropdown-item {
  color: #a0a0a0;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
  text-align: center;
}

.dropdown-item:hover {
  color: #ffffff;
  background-color: rgba(189, 154, 60, 0.15);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(5px);
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.active .dropdown-arrow {
  transform: rotate(180deg);
}

.dropdown-arrow {
  margin-left: 6px;
  display: block;
}

@media (max-width: 768px) {
  .nav-dropdown-toggle {
    font-size: 0.68rem;
  }
}

/* ==========================================================================
   DOCUMENT SUBPAGES STYLING
   ========================================================================== */
.subpage-body {
  background-color: var(--bg-primary);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 3rem 2rem;
  overflow-y: auto;
  position: relative;
}

.subpage-container {
  width: 90%;
  max-width: 750px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 8px;
  padding: 3.5rem 3rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  position: relative;
  z-index: 10;
}

.subpage-title {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-align: center;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  padding-bottom: 1rem;
  text-transform: uppercase;
}

.subpage-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-gray);
  margin-bottom: 2.5rem;
}

.subpage-content p {
  margin-bottom: 1.25rem;
}

.subpage-content h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold-theme);
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.subpage-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--gold-theme);
  border: 1px solid var(--gold-theme);
  color: var(--bg-primary);
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.subpage-back-btn:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  color: var(--bg-primary);
  box-shadow: 0 0 15px rgba(255, 234, 122, 0.3);
}

.subpage-back-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.subpage-back-btn:hover svg {
  transform: translateX(-3px);
}

@media (max-width: 520px) {
  .subpage-container {
    padding: 2rem 1.5rem;
  }
  .subpage-title {
    font-size: 1.6rem;
  }
  .subpage-content {
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   THE AUTHORS SLIDER (HORIZONTAL PHOTO GALLERY)
   ========================================================================== */
.gallery-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 700px;
  margin: 2.5rem auto 1.5rem auto;
}

.gallery-viewport {
  overflow: hidden;
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: rgba(5, 5, 5, 0.4);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}

.gallery-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  width: 100%;
}

.gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.slide-image-container {
  height: 55vh;
  width: 100%;
  max-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.slide-image {
  height: 100%;
  width: 100%;
  object-fit: contain; /* CRITICAL: Handles vertical & horizontal photos without distortion */
  pointer-events: none;
}

.slide-caption {
  margin-top: 1.5rem;
  text-align: center;
}

.author-name {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.author-role {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--gold-theme);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Slider Controls */
.gallery-nav-btn {
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--text-gray);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: absolute;
  top: calc(50% - 40px); /* Center relative to image container */
  z-index: 50;
  transform: translateY(-50%);
}

.gallery-nav-btn svg {
  width: 24px;
  height: 24px;
}

.gallery-nav-btn:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 15px var(--gold-glow);
  background: rgba(15, 15, 15, 0.95);
}

.gallery-nav-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.gallery-nav-btn.prev-btn {
  left: -70px;
}

.gallery-nav-btn.next-btn {
  right: -70px;
}

/* Responsive adjustments for slider navigation */
@media (max-width: 900px) {
  .gallery-wrapper {
    max-width: 90%;
  }
  .gallery-nav-btn.prev-btn {
    left: -55px;
  }
  .gallery-nav-btn.next-btn {
    right: -55px;
  }
}

@media (max-width: 768px) {
  .gallery-nav-btn {
    width: 42px;
    height: 42px;
    top: auto;
    bottom: 0.5rem;
    transform: none;
  }
  .gallery-nav-btn:active {
    transform: scale(0.92);
  }
  .gallery-nav-btn.prev-btn {
    left: calc(50% - 60px);
  }
  .gallery-nav-btn.next-btn {
    right: calc(50% - 60px);
  }
  .gallery-slide {
    padding: 1.5rem 1rem 4.5rem 1rem; /* Extra bottom padding for buttons on mobile */
  }
  .slide-image-container {
    height: 45vh;
  }
  .author-name {
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   HORIZONTAL SCROLL TIMELINE (APPROFONDIMENTI)
   ========================================================================== */
.timeline-container {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  width: 100vw;
  height: 100vh;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-primary);
  /* Hide scrollbar */
  scrollbar-width: none;
}

.timeline-container::-webkit-scrollbar {
  display: none;
}

.timeline-section {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 85px 4rem 100px 4rem; /* Accounts for header (65px) and bottom tracker (85px) */
  position: relative;
  overflow: hidden;
}

/* Subtle individual grid backgrounds for each card section to give a sense of movement */
.timeline-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 80% 30%, rgba(212, 175, 55, 0.03) 0%, rgba(0, 0, 0, 0) 60%);
  pointer-events: none;
  z-index: 1;
}

.card-wrapper {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  width: 100%;
  max-width: 1050px;
  height: 100%;
  max-height: 520px;
  align-items: center;
  z-index: 5;
}

.card-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.card-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(255, 234, 122, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-title {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.card-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--gold-theme);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  display: block;
}

.card-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-gray);
  margin-bottom: 1.75rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  padding: 0.65rem 1.4rem;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-link:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 15px var(--gold-glow);
  background: rgba(255, 234, 122, 0.02);
}

.card-link-scenette {
  margin-top: 0.75rem;
  border-color: rgba(212, 175, 55, 0.25);
  color: var(--gold-theme);
}

.card-link-scenette:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 15px rgba(255, 234, 122, 0.25);
  background: rgba(212, 175, 55, 0.04);
}

.card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.card-link:hover svg {
  transform: translateX(3px);
}

.card-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-frame {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  border: 1.5px solid var(--glass-border);
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.media-placeholder-graphic {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.05) 0%, rgba(0,0,0,0) 80%);
}

.graphic-svg {
  width: 60%;
  height: 60%;
  color: var(--text-gray);
  opacity: 0.85;
}

/* ==========================================================================
   BOTTOM TIMELINE ACCORDION (BOTTOM NAV)
   ========================================================================== */
.bottom-timeline-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 85px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.bottom-timeline-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 88%;
  max-width: 950px;
  height: 100%;
}

.bottom-timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-50%);
  z-index: 1;
}

.bottom-timeline-progress {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gold-theme);
  transform: translateY(-50%);
  z-index: 2;
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--gold-theme);
}

.timeline-node {
  position: relative;
  z-index: 5;
  background: var(--bg-secondary);
  border: 2px solid rgba(255, 255, 255, 0.15);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-node:hover {
  border-color: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-glow);
  transform: scale(1.15);
}

.timeline-node.active {
  border-color: var(--gold-theme);
  background: var(--gold-theme);
  box-shadow: 0 0 15px var(--gold-theme);
  transform: scale(1.3);
}

.timeline-node-label {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  white-space: nowrap;
  transition: all 0.3s ease;
}

.timeline-node.active .timeline-node-label {
  color: var(--gold-bright);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 234, 122, 0.2);
}

/* Responsive adjustments for timeline container */
@media (max-width: 900px) {
  .timeline-section {
    padding: 85px 2rem 100px 2rem;
  }
  .card-wrapper {
    gap: 2rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    max-height: 70vh;
    overflow-y: auto;
  }
  .card-media {
    order: -1; /* Display media on top for smaller heights */
    height: 180px;
  }
  .media-frame {
    aspect-ratio: auto;
    height: 100%;
  }
  .card-title {
    font-size: 1.6rem;
  }
  .card-desc {
    font-size: 0.8rem;
    line-height: 1.5;
  }
  .bottom-timeline-nav {
    height: 70px;
  }
  .timeline-node-label {
    display: none; /* Hide text labels on tablets/mobiles, rely on node selection */
  }
}

/* ==========================================================================
   PROJECT DOCUMENTS GRID & FULLSCREEN VIEWER (IL PROGETTO)
   ========================================================================== */
.project-intro-text {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
  color: var(--text-gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

.project-docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 2rem;
  width: 100%;
}

.doc-card {
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.doc-card:hover {
  border-color: var(--gold-bright);
  transform: translateY(-5px);
  box-shadow: 0 15px 30px var(--gold-glow);
}

.doc-thumbnail {
  height: 170px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #060606 0%, #121212 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
  color: var(--gold-dim);
  transition: color 0.3s ease;
}

.doc-card:hover .doc-thumbnail {
  color: var(--gold-bright);
}

.doc-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.15));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.doc-card:hover .doc-icon {
  transform: scale(1.08);
}

.doc-badge {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-gray);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.4);
}

.doc-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.doc-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.doc-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-gray);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Fullscreen PDF Viewer Overlay */
.pdf-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.5s;
}

.pdf-overlay.visible {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.pdf-overlay-header {
  height: 65px;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: #080808;
  z-index: 2010;
}

.close-pdf-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-gray);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.close-pdf-btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s ease;
}

.close-pdf-btn:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-glow);
  background: rgba(255, 234, 122, 0.02);
}

.close-pdf-btn:hover svg {
  transform: translateX(-3px);
}

.pdf-overlay-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pdf-viewer-container {
  flex-grow: 1;
  width: 100%;
  height: calc(100% - 65px);
  background: #000000;
  overflow: hidden;
}

.pdf-viewer-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000000;
}

}

/* ==========================================================================
   INTERACTIVE 3D FLIPBOOK COMPONENT
   ========================================================================== */
.toggle-mode-btn {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid var(--glass-border);
  color: var(--gold-theme);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.toggle-mode-btn:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 12px var(--gold-glow);
  background: rgba(255, 234, 122, 0.05);
}

.flipbook-container {
  display: none; /* Controlled via JS toggle */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100% - 65px);
  background-color: #080808;
  position: relative;
  overflow: hidden;
}

.flipbook-container.visible-flex {
  display: flex !important;
}

.book-viewport {
  perspective: 1500px;
  -webkit-perspective: 1500px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100% - 75px);
}

.book {
  position: relative;
  width: 290px;
  height: 400px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform: rotateX(8deg);
  margin-left: 145px; /* Spine centering offset */
  transition: transform 0.5s ease;
}

.page {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: left center;
  -webkit-transform-origin: left center;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.25, 1, 0.5, 1);
}

.page-front, .page-back {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #101010;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
}

.page-front {
  border-radius: 0 5px 5px 0;
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.page-back {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
  border-radius: 5px 0 0 5px;
  box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.5);
  z-index: 1;
  border-right: 1.5px solid rgba(212, 175, 55, 0.15); /* Stylized golden spine shadow */
}

.page-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.75rem 1.25rem;
  box-sizing: border-box;
}

.page-img-frame {
  width: 100%;
  height: 72%;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-fallback-graphic {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #121212 0%, #1e1d1a 100%);
  color: var(--gold-theme);
  text-align: center;
}

.page-fallback-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 0.5rem;
  opacity: 0.85;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.2));
}

.page-text-placeholder {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--text-gray);
  text-align: center;
  height: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-number {
  font-family: monospace;
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: center;
}

.flipbook-controls {
  position: absolute;
  bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 100;
}

.flip-control-btn {
  background: rgba(10, 10, 10, 0.7);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  padding: 0.5rem 1.1rem;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.flip-control-btn:hover {
  border-color: var(--gold-bright);
  color: var(--gold-bright);
  box-shadow: 0 0 10px var(--gold-glow);
}

.flip-control-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  border-color: var(--glass-border);
}

.flip-page-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-theme);
  letter-spacing: 0.05em;
  min-width: 95px;
  text-align: center;
}

/* Responsive adjustments for Flipbook */
@media (max-width: 768px) {
  .book {
    width: 200px;
    height: 290px;
    margin-left: 100px;
  }
  .page-content {
    padding: 1rem 0.75rem;
  }
  .page-fallback-icon {
    width: 32px;
    height: 32px;
  }
  .page-text-placeholder {
    font-size: 0.62rem;
  }
  .flipbook-controls {
    bottom: 1rem;
    gap: 0.75rem;
  }
  .flip-control-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.65rem;
  }
  .flip-page-num {
    font-size: 0.68rem;
    min-width: 75px;
  }
}

/* ==========================================================================
   DIRECTOR PROFILE PAGE (ms.html)
   ========================================================================== */
.director-body {
  background-color: #000000 !important;
  color: #ffffff !important;
  overflow-x: hidden;
}

.director-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 3rem 4rem 3rem;
  box-sizing: border-box;
  background-color: #000000;
}

.director-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.director-bg-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  transition: transform 0.1s ease-out;
}

/* Section 1 - Hook */
.director-hook-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 2;
  position: relative;
}

.director-huge-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-transform: uppercase;
}

.director-huge-text .highlight {
  color: var(--gold-theme);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.director-huge-text .muted {
  color: var(--text-gray);
  font-weight: 300;
}

/* Section 2 - Background */
.director-split-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
  z-index: 2;
  position: relative;
}

.director-bio-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  font-weight: 500;
  line-height: 1.45;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.director-bio-text p {
  margin-bottom: 2rem;
}

.director-bio-text p:last-child {
  margin-bottom: 0;
}

.director-bio-text strong {
  font-weight: 700;
  color: var(--gold-theme);
}

.director-portrait-container {
  width: 100%;
  height: 75vh;
  max-height: 680px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #080808;
  position: relative;
  border-radius: 4px;
}

.director-portrait-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(120%);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.director-portrait-container:hover img {
  filter: grayscale(0%) contrast(105%);
  transform: scale(1.03);
}

/* Section 3 - Vision */
.director-vision-container {
  width: 100%;
  max-width: 950px;
  margin: 0 auto;
  text-align: center;
  z-index: 2;
  position: relative;
  padding: 0 1.5rem;
}

.director-quote-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.4rem, 3.8vw, 2.6rem);
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.director-quote-author {
  margin-top: 2rem;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--gold-theme);
  text-transform: uppercase;
}

/* Section 4 - Contact Hub */
.director-contact-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 2;
  position: relative;
  display: flex;
  flex-direction: column;
}

.contact-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold-theme);
  margin-bottom: 2.5rem;
}

.contact-links-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-link-item {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.8rem, 5.5vw, 4rem);
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  line-height: 1.1;
  letter-spacing: -0.02em;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
  width: fit-content;
}

.contact-link-item:hover {
  color: var(--gold-bright);
  transform: translateX(18px);
  text-shadow: 0 0 35px rgba(212, 175, 55, 0.25);
}

/* Scroll-driven Reveal System */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.15s;
}

.delay-2 {
  transition-delay: 0.3s;
}

.delay-3 {
  transition-delay: 0.45s;
}

/* Responsive adjustments for Director Subpage */
@media (max-width: 992px) {
  .director-split-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
  .director-portrait-container {
    height: 60vh;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .director-section {
    padding: 5.5rem 1.5rem 3.5rem 1.5rem;
  }
  .director-huge-text {
    line-height: 1.15;
  }
  .contact-link-item:hover {
    transform: translateX(8px);
  }
}

/* Layout globale coerente con il tema scuro */
body {
  background-color: #0a0a0a !important;
  color: #f9f6f0 !important;
  font-family: 'Inter', sans-serif !important;
  margin: 0;
  padding: 0;
  display: block !important; /* Disattiva eventuali display flex sul body */
}

/* Centratura dei container principali dopo la rimozione del flex sul body */
main.subpage-container, main, .subpage-container {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Header Glassmorphism */
header.subpage-header {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  z-index: 100;
  box-sizing: border-box;
}

.header-nav-left .header-nav-back {
  color: #d4af37;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.header-nav-left .header-nav-back:hover {
  color: #ffffff;
}

/* Navigazione Destra (Menu Categorie) */
.header-nav-right {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.header-nav-link, .nav-dropdown-toggle {
  background: transparent;
  border: none;
  color: #a6a29a;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  transition: color 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.header-nav-link:hover, .nav-dropdown-toggle:hover {
  color: #d4af37;
}

.header-nav-sep {
  color: rgba(212, 175, 55, 0.3);
  font-size: 0.8rem;
  user-select: none;
}

/* Dropdown Menu Glassmorphism Scuro/Oro */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 18, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  padding: 0.5rem 0;
  min-width: 160px;
  z-index: 110;
  box-shadow: 0 10px 30px rgba(0,0,0,0.85);
  backdrop-filter: blur(10px);
}

.nav-dropdown.active .nav-dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 1.2rem;
  color: #f9f6f0;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-item:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
}
.nav-dropdown.active .dropdown-arrow { transform: rotate(180deg); }

/* Mobile Compaction for Header Nav */
@media (max-width: 768px) {
  .header-nav-right {
    display: flex !important;
    gap: 0.4rem !important;
    align-items: center !important;
  }
  .header-nav-sep {
    display: none !important;
  }
  .header-nav-link[data-letter] {
    font-size: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    background: rgba(255, 255, 255, 0.02) !important;
    transition: all 0.3s ease !important;
  }
  .header-nav-link[data-letter]::before {
    content: attr(data-letter) !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    font-family: 'Cinzel', serif !important;
    color: rgba(249, 246, 240, 0.6) !important;
    display: inline-block !important;
  }
  .header-nav-link[data-letter].active,
  .header-nav-link[data-letter]:hover {
    border-color: var(--gold-theme, #bd9a3c) !important;
    background: rgba(212, 175, 55, 0.08) !important;
  }
  .header-nav-link[data-letter].active::before,
  .header-nav-link[data-letter]:hover::before {
    color: var(--gold-bright, #d4af37) !important;
  }
  .header-nav-link:not([data-letter]) {
    font-size: 0.72rem !important;
    padding: 0.2rem 0.35rem !important;
    color: rgba(249, 246, 240, 0.7) !important;
    display: inline-block !important;
  }
}

.subpage-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%) !important;
  pointer-events: auto !important;
}

