/* =====================================================
  CSS RESET & BASE TYPOGRAPHY - Monochrome Sophisticated
====================================================== */
html {
  box-sizing: border-box;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}
body {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  color: #1A1A1A;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  line-height: 1.6;
  letter-spacing: 0.01em;
}
img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: #111;
  text-decoration: none;
  transition: color 0.25s;
}
a:focus {
  outline: 2px solid #273747;
  outline-offset: 2px;
}
ul, ol {
  padding-left: 24px;
  margin: 16px 0;
}
li {
  margin-bottom: 6px;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}
h2 {
  font-size: 1.75rem;
  margin-bottom: 20px;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}
.subtitle {
  font-size: 1.125rem;
  color: #555;
  font-family: 'Roboto', Arial, sans-serif;
  margin-bottom: 24px;
}
strong {
  font-weight: 700;
}
.container {
  max-width: 1220px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
main {
  flex: 1 0 auto;
  padding-top: 0;
  background: #fff;
}
body, html {
  height: 100%;
  background: #F3F6F9;
}

/* ===========================
   BRAND COLOR PALETTE
=========================== */
:root {
  --primary: #273747;
  --secondary: #B71C1C;
  --accent: #F3F6F9;
  --white: #fff;
  --black: #111;
  --gray-900: #1a1a1a;
  --gray-700: #222;
  --gray-500: #888;
  --gray-200: #e5e6e8;
  --shadow: rgba(39,55,71,0.09);
  --transition: 0.22s cubic-bezier(.5,.2,.1,1);
}

/* =====================================
   HEADER, LOGO, NAVIGATION
===================================== */
header {
  background: var(--white);
  box-shadow: 0 2px 12px 0 var(--shadow);
  position: sticky;
  top: 0;
  z-index: 900;
  transition: box-shadow var(--transition);
}
.logo {
  display: flex;
  align-items: center;
  padding: 14px 0 14px 0;
}
.logo img {
  max-height: 46px;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.main-nav a {
  font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
  font-size: 1.05rem;
  color: var(--primary);
  font-weight: 500;
  padding: 6px 2px;
  transition: color var(--transition);
  position: relative;
}
.main-nav a:hover,
.main-nav a:focus {
  color: var(--secondary);
  text-shadow: 0 1px 0 var(--gray-200);
}

/* Burger Menu Trigger */
.mobile-menu-toggle {
  display: none;
  background: var(--white);
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  width: 46px;
  height: 46px;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1202;
  font-size: 2rem;
  color: var(--primary);
  align-items: center;
  justify-content: center;
  transition: background var(--transition), color var(--transition); 
  box-shadow: 0 2px 8px 0 var(--shadow);
}
.mobile-menu-toggle:active, .mobile-menu-toggle:focus {
  background: var(--primary);
  color: var(--white);
}

/* MOBILE MENU OVERLAY */
.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(17,17,17,0.96);
  z-index: 1200;
  transform: translateX(-100vw);
  transition: transform 0.28s cubic-bezier(.6,.05,.77,.66);
  overflow-y: auto;
  padding: 0 0 32px 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  margin: 24px 24px 0 0;
  font-size: 2.2rem;
  color: var(--white);
  cursor: pointer;
  transition: color var(--transition);
  z-index: 2002;
}
.mobile-menu-close:focus {
  color: var(--secondary);
  outline: 2px solid var(--white);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: flex-start;
  margin-top: 50px;
  padding-left: 40px;
}
.mobile-nav a {
  font-size: 1.4rem;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--white);
  padding: 8px 0;
  font-weight: 500;
  border-left: 4px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--secondary);
  border-left: 4px solid var(--secondary);
}

/* Hide desktop nav/show burger on mobile */
@media (max-width: 992px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  header .btn-primary {
    display: none;
  }
}
@media (max-width: 600px) {
  header .container {
    padding: 0 12px;
  }
  .mobile-menu-close {
    margin-right: 14px;
    margin-top: 16px;
  }
}

/* =====================================
       BUTTONS
===================================== */
.btn-primary,
.btn-secondary {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.06rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 26px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  line-height: 1.2;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  margin-right: 12px;
  margin-bottom: 12px;
  min-width: 135px;
  position: relative;
  text-align: center;
  box-shadow: 0 2px 12px 0 rgba(39,55,71,0.08);
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: 1.5px solid var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
  box-shadow: 0 4px 16px 0 rgba(183,28,28,0.11);
}
.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px 0 var(--shadow);
}

/* ===========================
  HERO BANNER
=========================== */
.hero {
  background: linear-gradient(92deg, #fafbfc 90%, #ededed 100%);
  box-shadow: 0 2px 20px -4px var(--shadow);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0 30px 0;
  margin-bottom: 60px;
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.hero h1 {
  color: var(--primary);
  font-size: 2.5rem;
  letter-spacing: -0.03em;
}
.hero .subtitle {
  color: #444;
  font-size: 1.13rem;
  letter-spacing: 0.01em;
}
.hero .btn-primary {
  margin-top: 16px;
  font-size: 1.15rem;
  min-width: 166px;
}
@media (max-width: 600px) {
  .hero {
    padding: 36px 0 20px 0;
  }
  .hero h1 {
    font-size: 2rem;
  }
}

/* ============================
  SECTION & FLEX SPACING RULES
============================= */
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--white);
  border-radius: 22px;
  box-shadow: 0 2px 16px 0 var(--shadow);
}
.features-grid,
.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin-bottom: 6px;
}
.features-grid .feature,
.services-list .service-item {
  flex: 1 1 280px;
  min-width: 230px;
  max-width: 340px;
  background: #fafafa;
  border-radius: 14px;
  box-shadow: 0 2px 12px 0 var(--shadow);
  padding: 26px 22px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  transition: box-shadow var(--transition), transform var(--transition);
  margin-bottom: 20px;
}
.features-grid .feature img {
  height: 44px;
  margin-bottom: 10px;
}
.features-grid .feature h3,
.services-list .service-item h2 {
  font-size: 1.225rem;
  color: var(--primary);
  margin-bottom: 8px;
}
.features-grid .feature p,
.services-list .service-item p {
  color: #222;
  font-size: 1rem;
}
.features-grid .feature:hover,
.services-list .service-item:hover {
  box-shadow: 0 8px 32px 0 rgba(39,55,71,0.13);
  transform: translateY(-6px) scale(1.018);
}
.services-list .service-item .price {
  font-weight: 700;
  background: var(--primary);
  color: var(--white);
  border-radius: 14px;
  padding: 2px 10px 2.5px 10px;
  font-size: 1rem;
  margin-left: 10px;
}

@media (max-width: 900px) {
  .features-grid,
  .services-list {
    flex-direction: column;
    gap: 20px;
  }
  .features-grid .feature,
  .services-list .service-item {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

/* Card containers */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  flex: 1 1 300px;
  border-radius: 13px;
  box-shadow: 0 2px 10px 0 var(--shadow);
  background: #fff;
  overflow: hidden;
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 20px;
}

.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;
}

/* Testimonials */
.testimonials-slider,
.testimonials-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
  margin: 14px 0 8px 0;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 26px 24px 26px;
  border-radius: 14px;
  background: #fff;
  min-width: 290px;
  max-width: 410px;
  box-shadow: 0 2px 16px 0 var(--shadow);
  margin-bottom: 20px;
  border-left: 4px solid var(--primary);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.testimonial-card .testimonial-header {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.13rem;
  margin-bottom: 6px;
}
.testimonial-card .stars {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
}
.testimonial-card p {
  font-size: 1.07rem;
  color: var(--gray-900);
  line-height: 1.5;
}
.testimonial-card:hover {
  box-shadow: 0 8px 32px 0 rgba(39,55,71,0.13);
  border-left: 4px solid var(--secondary);
}
.average-rating {
  margin-top: 14px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.12rem;
}
.average-rating .stars {
  display: flex;
  gap: 2px;
}

@media (max-width: 900px) {
  .testimonials-slider,
  .testimonials-list {
    flex-direction: column;
  }
  .testimonial-card {
    min-width: 170px;
    max-width: 100%;
  }
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* Contact block */
.contact-info-block,
.contact-details,
.contact-info-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  margin-bottom: 24px;
}
.contact-info-block > div, .contact-details > div, .contact-info-summary > div {
  display: flex;
  align-items: center;
  font-size: 1.09rem;
  color: var(--primary);
  gap: 10px;
}
.cta-area {
  margin-top: 10px;
}

/* Footer */
footer {
  background: var(--primary);
  color: #F3F6F9;
  padding: 50px 0 28px 0;
  margin-top: 36px;
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}
.footer-logo img {
  height: 48px;
  width: auto;
  margin-bottom: 14px;
}
.footer-nav, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav a {
  color: #e5e6e8;
  font-size: 1rem;
  margin-bottom: 2px;
  transition: color var(--transition);
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--secondary);
}
.footer-contact > div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: #F3F6F9;
}
footer img {
  filter: grayscale(100%) brightness(1.1);
}

@media (max-width: 900px) {
  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
}

/* =======================
      UTILITIES
======================= */
.text-section {
  margin-bottom: 20px;
}
.solutions-highlights ul, .solutions-highlights li {
  color: var(--primary);
}
.project-descriptions h2 {
  margin-top: 20px;
  font-size: 1.09rem;
  font-weight: 700;
  color: var(--primary);
}
.project-descriptions p {
  color: #222;
  margin-bottom: 10px;
  font-size: 1.04rem;
}
.trust-badges {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

/* =======================
   FORMS (Preventivo)
======================= */
#modulo-preventivo ul {
  margin-bottom: 12px;
}
.next-steps ul li {
  margin-bottom: 6px;
}

/* =======================
   Responsive spacing
======================= */
@media (max-width: 600px) {
  section {
    padding: 22px 5px;
    margin-bottom: 34px;
    border-radius: 10px;
  }
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1.15rem;
  }
  h3 {
    font-size: 1rem;
  }
}

/* =======================
   GENERAL
======================= */
::selection {
  background: var(--secondary);
  color: var(--white);
}

/* Accessibility: keyboard focus for all links & buttons */
a:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--secondary);
  outline-offset: 3px;
}

/* =====================================
     COOKIE CONSENT BANNER && MODAL
===================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: #fff;
  box-shadow: 0 -2px 16px 0 var(--shadow);
  padding: 22px 16px 18px 16px;
  z-index: 1203;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 1.05rem;
  color: var(--primary);
  animation: slideUpCookie 0.6s cubic-bezier(.7,.2,.25,1);
}
@keyframes slideUpCookie {
  from { transform: translateY(140%); opacity: 0.1; }
  to   { transform: translateY(0); opacity: 1; }
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 10px;
}
.cookie-banner .btn-cookie {
  background: var(--primary);
  color: #fff;
  font-family: 'Montserrat', Arial, sans-serif;
  border: none;
  border-radius: 18px;
  padding: 7px 18px;
  font-size: 1rem;
  font-weight: 500;
  margin-right: 4px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.cookie-banner .btn-cookie:focus, .cookie-banner .btn-cookie:hover {
  background: var(--secondary);
  color: #fff;
}
.cookie-banner .btn-cookie-settings {
  background: #fff;
  color: var(--primary);
  border: 1.3px solid var(--primary);
}
.cookie-banner .btn-cookie-settings:hover, .cookie-banner .btn-cookie-settings:focus {
  background: var(--primary);
  color: #fff;
}

.cookie-modal-overlay {
  display: none;
  position: fixed;
  z-index: 1500;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(23, 28, 34, 0.84);
  align-items: center;
  justify-content: center;
  animation: fadeInModal 0.43s;
}
.cookie-modal-overlay.open {
  display: flex;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cookie-modal {
  background: #fff;
  color: var(--primary);
  border-radius: 18px;
  max-width: 400px;
  width: 95vw;
  padding: 32px 26px 26px 26px;
  box-shadow: 0 4px 32px 8px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeInModal 0.36s;
}
.cookie-modal h3 {
  font-size: 1.18rem;
  color: var(--primary);
}
.cookie-modal .cookie-category {
  padding: 10px 3px;
  border-radius: 7px;
  margin-bottom: 4px;
  background: #fafafa;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.cookie-toggle {
  margin-left: auto;
}
.cookie-toggle input[type=checkbox] {
  accent-color: var(--primary);
  width: 20px;
  height: 20px;
}
.cookie-modal-actions {
  align-self: flex-end;
  display: flex;
  gap: 9px;
}
.cookie-modal .btn-cookie {
  min-width: 90px;
  padding: 6px 15px;
  font-size: 1rem;
}

/* Responsive cookie */
@media (max-width: 600px) {
  .cookie-banner, .cookie-modal {
    flex-direction: column;
    align-items: flex-start;
    font-size: 1rem;
    padding: 18px 6px;
  }
  .cookie-modal {
    max-width: 98vw;
    padding: 18px 7px 14px 14px;
  }
}

/* ======================
   Animations/Micro-interactions
======================= */
.btn-primary, .btn-secondary, .card, .testimonial-card, .feature {
  transition: box-shadow var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}
.animated-fade-in {
  opacity: 0;
  animation: fadeInAnim 1.2s 0.2s forwards;
}
@keyframes fadeInAnim {
  0% {opacity:0; transform:translateY(8px);}
  100% {opacity:1; transform:none;}
}

/* ==========================
   Miscellaneous
========================== */
.trust-badges img {
  height: 38px;
  width: auto;
  filter: grayscale(1);
}

/* Hide visually but keep for accessibility */
.sr-only { position: absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ======================
   SCROLLBARS
======================= */
body::-webkit-scrollbar {width: 10px;}
body::-webkit-scrollbar-thumb {background: var(--gray-200); border-radius: 20px;}

/* ================
   Print Styles
================ */
@media print {
  header, footer, .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-overlay {display:none !important;}
  body, html {background: #fff !important;}
}

/* ================
  Accessibility
================= */
[tabindex="-1"]:focus {
  outline: none !important;
}

/* End of CSS */
