/* ========================================
   CSS VARIABLES - DESIGN SYSTEM
   Sistema centralizzato di variabili per colori, spaziature e transizioni
   ======================================== */
:root {
  /* Colors */
  --color-background: rgba(135, 87, 128, 0.05);
  --color-primary: #6f0f1f;
  --color-text-primary: #333333;
  --color-text-secondary: #FFFFFF;
  --color-border: #D1C7BD;
  --color-map-unvisited: #595959;
  
  /* Spacing system */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 80px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ========================================
   RESET AND BASE STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Lora", serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-background);
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h2,
p {
  font-family: "Lora", serif;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

p {
  font-size: 1.1rem;
  color: var(--color-text-primary);
  line-height: 1.6;
  margin-bottom: var(--spacing-sm);
}

.great-vibes-regular {
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-style: normal;
  font-size: 3.5rem;
  color: var(--color-primary);
  text-align: center;
  line-height: 1.2;
}

.hashtag {
  font-size: 1.2rem;
  color: var(--color-primary);
  text-align: center;
  font-style: italic;
}

/* ========================================
   LAYOUT AND COMMON COMPONENTS
   ======================================== */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-xxl) var(--spacing-md);
}

/* Images */
img {
  max-width: 100%;
  width: 100%;
  height: auto;
  filter: grayscale(100%);
  object-fit: cover;
}

.section-image {
  text-align: center;
  margin-top: var(--spacing-xl);
}

.section-image img {
  border-radius: 4px;
}

/* ========================================
   HERO SECTION
   Sezione principale con background e player audio
   ======================================== */
.hero-section {
  height: 100vh;
  background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('images/optimized/hero-background.webp');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero-content {
  background: rgba(243, 237, 243,0.9);
  padding: var(--spacing-xl);
  border: 2px solid var(--color-primary);
  max-width: 600px;
  margin: 0 var(--spacing-md);
}

.hero-quote p {
  font-size: 1.5rem;
  font-style: italic;
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
}

/* Audio Player */
.audio-player {
  margin-top: var(--spacing-md);
}

.audio-btn {
  background: var(--color-primary);
  color: var(--color-text-secondary);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.audio-btn:hover {
  background: #5a2539;
  transform: scale(1.05);
}

.audio-btn:focus,
.audio-btn:active {
  outline: none;
  box-shadow: none;
}

/* Audio Button Icons */
.audio-btn .play-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 12px solid var(--color-text-secondary);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 4px;
}

.audio-btn .pause-icon {
  display: none;
  position: relative;
  width: 16px;
  height: 16px;
}

.audio-btn .pause-icon::before,
.audio-btn .pause-icon::after {
  content: '';
  position: absolute;
  width: 4px;
  height: 12px;
  background-color: var(--color-text-secondary);
  top: 2px;
}

.audio-btn .pause-icon::before {
  left: 3px;
}

.audio-btn .pause-icon::after {
  right: 3px;
}

.audio-btn.is-playing .play-icon {
  display: none;
}

.audio-btn.is-playing .pause-icon {
  display: inline-block;
}

/* ========================================
   SAVE THE DATE SECTION
   Sezione con informazioni evento e funzionalità calendario
   ======================================== */
.save-date-section {
  background: var(--color-background);
  text-align: center;
}

.save-date-box {
  border: 2px solid var(--color-primary);
  padding: var(--spacing-xl);
  display: inline-block;
  background: var(--color-background);
}

.save-date-label {
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-primary);
}

.save-date-box .great-vibes-regular {
  margin: var(--spacing-md) 0;
}

.date {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.location {
  font-size: 1.2rem;
  color: var(--color-text-primary);
  margin-bottom: 0;
}

/* ========================================
   POLAROID SLIDESHOW SECTION
   Galleria fotografica interattiva con effetto polaroid
   ======================================== */
.polaroid-section {
  text-align: center;
  padding: var(--spacing-xxl) var(--spacing-md) var(--spacing-xl);
}

.polaroid-container {
  max-width: 500px;
  margin: var(--spacing-xxl) auto 0;
  position: relative;
}

.polaroid-stack {
  position: relative;
  width: 320px;
  height: 380px;
  margin: 0 auto var(--spacing-lg);
  perspective: 1000px;
}

.polaroid {
  position: absolute;
  width: 300px;
  height: 360px;
  cursor: pointer;
  transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center bottom;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.1),
    0 2px 4px rgba(0,0,0,0.1);
}

.polaroid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

/* Touch device cursor styles */
@media (pointer: coarse) {
  .polaroid {
    cursor: grab;
  }
  
  .polaroid:active {
    cursor: grabbing;
  }
}

/* Polaroid stack positions */
.polaroid[data-index="0"] {
  z-index: 8;
  transform: rotate(-2deg) translate(-3px, -4px);
}

.polaroid[data-index="1"] {
  z-index: 7;
  transform: rotate(4deg) translate(8px, -2px);
}

.polaroid[data-index="2"] {
  z-index: 6;
  transform: rotate(-3deg) translate(-6px, 2px);
}

.polaroid[data-index="3"] {
  z-index: 5;
  transform: rotate(5deg) translate(7px, 4px);
}

.polaroid[data-index="4"] {
  z-index: 4;
  transform: rotate(-4deg) translate(-5px, 6px);
}

.polaroid[data-index="5"] {
  z-index: 3;
  transform: rotate(6deg) translate(9px, 8px);
}

.polaroid[data-index="6"] {
  z-index: 2;
  transform: rotate(-5deg) translate(-8px, 10px);
}

.polaroid[data-index="7"] {
  z-index: 1;
  transform: rotate(3deg) translate(4px, 12px);
}

/* Polaroid interactions */
.polaroid {
  cursor: pointer;
}

.polaroid[data-index="0"]:hover {
  transform: rotate(-2deg) translate(-3px, -4px) scale(1.02);
  box-shadow: 
    0 8px 16px rgba(0,0,0,0.15),
    0 4px 8px rgba(0,0,0,0.1),
    inset 0 -1px 1px rgba(0,0,0,0.05);
}

/* Peek animation for the second polaroid */
.polaroid[data-index="1"] {
  animation: peekAnimation 4s ease-in-out 2s;
}

@keyframes peekAnimation {
  0%, 100% {
    transform: rotate(4deg) translate(8px, -2px);
  }
  15%, 85% {
    transform: rotate(4deg) translate(12px, -6px) scale(1.01);
  }
  50% {
    transform: rotate(4deg) translate(12px, -6px) scale(1.01);
  }
}


.polaroid-stack.animating {
  pointer-events: none;
}

.polaroid-stack.animating .polaroid {
  cursor: wait !important;
}

.polaroid.moving-up {
  animation: moveUp 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes moveUp {
  from {
    transform: var(--from-transform);
  }
  to {
    transform: var(--to-transform);
  }
}

/* ========================================
   POLAROID NAVIGATION ELEMENTS
   Indicatori dots per la galleria
   ======================================== */

/* Dots indicator */
.polaroid-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: var(--spacing-lg);
  padding: 0 var(--spacing-sm);
}

.polaroid-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(111, 15, 31, 0.3);
  cursor: pointer;
  transition: all var(--transition-medium);
  border: 1px solid transparent;
}

.polaroid-dot:hover {
  background: rgba(111, 15, 31, 0.6);
  transform: scale(1.2);
}

.polaroid-dot.active {
  background: var(--color-primary);
  transform: scale(1.3);
  box-shadow: 0 0 0 2px rgba(111, 15, 31, 0.3);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .polaroid-dots {
    gap: 6px;
    margin-top: var(--spacing-md);
  }
  
  .polaroid-dot {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 480px) {
  .polaroid-dot {
    width: 7px;
    height: 7px;
  }
}


/* ========================================
   THEME SECTION
   Sezione tema del matrimonio
   ======================================== */
.theme-section {
  text-align: center;
}

.theme-section .emphasis {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-primary);
  margin: var(--spacing-lg) 0;
}

/* ========================================
   CEREMONY, RECEPTION, TRAVEL, HONEYMOON AND CLOSING SECTIONS
   Sezioni informative dell'evento con animazione aeroplano
   ======================================== */
.ceremony-section,
.reception-section,
.travel-section,
.honeymoon-section,
.closing-section {
  text-align: center;
}

.details-box {
  background: rgba(230, 168, 192, 0.126);
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  border-radius: 2px;
  border: 2px solid var(--color-primary);

}

.venue-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.venue-location {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-sm);
}

.time {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.maps-btn,
.copy-iban-btn {
  display: inline-flex;
  align-items: center;
  background: var(--color-primary);
  color: var(--color-text-secondary);
  border: none;
  text-decoration: none;
  font-family: "Lora", serif;
  transition: all var(--transition-medium);
  outline: none;
}

.maps-btn {
  gap: 4px;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: var(--spacing-xs);
  opacity: 0.9;
}

.maps-btn:hover {
  background: #5a2539;
  opacity: 1;
  transform: translateY(-1px);
}

.maps-btn:active {
  transform: translateY(0);
}

.maps-icon {
  font-size: 12px;
}

.maps-text {
  font-size: 0.8rem;
}


.map-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: var(--spacing-xl) auto var(--spacing-lg);
  padding-bottom: 50%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border: 2px solid var(--color-border);
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
}



.cta-button {
  background: var(--color-primary);
  color: var(--color-text-secondary);
  border: none;
  padding: 16px 32px;
  font-size: 1.1rem;
  font-family: "Lora", serif;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-medium);
  margin: var(--spacing-lg) 0;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(111, 15, 31, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  background: #5a2539;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(111, 15, 31, 0.4);
}

@keyframes subtle-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(111, 15, 31, 0.3);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(111, 15, 31, 0.4);
  }
}

.cta-button {
  animation: subtle-pulse 3s ease-in-out infinite;
}

.cta-button:hover {
  animation: none;
}

/* ========================================
   INTERACTIVE TRAVEL MAP
   Mappa interattiva con animazione aeroplano e tracciato
   ======================================== */
.interactive-map-container {
  position: relative;
  display: inline-block;
  max-width: 600px;
  width: 100%;
  margin: var(--spacing-lg) auto;
}

.travel-map-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}


/* Stili per evidenziare i paesi del viaggio */
.travel-destination {
  stroke: #6f0f1f !important;
  stroke-width: 2 !important;
  fill-opacity: 0.8 !important;
}

.route-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.route-line {
  stroke: #87ceeb;
  stroke-width: 1;
  stroke-dasharray: 4, 2;
  fill: none;
  opacity: 0.7;
  animation: dashMove 6s linear infinite;
}

@keyframes dashMove {
  0% {
    stroke-dashoffset: 12;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.airplane-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.airplane {
  position: absolute;
  font-size: 1rem;
  transform: translate(-50%, -50%);
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
  opacity: 0;
  will-change: transform, left, top;
}

.airplane.flying {
  opacity: 1;
}

.map-pins {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.map-pin {
  position: absolute;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-medium);
  transform: translate(-50%, -50%);
  z-index: 3;
  filter: drop-shadow(2px 2px 6px rgba(0,0,0,0.4));
  pointer-events: auto;
  border-radius: 50%;
  padding: 4px;
  background: rgba(255, 255, 255, 0.15);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: subtleBounce 3s ease-in-out infinite;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.map-pin:hover {
  transform: translate(-50%, -50%) scale(1.3);
  filter: drop-shadow(2px 2px 10px rgba(111, 15, 31, 0.6));
  animation: none;
}

.map-pin.active {
  transform: translate(-50%, -50%) scale(1.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1.4);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.6);
  }
}

@keyframes subtleBounce {
  0%, 100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-2px);
  }
}

/* City Tooltip */
.city-tooltip {
  position: absolute;
  background: white;
  border: 2px solid var(--color-primary);
  border-radius: 8px;
  padding: var(--spacing-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 10;
  min-width: 200px;
  max-width: 280px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
  transform: translateY(10px);
}

.city-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tooltip-content {
  position: relative;
}

.tooltip-title {
  font-family: "Lora", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--spacing-xs) 0;
  line-height: 1.2;
}

.tooltip-description {
  font-family: "Lora", serif;
  font-size: 1rem;
  color: var(--color-text-primary);
  margin: 0;
  line-height: 1.4;
}

.tooltip-close {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tooltip-close:hover {
  background: #5a2539;
  transform: scale(1.1);
}

/* Mobile Responsive for Interactive Map */
@media (max-width: 768px) {
  .interactive-map-container {
    max-width: 100%;
    margin: var(--spacing-md) auto;
  }

  .map-pin {
    font-size: 1.4rem;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.4));
  }

  .map-pin:hover {
    transform: translate(-50%, -50%) scale(1.2);
  }

  .city-tooltip {
    min-width: 180px;
    max-width: 250px;
    padding: var(--spacing-xs);
    font-size: 0.9rem;
  }

  .tooltip-title {
    font-size: 1.1rem;
  }

  .tooltip-description {
    font-size: 0.9rem;
  }

  .tooltip-close {
    width: 20px;
    height: 20px;
    font-size: 1rem;
  }

  .route-line {
    stroke-width: 1.5;
  }
}

@media (max-width: 480px) {
  .map-pin {
    font-size: 1.6rem;
  }

  .airplane {
    font-size: 1.2rem;
  }

  .city-tooltip {
    min-width: 160px;
    max-width: 220px;
  }

  .tooltip-title {
    font-size: 1rem;
  }

  .tooltip-description {
    font-size: 0.85rem;
  }
}


.closing-image {
  margin-bottom: var(--spacing-lg);
}

.closing-image img {
  max-width: 500px;
  width: 100%;
  border-radius: 8px;
}

.signature {
  margin-top: var(--spacing-lg);
}

.with-love {
  font-size: 1.2rem;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.signature .names {
  font-size: 2.5rem;
  margin-bottom: 0;
}

/* ========================================
   SCROLL TO TOP BUTTON
   Pulsante di ritorno all'inizio pagina
   ======================================== */
.scroll-to-top {
  position: fixed;
  bottom: var(--spacing-lg);
  left: var(--spacing-lg);
  background: var(--color-primary);
  color: var(--color-text-secondary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem;
  transition: all var(--transition-medium);
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.scroll-to-top:hover {
  background: #7a1124;
  transform: scale(1.1);
}

.scroll-to-top:focus,
.scroll-to-top:active {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

.scroll-to-top.show {
  display: flex;
}

/* ========================================
   SCROLL TO NEXT SECTION BUTTON
   Pulsante di scorrimento alla sezione successiva
   ======================================== */
.scroll-to-next {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  background: var(--color-primary);
  color: var(--color-text-secondary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.5rem;
  transition: all var(--transition-medium);
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.scroll-to-next.show {
  display: flex;
}

.scroll-to-next:hover {
  background: #7a1124;
  transform: scale(1.1);
}

.scroll-to-next:focus,
.scroll-to-next:active {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* ========================================
   MODAL STYLES
   Stili per modal timeline e galleria immagini
   ======================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: rgba(244, 244, 244, 0.85);
  margin: 5% auto;
  padding: var(--spacing-xl);
  border: 2px solid var(--color-border);
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s ease-out;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  font-style: italic;

}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  color: var(--color-primary);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  position: absolute;
  right: 20px;
  top: 15px;
}

.close:hover {
  color: #7a1124;
  transform: scale(1.1);
}

.modal-content h2 {
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
  font-size: 2rem;
  text-align: center;
}

.modal-content p {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.iban-box {
  background-color: #ffffff;
  border: 2px solid var(--color-primary);
  border-radius: 10px;
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  text-align: center;
}

.iban-label {
  font-weight: bold;
  color: var(--color-primary);
  font-size: 1.2rem;
  margin-bottom: var(--spacing-sm);
}

.iban-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.iban-code {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-text-primary);
  background-color: #f8f8f8;
  padding: var(--spacing-sm);
  border-radius: 5px;
  word-break: break-all;
  margin: 0;
  flex: 1;
}

.copy-iban-btn {
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  gap: 4px;
  white-space: nowrap;
}

.copy-iban-btn:hover {
  background: #5a2539;
  transform: translateY(-1px);
}

.copy-iban-btn:active {
  transform: translateY(0);
}

.copy-iban-btn.copied {
  background: #28a745;
}

.copy-iban-btn.copied .copy-icon {
  content: '✓';
}

.copy-icon {
  font-size: 14px;
}

.copy-text {
  font-size: 0.9rem;
}

.iban-name, .iban-causale {
  font-size: 0.95rem;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.modal-note {
  font-style: italic;
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-top: var(--spacing-lg);
}

/* ========================================
   PRELOADER STYLES
   Schermata di caricamento con progress bar
   ======================================== */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-background), rgba(111, 15, 31, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
  max-width: 400px;
  padding: var(--spacing-xl);
}

.preloader-logo h1 {
  font-family: "Great Vibes", cursive;
  font-size: 3rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.2;
}

.preloader-logo p {
  font-family: "Lora", serif;
  font-size: 1.2rem;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xl);
}

.preloader-spinner {
  margin: var(--spacing-xl) 0;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(111, 15, 31, 0.3);
  border-top: 3px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.preloader-progress {
  margin-top: var(--spacing-lg);
}

.progress-bar {
  width: 100%;
  height: 4px;
  background-color: rgba(111, 15, 31, 0.2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--spacing-sm);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #8b1e2b);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--color-text-primary);
  margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   Media queries per adattamento mobile e tablet
   ======================================== */
@media (max-width: 768px) {
  h2 {
    font-size: 2rem;
  }
  
  .great-vibes-regular {
    font-size: 2.5rem;
  }
  
  .hero-quote p {
    font-size: 1.2rem;
  }
  
  .hero-content {
    padding: var(--spacing-lg);
    margin: 0 var(--spacing-sm);
  }
  
  .save-date-box {
    padding: var(--spacing-lg);
  }
  
  /* Polaroid responsive styles */
  .polaroid-stack {
    width: 280px;
    height: 330px;
  }
  
  .polaroid {
    width: 260px;
    height: 310px;
  }
  
  section {
    padding: var(--spacing-xl) var(--spacing-sm);
  }
  
  .signature .names {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-quote p {
    font-size: 1.1rem;
  }
  
  .great-vibes-regular {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .audio-btn {
    width: 50px;
    height: 50px;
  }
  
  /* Responsive icons for mobile */
  .audio-btn .play-icon {
    border-left: 10px solid var(--color-text-secondary);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    margin-left: 3px;
  }
  
  .audio-btn .pause-icon {
    width: 14px;
    height: 14px;
  }
  
  .audio-btn .pause-icon::before,
  .audio-btn .pause-icon::after {
    width: 3px;
    height: 10px;
    top: 2px;
  }
  
  .save-date-box {
    padding: var(--spacing-md);
  }
  
  /* Smaller polaroid for mobile */
  .polaroid-stack {
    width: 240px;
    height: 280px;
  }
  
  .polaroid {
    width: 220px;
    height: 260px;
  }
}

/* Mobile responsive for modal */
@media (max-width: 768px) {
  .modal-content {
    margin: 10% auto;
    padding: var(--spacing-lg);
    width: 95%;
    max-width: 95vw;
    box-sizing: border-box;
  }
  
  .iban-code {
    font-size: 0.9rem;
    word-break: break-all;
    overflow-wrap: break-word;
  }
  
  .modal-content h2 {
    font-size: 1.6rem;
  }
  
  .iban-box {
    padding: var(--spacing-md);
  }
  
  .iban-container {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
  
  .copy-iban-btn {
    width: 100%;
    justify-content: center;
  }
  
  .maps-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
  
  .map-container {
    margin: var(--spacing-lg) auto;
    padding-bottom: 60%;
    border-radius: 8px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 90%;
    max-width: 90vw;
    margin: 15% auto;
    padding: var(--spacing-md);
  }
  
  .iban-code {
    font-size: 0.8rem;
  }
  
  .modal-content h2 {
    font-size: 1.4rem;
  }
  
  .iban-box {
    padding: var(--spacing-sm);
  }
  
  .closing-image img {
    max-width: 100%;
  }
  
  .map-container {
    margin: var(--spacing-md) auto;
    padding-bottom: 70%;
    border-radius: 6px;
    border-width: 1px;
  }
}

/* ========================================
   TIMELINE STYLES
   ======================================== */
.timeline-container {
  margin: var(--spacing-xxl) 0;
  position: relative;
  padding: 60px 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow-x: hidden;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--color-primary);
  transform: translateY(-50%);
  z-index: 1;
  width: 100vw;
  margin-left: 0;
}

.timeline-years {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 120px;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.year-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.year-item.top {
  justify-content: center;
  align-items: center;
}

.year-item.bottom {
  justify-content: center;
  align-items: center;
}

.year-item.top .year-circle {
  position: absolute;
  top: 50%;
  transform: translateY(-100%); /* Position above center line */
}

.year-item.bottom .year-circle {
  position: absolute;
  top: 50%;
  transform: translateY(0%); /* Position below center line */
}

.year-item.top .year-label {
  position: absolute;
  top: -60px; /* Position above the tick */
}

.year-item.bottom .year-label {
  position: absolute;
  bottom: -60px; /* Position below the tick */
}

.year-circle {
  width: 3px;
  height: 30px;
  background-color: var(--color-primary);
  z-index: 3;
  border-radius: 0;
}

.year-label {
  font-family: "Lora", serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 8px 0;
  user-select: none;
}


.year-item.special .year-circle {
  height: 35px;
  width: 4px;
  background: linear-gradient(to bottom, var(--color-primary), #8b1538);
  box-shadow: 0 0 6px rgba(111, 15, 31, 0.3);
}

.year-item.special .year-label {
  font-size: 1.1rem;
  font-weight: bold;
}


/* Mobile Timeline Styles */
@media (max-width: 768px) {
  .timeline-container {
    padding: 40px 0;
    margin: var(--spacing-lg) 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: 0;
    padding-right: 0;
  }
  
  .timeline-line {
    width: 100vw;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  
  .timeline-years {
    height: 100px;
    padding: 0 1rem;
  }
  
  .year-circle {
    width: 2px;
    height: 25px;
  }
  
  .year-label {
    font-size: 0.9rem;
  }
  
  
  .year-item.special .year-circle {
    width: 3px;
    height: 30px;
  }
  
}

@media (max-width: 480px) {
  .timeline-container {
    padding: 30px 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding-left: 0;
    padding-right: 0;
  }
  
  .timeline-line {
    width: 100vw;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  
  .timeline-years {
    height: 80px;
    padding: 0 0.5rem;
  }
  
  .year-circle {
    width: 2px;
    height: 20px;
  }
  
  .year-label {
    font-size: 0.8rem;
    margin: 6px 0;
  }
  
  
  .year-item.special .year-circle {
    width: 3px;
    height: 25px;
  }
  
}
