:root {
  /* Palette */
  --color-gold: #C9A962;
  --color-gold-light: #E5D4A1;
  --color-gold-dark: #9A7B3A;
  --color-white-silk: #F8F6F0;
  --color-white-pure: #FFFFFF;
  --color-anthracite: #3D3D3D;
  --color-anthracite-light: #5A5A5A;
  --color-anthracite-dark: #2A2A2A;
  --color-text: #333333;
  --color-text-light: #666666;

  /* Gradients */
  --gradient-gold: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 50%, var(--color-gold-dark) 100%);
  --gradient-dark: linear-gradient(135deg, var(--color-anthracite-dark) 0%, var(--color-anthracite) 100%);

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;

  /* Spacing & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 4px 20px rgba(201, 169, 98, 0.3);
}

/* Base */
html, body {
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-white-silk);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: var(--font-heading);
  color: var(--color-anthracite);
  font-weight: 700;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--color-gold-dark);
}

/* Utilities */
.text-gold { color: var(--color-gold) !important; }
.text-gold-light { color: var(--color-gold-light) !important; }
.text-anthracite { color: var(--color-anthracite) !important; }
.bg-gold { background-color: var(--color-gold) !important; }
.bg-anthracite { background-color: var(--color-anthracite) !important; }
.bg-white-silk { background-color: var(--color-white-silk) !important; }
.bg-anthracite-dark { background-color: var(--color-anthracite-dark) !important; }

.ls-1 { letter-spacing: 0.1em; }
.ls-2 { letter-spacing: 0.2em; }
.ls-3 { letter-spacing: 0.3em; }
.opacity-10 { opacity: 0.1; }
.opacity-90 { opacity: 0.9; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-gold { box-shadow: var(--shadow-gold) !important; }
.text-shadow { text-shadow: 0 2px 4px rgba(0,0,0,0.3); }

/* Buttons */
.btn {
  border-radius: 50px;
  padding: 0.8rem 2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-brand {
  background: var(--gradient-gold);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-gold);
}

.btn-brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(201, 169, 98, 0.4);
  color: #fff;
}

.btn-outline-brand {
  border: 2px solid var(--color-gold);
  color: var(--color-gold);
  background: transparent;
}

.btn-outline-brand:hover {
  background: var(--color-gold);
  color: #fff;
}

/* Navbar */
.navbar {
  transition: all 0.4s ease;
  padding: 1.5rem 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  box-shadow: var(--shadow-md);
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  color: #fff !important; /* White by default */
  position: relative;
  padding: 0.5rem 1rem !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3); /* Legibility */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-text {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  transition: color 0.3s ease;
}

/* Scrolled State (White BG) */
.navbar.scrolled .nav-link {
  color: var(--color-anthracite) !important;
  text-shadow: none;
}

.navbar.scrolled .brand-text {
  color: var(--color-anthracite) !important;
  text-shadow: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

/* Navbar Toggler & Mobile Menu */
.navbar-toggler {
    transition: all 0.3s ease;
}

.navbar-toggler i {
    transition: color 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Icon color logic */
.navbar:not(.scrolled) .navbar-toggler i {
    color: #fff !important;
}

.navbar.scrolled .navbar-toggler i {
    color: var(--color-anthracite) !important;
    text-shadow: none;
}

/* When menu is OPEN, ensure icon is visible against dark bg */
.navbar-toggler[aria-expanded="true"] i {
    color: var(--color-gold) !important;
}

/* Mobile Menu Styling */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--color-anthracite-dark);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        height: 100vh;
        padding: 2rem;
        text-align: center;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .navbar-nav {
        margin-top: 2rem;
        gap: 1.5rem !important;
    }

    .nav-link {
        font-size: 1.25rem;
        font-family: var(--font-heading);
        color: rgba(255,255,255,0.9) !important;
        text-shadow: none !important;
        justify-content: center;
    }

    .nav-link i {
        color: var(--color-gold);
        margin-right: 8px;
    }

    .nav-link:hover, .nav-link.active {
        color: var(--color-gold) !important;
    }
    
    .navbar-collapse .d-flex {
        justify-content: center;
        flex-direction: column;
        margin-top: 2rem !important;
        width: 100%;
    }
    
    .navbar-collapse .btn {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}


/* Hero Section (Main) */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.hero-bg, .hero-bg-next {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: opacity 1s ease-in-out;
  z-index: 0;
}

.hero-bg::after, .hero-bg-next::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}

.hero h1 {
  text-shadow: 0 4px 16px rgba(0,0,0,0.8);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--color-gold-light);
  /* Added text shadow for better contrast */
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero p {
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  font-weight: 400;
}

/* Hero Small (Internal Pages) */
.hero-sm {
  position: relative;
  overflow: hidden;
}

.hero-sm::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6); /* Slightly darker overlay for better text contrast */
  z-index: 1;
}

.hero-sm .container {
  position: relative;
  z-index: 2;
}

.hero-sm h1 {
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--color-anthracite);
}

/* Cards */
.card {
  border: none;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Gallery Grid (Home) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.gallery-grid a {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.gallery-item-overlay i {
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.gallery-grid a:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-grid a:hover .gallery-item-overlay i {
  transform: scale(1);
}

/* Animations */
.animate-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { animation-delay: 0.1s; transition-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; transition-delay: 0.3s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-bounce {
  animation: bounce 2s infinite;
}

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

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  border-radius: 4px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.3s;
  z-index: 2001;
  background: none;
  border: none;
  padding: 10px;
}

.lightbox-close:hover {
  color: var(--color-gold);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s;
  padding: 20px;
  background: rgba(0,0,0,0.2);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-nav:hover {
  color: var(--color-gold);
  background: rgba(255,255,255,0.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Back to Top Button removed */

/* === MOBILE FOOTER PREMIUM OVERHAUL === */
@media (max-width: 767.98px) {
  
  /* Global Footer Reset for Mobile */
  footer .row > div {
    text-align: center !important;
    margin-bottom: 3rem; /* More breathing room between sections */
  }
  footer .row > div:last-child {
    margin-bottom: 0;
  }

  /* Titles - Premium Centered Look with Gold Underline */
  footer h6, footer h5 {
    text-align: center !important;
    font-size: 1.3rem !important; /* Larger title */
    letter-spacing: 2px;
    margin-bottom: 1.5rem !important;
    position: relative;
    display: inline-block;
    width: 100%;
    color: #fff !important;
  }
  
  /* Gold Underline */
  footer h6::after, footer h5::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: var(--color-gold);
    margin: 10px auto 0;
  }

  /* --- COLUMN 1: BRAND --- */
  /* Stack Logo and Text */
  footer .row > div:nth-child(1) .d-flex {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1rem !important;
  }
  
  /* Logo Styling */
  footer .row > div:nth-child(1) img {
    width: 90px !important;
    height: 90px !important;
    margin-bottom: 0.5rem;
    border: 2px solid var(--color-gold) !important;
  }
  
  /* Description */
  footer .row > div:nth-child(1) p {
    margin: 0 auto 1.5rem;
    max-width: 100% !important;
    font-size: 1rem;
    opacity: 0.9;
    padding: 0 15px;
  }
  
  /* Socials */
  .socials {
    justify-content: center;
    gap: 1.5rem;
  }
  
  .social-link {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  /* --- COLUMN 2: CONTATTI --- */
  footer .list-unstyled li {
    justify-content: center !important;
    margin-bottom: 1rem !important;
    font-size: 1rem !important;
  }

  /* --- COLUMN 3: ORARI --- */
  footer .row > div:nth-child(3) ul li {
    font-size: 1rem !important;
    margin-bottom: 1rem !important;
  }

  /* --- COLUMN 4: LINKS --- */
  footer .row > div:nth-child(4) ul li {
    margin-bottom: 1rem !important;
  }
  
  footer .row > div:nth-child(4) ul li a {
    font-size: 1.1rem !important;
    padding: 5px 0;
    display: block;
  }
}

/* === MODAL PREMIUM STYLES === */
.modal-premium-content {
  background: var(--color-anthracite-dark);
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  position: relative;
}

.modal-premium-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-gold);
}

.btn-close-premium {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  transition: all 0.3s ease;
  padding: 0.5rem;
  line-height: 1;
}

.btn-close-premium:hover {
  color: var(--color-gold);
  transform: rotate(90deg);
}

.icon-circle-premium {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(201, 169, 98, 0.1);
  border: 1px solid var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(201, 169, 98, 0.2);
}

.bg-gold-subtle {
  background-color: rgba(201, 169, 98, 0.15) !important;
}

.x-small {
  font-size: 0.75rem;
}

.tracking-wider {
  letter-spacing: 0.1em;
}

.modal-decoration-top {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(201, 169, 98, 0.1) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}

.modal-decoration-bottom {
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201, 169, 98, 0.05) 0%, rgba(0,0,0,0) 70%);
  pointer-events: none;
}
