/* ============================================
   GRAPPOLO VINI - Design System & Styles
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Lato:wght@300;400;500;700&display=swap');

/* CSS Variables - Color Palette */
:root {
  /* Colors */
  --color-bg: #FDFBF7;
  --color-primary: #5D3A9B;
  --color-accent: #E2725B;
  --color-text: #2D2D2D;
  --color-text-light: #5A5A5A;
  --color-white: #FFFFFF;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, rgba(93, 58, 155, 0.1) 0%, rgba(226, 114, 91, 0.08) 100%);
  --gradient-primary: linear-gradient(135deg, #5D3A9B 0%, #7B52C4 100%);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(93, 58, 155, 0.08);
  --shadow-md: 0 8px 30px rgba(93, 58, 155, 0.12);
  --shadow-lg: 0 20px 50px rgba(93, 58, 155, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
}

h4 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: 12px;
}

p {
  color: var(--color-text-light);
  margin-bottom: 1rem;
}

/* Container */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 15px 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.logo:hover {
  color: var(--color-accent);
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--color-primary);
  transition: var(--transition-fast);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(253, 251, 247, 0.7) 0%,
      rgba(253, 251, 247, 0.85) 50%,
      rgba(253, 251, 247, 0.95) 100%);
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(93, 58, 155, 0.15);
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin-bottom: 24px;
  animation: fadeUp 1s ease;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.5);
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeUp 1s ease 0.2s backwards;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: 0 8px 25px rgba(93, 58, 155, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(93, 58, 155, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 8px 25px rgba(226, 114, 91, 0.3);
}

.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(226, 114, 91, 0.4);
}

/* ============================================
   SECTIONS
   ============================================ */
section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.1rem;
}

/* ============================================
   CHI SIAMO
   ============================================ */
.about {
  background: var(--color-white);
  position: relative;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image-main {
  width: 100%;
  height: 500px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.about-image-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image-accent {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 200px;
  height: 200px;
  background: var(--color-accent);
  border-radius: 20px;
  opacity: 0.15;
  z-index: -1;
}

.about-content h2 {
  margin-bottom: 24px;
}

.about-content p {
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.about-features {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--color-bg);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
}

.about-feature svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}

/* ============================================
   SERVIZI
   ============================================ */
.services {
  background: var(--color-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--color-white);
  padding: 48px 36px;
  border-radius: 24px;
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: var(--transition-smooth);
}

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

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: rgba(93, 58, 155, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  transition: var(--transition-smooth);
}

.service-card:hover .service-icon {
  background: var(--color-primary);
  transform: scale(1.1);
}

.service-card:hover .service-icon span {
  filter: brightness(0) invert(1);
}

.service-card h3 {
  margin-bottom: 16px;
  color: var(--color-text);
}

.service-card p {
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.service-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.service-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(226, 114, 91, 0.1);
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 50px;
}

.service-cta {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.service-card:hover .service-cta {
  color: var(--color-accent);
}

/* ============================================
   CATALOGO - CENTERED VERSION
   ============================================ */
.catalog {
  background: var(--color-white);
  position: relative;
}

.catalog-centered {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 40px;
  background: var(--color-bg);
  border-radius: 30px;
  box-shadow: var(--shadow-md);
}

.catalog-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.catalog-centered h2 {
  margin-bottom: 20px;
}

.catalog-centered p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.catalog-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================
   CONTATTI & FOOTER
   ============================================ */
.contact {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
}

.contact h2 {
  color: var(--color-white);
  margin-bottom: 16px;
}

.contact p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  background: var(--color-white);
  color: var(--color-primary);
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-contact.whatsapp {
  background: #25D366;
  color: var(--color-white);
}

.btn-contact.whatsapp:hover {
  background: #1fb855;
}

.btn-contact svg {
  width: 22px;
  height: 22px;
}

/* Footer */
.footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-white);
  text-decoration: none;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--color-white);
  transition: var(--transition-fast);
}

.footer-social a:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

.footer-copyright {
  font-size: 0.9rem;
}

/* Iubenda Legal Links */
.footer-legal {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 16px 0;
}

.footer-legal a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--color-white);
}

.footer-legal-separator {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--color-white);
  border-radius: 24px;
  padding: 48px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 2001;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  text-align: center;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-text-light);
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-accent);
}

.modal-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.modal h2 {
  margin-bottom: 12px;
}

.modal-intro {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.modal-content {
  text-align: left;
  margin-bottom: 32px;
}

.modal-content h4 {
  margin-top: 24px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(93, 58, 155, 0.1);
}

.modal-content h4:first-child {
  margin-top: 0;
}

.modal-content ul {
  list-style: none;
  padding: 0;
}

.modal-content li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.modal-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: bold;
}

/* ============================================
   GALLERY CAROUSEL
   ============================================ */
.gallery {
  background: var(--color-bg);
  overflow: hidden;
}

.carousel-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  aspect-ratio: 4/3;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 30px 30px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.carousel-caption span {
  display: inline-block;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Navigation Arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--color-primary);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn:hover svg {
  stroke: var(--color-white);
}

.carousel-btn svg {
  stroke: var(--color-primary);
  transition: var(--transition-fast);
}

.carousel-btn-prev {
  left: -25px;
}

.carousel-btn-next {
  right: -25px;
}

/* Dots Navigation */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  background: rgba(93, 58, 155, 0.2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 0;
}

.carousel-dot:hover {
  background: rgba(93, 58, 155, 0.4);
}

.carousel-dot.active {
  background: var(--color-primary);
  transform: scale(1.2);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* Scroll Animations (JS will add .visible class) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    order: -1;
  }

  .about-image-main {
    height: 350px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-bg);
    padding: 20px;
    gap: 20px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding-top: 100px;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .catalog-centered {
    padding: 40px 24px;
  }

  .catalog-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .catalog-buttons .btn {
    text-align: center;
    justify-content: center;
  }

  .contact-buttons {
    flex-direction: column;
    align-items: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .modal {
    padding: 32px 24px;
    max-height: 90vh;
  }

  .modal-icon {
    font-size: 3rem;
  }

  /* Carousel responsive */
  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-btn-prev {
    left: 10px;
  }

  .carousel-btn-next {
    right: 10px;
  }

  .carousel-caption span {
    font-size: 0.9rem;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 16px;
  }

  .btn {
    padding: 14px 28px;
    font-size: 0.95rem;
  }

  .service-card {
    padding: 36px 24px;
  }

  .about-image-main {
    height: 280px;
  }
}

/* Print styles */
@media print {

  .navbar,
  .modal,
  .modal-overlay {
    display: none;
  }
}
