/* ================================================================
   RBA EDILIZIA — style.css  |  Stili condivisi su tutte le pagine
   ================================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Karla', sans-serif;
  font-size: 15px;
  color: #333;
  background: #fff;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5,h6 { font-family: 'Fraunces', serif; color: #a4222c; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== LAYOUT ===== */
#outer-wrap { display: block; min-height: 100vh; }

/* ===== TOP HEADER ===== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 92px;
  background: #fff;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}
#site-logo { flex-shrink: 0; }
#site-logo img { height: 78px; width: auto; display: block; }
#header-right { display: flex; align-items: center; gap: 22px; }
.header-phone {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Fraunces', serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #a4222c;
  white-space: nowrap;
  transition: color 0.2s;
}
.header-phone i { font-size: 13px; }
.header-phone:hover { color: #1c1c1c; }
#site-navigation { width: auto; }
#site-navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
#site-navigation ul li a {
  display: block;
  padding: 10px 11px;
  font-family: 'Fraunces', serif;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #a4222c;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}
#site-navigation ul li a:hover,
#site-navigation ul li.current > a {
  color: #1c1c1c;
  border-bottom-color: #a4222c;
}

/* ===== DROPDOWN NAV ===== */
#site-navigation ul li.has-dropdown { position: relative; }
.dropdown-arrow {
  font-size: 9px !important;
  margin-left: 5px;
  transition: transform 0.3s ease;
  display: inline-block;
  vertical-align: middle;
}
#site-navigation ul li.has-dropdown:hover > a .dropdown-arrow { transform: rotate(180deg); }
#site-navigation ul li.has-dropdown .dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #fff;
  min-width: 250px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.13);
  border-top: 3px solid #a4222c;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 500;
  display: flex !important;
  flex-direction: column;
  padding: 6px 0;
  pointer-events: none;
}
#site-navigation ul li.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
#site-navigation ul li.has-dropdown .dropdown li { width: 100%; }
#site-navigation ul li.has-dropdown .dropdown li a {
  display: block !important;
  padding: 10px 20px !important;
  font-size: 11px !important;
  letter-spacing: 1.5px !important;
  color: #1c1c1c !important;
  border-bottom: 1px solid #e8e8e8 !important;
  border-left: none !important;
  border-bottom-color: #e8e8e8 !important;
  white-space: nowrap;
  transition: background 0.15s, padding-left 0.15s, color 0.15s !important;
}
#site-navigation ul li.has-dropdown .dropdown li:last-child a { border-bottom: none !important; }
#site-navigation ul li.has-dropdown .dropdown li a:hover {
  background: #f5f5f5 !important;
  color: #a4222c !important;
  padding-left: 26px !important;
}

/* ===== SCROLL-TO-TOP ===== */
#scroll-top {
  position: fixed;
  bottom: 30px; right: 30px;
  width: 42px; height: 42px;
  background: #a4222c;
  color: #fff;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 999;
}
#scroll-top.visible { opacity: 1; }

/* ===== MAIN WRAP ===== */
#wrap {
  margin-left: 0;
  width: 100%;
  min-height: 100vh;
  padding-top: 92px;
}

/* ===== PAGE BANNER (inner pages) ===== */
.page-banner {
  position: relative;
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  padding: 110px 40px 90px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.page-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.58);
}
.page-banner .banner-inner {
  position: relative; z-index: 1;
}
.page-banner h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 3px 20px rgba(0,0,0,0.5);
  line-height: 1.1;
  animation: fadeInUp 0.9s ease both;
}
.page-banner .banner-sub {
  font-family: 'Fraunces', serif;
  font-size: 14px;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  margin-top: 12px;
  animation: fadeInUp 0.9s 0.15s ease both;
}
.page-banner .breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 18px;
  animation: fadeInUp 0.9s 0.25s ease both;
}
.page-banner .breadcrumb a { color: rgba(255,255,255,0.65); transition: color 0.2s; }
.page-banner .breadcrumb a:hover { color: #fff; }
.page-banner .breadcrumb .sep { margin: 0 8px; opacity: 0.5; }
.page-banner .breadcrumb .current-page { color: #c98a90; }

/* ===== COMMON SECTION HEADER ===== */
.section-header { text-align: center; }
.section-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #a4222c;
}
.divider-line {
  width: 60px; height: 2px;
  background: #a4222c;
  margin: 14px auto 0;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: #1c1c1c;
  padding: 70px 40px;
  text-align: center;
}
.cta-section h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.cta-section p {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
  line-height: 1.7;
}
.btn-primary {
  display: inline-block;
  padding: 14px 42px;
  background: #a4222c;
  color: #fff;
  font-family: 'Fraunces', serif;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: 2px solid rgba(255,255,255,0.3);
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
}
.btn-primary:hover {
  background: #c1323b;
  border-color: rgba(255,255,255,0.7);
  transform: translateY(-2px);
}
.btn-outline {
  display: inline-block;
  padding: 13px 40px;
  background: transparent;
  color: #fff;
  font-family: 'Fraunces', serif;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  border: 2px solid rgba(255,255,255,0.5);
  transition: background 0.3s, border-color 0.3s;
  margin-left: 16px;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.9); }

/* ===== ICON BOXES ===== */
.icon-boxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.icon-box {
  flex: 1 1 200px;
  max-width: 240px;
  text-align: center;
  padding: 20px 16px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s, transform 0.6s;
}
.icon-box.visible { opacity: 1; transform: translateY(0); }
.icon-box .icon-wrap {
  width: 60px; height: 60px;
  background: #1c1c1c;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s;
}
.icon-box:hover .icon-wrap { background: #a4222c; }
.icon-box .icon-wrap i { font-size: 20px; color: #fff; }
.icon-box h3 {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  letter-spacing: 2px;
  color: #a4222c;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.icon-box p { font-size: 13px; color: #666; line-height: 1.7; }

/* ===== NEWS CARDS ===== */
.news-section {
  background: #f5f5f5;
  padding: 70px 40px 80px;
}
.news-section .section-header { margin-bottom: 50px; }
.news-section .section-header h2 { margin-bottom: 14px; }
.news-section .section-header .divider-line { margin: 0 auto; }
.news-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}
.news-card {
  flex: 1 1 280px;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.news-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.news-card-img {
  width: 100%; height: 220px;
  object-fit: cover; display: block;
  transition: transform 0.5s ease, opacity 0.4s;
  opacity: 0.88;
}
.news-card:hover .news-card-img { transform: scale(1.04); opacity: 1; }
.news-card-img-wrap { overflow: hidden; flex-shrink: 0; }
.news-card-body {
  padding: 24px 24px 28px;
  display: flex; flex-direction: column; flex: 1;
}
.news-card-meta {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: #a4222c; font-family: 'Fraunces', serif; margin-bottom: 10px;
}
.news-card-body h3 {
  font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase; color: #1c1c1c;
  margin-bottom: 12px; line-height: 1.3;
}
.news-card-body p { font-size: 14px; color: #666; line-height: 1.75; flex: 1; }
.news-card-link {
  display: inline-block;
  margin-top: 16px;
  font-family: 'Fraunces', serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #a4222c;
  border-bottom: 1px solid #a4222c;
  padding-bottom: 2px;
  transition: color 0.2s;
}
.news-card-link:hover { color: #1c1c1c; border-bottom-color: #1c1c1c; }

/* ===== ZONE SERVITE ===== */
.zone-section {
  background: #fff;
  padding: 70px 40px 80px;
}
.zone-inner {
  max-width: 1100px; margin: 0 auto; text-align: center;
}
.zone-inner h2 {
  font-family: 'Fraunces', serif;
  font-size: 28px; font-weight: 600;
  letter-spacing: 5px; text-transform: uppercase; color: #a4222c;
}
.zone-divider { width: 60px; height: 2px; background: #a4222c; margin: 14px auto 24px; }
.zone-intro { font-size: 15px; color: #555; line-height: 1.8; max-width: 700px; margin: 0 auto 36px; }
.zone-intro strong { color: #a4222c; }
.zone-grid {
  list-style: none; display: flex;
  flex-wrap: wrap; gap: 12px 20px; justify-content: center;
}
.zone-grid li {
  font-family: 'Fraunces', serif; font-size: 13px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: #1c1c1c; background: #f5f5f5;
  padding: 8px 16px; border-left: 3px solid #a4222c;
  transition: background 0.2s, color 0.2s;
}
.zone-grid li:hover { background: #a4222c; color: #fff; }
.zone-grid li i { color: #a4222c; margin-right: 7px; font-size: 11px; }
.zone-grid li:hover i { color: #fff; }

/* ===== FAQ SECTION ===== */
.faq-section { background: #f5f5f5; padding: 70px 40px 80px; }
.faq-inner { max-width: 860px; margin: 0 auto; }
.faq-inner .section-header h2 {
  font-family: 'Fraunces', serif; font-size: 28px; font-weight: 600;
  letter-spacing: 5px; text-transform: uppercase; color: #a4222c; text-align: center;
}
.faq-list { margin-top: 44px; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: #fff; border-left: 4px solid #a4222c;
  cursor: pointer; transition: box-shadow 0.2s;
}
.faq-item:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.faq-item summary {
  font-family: 'Fraunces', serif; font-size: 16px; font-weight: 500;
  letter-spacing: 1px; color: #1c1c1c;
  padding: 18px 22px; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 22px; color: #a4222c;
  font-weight: 300; flex-shrink: 0; transition: transform 0.3s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: #a4222c; }
.faq-item p { font-size: 14px; color: #555; line-height: 1.8; padding: 0 22px 20px; }
.faq-item p strong { color: #a4222c; }

/* ===== FORM: INLINE PREVENTIVO ===== */
.inline-prev-wrap { max-width: 640px; margin: 50px auto 0; text-align: left; }
.inline-prev-title {
  font-family: 'Fraunces', serif; font-size: 22px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase; color: #a4222c;
  text-align: center; margin-bottom: 16px;
}
.inline-prev-form { background: #f6f6f6; padding: 30px 32px 34px; border-top: 3px solid #a4222c; }
.inline-prev-row { display: flex; gap: 16px; }
.inline-prev-row .inline-prev-field { flex: 1; }
.inline-prev-field { margin-bottom: 16px; }
.inline-prev-field label {
  display: block; font-family: 'Fraunces', serif;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #a4222c; margin-bottom: 5px;
}
.inline-prev-field input,
.inline-prev-field select,
.inline-prev-field textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid #ddd; background: #fff;
  font-family: 'Karla', sans-serif; font-size: 14px; color: #333;
  outline: none; transition: border-color 0.2s;
  border-radius: 0; appearance: none; -webkit-appearance: none;
}
.inline-prev-field input:focus,
.inline-prev-field select:focus,
.inline-prev-field textarea:focus { border-color: #a4222c; }
.inline-prev-field textarea { resize: vertical; min-height: 80px; }
.inline-prev-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a4222c' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.inline-prev-success {
  background: #f6f6f6; border-top: 3px solid #a4222c;
  padding: 40px 32px; text-align: center;
}
.prev-submit-btn {
  display: block; width: 100%; padding: 14px 20px;
  background: #a4222c; color: #fff;
  font-family: 'Fraunces', serif; font-size: 14px;
  letter-spacing: 3px; text-transform: uppercase;
  border: none; cursor: pointer; transition: background 0.3s; margin-top: 6px;
}
.prev-submit-btn:hover { background: #1c1c1c; }
.success-icon {
  width: 64px; height: 64px; background: #a4222c; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 20px;
}
.success-icon i { font-size: 28px; color: #fff; }

/* ===== MODAL PREVENTIVO ===== */
#preventivo-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.75); z-index: 10001;
  align-items: center; justify-content: center; padding: 20px;
}
#preventivo-overlay.open { display: flex; }
#preventivo-modal {
  background: #fff; width: 100%; max-width: 580px;
  max-height: 90vh; overflow-y: auto; position: relative;
  animation: lbIn 0.3s ease;
}
#preventivo-modal .modal-header {
  background: #a4222c; padding: 28px 32px 22px;
}
#preventivo-modal .modal-header h2 {
  font-family: 'Fraunces', serif; font-size: 20px; font-weight: 600;
  letter-spacing: 3px; text-transform: uppercase; color: #fff; margin: 0;
}
#preventivo-modal .modal-header p {
  font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 6px;
}
#preventivo-modal .modal-close {
  position: absolute; top: 16px; right: 20px;
  color: #fff; font-size: 28px; cursor: pointer;
  line-height: 1; user-select: none; opacity: 0.8; transition: opacity 0.2s;
}
#preventivo-modal .modal-close:hover { opacity: 1; }
#preventivo-modal .modal-body { padding: 28px 32px 32px; }
.prev-form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.prev-form-row .prev-field { flex: 1; }
.prev-field { margin-bottom: 16px; }
.prev-field label {
  display: block; font-family: 'Fraunces', serif;
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #a4222c; margin-bottom: 6px;
}
.prev-field input, .prev-field select, .prev-field textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid #ddd; background: #f6f6f6;
  font-family: 'Karla', sans-serif; font-size: 14px; color: #333;
  outline: none; transition: border-color 0.2s;
  border-radius: 0; appearance: none; -webkit-appearance: none;
}
.prev-field input:focus, .prev-field select:focus, .prev-field textarea:focus {
  border-color: #a4222c; background: #fff;
}
.prev-field textarea { resize: vertical; min-height: 90px; }
.prev-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a4222c' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
#preventivo-success {
  display: none; text-align: center; padding: 40px 32px;
}
#preventivo-success h3 {
  font-family: 'Fraunces', serif; font-size: 22px;
  letter-spacing: 2px; text-transform: uppercase; color: #a4222c; margin-bottom: 12px;
}
#preventivo-success p { font-size: 14px; color: #555; line-height: 1.7; }

/* ===== LIGHTBOX ===== */
#lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92); z-index: 10000;
  align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain; border: 2px solid rgba(255,255,255,0.15);
  animation: lbIn 0.3s ease;
}
#lightbox-close {
  position: absolute; top: 20px; right: 28px;
  color: #fff; font-size: 36px; cursor: pointer;
  line-height: 1; user-select: none;
}

/* ===== FOOTER ===== */
#footer-widgets { background: #efefef; padding: 50px 40px 30px; }
.footer-widgets-inner {
  display: flex; flex-wrap: wrap; gap: 30px;
  max-width: 1200px; margin: 0 auto;
}
.footer-box { flex: 1 1 200px; }
.footer-box h4 {
  font-family: 'Fraunces', serif; font-size: 15px;
  letter-spacing: 2px; text-transform: uppercase; color: #a4222c;
  border-bottom: 1px solid #aaa; padding-bottom: 10px; margin-bottom: 16px;
}
.footer-box p, .footer-box .textwidget { font-size: 13px; color: #777; line-height: 1.9; }
.footer-box .textwidget a { color: #a4222c; text-decoration: none; transition: color 0.2s; }
.footer-box .textwidget a:hover { color: #1c1c1c; }
.footer-zone-list { font-size: 12px; line-height: 2; color: #888; }

/* ===== FOOTER ZONE DROPDOWN ===== */
.footer-zone-dropdown summary {
  font-family: 'Fraunces', serif; font-size: 15px;
  letter-spacing: 2px; text-transform: uppercase; color: #a4222c;
  border-bottom: 1px solid #aaa; padding-bottom: 10px; margin-bottom: 14px;
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-zone-dropdown summary::-webkit-details-marker { display: none; }
.footer-zone-dropdown summary::after { content: '+'; font-size: 16px; font-weight: 300; color: #a4222c; flex-shrink: 0; }
.footer-zone-dropdown[open] summary::after { content: '\2212'; }
.footer-zone-dropdown .footer-zone-links { list-style: none; font-size: 13px; line-height: 2; }
.footer-zone-dropdown .footer-zone-links a { color: #777; text-decoration: none; transition: color 0.2s; }
.footer-zone-dropdown .footer-zone-links a:hover { color: #a4222c; }
.footer-zone-more { font-size: 11.5px; color: #999; margin-top: 12px; line-height: 1.7; }
#footer-bottom { background: #a4222c; text-align: center; padding: 16px 20px; }
#footer-bottom #copyright {
  font-size: 12px; letter-spacing: 0.5px;
  color: rgba(255,255,255,0.9); line-height: 1.7;
}
#footer-bottom #copyright a { color: rgba(255,255,255,0.8); text-decoration: none; }
#footer-bottom #copyright a:hover { color: #fff; }

/* ===== COOKIE BAR ===== */
#cookie-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(20,20,20,0.95);
  padding: 14px 30px;
  display: flex; align-items: center; justify-content: center; gap: 20px;
  z-index: 9999; font-size: 13px; color: rgba(255,255,255,0.85); flex-wrap: wrap;
}
#cookie-bar button {
  background: #a4222c; border: none; padding: 8px 28px;
  color: #fff; font-family: 'Fraunces', serif;
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}
#cookie-bar button:hover { background: #1c1c1c; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0; transform: translateY(40px);
  transition: opacity 0.75s cubic-bezier(0.22,1,0.36,1), transform 0.75s cubic-bezier(0.22,1,0.36,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal:nth-child(5) { transition-delay: 0.32s; }
.reveal:nth-child(6) { transition-delay: 0.40s; }

/* ===== ENHANCED HOVER — CARD LIFT ===== */
.news-card {
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.news-card:hover {
  box-shadow: 0 18px 50px rgba(0,0,0,0.13);
  transform: translateY(-6px);
}
.news-card-img {
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1), opacity 0.4s;
}
.news-card:hover .news-card-img { transform: scale(1.06); opacity: 1; }

.zone-grid li {
  transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.zone-grid li:hover {
  background: #a4222c; color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(164,34,44,0.3);
}

.faq-item {
  transition: box-shadow 0.3s, transform 0.3s;
}
.faq-item:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,0.10);
  transform: translateX(4px);
}

/* ===== BUTTON ANIMATIONS ===== */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(164,34,44,0.4); }
.btn-primary:active { transform: translateY(-1px); }

.btn-outline {
  transition: background 0.3s, border-color 0.3s, transform 0.25s, box-shadow 0.25s;
}
.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.9);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ===== ICON BOX HOVER ===== */
.icon-box {
  transition: opacity 0.6s, transform 0.6s, box-shadow 0.3s;
  cursor: default;
}
.icon-box:hover { transform: translateY(-6px) !important; box-shadow: 0 12px 36px rgba(0,0,0,0.08); }
.icon-box .icon-wrap {
  transition: background 0.3s, transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.icon-box:hover .icon-wrap {
  background: #a4222c;
  transform: scale(1.12) rotate(-5deg);
}

/* ===== LOGO HOVER ===== */
#site-logo img {
  transition: transform 0.3s ease, opacity 0.3s;
}
#site-logo img:hover { transform: scale(1.04); opacity: 0.9; }

/* ===== SCROLL TOP BUTTON ===== */
#scroll-top {
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
}
#scroll-top:hover { transform: translateY(-4px); background: #1c1c1c; }

/* ===== PAGE BANNER PARALLAX POLISH ===== */
.page-banner h1 { animation: bannerSlideUp 0.9s cubic-bezier(0.22,1,0.36,1) both; }
.page-banner .banner-sub { animation: bannerSlideUp 0.9s 0.15s cubic-bezier(0.22,1,0.36,1) both; }
.page-banner .breadcrumb { animation: bannerSlideUp 0.9s 0.28s cubic-bezier(0.22,1,0.36,1) both; }

/* ===== FOOTER BOX HOVER ===== */
.footer-box {
  transition: transform 0.25s ease;
}
.footer-box:hover { transform: translateY(-3px); }

/* ===== PREV SUBMIT BUTTON ===== */
.prev-submit-btn {
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}
.prev-submit-btn:hover {
  background: #1c1c1c;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(28,28,28,0.3);
}
.prev-submit-btn:active { transform: translateY(0); }

/* ===== MODAL ANIMATION ===== */
#preventivo-overlay {
  animation: none;
}
#preventivo-overlay.open #preventivo-modal {
  animation: modalIn 0.35s cubic-bezier(0.22,1,0.36,1) both;
}

/* ===== NEW KEYFRAMES ===== */
@keyframes bannerSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(164,34,44,0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(164,34,44,0); }
}
@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== CTA SECTION ANIMATED ===== */
.cta-section {
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(164,34,44,0.12) 0%, transparent 60%);
  pointer-events: none;
}

/* ===== CARD GENERIC HOVER (sz-card, step-card, vantaggio-card, contatti-info-card) ===== */
.sz-card, .step-card, .vantaggio-card, .contatti-info-card, .materiale-card, .req-box, .serv-card, .bonus-card, .valore-card {
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
}
.sz-card:hover, .step-card:hover, .vantaggio-card:hover, .contatti-info-card:hover, .serv-card:hover, .bonus-card:hover, .valore-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.10);
}
.materiale-card:hover, .req-box:hover {
  transform: translateX(4px);
  box-shadow: 2px 0 0 #a4222c;
}

/* ===== GALLERY ITEM HOVER ===== */
.gallery-item {
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), box-shadow 0.4s;
}
.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 50px rgba(0,0,0,0.18);
  z-index: 2;
}

/* ===== NAV LINK ANIMATED UNDERLINE ===== */
#site-navigation ul > li > a {
  position: relative;
}
#site-navigation ul > li > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: #a4222c;
  transition: left 0.25s ease, right 0.25s ease;
}
#site-navigation ul > li > a:hover::after,
#site-navigation ul > li.current > a::after {
  left: 0; right: 0;
}
/* Remove old border-bottom since we use ::after now */
#site-navigation ul li a {
  border-bottom: none !important;
}

/* ===== SMOOTH HEADER SHADOW on scroll ===== */
#site-header {
  transition: box-shadow 0.3s;
}

/* ===== MOBILE HAMBURGER ===== */
.mobile-toggle {
  display: none; background: none; border: none;
  color: #a4222c; font-size: 24px; cursor: pointer;
  padding: 6px; line-height: 1;
}

/* ===== CONTATTACI (condiviso home + contatti) ===== */
.contattaci-section { background: #fff; padding: 60px 40px; text-align: center; }
.contattaci-section h2 {
  font-family: 'Fraunces', serif; font-size: 26px; font-weight: 600;
  letter-spacing: 3px; color: #a4222c; text-transform: uppercase; margin-bottom: 16px;
}
.contattaci-divider { width: 50px; height: 1px; background: #ccc; margin: 0 auto 30px; }
.contattaci-section h2.sub { font-size: 22px; margin-bottom: 40px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  #site-header { padding: 0 20px; height: 70px; flex-wrap: wrap; align-items: center; }
  #site-logo img { height: 52px; }
  #wrap { padding-top: 70px; }
  .mobile-toggle { display: block; }
  #site-navigation {
    display: none; width: 100%; order: 3; background: #fff;
    position: absolute; top: 70px; left: 0; right: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  #site-navigation.open { display: block; }
  #site-navigation ul { flex-direction: column; gap: 0; }
  #site-navigation ul li a {
    padding: 14px 24px; border-bottom: none;
    border-left: 3px solid transparent; font-size: 14px;
  }
  #site-navigation ul li a::after { display: none; }
  #site-navigation ul li a:hover,
  #site-navigation ul li.current > a {
    border-left-color: #a4222c; border-bottom-color: transparent;
    background: rgba(164,34,44,0.05);
  }
  /* Mobile dropdown — always visible as nested list */
  #site-navigation ul li.has-dropdown .dropdown {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    box-shadow: none;
    border-top: none;
    border-left: 3px solid #e6e6e6;
    margin-left: 24px;
    padding: 0;
    display: none !important;
  }
  #site-navigation ul li.has-dropdown.mob-open .dropdown {
    display: flex !important;
  }
  #site-navigation ul li.has-dropdown .dropdown li a {
    padding: 10px 16px !important;
    font-size: 12px !important;
    color: #a4222c !important;
    border-bottom: 1px solid #e8e8e8 !important;
  }
  .dropdown-arrow { transition: transform 0.3s; }
  #site-navigation ul li.has-dropdown.mob-open .dropdown-arrow { transform: rotate(180deg); }
  .footer-widgets-inner { flex-direction: column; }
  .icon-boxes { flex-direction: column; align-items: center; }
  .icon-box { max-width: 100%; }
  .news-section { padding: 50px 20px 60px; }
  .news-grid { flex-direction: column; }
  .news-card { flex: 1 1 100%; }
  .zone-section, .faq-section { padding: 50px 20px 60px; }
  .cta-section { padding: 50px 20px; }
  .btn-outline { margin-left: 0; margin-top: 12px; display: block; max-width: 280px; margin: 12px auto 0; }
  .page-banner { padding: 90px 20px 70px; background-attachment: scroll; }
  /* Long single words (e.g. "RISTRUTTURAZIONI") at the desktop clamp/letter-spacing
     don't fit narrow screens and force horizontal overflow on the whole page */
  .page-banner h1 { font-size: 28px; letter-spacing: 5px; }
  /* Font-size >=16px on form fields: prevents iOS Safari from auto-zooming on focus */
  .prev-field input, .prev-field select, .prev-field textarea,
  .inline-prev-field input, .inline-prev-field select, .inline-prev-field textarea {
    font-size: 16px;
  }
}

@media (max-width: 600px) {
  .prev-form-row { flex-direction: column; gap: 0; }
  .inline-prev-row { flex-direction: column; gap: 0; }
  #preventivo-modal .modal-header,
  #preventivo-modal .modal-body,
  #preventivo-success { padding-left: 20px; padding-right: 20px; }
  .inline-prev-form { padding: 22px 16px 26px; }
}

/* ===== RECENSIONI ===== */
.recensioni-section {
  background: #f5f5f5;
  padding: 70px 40px 80px;
  text-align: center;
}
.rating-summary {
  font-size: 1.05rem;
  color: #555;
  margin-top: 10px;
  margin-bottom: 36px;
}
.stars-display {
  color: #e8a020;
  font-size: 1.2rem;
  letter-spacing: 2px;
  margin-right: 6px;
}
.recensioni-grid {
  display: flex;
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.recensione-card {
  background: #fff;
  border-radius: 10px;
  padding: 32px 28px 26px;
  flex: 1 1 300px;
  max-width: 340px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rec-stars {
  color: #e8a020;
  font-size: 1.1rem;
  letter-spacing: 2px;
}
.recensione-card blockquote {
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  color: #444;
  line-height: 1.65;
  font-style: italic;
}
.recensione-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.rec-author {
  font-weight: 700;
  font-size: 0.9rem;
  color: #333;
}
.rec-via {
  font-size: 0.78rem;
  color: #888;
  background: #e8e8e8;
  padding: 3px 9px;
  border-radius: 20px;
}
@media (max-width: 900px) {
  .recensioni-section { padding: 50px 20px 60px; }
  .recensioni-grid { flex-direction: column; align-items: center; }
  .recensione-card { max-width: 100%; }
}

/* ===== CHI SIAMO – CERTIFICAZIONI ===== */
.certificazioni-section {
  padding: 60px 40px 70px;
  background: #fff;
  text-align: center;
}
.cert-grid {
  display: flex;
  gap: 24px;
  max-width: 960px;
  margin: 40px auto 0;
  flex-wrap: wrap;
  justify-content: center;
}
.cert-item {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 28px 24px;
  flex: 1 1 200px;
  max-width: 220px;
  text-align: center;
}
.cert-item i {
  font-size: 2rem;
  color: #a4222c;
  margin-bottom: 14px;
  display: block;
}
.cert-item h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cert-item p {
  font-size: 0.82rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}
@media (max-width: 900px) {
  .certificazioni-section { padding: 40px 20px 50px; }
  .cert-grid { flex-direction: column; align-items: center; }
  .cert-item { max-width: 100%; }
}

/* ===== HEADER PHONE (hide on mobile, wrapper becomes transparent to layout) ===== */
@media (max-width: 900px) {
  .header-phone { display: none; }
  #header-right { display: contents; }
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 54px;
  height: 54px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  background-color: #20ba5a;
}

.whatsapp-float .whatsapp-icon {
  width: 30px;
  height: 30px;
  fill: #fff;
}

@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Adjust scroll-top to stack above WhatsApp */
#scroll-top {
  bottom: 95px !important;
}


/* ===== HEADER: niente a-capo nel menu desktop ===== */
@media (min-width: 901px) {
  #site-navigation > ul > li > a { white-space: nowrap; }
}

/* ===== HEADER COMPATTO 901-1360px: il menu esteso non entra con gli stili standard ===== */
@media (min-width: 901px) and (max-width: 1360px) {
  #site-header { padding: 0 12px; }
  #site-logo img { height: 48px; }
  #header-right { gap: 12px; }
  #site-navigation ul { gap: 0; }
  #site-navigation > ul > li > a { padding: 10px 5px; font-size: 10px; letter-spacing: 0.5px; }
  .header-phone { font-size: 12px; }
  .header-phone i { font-size: 11px; }
}

/* ===== HEADER: menu distribuito uniformemente tra logo e telefono ===== */
@media (min-width: 901px) {
  #header-right { flex: 1 1 auto; min-width: 0; margin-left: clamp(16px, 3vw, 48px); }
  #site-navigation { flex: 1 1 auto; }
  #site-navigation > ul { justify-content: space-evenly; }
}
