:root {
  --bg: #141210;
  --surface: rgba(255, 255, 255, 0.92);
  --text: #f5efe8;
  --muted: #d8c7b2;
  --accent: #c18b4b;
  --accent-dark: #9b6b35;
  --wood: #d4a26a;
  --top-bg: rgba(24, 20, 17, 0.78);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #171310, #0f0d0b);
  line-height: 1.6;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--top-bg);
  border-bottom: 3px solid var(--wood);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  margin-right: auto;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(139, 94, 52, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.brand-text {
  display: inline-block;
}

.company-name,
.company-subline {
  display: block;
  line-height: 1.15;
}

.company-name {
  font-weight: 700;
}

.company-subline {
  font-size: 0.78em;
  color: #e8d7c3;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(139, 94, 52, 0.35);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(139, 94, 52, 0.12);
}

.menu-icon {
  width: 18px;
  height: 14px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle.is-open .menu-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open .menu-icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open .menu-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.main-nav {
  display: flex;
  position: static;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  padding: 0;
  background: transparent;
}

.main-nav a {
  color: #f7eadb;
  text-decoration: none;
  padding: 0.5rem 0;
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 0;
}

.mobile-nav-brand {
  display: none;
}

body.nav-open {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-image: url("assets/hero.png");
  background-size: cover;
  background-position: center;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.42));
}

.hero-content {
  position: relative;
  color: #fff;
  z-index: 1;
  padding: 4rem 0;
}

.eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 0.5rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.9rem, 7vw, 3.1rem);
  margin: 0.2rem 0 1rem;
}

h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  margin: 0 0 1rem;
}

.hero p {
  max-width: 600px;
}

.hero-heading-secondary {
  margin: 0.35rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 1;
  display: inline-block;
  background: rgba(193, 139, 75, 0.24);
  border: 1px solid rgba(212, 162, 106, 0.5);
  color: #fff6ea;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hero-description {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.75;
  opacity: 0.95;
  margin-top: 0.7rem;
}

.hero-main-title .company-name {
  font-size: clamp(2rem, 8vw, 3.4rem);
}

.hero-main-title .company-subline {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: #e8d7c3;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.3rem;
}

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.75rem 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.section {
  padding: 3.5rem 0;
  position: relative;
}

#servizi {
  background: linear-gradient(180deg, rgba(16, 13, 10, 0.85), rgba(16, 13, 10, 0.9)),
    url("assets/fb/stairs.jpg") center / cover no-repeat;
}

#testimonials {
  background: linear-gradient(180deg, rgba(20, 16, 12, 0.85), rgba(20, 16, 12, 0.9)),
    url("assets/fb/stair-2.jpg") center / cover no-repeat;
}

#contatti {
  background: linear-gradient(180deg, rgba(17, 13, 10, 0.86), rgba(17, 13, 10, 0.92)),
    url("assets/fb/floor-purple.jpg") center / cover no-repeat;
}

#galleria {
  background: linear-gradient(180deg, #0c0a08, #12100d);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.ig-gallery-bleed {
  max-width: 1100px;
  margin: 0 auto;
}

.ig-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: #050403;
}

@media (min-width: 760px) {
  .ig-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  }
}

.ig-tile {
  position: relative;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

button.ig-tile {
  padding: 0;
  border: none;
  cursor: zoom-in;
  background: #161210;
  display: block;
}

button.ig-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
  transition: transform 0.32s ease, filter 0.32s ease;
  filter: brightness(0.96);
}

@media (hover: hover) {
  button.ig-tile:hover img {
    transform: scale(1.04);
    filter: brightness(1.02);
  }
}

button.ig-tile:active img {
  transform: scale(1.02);
  filter: brightness(1);
}

button.ig-tile:focus-visible {
  outline: 2px solid var(--wood);
  outline-offset: 0;
  z-index: 1;
}

a.ig-tile-fb-more {
  display: flex;
  text-decoration: none;
  color: #f0f4ff;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
  padding: 0.5rem;
  background: linear-gradient(145deg, #1a3a7a 0%, #0d1f45 55%, #162a52 100%);
  border: 1px solid rgba(100, 149, 237, 0.35);
}

a.ig-tile-fb-more:hover {
  filter: brightness(1.08);
  border-color: rgba(138, 180, 248, 0.55);
}

a.ig-tile-fb-more:focus-visible {
  outline: 2px solid #8ab4f8;
  outline-offset: 0;
  z-index: 1;
}

.ig-tile-fb-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
}

.ig-tile-fb-line {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  max-width: 100%;
}

.ig-tile-fb-sub {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.92;
  line-height: 1.2;
}

.gallery-lightbox {
  padding: 0;
  border: none;
  background: transparent;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0;
  box-sizing: border-box;
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
}

.gallery-lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(56px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
  pointer-events: none;
}

.gallery-lightbox-img {
  max-width: 100%;
  max-height: min(86dvh, 100%);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

.gallery-lightbox-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(22, 18, 15, 0.92);
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  pointer-events: auto;
}

.gallery-lightbox-close:hover {
  background: rgba(40, 34, 28, 0.96);
}

@media (max-width: 759px) {
  .ig-gallery-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    max-width: none;
  }

  .ig-gallery-section {
    padding-left: 0;
    padding-right: 0;
  }
}

.muted {
  background: transparent;
}

.section-subtitle {
  color: #ead9c5;
  margin-bottom: 1.4rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.cards-2 {
  grid-template-columns: 1fr;
}

.cards-3 {
  grid-template-columns: 1fr;
}

.card {
  background: var(--surface);
  padding: 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #2a2119;
}

.soft {
  background: rgba(250, 244, 237, 0.94);
}

.ribbon {
  position: relative;
  background-image: linear-gradient(125deg, rgba(102, 78, 54, 0.9), rgba(45, 33, 24, 0.92)),
    url("assets/c2-logo.jpg");
  background-size: cover;
  background-position: center;
  color: #f8f2ea;
}

.ribbon .overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.3));
}

.ribbon .card {
  background: rgba(249, 242, 233, 0.95);
  border: 1px solid rgba(145, 111, 77, 0.32);
  box-shadow: 0 14px 30px rgba(40, 24, 12, 0.2);
}

.ribbon .card h3 {
  color: #4b3321;
}

.ribbon .card p {
  color: #3f3025;
}

.ribbon h2 {
  color: #fff;
  text-shadow: 0 2px 8px rgba(35, 23, 14, 0.35), 0 0 14px rgba(255, 218, 176, 0.35);
}

.feedback-card {
  overflow: hidden;
  padding: 0;
}

.feedback-card .feedback-text,
.feedback-card span {
  display: block;
  padding-inline: 1.1rem;
}

.feedback-card .feedback-text {
  margin: 0.95rem 0 0.4rem;
}

.feedback-card span {
  color: var(--muted);
  font-weight: 500;
  padding-bottom: 1rem;
}

.feedback-source {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #2f241b;
  font-weight: 600;
}

.feedback-card .feedback-source {
  display: inline-flex;
}

.feedback-source a {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.feedback-source a:focus-visible {
  outline: 2px solid #1877f2;
  outline-offset: 2px;
  border-radius: 4px;
}

.feedback-source img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  margin-right: 0.2rem;
}

.feedback-meta {
  margin: 0;
  padding: 0 1.1rem 1rem;
  font-size: 0.82rem;
  color: #7a756d;
}

.feedback-fb-link {
  color: #1877f2;
  font-weight: 600;
  text-decoration: none;
}

.feedback-fb-link:hover {
  text-decoration: underline;
}

.feedback-external-link {
  color: #6b5344;
  font-weight: 600;
  text-decoration: none;
}

.feedback-external-link:hover {
  text-decoration: underline;
}

.map-card iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 12px;
}

.whatsapp-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: #22c35e;
  color: #fff;
  text-decoration: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.facebook-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.facebook-link img {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 8px;
}

#contatti .company-subline {
  color: #6e6a65;
}

.company-card {
  background: rgba(252, 248, 242, 0.96);
  border: 1px solid rgba(175, 149, 120, 0.28);
}

.company-card h3 {
  margin-bottom: 1rem;
}

.company-title-block {
  margin: 0 0 0.9rem;
}

.contact-address {
  color: #67635e;
  font-weight: 500;
}

.contact-row {
  margin: 0.45rem 0;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a857e;
  margin-bottom: 0.12rem;
}

.contact-value {
  color: #4e4a45;
  font-weight: 500;
}

#contatti .card p,
#contatti .card a:not(.facebook-link) {
  color: #6a6661;
}

.facebook-link {
  margin-top: 0.35rem;
}

.site-footer {
  background: rgba(20, 16, 13, 0.92);
  border-top: 3px solid var(--wood);
  padding: 1rem 0 1.3rem;
}

.footer-wrap {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.parallax {
  transform: translateY(var(--parallax-offset, 0));
  will-change: transform;
}

@media (min-width: 760px) {
  /* Sticky header (nav padding + logo + bottom border) + extra line so h2 clears the bar */
  section[id] {
    scroll-margin-top: calc(1.8rem + 46px + 3px + 1.35rem);
  }

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

  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }

}

@media (max-width: 759px) {
  section[id] {
    scroll-margin-top: 96px;
  }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }

  body {
    padding-top: 82px;
  }

  .menu-toggle {
    display: inline-flex;
    z-index: 2100;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    min-height: 100dvh;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(140deg, rgba(26, 21, 17, 0.97), rgba(42, 31, 22, 0.95));
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    z-index: 2000;
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .main-nav a {
    display: block;
    width: min(82vw, 360px);
    text-align: center;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(139, 94, 52, 0.2);
  }

  .mobile-nav-brand {
    display: block;
    margin-bottom: 0.35rem;
    padding-bottom: 0.9rem;
  }

  .mobile-nav-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    margin: 0 auto 0.5rem;
    display: block;
    border: 1px solid rgba(212, 162, 106, 0.45);
  }

  .mobile-nav-brand .company-name {
    font-size: 1.35rem;
    color: #fff8ef;
  }

  .mobile-nav-brand .company-subline {
    font-size: 0.86rem;
    color: #e7c9a7;
  }
}
