/* =======================================================
   TOUR CAPRI - LUXURY EDITION CSS
   Design Premium, Glassmorphism, Responsive
======================================================= */

/* RESET E BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* PALETTE COLORI LUXURY */
  --primary-blue: #004E98;
  --primary-blue-dark: #003366;
  --primary-blue-light: #E6F0FA;
  --secondary-blue: #3A86FF;
  
  --accent-gold: #C5A059;
  --accent-teal: #2DC7CC;
  --whatsapp: #25D366;

  /* SFONDI E TESTI */
  --bg-color: #F8F9FC;
  --text-main: #334155;
  --text-light: #64748B;
  
  /* SPAZIATURA E FORME */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  /* OMBRE "GLOW" (BLUASTRE) */
  --shadow-sm: 0 4px 6px -1px rgba(0, 78, 152, 0.1), 0 2px 4px -1px rgba(0, 78, 152, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 78, 152, 0.1), 0 4px 6px -2px rgba(0, 78, 152, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 78, 152, 0.1), 0 10px 10px -5px rgba(0, 78, 152, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 78, 152, 0.25);
  
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  overflow-x: hidden;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-color);
}

/* TYPOGRAPHY PREMIUM */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--primary-blue-dark);
  letter-spacing: -0.02em;
}

p {
  color: var(--text-light);
  line-height: 1.7;
}

/* HEADER FISSO (GLASS EFFECT) */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.nav-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo img {
  height: 42px;
  max-width: 180px;
  object-fit: contain;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-base);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: width var(--transition-base);
}

nav a:hover {
  color: var(--primary-blue);
}

nav a:hover::after {
  width: 100%;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  background: white;
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--primary-blue-light);
  box-shadow: var(--shadow-sm);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: 'Montserrat', sans-serif;
}

.lang-btn.active, .lang-btn:hover {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 78, 152, 0.3);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 26px;
  height: 2px;
  background: var(--primary-blue-dark);
  transition: all var(--transition-base);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* MAIN CONTENT */
main {
  margin-top: 72px;
}

/* ==================== HERO SECTION NUOVA CON GALLERY ==================== */
.tour-hero-new {
  background: var(--bg-color);
  padding: 2rem 0 3rem;
}

.hero-new-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header con titolo e prezzo CON ICONE */
.hero-new-header {
  margin-bottom: 1.5rem;
}

.hero-new-title {
  font-family: 'Playfair Display', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--primary-blue-dark);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero-new-price {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 400;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.price-item i {
  color: var(--primary-blue);
  font-size: 1rem;
}

.price-separator {
  color: var(--text-light);
  font-weight: 300;
}

/* Gallery Grid */
.hero-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 600px;
}

/* Immagine principale (occupa 2 righe a sinistra) */
.hero-gallery-main {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.3s ease;
  height: 100%;
  min-height: 400px;
}

.hero-gallery-main:hover {
  transform: scale(1.02);
}

.hero-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Thumbnails grid (4 immagini in griglia 2x2 a destra) */
.hero-gallery-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: 100%;
}

.hero-gallery-thumb {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.3s ease;
  min-height: 150px;
}

.hero-gallery-thumb:hover {
  transform: scale(1.05);
  z-index: 1;
}

.hero-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==================== TOUR CONTENT ==================== */
.tour-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* TOUR LAYOUT: 2 COLONNE */
.tour-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
}

.tour-main {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.tour-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* INFO CARDS MOBILE - nascoste su desktop */
.info-cards-mobile {
  display: none;
}

/* SEZIONI TOUR */
.tour-section {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 78, 152, 0.08);
}

.tour-section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary-blue-dark);
}

.tour-section p {
  font-size: 1rem;
  line-height: 1.8;
}

/* BOX INFORMAZIONI TOUR */
.tour-info-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary-blue-light) 0%, rgba(45, 199, 204, 0.1) 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--primary-blue-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tour-info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  min-width: fit-content;
}

.tour-info-item i {
  font-size: 1.8rem;
  color: var(--primary-blue);
  flex-shrink: 0;
}

.tour-info-item > div {
  display: flex;
  flex-direction: column;
}

.info-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-light);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.info-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-blue-dark);
  margin-top: 0.2rem;
  white-space: nowrap;
}

/* SPAZIO TRA INTRO E TIMELINE */
.itinerary-intro {
  margin-bottom: 2.5rem !important;
}

/* ==================== TIMELINE ==================== */
.timeline {
  position: relative;
  padding-left: 80px;
}

.timeline-line {
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary-blue-light), var(--accent-teal));
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
}

.timeline-time {
  font-size: 0.85rem;
  color: var(--primary-blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.timeline-icon {
  position: absolute;
  left: -80px;
  top: 0;
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary-blue);
  box-shadow: 0 0 0 4px var(--primary-blue-light), var(--shadow-md);
  z-index: 2;
  transition: all var(--transition-base);
}

.timeline-item:hover .timeline-icon {
  transform: scale(1.1);
  box-shadow: 0 0 0 6px rgba(45, 199, 204, 0.2), var(--shadow-lg);
  color: var(--accent-teal);
}

.timeline-icon.highlight {
  background: var(--primary-blue);
  color: white;
  box-shadow: 0 0 0 4px rgba(0, 78, 152, 0.15), var(--shadow-lg);
}

.timeline-content {
  transition: transform var(--transition-base);
}

.timeline-item:hover .timeline-content {
  transform: translateX(10px);
}

.timeline-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-blue-dark);
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.95rem;
}

.timeline-icon.optional {
  color: var(--text-light);
  box-shadow: 0 0 0 4px #f1f5f9, var(--shadow-md);
}

.optional-badge {
  display: inline-block;
  background: var(--primary-blue-light);
  color: var(--primary-blue);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-left: 10px;
  vertical-align: middle;
  letter-spacing: 0.5px;
  font-family: 'Montserrat', sans-serif;
}

/* ==================== INFO CARDS (SIDEBAR) ==================== */
.info-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.5);
}

.info-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-card h3 i {
  color: var(--accent-gold);
}

.info-card ul {
  list-style: none;
}

.info-card li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  color: var(--text-main);
  border-bottom: 1px dashed var(--primary-blue-light);
}

.info-card li:last-child {
  border-bottom: none;
}

.info-card li i {
  color: var(--primary-blue);
  font-size: 1.1rem;
}

/* PRICE CARD */
.price-card {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
  color: white;
  text-align: center;
}

.price-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.price-from {
  font-size: 0.9rem;
  opacity: 0.9;
}

.price-value {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.price-unit {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* ==================== CTA BUTTON ==================== */
.cta-button {
  width: 100%;
  padding: 0.85rem 1.8rem;
  background: white;
  color: var(--primary-blue);
  border: none;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 6px 16px -4px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
  background: var(--secondary-blue);
  color: white;
}

/* CTA nella sezione descrizione */
.cta-description {
  margin-top: 2rem;
  width: auto;
  display: inline-flex;
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 10, 30, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(5px);
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.lightbox-close { top: 2rem; right: 2rem; font-size: 2rem; }
.lightbox-prev { left: 2rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 2rem; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: white;
  color: var(--primary-blue);
  transform: translateY(-50%) scale(1.1);
}
.lightbox-close:hover { transform: scale(1.1) rotate(90deg); }

/* ==================== WHATSAPP BUTTON ==================== */
.whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 64px;
  height: 64px;
  background: var(--whatsapp);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  z-index: 1500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 15px 40px rgba(37, 211, 102, 0.6);
}

/* ==================== UTILITIES ==================== */
.hidden { 
  display: none !important; 
}

/* ==================== RESPONSIVE ==================== */

/* TABLET */
@media (max-width: 991px) {
  .tour-layout {
    grid-template-columns: 1fr;
  }
  
  /* Sidebar va in alto su tablet */
  .tour-sidebar {
    position: static;
    order: -1;
  }
  
  /* Info cards mobile rimangono nascoste su tablet */
  .info-cards-mobile {
    display: none;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  /* HEADER MOBILE */
  .hamburger { 
    display: flex; 
  }
  
  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-xl);
    border-bottom: 1px solid var(--primary-blue-light);
  }
  
  nav ul:not(.hidden) { 
    display: flex; 
  }

  /* HERO MOBILE */
  .hero-new-container {
    padding: 0 1rem;
  }

  /* PREZZO CON ICONE - SENZA ACCAPO */
  .hero-new-price {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .hero-new-price::-webkit-scrollbar {
    display: none;
  }
  
  .price-item {
    flex-shrink: 0;
  }
  
  .price-separator {
    flex-shrink: 0;
  }

  .hero-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 8px;
  }

  .hero-gallery-main {
    grid-row: span 1;
    aspect-ratio: 16/9;
  }

  .hero-gallery-thumbs {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 1fr;
    gap: 8px;
  }

  .hero-gallery-thumb {
    aspect-ratio: 1;
  }

  /* SIDEBAR NASCOSTA SU MOBILE */
  .tour-sidebar {
    display: none !important;
  }
  
  /* INFO CARDS MOBILE - DOPO LA DESCRIZIONE */
  .info-cards-mobile {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  /* TIMELINE MOBILE */
  .timeline {
    padding-left: 60px;
  }

  .timeline-line { 
    left: 20px; 
  }
  
  .timeline-item { 
    padding-left: 0;
    margin-bottom: 2.5rem; 
  }
  
  .timeline-icon { 
    width: 44px; 
    height: 44px; 
    font-size: 1.1rem;
    left: -60px;
  }
  
  .tour-section { 
    padding: 1.5rem; 
    border-radius: 20px; 
  }
  
  /* BOX INFO - riduce padding su mobile */
  .tour-info-box {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .tour-info-item i {
    font-size: 1.5rem;
  }
  
  .info-label {
    font-size: 0.65rem;
  }
  
  .info-value {
    font-size: 0.85rem;
  }
  
  /* LIGHTBOX MOBILE */
  .lightbox-prev, 
  .lightbox-next { 
    width: 45px; 
    height: 45px; 
    font-size: 1.5rem; 
  }
  
  .lightbox-prev { 
    left: 1rem; 
  }
  
  .lightbox-next { 
    right: 1rem; 
  }
  
  .lightbox-close { 
    top: 1rem; 
    right: 1rem; 
  }
}

/* MOBILE SMALL */
@media (max-width: 480px) {
  .hero-new-title { 
    font-size: 1.5rem; 
  }
  
  .hero-new-price {
    font-size: 0.8rem;
    gap: 0.3rem;
  }
  
  .price-item i {
    font-size: 0.85rem;
  }
  
  /* BOX INFO - ulteriore riduzione su schermi piccoli */
  .tour-info-box {
    padding: 0.75rem;
    gap: 0.5rem;
  }
  
  .tour-info-item {
    gap: 0.5rem;
  }
  
  .tour-info-item i {
    font-size: 1.3rem;
  }
  
  .info-label {
    font-size: 0.6rem;
  }
  
  .info-value {
    font-size: 0.75rem;
  }

  .whatsapp { 
    width: 56px; 
    height: 56px; 
    font-size: 1.8rem; 
    bottom: 20px; 
    right: 20px; 
  }

  .hero-gallery-thumbs {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }
}