/* ==========================================================================
   CIENNE FINITURE - Black Marble & Pure White Modern Theme
   ========================================================================== */

:root {
  --bg: #07080a;
  --panel: #111317;
  --panel-alt: #171a21;
  --border: rgba(255, 255, 255, 0.12);
  --border-light: rgba(255, 255, 255, 0.25);
  --text: #ffffff;
  --muted: #94a3b8;
  --accent: #ffffff;             /* Bianco per accenti e pulsanti principali */
  --accent-hover: #e2e8f0;       /* Grigio chiarissimo all'hover */
  --radius: 12px;
  --max-width: 1100px;
  --transition: all 0.25s ease;
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
}

/* Reset Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout Wrapper */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px;
}

/* Header & Navigazione */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.nav-cta {
  background: var(--accent);
  color: #000000;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

/* Sezioni & Sfondi */
main {
  margin-top: 24px;
}

.section-frame {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}

.section-frame.alt {
  background: var(--panel-alt);
}

.section-frame.alt-2 {
  background: linear-gradient(180deg, var(--panel-alt), var(--panel));
}

/* Effetto Marmo Nero */
.marble-bg {
  position: relative;
  background-image: linear-gradient(180deg, rgba(7, 8, 10, 0.75) 0%, rgba(7, 8, 10, 0.92) 100%), url('Cienne.jpeg');
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-light);
}

/* Hero Section */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-logo-large {
  max-width: 280px;
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.8));
}

.hero h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 16px;
  color: #ffffff;
}

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 800px;
  margin-bottom: 24px;
}

.cta-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.cta-primary {
  background: var(--accent);
  color: #000000;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}

.cta-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.cta-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.cta-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #ffffff;
}

/* Servizi */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.service {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  transition: var(--transition);
}

.service:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.service h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #ffffff;
}

.service p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Chi Siamo & Galleria */
.about-gallery {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}

.about h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 12px;
  margin-top: 0;
}

.about p {
  color: var(--muted);
  font-size: 0.95rem;
}

.about-sub {
  margin-top: 12px;
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}

.thumb {
  height: 120px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--muted);
  transition: var(--transition);
}

.thumb:hover {
  border-color: #ffffff;
  color: #ffffff;
}

/* Contatti */
.contacts.framed {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 28px;
}

.contacts h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.contact-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-item strong {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.contact-item a, .contact-item span {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.contact-item a:hover {
  color: #ffffff;
}

.contacts-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

/* Modal Preventivo */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px;
  width: min(550px, 100%);
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
}

.modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

.modal input, .modal textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.modal input:focus, .modal textarea:focus {
  outline: none;
  border-color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
}

.modal textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}

.modal .btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.modal .btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.modal .btn-submit {
  background: var(--accent);
  color: #000000;
  border: none;
}

.modal .btn-submit:hover {
  background: var(--accent-hover);
}

/* WhatsApp FAB */
.whatsapp-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  -webkit-font-smoothing: subpixel-antialiased;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.whatsapp-fab:hover {
  transform: scale(1.08) translateZ(0);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-fab svg {
  width: 30px;
  height: 30px;
  display: block;
  shape-rendering: geometricPrecision;
}

/* ==========================================================================
   FOOTER STYLING (CORRETTO E RIDIMENSIONATO)
   ========================================================================== */
footer {
  margin-top: 40px;
  padding: 32px 0 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: 24px;
}

.footer-left {
  min-width: 240px;
  max-width: 320px;
}

/* FIX LOGO FOOTER */
.footer-logo-img {
  height: 36px;            /* Ridimensionato a misura pulita ed elegante */
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  margin-bottom: 8px;
}

.footer-left .sub {
  font-size: 0.85rem;
  color: #ffffff;
  margin-top: 2px;
}

.footer-desc {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col ul li, .footer-col ul li a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: #ffffff;
}

.footer-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--text);
}

.footer-social {
  min-width: 200px;
}

.social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.social-links a {
  font-size: 0.9rem;
  color: #ffffff;
  text-decoration: none;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--muted);
}

.footer-address {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-address a {
  color: var(--muted);
  text-decoration: none;
}

.footer-address a:hover {
  color: #ffffff;
}

/* BARRA INFERIORE LEGAL & PRIVACY */
.footer-bottom {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-links a {
  color: var(--muted);
  text-decoration: none;
  transition: var(--transition);
}

.legal-links a:hover {
  color: #ffffff;
}

.legal-links .sep {
  color: var(--border-light);
  font-size: 0.75rem;
}

/* Responsive Media Queries */
@media (max-width: 850px) {
  .about-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .top-nav {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 10px;
  }
  
  .nav-cta {
    width: 100%;
    text-align: center;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-primary, .cta-outline {
    text-align: center;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Stili Pagine Legali (Privacy & Cookie) */
.legal-page {
  padding: 40px;
}

.legal-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.legal-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: #ffffff;
  margin-top: 28px;
  margin-bottom: 10px;
}

.legal-content p, .legal-content ul {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 12px;
}

.legal-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.legal-content ul li {
  margin-bottom: 6px;
}

.legal-content a {
  color: #ffffff;
  text-decoration: underline;
  transition: var(--transition);
}

.legal-content a:hover {
  color: var(--muted);
}

.legal-actions {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}