/* 
   PUCCINI 20 - LIGHT ELEGANCE RESTYLING
   A clean, custom design system without broken Elementor code.
*/

:root {
  /* Colors - Light Theme */
  --bg-main: #FCFBF9; /* Warm ivory */
  --bg-alt: #FFFFFF;
  --bg-accent: #F4F1EA;
  
  --text-main: #2C362F; /* Very dark green/grey */
  --text-muted: #6B7770;
  
  --gold-primary: #C5A059;
  --gold-light: #DFCA97;
  --gold-dark: #9A7B40;
  
  /* Typography */
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Montserrat', sans-serif;
  
  /* Spacing */
  --section-padding: 6rem;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

.title-display {
  font-size: clamp(3rem, 5vw, 4.5rem);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.title-section {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1.5rem;
  text-align: center;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--gold-primary);
  margin-bottom: 1rem;
  font-weight: 500;
  text-align: center;
}

.text-lead {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 2rem;
  text-align: center;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: var(--section-padding) 0;
}

.section-alt {
  background-color: var(--bg-alt);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(252, 251, 249, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  height: 60px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--gold-primary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: 1px solid var(--text-main);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.4s ease;
}

.btn:hover {
  background: var(--text-main);
  color: var(--bg-main);
}

.btn-gold {
  border-color: var(--gold-primary);
  color: var(--gold-dark);
}

.btn-gold:hover {
  background: var(--gold-primary);
  color: #fff;
  border-color: var(--gold-primary);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  background-color: var(--bg-accent);
  margin-top: 80px; /* Offset for fixed nav */
  padding: 0 2rem;
}

.hero-img-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('https://puccini20.it/wp-content/uploads/2025/07/modificata.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-img-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content .text-lead {
  color: #f0f0f0;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Cards & Images */
.img-elegant {
  border-radius: 2px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  transition: transform 0.8s ease;
}

.img-elegant:hover {
  transform: scale(1.02);
}

/* Footer */
.footer {
  background-color: var(--bg-alt);
  border-top: 1px solid rgba(197, 160, 89, 0.2);
  padding: 4rem 0 2rem;
  text-align: center;
}

.footer-logo {
  height: 80px;
  margin-bottom: 2rem;
}

/* Animations */
.fade-in {
  animation: fadeIn 1.2s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .title-display { font-size: 2.5rem; }
}

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr; } }

/* Masonry Gallery (No spaces) */
.masonry-gallery {
    column-count: 3;
    column-gap: 0;
    line-height: 0;
}
.masonry-gallery img.img-elegant {
    width: 100%;
    height: auto !important;
    margin-bottom: 0 !important;
    display: block;
    border-radius: 0 !important;
    box-shadow: none !important;
    break-inside: avoid;
    transform: none !important;
    transition: filter 0.3s ease;
}
.masonry-gallery img.img-elegant:hover {
    filter: brightness(0.8);
}
@media (max-width: 900px) {
    .masonry-gallery { column-count: 2; }
}
@media (max-width: 500px) {
    .masonry-gallery { column-count: 1; }
}

/* Improved Masonry */
.masonry-gallery {
    column-count: 4;
    column-gap: 0;
}
.masonry-item {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: 0;
    padding: 0;
    display: block;
}
.masonry-item img.img-elegant {
    width: 100%;
    height: auto !important;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: filter 0.3s ease;
}
.masonry-item img.img-elegant:hover {
    filter: brightness(0.8);
}
@media (max-width: 900px) {
    .masonry-gallery { column-count: 3; }
}
@media (max-width: 600px) {
    .masonry-gallery { column-count: 2; }
}

/* Seamless Grid Gallery */
.seamless-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    width: 100%;
}
.seamless-grid img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease, transform 0.5s ease;
}
.seamless-grid img:hover {
    filter: brightness(0.7);
}
@media (max-width: 1024px) {
    .seamless-grid { grid-template-columns: repeat(3, 1fr); }
    .seamless-grid img { height: 250px; }
}
@media (max-width: 768px) {
    .seamless-grid { grid-template-columns: repeat(2, 1fr); }
    .seamless-grid img { height: 200px; }
}
@media (max-width: 480px) {
    .seamless-grid { grid-template-columns: 1fr; }
    .seamless-grid img { height: 300px; }
}



/* ===================================================
   Navbar Refinements & Mobile Navigation
   =================================================== */

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-btn-prenota {
  padding: 0.75rem 1.5rem;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, background-color 0.3s ease;
  transform-origin: center;
}

.nav-toggle:hover span {
  background-color: var(--gold-primary);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background-color: var(--gold-dark);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background-color: var(--gold-dark);
}

/* Mobile Drawer Overlay */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 18, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Side Drawer - Uses transform to prevent layout overflow */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  height: 100dvh;
  background: #FCFBF9;
  z-index: 1060;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 1.5rem;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  box-sizing: border-box;
}

.mobile-menu.active {
  display: flex;
  animation: slideInMenu 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInMenu {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.mobile-menu-logo {
  height: 44px;
}

.mobile-close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-close-btn:hover {
  color: var(--gold-primary);
  transform: rotate(90deg);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem 0;
}

.mobile-nav-links a {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-main);
  letter-spacing: 0.03em;
  padding: 0.4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s ease, transform 0.2s ease, padding-left 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.mobile-nav-links a::after {
  content: '→';
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gold-primary);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  color: var(--gold-dark);
  padding-left: 0.5rem;
}

.mobile-nav-links a:hover::after,
.mobile-nav-links a.active::after {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu-footer {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(197, 160, 89, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-prenota-btn {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  padding: 0.85rem 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
}

.mobile-contact-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-contact-info a {
  color: var(--gold-dark);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-contact-info p {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}


/* Mobile & Tablet Responsive Adjustments */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .container {
    padding: 0 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .navbar {
    padding: 0.5rem 0 !important;
    width: 100% !important;
  }

  .nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  .nav-logo {
    height: 40px !important;
    width: auto !important;
    display: block !important;
  }

  .nav-links {
    display: none !important;
  }

  .nav-right {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
  }

  .nav-btn-prenota {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.08em !important;
    white-space: nowrap !important;
    border: 1px solid var(--text-main) !important;
  }

  .nav-toggle {
    display: flex !important;
    width: 38px !important;
    height: 38px !important;
    padding: 5px !important;
    flex-shrink: 0 !important;
  }

  /* Hero Section responsive typography & spacing */
  .hero {
    height: auto !important;
    min-height: 85vh !important;
    margin-top: 60px !important;
    padding: 3rem 1rem !important;
    box-sizing: border-box !important;
  }

  .hero-content {
    max-width: 100% !important;
    padding: 1rem 0 !important;
  }

  .title-display {
    font-size: clamp(1.8rem, 7vw, 2.3rem) !important;
    line-height: 1.25 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .title-section {
    font-size: clamp(1.7rem, 6vw, 2.2rem) !important;
  }

  .text-lead {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    padding: 0 0.5rem !important;
  }

  .grid-2, .grid-3 {
    grid-template-columns: 1fr !important;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .grid-4 {
    grid-template-columns: 1fr !important;
  }
  .nav-btn-prenota {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.62rem !important;
  }
}
