/* ============================================================
   GEOMETRA GIRASOLI VITTORIO — geometragirasolimilano.it
   Palette: Pietra #1e1c1a | Rame #bf4a1e | Crema #fdf8f2
   Font: Raleway (titoli) + Inter (testo)
   ============================================================ */

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

:root {
  --stone:        #1e1c1a;
  --stone-light:  #2d2924;
  --stone-mid:    #3d3730;
  --copper:       #bf4a1e;
  --copper-light: #d4622a;
  --copper-pale:  rgba(191,74,30,.1);
  --cream:        #fdf8f2;
  --cream-dark:   #f5ede0;
  --white:        #ffffff;
  --text:         #302e2b;
  --text-muted:   #7a736a;
  --border:       #e8dfd2;
  --shadow:       0 2px 16px rgba(30,28,26,.09);
  --shadow-lg:    0 6px 36px rgba(30,28,26,.15);
  --radius:       6px;
  --radius-lg:    14px;
  --transition:   .28s ease;
  --font-head:    'Raleway', 'Montserrat', sans-serif;
  --font-body:    'Inter', 'Open Sans', sans-serif;
  --max-w:        1160px;
}

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; }

/* ---- Utility ---- */
.container {
  width: 90%;
  max-width: var(--max-w);
  margin-inline: auto;
}
.section-pad { padding: 88px 0; }
.bg-light    { background: var(--cream); }
.accent      { color: var(--copper); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.btn-primary {
  background: var(--copper);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--copper-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(191,74,30,.35);
}
.btn-outline {
  border: 2px solid rgba(255,255,255,.65);
  color: var(--white);
}
.btn-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: var(--white);
  transform: translateY(-2px);
}
.btn-outline-dark {
  border: 2px solid var(--stone);
  color: var(--stone);
  padding: 14px 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}
.btn-outline-dark:hover {
  background: var(--stone);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }

/* ---- Section labels / headers ---- */
.section-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 12px;
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p  { color: var(--text-muted); }
.section-header--white .section-label { color: var(--copper-light); }
.section-header--white h2 { color: var(--white); }
.section-header--white p  { color: rgba(255,255,255,.65); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.25;
  color: var(--stone);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: var(--white);
  box-shadow: 0 1px 0 var(--border), var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--white);
  transition: color var(--transition);
}
.site-header.scrolled .logo { color: var(--stone); }

.logo-icon {
  width: 46px;
  height: 46px;
  background: var(--copper);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.logo-gv {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .05em;
}
.logo-text {
  font-family: var(--font-head);
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
}
.logo-text strong { font-weight: 800; }
.logo-text small  { font-size: .7rem; opacity: .65; letter-spacing: .08em; text-transform: uppercase; }

/* Nav */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,.1); }
.main-nav a.active { color: var(--white); font-weight: 700; }

.site-header.scrolled .main-nav a { color: var(--text-muted); }
.site-header.scrolled .main-nav a:hover { color: var(--copper); background: var(--copper-pale); }
.site-header.scrolled .main-nav a.active { color: var(--copper); background: var(--copper-pale); }

.btn-nav {
  background: var(--copper) !important;
  color: var(--white) !important;
  padding: 10px 22px !important;
  border-radius: var(--radius) !important;
}
.btn-nav:hover { background: var(--copper-light) !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}
.site-header.scrolled .hamburger span { background: var(--stone); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO — SPLIT LAYOUT (editorial)
   ============================================================ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  position: relative;
}

.hero-left {
  background: var(--stone);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px 64px 100px 60px;
  position: relative;
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, calc(100% - 52px) 100%, 0 100%);
  margin-right: -52px;
}
.hero-left::before {
  content: '';
  position: absolute;
  top: 148px; left: 60px;
  width: 3px;
  height: 52px;
  background: var(--copper);
}

.hero-right {
  position: relative;
  overflow: hidden;
  background: var(--stone-light);
  background-size: cover;
  background-position: center;
}
.hero-right-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(30,28,26,.35) 0%, rgba(30,28,26,.1) 45%, rgba(30,28,26,.72) 100%);
}

.hero-pre {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--copper-light);
  margin-bottom: 26px;
}
.hero-pre::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 2px;
  background: var(--copper);
  flex-shrink: 0;
}
.hero-left h1 {
  color: var(--white);
  font-size: clamp(2.6rem, 4vw, 4rem);
  line-height: 1.1;
  margin-bottom: 28px;
  font-weight: 800;
}
.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 44px;
  max-width: 400px;
  line-height: 1.8;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 60px;
  z-index: 3;
}
.hero-scroll-hint a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.38);
  font-family: var(--font-head);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color var(--transition);
  animation: bounceY 2.2s infinite;
}
.hero-scroll-hint a:hover { color: var(--copper-light); }
@keyframes bounceY {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* Statistiche dentro hero-right */
.hero-stats {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(18,15,12,.84);
  backdrop-filter: blur(10px);
  border-top: 2px solid var(--copper);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  padding: 24px 36px;
  gap: 16px;
  text-align: center;
  z-index: 2;
}
.hero-stat-item { color: var(--white); }
.stat-number {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--copper-light);
}
.stat-plus {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--copper-light);
}
.hero-stat-item p {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 6px;
  color: rgba(255,255,255,.5);
}

/* ============================================================
   CHI SIAMO
   ============================================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.col-text h2 { margin-bottom: 24px; }
.col-text p  { color: var(--text-muted); margin-bottom: 16px; }
.col-text .btn { margin-top: 12px; }

.img-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
}
.img-frame img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.img-placeholder {
  width: 100%;
  height: 460px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--stone-light) 0%, var(--stone) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}
.img-placeholder::after {
  content: '\f0ac';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 5rem;
  color: rgba(255,255,255,.12);
}
.img-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  background: var(--copper);
  color: var(--white);
  padding: 16px 22px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 4px 16px rgba(191,74,30,.4);
}
.img-badge i { font-size: 1.5rem; }

/* ============================================================
   CHI SIAMO — editorial full-bleed split (home)
   ============================================================ */
.chi-siamo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
}
.chi-siamo-image {
  position: relative;
  overflow: hidden;
  min-height: 520px;
}
.chi-siamo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chi-siamo-image.chi-siamo-image-placeholder {
  background: linear-gradient(145deg, var(--stone-light), var(--stone));
  display: flex;
  align-items: center;
  justify-content: center;
}
.chi-siamo-image.chi-siamo-image-placeholder::after {
  content: '\f549';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 7rem;
  color: rgba(255,255,255,.08);
}
.chi-siamo-text {
  padding: 80px 68px 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background: var(--white);
  overflow: hidden;
}
.chi-siamo-text::after {
  content: '\201C';
  position: absolute;
  bottom: -60px; right: 32px;
  font-family: Georgia, serif;
  font-size: 18rem;
  line-height: 1;
  color: rgba(191,74,30,.05);
  pointer-events: none;
  user-select: none;
}
.chi-siamo-text .section-label { margin-bottom: 16px; }
.chi-siamo-text h2 {
  font-size: clamp(1.9rem, 2.8vw, 2.6rem);
  margin-bottom: 24px;
  line-height: 1.15;
}
.chi-siamo-text p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.8; }
.chi-siamo-text .btn { margin-top: 16px; align-self: flex-start; }

/* ============================================================
   SERVIZI
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 26px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0;
  height: 3px;
  background: var(--copper);
  transition: width var(--transition);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}
.service-card:hover::after { width: 100%; }
.service-icon {
  width: 52px;
  height: 52px;
  background: var(--copper-pale);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  color: var(--copper);
  font-size: 1.3rem;
  transition: background var(--transition), color var(--transition);
}
.service-card:hover .service-icon {
  background: var(--copper);
  color: var(--white);
}
.service-card h3 { color: var(--stone); margin-bottom: 10px; }
.service-card p  { font-size: .88rem; color: var(--text-muted); flex: 1; }

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  color: var(--copper);
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: gap var(--transition), color var(--transition);
}
.service-card-link:hover { gap: 12px; color: var(--stone); }
.service-card-link i { font-size: .72rem; }

/* ============================================================
   PERCHÉ — dark numbered horizontal strip con diagonali
   ============================================================ */
.perche {
  background: var(--stone);
  clip-path: polygon(0 52px, 100% 0, 100% calc(100% - 52px), 0 100%);
  margin: -52px 0;
  padding: calc(88px + 52px) 0;
  position: relative;
  z-index: 1;
}
.perche .section-header {
  text-align: left;
  max-width: none;
  margin-bottom: 56px;
}
.perche .section-label { color: var(--copper-light); }
.perche h2 { color: var(--white); }
.perche-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.perche-item {
  background: transparent;
  border: none;
  border-radius: 0;
  border-right: 1px solid rgba(255,255,255,.1);
  padding: 0 40px 0 0;
  text-align: left;
  overflow: visible;
  transition: background var(--transition);
}
.perche-item:not(:first-child) { padding-left: 40px; }
.perche-item:last-child { border-right: none; }
.perche-item:hover { transform: none; box-shadow: none; border-color: rgba(255,255,255,.18); }
.perche-item::before { display: none; }
.perche-num {
  font-family: var(--font-head);
  font-size: 4rem;
  font-weight: 800;
  color: rgba(191,74,30,.22);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -.02em;
  display: block;
}
.perche-item i {
  font-size: 1.5rem;
  color: var(--copper-light);
  margin-bottom: 14px;
  display: block;
}
.perche-item h4 { color: var(--white); margin-bottom: 10px; font-weight: 700; }
.perche-item p  { font-size: .88rem; color: rgba(255,255,255,.52); line-height: 1.75; }

/* ============================================================
   NEWS
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.news-img {
  height: 196px;
  background-size: cover;
  background-position: center;
}
.news-img--1 { background: linear-gradient(135deg, #3d2010 0%, #1e0e06 100%); }
.news-img--2 { background: linear-gradient(135deg, #1e3028 0%, #0d1a14 100%); }
.news-img--3 { background: linear-gradient(135deg, #2a1e3a 0%, #160f20 100%); }
.news-img--4 { background: linear-gradient(135deg, #1e2a30 0%, #0d1518 100%); }
.news-img--5 { background: linear-gradient(135deg, #2e1c10 0%, #160d07 100%); }
.news-body { padding: 26px; }
.news-date {
  font-size: .72rem;
  color: var(--copper);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.news-body h3   { color: var(--stone); margin-bottom: 10px; font-size: 1.02rem; }
.news-body p    { font-size: .88rem; color: var(--text-muted); margin-bottom: 18px; }
.link-more {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  color: var(--copper);
  letter-spacing: .06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}
.link-more:hover { gap: 10px; }

/* ============================================================
   HOME SECTION OVERRIDES (left-aligned headers + news editorial)
   ============================================================ */
#servizi-home .section-header,
#news-home .section-header {
  text-align: left;
  max-width: none;
  margin-bottom: 48px;
}

/* News: featured (1st card large) + stacked (2nd-3rd horizontal) */
#news-home .news-grid {
  grid-template-columns: 1.6fr 1fr;
  align-items: start;
  gap: 24px;
}
#news-home .news-card:first-child {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
}
#news-home .news-card:first-child .news-img { height: 320px; }
#news-home .news-card:not(:first-child) {
  display: grid;
  grid-template-columns: 110px 1fr;
  overflow: hidden;
}
#news-home .news-card:not(:first-child) .news-img {
  height: 100%;
  min-height: 120px;
}
#news-home .news-card:not(:first-child) .news-body { padding: 16px 20px; }
#news-home .news-card:not(:first-child) .news-body h3 { font-size: .9rem; margin-bottom: 6px; }
#news-home .news-card:not(:first-child) .news-body p {
  font-size: .82rem;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   CONTATTI SEZIONE
   ============================================================ */
.contatti { background: var(--stone); }
.contatti .section-label { color: var(--copper-light); }
.contatti h2,
.contatti h3 { color: var(--white); }
.contatti p  { color: rgba(255,255,255,.65); margin-bottom: 32px; }
.two-col--contatti { gap: 64px; }

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: rgba(255,255,255,.8);
}
.contact-list i {
  width: 40px; height: 40px;
  background: rgba(191,74,30,.18);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--copper-light);
  font-size: .95rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-list strong {
  display: block;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--copper-light);
  margin-bottom: 2px;
}
.contact-list a { color: rgba(255,255,255,.8); transition: color var(--transition); }
.contact-list a:hover { color: var(--copper-light); }

/* Form */
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.contact-form h3 { color: var(--stone); margin-bottom: 28px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(191,74,30,.14);
}
.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid { border-color: #e05858; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-error { display: block; font-size: .78rem; color: #e05858; margin-top: 4px; min-height: 18px; }
.form-group--privacy { margin-bottom: 24px; }
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .85rem;
  color: var(--text-muted);
  cursor: pointer;
}
.checkbox-label input { margin-top: 3px; accent-color: var(--copper); }
.checkbox-label a { color: var(--copper); text-decoration: underline; }
.form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(35,150,80,.1);
  border: 1px solid rgba(35,150,80,.3);
  color: #1e7d40;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-size: .9rem;
}
.form-success[hidden] { display: none; }
.form-success i { font-size: 1.2rem; flex-shrink: 0; }
.form-error-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fdf0f0;
  border: 1.5px solid #e05858;
  border-radius: var(--radius);
  color: #c0392b;
  padding: 14px 18px;
  font-size: .88rem;
  margin-top: 12px;
}
.form-error-msg[hidden] { display: none; }

/* ============================================================
   MAP
   ============================================================ */
.map-container { line-height: 0; }
.map-container iframe { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #130f0c;
  color: rgba(255,255,255,.55);
  padding-top: 64px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.footer-brand p { font-size: .88rem; margin-top: 16px; line-height: 1.8; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { font-size: .88rem; transition: color var(--transition); }
.footer-col ul a:hover { color: var(--copper-light); }
.footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  margin-bottom: 10px;
}
.footer-contact i { color: var(--copper-light); width: 14px; }
.footer-contact a:hover { color: var(--copper-light); }

.social-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.social-links a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.07);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.6);
  font-size: .9rem;
  transition: background var(--transition), color var(--transition);
}
.social-links a:hover { background: var(--copper); color: var(--white); }

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: .78rem;
}
.footer-bottom a { color: var(--copper-light); }

/* ============================================================
   PAGE HERO (pagine interne)
   ============================================================ */
.page-hero {
  position: relative;
  padding: 140px 0 80px;
  background:
    linear-gradient(160deg, rgba(30,28,26,.95) 45%, rgba(30,28,26,.75) 100%),
    url('../img/hero-bg.jpg') center/cover no-repeat;
  background-color: var(--stone);
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, var(--stone) 0%, rgba(45,41,36,.5) 100%);
}
.page-hero-content {
  position: relative;
  z-index: 1;
}
.page-hero-content h1 {
  color: var(--white);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-bottom: 14px;
}
.page-hero-content p {
  color: rgba(255,255,255,.68);
  font-size: 1.05rem;
  max-width: 560px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: .72rem;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.breadcrumb a        { color: var(--copper-light); }
.breadcrumb a:hover  { text-decoration: underline; }
.breadcrumb i        { font-size: .55rem; color: rgba(255,255,255,.35); }
.breadcrumb span     { color: rgba(255,255,255,.65); }

/* ============================================================
   VALORI (chi siamo)
   ============================================================ */
.valori-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.valore-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.valore-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.valore-num {
  font-family: var(--font-head);
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(191,74,30,.1);
  line-height: 1;
  margin-bottom: 12px;
}
.valore-card h3 { color: var(--stone); margin-bottom: 10px; font-size: 1rem; }
.valore-card p  { font-size: .88rem; color: var(--text-muted); }

/* ============================================================
   PROCESSO DI LAVORO (servizi)
   ============================================================ */
.processo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  position: relative;
}
.processo-grid::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
  opacity: .25;
}
.processo-step {
  text-align: center;
  padding: 0 24px;
  position: relative;
}
.processo-num {
  width: 52px; height: 52px;
  background: var(--copper);
  color: var(--white);
  border-radius: 50%;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 14px rgba(191,74,30,.35);
}
.processo-step h3 { font-size: 1rem; color: var(--stone); margin-bottom: 10px; }
.processo-step p  { font-size: .88rem; color: var(--text-muted); }

/* ============================================================
   CONTATTI CTA STRIP
   ============================================================ */
.contatti-cta {
  background: var(--stone);
}
.contatti-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.contatti-cta .section-label { color: var(--copper-light); }
.contatti-cta h2 { color: var(--white); margin-bottom: 8px; }
.contatti-cta p  { color: rgba(255,255,255,.65); max-width: 480px; }
.contatti-cta-actions {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ============================================================
   SKELETON + DATA MESSAGES
   ============================================================ */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
}
.skeleton-grid--news { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.skeleton-card {
  background: linear-gradient(90deg, #ede8e0 25%, #f5f0e8 50%, #ede8e0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 14px;
  height: 200px;
}
.skeleton-card--news { height: 340px; }
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.data-empty, .data-error {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: .95rem;
  width: 100%;
  grid-column: 1/-1;
}
.data-error { color: #e05858; }

/* ============================================================
   MODALE ARTICOLO COMPLETO
   ============================================================ */
.news-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(20,16,12,.68);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: nmFade .22s ease;
}
.news-modal-overlay[hidden] { display: none; }
@keyframes nmFade { from { opacity: 0; } to { opacity: 1; } }
.news-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 700px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  position: relative;
  animation: nmSlide .22s ease;
  box-shadow: var(--shadow-lg);
}
@keyframes nmSlide {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.news-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px;
  border: none;
  background: var(--cream);
  border-radius: var(--radius);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: .9rem;
  color: var(--text);
  transition: background var(--transition), color var(--transition);
}
.news-modal-close:hover { background: var(--stone); color: var(--white); }
.news-modal-date {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--copper);
  display: block;
  margin-bottom: 10px;
}
.news-modal-title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--stone);
  margin-bottom: 20px;
  line-height: 1.3;
}
.news-modal-body p { color: #4a4540; line-height: 1.85; margin-bottom: 16px; }

/* Gallery carousel */
.news-gallery {
  position: relative;
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--stone);
}
.gallery-viewport { position: relative; width: 100%; padding-top: 60%; }
.gallery-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s ease; }
.gallery-slide.active { opacity: 1; }
.gallery-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; background: rgba(0,0,0,.5); color: #fff;
  border: none; width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; display: grid; place-items: center; transition: background .2s;
}
.gallery-btn:hover { background: rgba(0,0,0,.85); }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-counter {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: #fff;
  font-size: .75rem; padding: 2px 10px; border-radius: 20px; pointer-events: none;
}

/* ============================================================
   BACK TO TOP + LOGO IMG
   ============================================================ */
/* Logo come immagine reale (quando logo_url è impostato) */
.logo--img { gap: 0; }
.logo-img-full {
  height: 46px;
  width: auto;
  max-width: 220px;
  display: block;
  object-fit: contain;
  filter: brightness(1);
  transition: opacity var(--transition);
}
.logo-img-full:hover { opacity: .85; }
/* Su header scrolled (sfondo bianco) nessun filtro aggiuntivo */
.site-header.scrolled .logo-img-full { filter: none; }

.logo-img-full--footer {
  height: 40px;
  /* sul footer scuro aumentiamo leggermente la luminosità se serve */
  filter: brightness(1.15);
}

.logo-img { height: 46px; width: auto; display: block; object-fit: contain; }
.logo--footer .logo-img { height: 36px; }

.back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 44px; height: 44px;
  background: var(--copper);
  color: var(--white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .9rem;
  box-shadow: 0 4px 16px rgba(191,74,30,.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 999;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover   { background: var(--copper-light); }

/* ============================================================
   PAGINA SERVIZIO DEDICATA
   ============================================================ */
.page-hero--servizio .page-hero-content h1 { margin-bottom: 8px; }
.servizio-hero-inner { display: flex; align-items: center; gap: 28px; margin-top: 8px; }
.servizio-hero-icon {
  flex-shrink: 0;
  width: 72px; height: 72px;
  background: rgba(191,74,30,.16);
  border-radius: var(--radius-lg);
  display: grid; place-items: center;
  color: var(--copper-light);
  font-size: 1.9rem;
}
.two-col--servizio { gap: 60px; align-items: flex-start; }
.two-col--servizio .col-text h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 18px; }
.two-col--servizio .col-text p  { color: var(--text-muted); margin-bottom: 14px; line-height: 1.78; }
.servizio-img-full { width: 100%; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.servizio-img-full img { width: 100%; height: auto; display: block; }
.servizio-img-placeholder {
  width: 100%; aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--stone-light) 0%, var(--stone) 100%);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
}
.servizio-img-placeholder i { font-size: 4rem; color: rgba(255,255,255,.14); }
.punti-box {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  margin-top: 28px;
}
.punti-box h3 { color: var(--stone); margin-bottom: 16px; font-size: 1rem; }
.punti-box ul { display: flex; flex-direction: column; gap: 12px; }
.punti-box ul li { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--text-muted); }
.punti-box ul li i { color: var(--copper); margin-top: 3px; font-size: .85rem; flex-shrink: 0; }
.servizio-cta-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============================================================
   MODAL RICHIESTA SERVIZIO
   ============================================================ */
.modal-overlay--site {
  position: fixed; inset: 0;
  background: rgba(20,16,12,.68);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: grid; place-items: center; padding: 20px;
}
.modal-overlay--site[hidden] { display: none; }
.modal-site {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; padding: 44px 48px;
  position: relative; animation: modalIn .22s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
.modal-site-close {
  position: absolute; top: 20px; right: 20px;
  width: 36px; height: 36px;
  border-radius: 50%; border: none;
  background: var(--cream); color: var(--text-muted);
  cursor: pointer; display: grid; place-items: center;
  transition: background var(--transition), color var(--transition);
}
.modal-site-close:hover { background: var(--stone); color: var(--white); }
.modal-site-header { margin-bottom: 28px; }
.modal-site-header .section-label { margin-bottom: 6px; }
.modal-site-header h2 { font-size: 1.5rem; color: var(--stone); margin: 0; }
.modal-richiesta-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.modal-richiesta-form .form-group { margin-bottom: 16px; }
.modal-richiesta-form .form-group label {
  display: block; font-family: var(--font-head); font-size: .72rem;
  font-weight: 700; color: var(--stone); margin-bottom: 6px;
  letter-spacing: .06em; text-transform: uppercase;
}
.modal-richiesta-form .req { color: var(--copper); }
.modal-richiesta-form input,
.modal-richiesta-form textarea {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; font-family: var(--font-body); font-size: .9rem;
  color: var(--stone); background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition); box-sizing: border-box;
}
.modal-richiesta-form input:focus,
.modal-richiesta-form textarea:focus {
  outline: none; border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(191,74,30,.12);
}
.modal-richiesta-form textarea { resize: vertical; }
.modal-richiesta-form .form-error { color: #d94f4f; font-size: .78rem; margin-top: 4px; display: block; }
.modal-richiesta-form .form-group--privacy { margin-top: 4px; }
.modal-richiesta-form .checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .85rem; color: var(--text-muted); }
.modal-richiesta-form .checkbox-label input[type="checkbox"] { width: auto; margin-top: 2px; accent-color: var(--copper); }
.modal-richiesta-form .checkbox-label a { color: var(--copper); }
.btn-full { width: 100%; justify-content: center; margin-top: 8px; }

/* ============================================================
   WHATSAPP QR (contatti.php)
   ============================================================ */
.whatsapp-qr {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
}
.whatsapp-qr-inner { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; }
.whatsapp-qr-text { max-width: 480px; }
.whatsapp-qr-text h2 { color: var(--stone); margin-bottom: 12px; }
.whatsapp-qr-text p  { color: var(--text-muted); margin-bottom: 28px; line-height: 1.7; }
.btn-whatsapp {
  display: inline-flex; align-items: center; gap: 10px;
  background: #25d366; color: #fff; padding: 13px 28px;
  border-radius: var(--radius); font-weight: 600; font-size: .95rem;
  text-decoration: none; transition: background .2s, transform .15s;
}
.btn-whatsapp:hover { background: #1ebe5d; transform: translateY(-2px); color: #fff; }
.whatsapp-qr-img { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.whatsapp-qr-img img { border-radius: 12px; border: 4px solid var(--white); box-shadow: var(--shadow-lg); display: block; }
.whatsapp-qr-hint { font-size: .78rem; color: var(--text-muted); text-align: center; display: flex; align-items: center; gap: 6px; }

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.whatsapp-float {
  position: fixed; bottom: 32px; left: 32px;
  width: 52px; height: 52px; background: #25d366; color: #fff;
  border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem;
  box-shadow: 0 4px 16px rgba(37,211,102,.45); z-index: 999;
  transition: transform .2s, background .2s; text-decoration: none;
}
.whatsapp-float:hover { background: #1ebe5d; transform: scale(1.1); color: #fff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .two-col       { grid-template-columns: 1fr; gap: 48px; }
  .col-image     { order: -1; }
  .img-frame img,
  .img-placeholder { height: 340px; }
  .contatti-cta-inner { flex-direction: column; align-items: flex-start; }
  .processo-grid::before { display: none; }
  /* Chi siamo split */
  .chi-siamo-split { grid-template-columns: 1fr; }
  .chi-siamo-image { min-height: 360px; }
  .chi-siamo-text  { padding: 56px 40px; }
  /* Perché */
  .perche-grid { grid-template-columns: 1fr 1fr; gap: 0; }
  .perche-item:nth-child(2n) { border-right: none; }
  .perche-item { border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 40px; margin-bottom: 0; }
  .perche-item:nth-child(n+3) { padding-top: 40px; }
  .perche-item:nth-child(3), .perche-item:nth-child(4) { border-bottom: none; }
  /* News editorial */
  #news-home .news-grid { grid-template-columns: 1fr; }
  #news-home .news-card:first-child { grid-row: auto; }
}

@media (max-width: 768px) {
  .section-pad { padding: 64px 0; }
  .hamburger { display: flex; }
  .main-nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--stone);
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
  }
  .main-nav.open { max-height: 420px; }
  .main-nav ul { flex-direction: column; padding: 16px 24px 24px; gap: 4px; }
  .main-nav a  { display: block; padding: 12px 16px; color: rgba(255,255,255,.8); }
  .main-nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
  .main-nav a.active { color: var(--copper-light); background: transparent; }
  .site-header.scrolled .main-nav a { color: rgba(255,255,255,.8); }
  .site-header.scrolled .main-nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
  .site-header.scrolled .main-nav a.active { color: var(--copper-light); background: transparent; }
  .form-row   { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-left { clip-path: none; margin-right: 0; padding: 120px 28px 80px; min-height: 70vh; }
  .hero-left::before { left: 28px; top: 128px; }
  .hero-scroll-hint { left: 28px; bottom: 24px; }
  .hero-right { min-height: 300px; }
  .hero-stats { padding: 18px 20px; grid-template-columns: repeat(2, 1fr); }
  .hero-cta   { flex-direction: column; align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  /* Chi siamo split stacked */
  .chi-siamo-text { padding: 40px 28px; }
  .chi-siamo-text::after { display: none; }
  /* Perché on mobile: stack all */
  .perche { clip-path: none; margin: 0; padding: 64px 0; }
  .perche-grid { grid-template-columns: 1fr; }
  .perche-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); padding: 28px 0 !important; }
  .perche-item:last-child { border-bottom: none; }
  #news-home .news-card:not(:first-child) { grid-template-columns: 90px 1fr; }
  .page-hero { padding: 120px 0 60px; }
  .processo-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .news-modal { padding: 28px 20px; }
  .servizio-hero-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .servizio-cta-btns { flex-direction: column; }
  .servizio-cta-btns .btn,
  .servizio-cta-btns .btn-outline-dark { width: 100%; justify-content: center; }
  .whatsapp-qr-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .whatsapp-qr-text  { max-width: 100%; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px 16px; }
  #news-home .news-card:not(:first-child) { grid-template-columns: 1fr; }
  #news-home .news-card:not(:first-child) .news-img { height: 140px; min-height: auto; }
  .contact-form  { padding: 28px 20px; }
  .back-to-top   { bottom: 20px; right: 20px; }
  .processo-grid { grid-template-columns: 1fr; }
  .contatti-cta-actions { width: 100%; }
  .contatti-cta-actions .btn { flex: 1; justify-content: center; }
  .whatsapp-float { bottom: 20px; left: 20px; width: 46px; height: 46px; font-size: 1.4rem; }
  .modal-site { padding: 32px 24px; }
  .modal-richiesta-form .form-row { grid-template-columns: 1fr; }
  .hero-pre::before { display: none; }
}
