/* ==== CSS RESET & NORMALIZATION ==== */
html {
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  font-size: 16px;
  background: #F9F7F3;
  color: #233047;
}
*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}
body {
  min-height: 100vh;
  background: #F9F7F3;
  color: #233047;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  line-height: 1.6;
  font-size: 16px;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul, ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
a {
  color: #233047;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #A78E65;
  outline: none;
}
button, input, select, textarea {
  font: inherit;
  background: none;
  border: none;
  outline: none;
}
button {
  cursor: pointer;
}
hr {
  border: none;
  border-top: 1px solid #e7e6e3;
  margin: 32px 0;
}

/* ==== BRAND VARIABLES ==== */
:root {
  --color-primary: #233047;
  --color-secondary: #A78E65;
  --color-accent: #F9F7F3;
  --color-grey: #EAE9E5;
  --color-shadow: rgba(35,48,71,0.08);
  --font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;
}

/* ==== TYPOGRAPHY ==== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  color: #233047;
  margin-bottom: 16px;
  font-weight: 600;
}
h1 {
  font-size: 2.25rem; /* 36px */
  line-height: 1.15;
  margin-bottom: 20px;
}
h2 {
  font-size: 1.5rem; /* 24px */
  line-height: 1.2;
  margin-bottom: 18px;
}
h3 {
  font-size: 1.25rem; /* 20px */
  line-height: 1.3;
  margin-bottom: 14px;
}
h4, h5, h6 {
  font-size: 1.1rem;
  line-height: 1.4;
}
p, ul li, ol li, address, article, .text-section, .content-wrapper, .footer-contact {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #233047;
}
strong {
  font-weight: 600;
  color: #233047;
}

/* ==== GENERIC LAYOUT ==== */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ==== HEADER ==== */
header {
  width: 100%;
  background: #F9F7F3;
  border-bottom: 1px solid #EAEBEE;
  position: relative;
  z-index: 10;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
header img {
  width: 140px;
  height: auto;
}
nav.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}
nav.main-nav a {
  font-family: var(--font-body);
  font-size: 1rem;
  color: #233047;
  padding: 8px 4px;
  border-radius: 4px;
  transition: color .18s, background .18s;
}
nav.main-nav a:hover, nav.main-nav a:focus {
  background: #eae9e5;
  color: #A78E65;
}
.cta-button {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  border-radius: 20px;
  padding: 10px 26px;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px var(--color-shadow);
  transition: background .17s, color .17s, box-shadow .22s;
  border: none;
  text-align: center;
}
.cta-button:hover, .cta-button:focus {
  background: #A78E65;
  color: #fff;
  box-shadow: 0 4px 14px var(--color-shadow);
}

/* ==== MOBILE MENU ==== */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-primary);
  margin-left: auto;
  z-index: 25;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.15s;
}
.mobile-menu-toggle:focus {
  background: #ECEBEB;
  outline: none;
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #F9F7F3;
  z-index: 40;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(.86,0,.07,1);
  display: flex;
  flex-direction: column;
  padding-top: 32px;
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2.2rem;
  color: #A78E65;
  background: none;
  margin: 0 30px 18px 0;
  padding: 8px;
  border-radius: 50%;
  border: none;
  transition: background 0.18s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #ECEBEB;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-left: 36px;
}
.mobile-nav a {
  color: #233047;
  font-size: 1.13rem;
  font-family: var(--font-body);
  padding: 12px 8px;
  border-radius: 4px;
  width: 180px;
  transition: background .16s, color .16s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #EAE9E5;
  color: #A78E65;
}

@media (max-width: 991px) {
  nav.main-nav { display: none; }
  .cta-button { display: none; }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (min-width: 992px) {
  .mobile-menu { display: none !important; }
}

/* ==== MAIN LAYOUT SECTIONS ==== */
.section, section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  width: 100%;
}
section:last-child {
  margin-bottom: 0;
}
.content-wrapper {
  gap: 24px;
}

/* ==== HERO ==== */
.hero {
  background: linear-gradient(90deg,#f9f7f3 70%,#ece9e2 100%);
  min-height: 320px;
  padding-top: 48px;
  padding-bottom: 48px;
  display: flex;
  align-items: center;
}
.hero h1 {
  font-size: 2.4rem;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 18px;
}
.hero p {
  font-size: 1.18rem;
  margin-bottom: 22px;
  color: #455265;
}
.hero .cta-button {
  margin-top: 6px;
}

/* ==== FEATURES FLEX LAYOUT (UL) ==== */
.features ul {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  width: 100%;
  margin-top: 18px;
}
.features ul li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px var(--color-shadow);
  padding: 32px 24px 28px 24px;
  flex: 1 1 230px;
  min-width: 210px;
  transition: box-shadow .19s, transform .14s;
}
.features ul li:hover {
  box-shadow: 0 8px 28px var(--color-shadow);
  transform: translateY(-3px) scale(1.025);
}
.features ul li img {
  width: 42px; height: 42px;
  object-fit: contain;
}
.features ul li h3 {
  font-size: 1.18rem;
  color: var(--color-primary);
  margin: 0 0 6px 0;
}

/* ==== GENERIC CARD CONTAINER ==== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  border-radius: 16px;
  box-shadow: 0 2px 12px var(--color-shadow);
  background: #fff;
  padding: 30px 22px;
  flex: 1 1 260px;
  min-width: 220px;
  transition: box-shadow .2s, transform .15s;
}
.card:hover {
  box-shadow: 0 8px 24px var(--color-shadow);
  transform: translateY(-2px) scale(1.014);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

/* ==== CONTENT GRID/LIST ==== */
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
}

/* ==== TESTIMONIALS ==== */
.testimonials {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 2px 24px var(--color-shadow);
  margin-bottom: 60px;
}
.testimonials h2 {
  text-align: left;
  margin-bottom: 18px;
}
.testimonial-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 20px 18px 20px;
  border-radius: 18px;
  background: #FAFAF8;
  min-width: 220px;
  flex: 1 1 290px;
  box-shadow: 0 1px 8px var(--color-shadow);
  color: #233047;
  font-size: 1rem;
  transition: box-shadow .16s;
}
.testimonial-card strong {
  font-size: 1.05rem;
  font-family: var(--font-body);
  color: #233047;
  letter-spacing: 0.01em;
}
.testimonial-card p {
  color: #233047;
  font-size: 1.02rem;
}
.testimonial-card:hover {
  box-shadow: 0 8px 28px var(--color-shadow);
}

/* ==== CTA BAR ==== */
.cta-bar {
  background: #233047;
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 24px var(--color-shadow);
  margin-bottom: 60px;
}
.cta-bar .content-wrapper {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
}
.cta-bar p {
  color: #fff;
  font-size: 1.13rem;
}
.cta-bar .cta-button {
  background: #A78E65;
  color: #fff;
  box-shadow: 0 2px 10px var(--color-shadow);
}
.cta-bar .cta-button:hover {
  background: #233047;
  color: #fff;
}

/* ==== FOOTER ==== */
footer {
  background: #fff;
  border-top: 1px solid #EAEBEE;
  margin-top: 70px;
  padding-top: 38px;
  padding-bottom: 34px;
  width: 100%;
}
footer .container {
  display: flex;
  flex-direction: column;
}
footer .content-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-logo img {
  width: 110px;
}
.footer-contact h3 {
  font-size: 1.13rem;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}
.footer-contact address, .footer-contact a {
  font-size: 0.98rem;
  color: #233047;
  line-height: 1.5;
}
.footer-contact a {
  text-decoration: underline;
  color: #A78E65;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-nav a {
  color: #233047;
  font-size: 0.97rem;
  padding: 3px 0;
  transition: color .15s;
}
.footer-nav a:hover {
  color: #A78E65;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-social a img {
  width: 28px; height: 28px;
  border-radius: 6px;
  filter: grayscale(50%) brightness(0.9);
  transition: filter .16s;
}
.footer-social a:hover img { filter: none; }

/* ==== LEGAL + GENERIC LIST SECTIONS ==== */
.legal ul, .legal ol {
  margin-left: 18px;
}
.legal li {
  margin-bottom: 10px;
}
.legal h2 {
  font-size: 1.22rem;
  margin-top: 16px;
}

/* ==== TEAM & ABOUT (CHI SIAMO etc.) ==== */
.team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.text-section {
  background: #fff;
  padding: 28px 22px;
  border-radius: 14px;
  box-shadow: 0 2px 12px var(--color-shadow);
  flex: 1 1 250px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==== FAQ ==== */
.faq ul {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.faq li strong {
  display: block;
  margin-bottom: 6px;
  color: #233047;
  font-size: 1.05rem;
}
.faq li p {
  color: #545454;
  font-size: .97rem;
}

/* ==== CONTACT SECTION ==== */
.contact-section .contact-details, .contact-section .map-location {
  background: #fff;
  padding: 24px 18px;
  border-radius: 12px;
  box-shadow: 0 2px 12px var(--color-shadow);
  margin-bottom: 22px;
  flex: 1 1 240px;
}
.contact-section .content-wrapper {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 22px;
}

/* ==== CARD, SPACING, ALIGNMENT: MANDATORY PATTERNS ==== */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ==== RESPONSIVE BREAKPOINTS ==== */
@media (max-width: 1099px) {
  .container {
    max-width: 98vw;
    padding-left: 10px;
    padding-right: 10px;
  }
  .content-wrapper {
    gap: 14px;
  }
}
@media (max-width: 900px) {
  .features ul {
    gap: 18px;
  }
  .team-list {
    gap: 20px;
  }
  .testimonial-list {
    gap: 16px;
  }
}
@media (max-width: 768px) {
  h1 {
    font-size: 1.53rem;
  }
  h2 {
    font-size: 1.17rem;
  }
  .hero {
    min-height: 160px;
    padding-top: 24px;
    padding-bottom: 24px;
  }
  .features ul, .testimonial-list, .team-list {
    flex-direction: column;
    gap: 18px;
  }
  .content-wrapper {
    gap: 8px;
  }
  .footer-social {
    margin-top: 8px;
  }
  .contact-section .content-wrapper {
    flex-direction: column;
  }
  .section, section {
    padding: 26px 6px;
    margin-bottom: 36px;
  }
  .cta-bar {
    border-radius: 10px;
    padding: 0 2px;
  }
  footer .content-wrapper {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
}
@media (max-width:540px) {
  .features ul li, .testimonial-card, .card {
    padding: 22px 10px !important;
    min-width: 0;
  }
}

/* ==== PRICES ON SERVIZI ==== */
.service-price {
  color: #A78E65;
  font-weight: 500;
  margin-left: 10px;
  font-size: 1.05em;
  letter-spacing: 0.01em;
}

/* ==== MICRO-INTERACTIONS & TRANSITIONS ==== */
button, .cta-button, nav a, .card, .features ul li, .testimonial-card {
  transition-property: background, color, box-shadow, transform, filter;
  transition-duration: .15s;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid #A78E65;
}

/* ==== COOKIE CONSENT BANNER ==== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #233047;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 18px 22px;
  box-shadow: 0 0 28px 6px var(--color-shadow);
  font-size: 1rem;
  gap: 22px;
  transition: transform 0.42s cubic-bezier(.85,0,.12,1);
  transform: translateY(0);
}
.cookie-banner.hide {
  transform: translateY(110%);
}
.cookie-banner p {
  flex: 1 1 220px;
  margin-bottom: 0;
  color: #fff;
}
.cookie-banner-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.cookie-banner button {
  min-width: 110px;
  border-radius: 16px;
  padding: 9px 18px;
  font-size: .98rem;
  font-family: var(--font-display);
  font-weight: 500;
  border: none;
  transition: background .15s, color .15s;
}
.cookie-banner .accept {
  background: #A78E65;
  color: #fff;
}
.cookie-banner .accept:hover, .cookie-banner .accept:focus {
  background: #233047;
  color: #fff;
}
.cookie-banner .reject {
  background: #fff;
  color: #233047;
  border: 1.5px solid #233047;
}
.cookie-banner .reject:hover, .cookie-banner .reject:focus {
  background: #233047;
  color: #fff;
}
.cookie-banner .settings {
  background: transparent;
  color: #A78E65;
  border: 1.5px solid #A78E65;
}
.cookie-banner .settings:hover, .cookie-banner .settings:focus {
  background: #A78E65;
  color: #fff;
}

/* ==== COOKIE MODAL POPUP ==== */
.cookie-modal {
  display: none;
  position: fixed;
  z-index: 120;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(35, 48, 71, 0.25);
  justify-content: center;
  align-items: center;
}
.cookie-modal.open {
  display: flex;
  animation: fadeIn 0.28s ease-in;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.cookie-modal-content {
  background: #fff;
  color: #233047;
  border-radius: 18px;
  box-shadow: 0 8px 48px 0 rgba(35,48,71,0.12);
  padding: 32px 24px 22px 24px;
  max-width: 380px;
  width: 96vw;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  animation: modalPop 0.36s cubic-bezier(.86,0,.07,1);
}
@keyframes modalPop {
  0% { transform: translateY(40px) scale(0.98); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.cookie-modal-close {
  position: absolute;
  top: 17px;
  right: 19px;
  font-size: 1.7rem;
  color: #A78E65;
  background: transparent;
  border: none;
  border-radius: 50%;
  padding: 4px 7px;
  transition: background .14s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus { background: #F4EBDC; }
.cookie-modal-content h2 {
  font-size: 1.26rem;
  color: #233047;
  margin-bottom: 12px;
}
.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}
.cookie-category label {
  font-size: 1.04rem;
  color: #233047;
  margin-right: 6px;
}
.cookie-toggle {
  appearance: none;
  width: 34px;
  height: 18px;
  background: #EAE9E5;
  border-radius: 11px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background .18s;
}
.cookie-toggle:checked {
  background: #A78E65;
}
.cookie-toggle::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 2px;
  left: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px var(--color-shadow);
  transition: left 0.18s;
}
.cookie-toggle:checked::before {
  left: 18px;
}
.cookie-desc {
  font-size: 0.98rem;
  color: #6f6f6f;
}
.essential[disabled], .cookie-toggle[disabled] {
  opacity: 0.40;
  pointer-events: none;
}
.cookie-modal-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
  justify-content: flex-end;
}
.cookie-modal-buttons button {
  min-width: 110px;
  border-radius: 14px;
  padding: 9px 18px;
  font-size: .99rem;
  font-family: var(--font-display);
  font-weight: 500;
  border: none;
  transition: background .13s, color .13s;
}
.cookie-modal-buttons .accept {
  background: #A78E65;
  color: #fff;
}
.cookie-modal-buttons .accept:focus,
.cookie-modal-buttons .accept:hover {
  background: #233047;
  color: #fff;
}
.cookie-modal-buttons .reject {
  background: #fff;
  color: #233047;
  border: 1.4px solid #233047;
}
.cookie-modal-buttons .reject:focus,
.cookie-modal-buttons .reject:hover {
  background: #233047;
  color: #fff;
}

/* ==== CONFIRMATION PAGE ==== */
.confirmation {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 18px var(--color-shadow);
  min-height: 340px;
  margin-bottom: 60px;
}

/* ==== HELPER: HIDE/SHOW ==== */
.sr-only {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==== PRINT FIX ==== */
@media print {
  header, footer, .cookie-banner, .mobile-menu {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #111 !important;
  }
}
