:root {
  --bg: #f6f9fc;
  --surface: #ffffff;
  --text: #13283a;
  --muted: #43596c;
  --primary: #0b3a63;
  --primary-dark: #082c49;
  --accent: #2e7f4f;
  --accent-dark: #22643e;
  --whatsapp: #6fb98d;
  --whatsapp-dark: #5ca37a;
  --border: #d8e3ed;
  --focus: #ffbf47;
  --container: 1120px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f9fcff 0%, #f3f7fb 100%);
  font-size: 18px;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: #fff;
  color: #000;
  padding: 0.6rem 0.85rem;
}

.skip-link:focus {
  left: 10px;
  top: 10px;
}

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

.narrow {
  max-width: 860px;
}

.section {
  padding: 2.3rem 0;
}

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

h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  letter-spacing: 0.2px;
}

h2 {
  font-size: clamp(1.45rem, 4vw, 2.1rem);
  margin-bottom: 0.9rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}

p {
  margin: 0 0 1rem;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--primary);
  color: #fff;
}

.top-bar-inner {
  min-height: 70px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.9rem;
}

.top-bar-text {
  margin: 0;
  font-size: 1rem;
}

.brand-link {
  display: none;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: 130px;
  height: auto;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 48px;
  border-radius: 11px;
  border: 2px solid transparent;
  padding: 0.72rem 1rem;
  font-weight: 700;
  transform: translateY(0);
  transition: background-color 0.18s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.btn-phone {
  background: linear-gradient(180deg, #37945d 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 3px 0 #1d5e3c, 0 9px 18px rgba(6, 33, 20, 0.26);
}

.btn-phone:hover {
  background: linear-gradient(180deg, #308351 0%, var(--accent-dark) 100%);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 4px 0 #184d31, 0 11px 22px rgba(6, 33, 20, 0.28);
}

.btn-phone:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 0 #184d31, 0 4px 10px rgba(6, 33, 20, 0.2);
}

.btn-whatsapp {
  background: linear-gradient(180deg, #7cc89c 0%, var(--whatsapp) 100%);
  color: #143324;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 3px 0 #4c8b68, 0 9px 18px rgba(8, 45, 30, 0.2);
}

.btn-whatsapp:hover {
  background: linear-gradient(180deg, #71c192 0%, var(--whatsapp-dark) 100%);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 0 #417758, 0 11px 22px rgba(8, 45, 30, 0.24);
}

.btn-whatsapp:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 0 #417758, 0 4px 10px rgba(8, 45, 30, 0.16);
}

.btn-xl {
  min-height: 56px;
  padding: 0.9rem 1.15rem;
  font-size: 1.06rem;
}

.btn-phone-split {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
  gap: 0.12rem;
  text-align: center;
}

.btn-phone-split .cta-label {
  font-size: 0.98rem;
  font-weight: 700;
}

.btn-phone-split .cta-number {
  font-size: 1.1rem;
  font-weight: 800;
}

.home-page .btn-phone-split .cta-number {
  font-size: clamp(1.5rem, 4.4vw, 1.9rem);
  line-height: 1;
}

.hero {
  padding: 2.2rem 0 2.4rem;
  background:
    linear-gradient(180deg, rgba(12, 45, 72, 0.76) 0%, rgba(12, 45, 72, 0.66) 100%),
    url("hero-optimized.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 1.13rem;
  color: #f2f7fb;
  font-weight: 700;
}

.eyebrow-highlight {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(10, 34, 55, 0.38);
  box-shadow: 0 3px 10px rgba(4, 17, 28, 0.18);
}

.hero-logo {
  display: block;
  width: clamp(140px, 22vw, 240px);
  height: auto;
  margin: -14px auto -24px;
}

.hero h1 {
  margin: 0.08rem 0 0.45rem;
  color: #fff;
  text-align: center;
}

.hero-subhead {
  color: #e7f0f7;
  margin-bottom: 0.75rem;
  text-align: center;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.hero-cta.center {
  justify-content: center;
}

.hero-cta .btn {
  min-width: 240px;
}

.hero-trust-note {
  margin: 0;
  color: #d7e7f4;
  font-size: 0.94rem;
  font-weight: 600;
}

.trust-strip {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1rem 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #f8fbfe;
  border: 1px solid #e2ebf4;
  border-radius: 10px;
  padding: 0.7rem;
}

.icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--primary);
}

.icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.trust-item p {
  margin: 0;
  font-size: 0.97rem;
  font-weight: 600;
}

.climate-service {
  background: linear-gradient(180deg, #fbfdff 0%, #f4f9fe 100%);
  border-top: 1px solid #e4edf6;
  border-bottom: 1px solid #e4edf6;
}

.climate-intro {
  margin-bottom: 0.85rem;
}

.climate-list {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.85rem;
}

.climate-list li {
  display: flex;
  gap: 0.48rem;
  align-items: flex-start;
  margin-bottom: 0.45rem;
  font-weight: 600;
  color: #193a58;
}

.climate-extra {
  margin-bottom: 0.8rem;
  color: #26465f;
}

.climate-cta {
  min-width: 320px;
}

.reviews-section {
  background: #fff;
}

.reviews-subtitle {
  margin-top: -0.35rem;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.reviews-underline {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

.google-logo-word {
  font-family: "Google Sans", "Product Sans", "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.google-logo-word span:nth-child(1) {
  color: #4285f4;
}

.google-logo-word span:nth-child(2) {
  color: #ea4335;
}

.google-logo-word span:nth-child(3) {
  color: #fbbc05;
}

.google-logo-word span:nth-child(4) {
  color: #4285f4;
}

.google-logo-word span:nth-child(5) {
  color: #34a853;
}

.google-logo-word span:nth-child(6) {
  color: #ea4335;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.review-card {
  margin: 0;
  background: #fff;
  border: 1px solid #e2ebf4;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 7px rgba(10, 39, 64, 0.06);
}

.review-stars {
  margin: 0 0 0.35rem;
  color: #c99a2d;
  font-size: 0.94rem;
  letter-spacing: 0.04em;
}

.review-card cite {
  font-style: normal;
  color: var(--muted);
  font-weight: 600;
}

.reviews-more {
  margin-top: 0.85rem;
}

.reviews-more a {
  color: #0d4d82;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.05rem;
  box-shadow: 0 3px 9px rgba(10, 39, 64, 0.05);
}

.service-card p {
  color: #2a445c;
}

.service-card .mini-cta {
  color: #0d4d82;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.other-services {
  margin-top: 1rem;
  font-size: 0.98rem;
  color: var(--muted);
}

.other-services a {
  color: #0d4d82;
  font-weight: 700;
}

.emergency {
  background: #f7fafc;
  border-top: 1px solid #dbe7f2;
  border-bottom: 1px solid #dbe7f2;
  padding: 1.9rem 0;
}

.emergency-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.area-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.area-text {
  font-weight: 600;
}

#zona .text-link {
  color: #0d4d82;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.map-wrap {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  min-height: 260px;
  background: #eef4fa;
}

.map-wrap iframe {
  width: 100%;
  min-height: 260px;
  border: 0;
}

.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.7rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.final-cta {
  background: var(--primary);
  color: #fff;
  text-align: center;
}

.final-cta p {
  color: #e8f1fa;
}

.footer {
  background: #0d2237;
  color: #e8f1fa;
  padding: 2rem 0 4.8rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 1rem;
}

.footer-title {
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
}

.legal-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.legal-links li + li {
  margin-top: 0.45rem;
}

.legal-links a,
.footer .text-link {
  color: #aee6ff;
}

.legal-cookie-manage {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: #aee6ff;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  margin-top: 1rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
}

.cookie-consent {
  position: fixed;
  right: 14px;
  left: auto;
  bottom: 14px;
  z-index: 90;
  width: min(360px, calc(100vw - 28px));
  padding: 0;
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent-inner {
  width: 100%;
  margin: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(10, 39, 64, 0.22);
  padding: 0.72rem;
}

.cookie-consent-text {
  color: #233d53;
  margin: 0 0 0.56rem;
  font-size: 0.87rem;
  line-height: 1.35;
}

.cookie-consent .text-link {
  color: #0d4d82;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent-text-small {
  margin-top: 0.08rem;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cookie-consent-btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.42rem 0.62rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}

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

.cookie-consent-btn-secondary {
  background: #eff4f8;
  border-color: #d2dde8;
  color: #1f3b54;
}

.cookie-consent-btn-outline {
  background: #fff;
  border-color: #d2dde8;
  color: #1f3b54;
}

.cookie-consent-panel {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e2ebf4;
}

.cookie-consent-panel[hidden] {
  display: none;
}

.cookie-consent-option {
  display: block;
  margin: 0 0 0.48rem;
  color: #1f3b54;
  font-weight: 600;
  font-size: 0.88rem;
}

.cookie-consent-option input {
  margin-right: 0.45rem;
}

.mobile-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 12px rgba(5, 28, 47, 0.12);
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-sticky-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .trust-strip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .area-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .top-bar {
    display: none;
  }

  .mobile-sticky-cta {
    display: grid;
  }

  body {
    padding-bottom: 86px;
  }

  .cookie-consent {
    right: 8px;
    bottom: 94px;
    width: min(340px, calc(100vw - 16px));
    padding: 0;
  }

  .cookie-consent-inner {
    width: 100%;
  }

  .cookie-consent-btn {
    flex: 1 1 auto;
  }

  .hero .hero-cta .btn {
    width: 100%;
  }

  .btn-phone-split .cta-number {
    font-size: 1.55rem;
    line-height: 1;
  }

  .home-page .btn-phone-split .cta-number {
    font-size: clamp(2.05rem, 8.2vw, 2.7rem);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }

  .section {
    padding: 2rem 0;
  }

  .hero-logo {
    margin: -4px auto -10px;
  }

  .hero {
    padding-top: 0.85rem;
    padding-bottom: 0.7rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 10.6vw, 3.2rem);
    line-height: 1.12;
    margin-top: 0.08rem;
  }

  .hero .eyebrow {
    text-align: center;
  }

  .hero .eyebrow-highlight {
    display: flex;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .services-grid,
  .trust-strip-grid {
    grid-template-columns: 1fr;
  }

  .climate-cta {
    width: 100%;
    min-width: 0;
  }

  .emergency-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .trust-strip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .trust-item {
    width: 100%;
    min-height: 70px;
    padding: 10px 12px;
    align-items: center;
  }

  .trust-item .icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }

  .trust-item p {
    margin: 0;
    line-height: 1.25;
    word-break: break-word;
  }
}

@media (min-width: 1024px) {
  :root {
    --container: 1100px;
  }

  .top-bar-inner {
    min-height: 64px;
    padding-block: 0.2rem;
    gap: 0.7rem;
  }

  .top-bar-text {
    font-size: 0.95rem;
  }

  .top-bar-actions {
    gap: 0.5rem;
  }

  .top-bar .btn {
    min-height: 42px;
    padding: 0.52rem 0.85rem;
    font-size: 0.92rem;
  }

  .hero-logo {
    margin: -18px auto -30px;
  }

  .hero {
    min-height: max(42vh, 340px);
    display: flex;
    align-items: flex-start;
    padding-top: 14px;
    padding-bottom: 8px;
  }

  .hero-grid {
    max-width: 880px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 32px;
    padding-right: 32px;
    text-align: center;
  }

  .hero-copy {
    text-align: center;
  }

  .hero .eyebrow {
    font-size: clamp(1.35rem, 1.8vw, 1.7rem);
    font-weight: 800;
    margin-bottom: 0.35rem;
  }

  .hero h1 {
    font-size: clamp(60px, 5vw, 64px);
    line-height: 1.1;
    font-weight: 800;
  }

  .hero .btn-xl {
    min-height: 50px;
    padding: 0.7rem 0.95rem;
    font-size: 1rem;
  }

  .hero-subhead {
    max-width: 720px;
    margin: 0 auto 0.95rem;
    font-size: clamp(18px, 1.4vw, 20px);
  }

  .hero .hero-cta {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 16px;
    align-items: center;
  }

  .hero .hero-cta .btn {
    min-width: 220px;
    max-width: 320px;
    width: auto;
    flex: 0 1 auto;
  }

  .trust-strip .container,
  .reviews-section .container,
  #servizi .container {
    max-width: 1100px;
  }

  .trust-strip-grid {
    width: 100%;
    margin-inline: auto;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
  }

  .trust-item {
    min-height: 72px;
    height: 100%;
  }

  .reviews-section .container {
    max-width: 1100px;
  }

  .reviews-grid {
    align-items: stretch;
    gap: 1rem;
  }

  .review-card {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  .review-card p:not(.review-stars) {
    font-size: 1.06rem;
    line-height: 1.65;
  }

  .review-card cite {
    margin-top: auto;
  }

  .reviews-more {
    margin-top: 1rem;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
