/* ===== CSS RESET & NORMALIZE ===== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  box-sizing: border-box;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  line-height: 1.6;
  background: #fff;
  color: #232936;
  font-family: 'Roboto', Arial, sans-serif;
  min-height: 100vh;
}
img, video {
  max-width: 35%;
  height: auto;
}
ul, ol {
  padding-left: 1.5em;
}
a {
  color: #2B3B55;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #F9C846;
}
button, [type="button"], [type="submit"] {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
:focus {
  outline: 2px solid #F9C846;
  outline-offset: 2px;
}

/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css?family=Montserrat:700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #2B3B55;
  font-weight: 700;
  letter-spacing: -0.5px;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 24px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 14px;
}
h4, h5, h6 {
  font-size: 1.1rem;
}
p, li, table, details, summary {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  color: #232936;
  margin-bottom: 16px;
}
strong {
  font-weight: 700;
  color: #2B3B55;
}
em {
  font-style: italic;
  color: #2B3B55;
}

/* ====== LAYOUT CONTAINERS ====== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 18px 0 rgba(25, 35, 66, 0.06);
  transition: box-shadow 0.25s;
}
.section:hover {
  box-shadow: 0 8px 28px 0 rgba(25,35,66,0.11);
}

/* ====== HEADER ====== */
header {
  background: #fff;
  border-bottom: 1px solid #F1F1F5;
  position: sticky;
  top: 0;
  z-index: 1100;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}
header img[alt="AutoFacile Infera"] {
  height: 44px;
  width: auto;
}
nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
nav a {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  color: #2B3B55;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  border-radius: 5px;
  transition: background 0.2s, color 0.2s;
}
nav a:not(.cta):hover,
nav a:not(.cta):focus {
  background: #F9C84622;
  color: #2B3B55;
}
nav a.cta {
  background: #2B3B55;
  color: #fff;
  padding: 10px 26px;
  border-radius: 21px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 2px 12px 0 rgba(43,59,85,0.08);
  margin-left: 12px;
  transition: background 0.15s, box-shadow 0.2s;
}
nav a.cta:hover, nav a.cta:focus {
  background: #F9C846;
  color: #2B3B55;
  box-shadow: 0 6px 18px 0 rgba(43,59,85,0.13);
}

/* ===== MOBILE MENU HAMBURGER ===== */
.mobile-menu-toggle {
  display: none;
  background: #fff;
  color: #2B3B55;
  border: 1.5px solid #2B3B55;
  font-size: 2rem;
  border-radius: 8px;
  padding: 2px 12px 0 12px;
  margin-left: 16px;
  z-index: 1151;
  transition: background 0.15s, box-shadow 0.18s;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: #F9C846;
  border-color: #F9C846;
  color: #2B3B55;
  box-shadow: 0 3px 16px 0 rgba(43,59,85,0.16);
}
@media (max-width: 1024px) {
  nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (max-width: 768px) {
  header .container {
    padding-left: 14px;
    padding-right: 14px;
    height: 62px;
  }
  header img[alt="AutoFacile Infera"] {
    height: 36px;
  }
}

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  z-index: 1200;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.33s cubic-bezier(.6,.05,.28,1), box-shadow 0.18s;
  box-shadow: 0 14px 45px 0 rgba(43,59,85,0.18);
  display: flex;
  flex-direction: column;
  min-width: 260px;
  width: 100vw;
  max-width: 375px;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2rem;
  color: #2B3B55;
  background: none;
  border: none;
  text-align: right;
  align-self: flex-end;
  margin: 18px 22px 0 0;
  padding: 0 0 4px 0;
  transition: color 0.14s;
}
.mobile-menu-close:focus,
.mobile-menu-close:hover {
  color: #F9C846;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 20px 32px;
  margin-top: 18px;
}
.mobile-nav a {
  font-size: 1.15rem;
  color: #2B3B55;
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: 500;
  padding: 13px 0;
  border-radius: 8px;
  transition: background 0.14s, color 0.18s;
}
.mobile-nav a:active,
.mobile-nav a:hover {
  background: #F9C846;
  color: #2B3B55;
}

@media (min-width: 1025px) {
  .mobile-menu {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: none !important;
  }
}

/* ===== HERO SECTIONS ===== */
.hero {
  padding-top: 48px;
  padding-bottom: 48px;
  background: #F7F7F7;
  margin-bottom: 60px;
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero .content-wrapper {
  margin: 0;
  gap: 20px;
  align-items: flex-start;
}
.hero h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  color: #2B3B55;
}
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.62rem;
  }
  .hero {
    padding-top: 28px;
    padding-bottom: 32px;
  }
}

/* ===== CTA BUTTONS ===== */
.cta {
  display: inline-block;
  background: #F9C846;
  color: #2B3B55 !important;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.13rem;
  padding: 14px 34px;
  border-radius: 21px;
  box-shadow: 0 2px 12px 0 rgba(43,59,85,0.08);
  letter-spacing: 0.06em;
  text-align: center;
  border: none;
  margin-top: 10px;
  margin-bottom: 10px;
  transition: background 0.18s, color 0.17s, box-shadow 0.19s, transform 0.17s;
}
.cta:hover, .cta:focus {
  background: #2B3B55;
  color: #fff !important;
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 8px 24px 0 rgba(43,59,85,0.18);
}

/* ===== FEATURE GRID, FLEX WRAPS, CARDS ===== */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
}
.feature-grid > div {
  flex: 1 1 220px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px 0 rgba(43,59,85,0.07);
  padding: 24px 20px 18px 20px;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.18s, transform 0.18s;
}
.feature-grid > div:hover {
  box-shadow: 0 8px 25px 0 rgba(43,59,85,0.14);
  transform: translateY(-2px) scale(1.018);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  border-radius: 14px;
  box-shadow: 0 2px 10px 0 rgba(43,59,85,0.08);
  background: #fff;
  padding: 24px 22px;
  flex: 1 1 270px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.16s, transform 0.15s;
}
.card:hover {
  box-shadow: 0 14px 28px 0 rgba(43,59,85,0.18);
  transform: translateY(-1.5px) scale(1.01);
}
.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;
  margin-bottom: 28px;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: 13px;
  background: #F7F7F7;
  box-shadow: 0 2px 8px 0 rgba(43,59,85,0.06);
  margin-bottom: 20px;
  transition: box-shadow 0.17s, background 0.18s;
}
.testimonial-card:hover {
  background: #fff;
  box-shadow: 0 12px 24px 0 rgba(43,59,85,0.14);
}
.testimonial-card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #F9C84644;
  object-fit: cover;
}
.testimonial-card strong {
  display: block;
  font-size: 1.08rem;
  font-family: 'Montserrat', Arial, sans-serif;
  color: #2B3B55;
  margin-bottom: 3px;
}
.testimonial-card div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.testimonial-card p {
  color: #232936;
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.testimonial-card > div > div {
  color: #F9C846;
  font-size: 1.25rem;
  font-family: 'Montserrat', Arial, sans-serif;
  letter-spacing: 2px;
  margin-bottom: 2px;
}

@media (max-width: 768px) {
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
  }
  .feature-grid > div, .card {
    flex-basis: 100%;
    min-width: 0;
  }
  .section {
    padding: 30px 8px;
    margin-bottom: 40px;
  }
}

/* ===== TABLES (for services page) ===== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-bottom: 18px;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #F1F1F5;
  text-align: left;
}
th {
  background: #F7F7F7;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.06rem;
  color: #2B3B55;
}
tr:last-child td {
  border-bottom: none;
}

/* ===== DETAILS & SUMMARY (FAQ) ===== */
details {
  margin-bottom: 18px;
  background: #F7F7F7;
  border-radius: 10px;
  box-shadow: 0 1px 6px 0 rgba(43,59,85,0.06);
  transition: box-shadow 0.14s;
  padding: 13px 18px;
}
details[open] {
  box-shadow: 0 3px 14px 0 rgba(43,59,85,0.07);
}
summary {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #2B3B55;
  font-weight: 600;
  font-size: 1.04rem;
  cursor: pointer;
  margin-bottom: 6px;
}
details p {
  margin-bottom: 5px;
  color: #232936;
}

/* ===== LISTS ===== */
ul, ol {
  margin-bottom: 16px;
  color: #232936;
}
ul li, ol li {
  margin-bottom: 8px;
  padding-left: 0;
  line-height: 1.6;
  font-size: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
ul li img {
  width: 22px;
  height: 22px;
  margin-right: 7px;
  opacity: 0.84;
}

/* ===== FOOTER ===== */
footer {
  background: #fff;
  border-top: 1px solid #F1F1F5;
  margin-top: 44px;
  padding: 22px 0 18px 0;
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}
footer nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.95rem;
}
footer nav a {
  color: #2B3B55;
  font-family: 'Roboto', Arial, sans-serif;
  opacity: .72;
  padding: 1px 5px;
}
footer nav a:hover,
footer nav a:focus {
  opacity: 1;
  color: #F9C846;
}
footer small {
  color: #838996;
  font-size: 0.93rem;
  font-family: 'Roboto', Arial, sans-serif;
}

@media (max-width: 600px) {
  footer .container {
    gap: 10px;
  }
  footer nav {
    gap: 5px;
    font-size: 0.90rem;
  }
}

/* ===== CONTACT SECTIONS ===== */
.contact-list, .contact-info ul {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding-left: 0;
  list-style: none;
}

/* ====== COOKIE CONSENT BANNER & MODAL ====== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  background: rgba(255,255,255, 0.97);
  border-top: 1.5px solid #F1F1F5;
  padding: 24px 20px 16px 20px;
  box-shadow: 0 -4px 32px 0 rgba(43,59,85,0.13);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 2500;
  animation: cookieBannerIn 0.53s cubic-bezier(.4,1.4,.5,1) both;
}
@keyframes cookieBannerIn {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  color: #2B3B55;
  font-size: 1rem;
  text-align: center;
  margin-bottom: 0;
}
.cookie-banner .cookie-btns {
  display: flex;
  flex-direction: row;
  gap: 12px;
}
.cookie-btn {
  background: #fff;
  color: #2B3B55;
  border: 1.4px solid #2B3B55;
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 18px;
  padding: 9px 24px;
  cursor: pointer;
  margin: 0;
  transition: background 0.18s, color 0.13s, border 0.13s;
}
.cookie-btn.accept {
  background: #F9C846;
  color: #2B3B55;
  border: 1.4px solid #F9C846;
}
.cookie-btn.accept:hover, .cookie-btn.accept:focus {
  background: #2B3B55;
  color: #fff;
  border-color: #2B3B55;
}
.cookie-btn.settings {
  background: #fff;
  color: #2B3B55;
  border: 1.4px solid #2B3B55;
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: #F9C846;
  color: #2B3B55;
  border-color: #F9C846;
}
.cookie-btn.reject {
  background: #fff;
  color: #2B3B55;
  border: 1.2px solid #F1F1F5;
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #F1F1F5;
  color: #2B3B55;
}

/* Cookie modal popup */
.cookie-modal-backdrop {
  position: fixed;
  z-index: 3000;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(43,59,85, 0.32);
  animation: fadeInBackdrop 0.23s both;
}
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  position: fixed;
  z-index: 3500;
  left: 50%;
  top: 50%;
  width: 94vw;
  max-width: 410px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 34px 0 rgba(43,59,85,0.08);
  transform: translate(-50%, -50%) scale(1.03);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px 24px 22px 24px;
  animation: cookieModalIn 0.24s cubic-bezier(.38,1.2,.36,1) both;
}
@keyframes cookieModalIn {
  from { opacity: 0; transform: translate(-50%, -45%) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1.03); }
}
.cookie-modal h2 {
  margin-bottom: 0;
  font-size: 1.32rem;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 0;
}
.cookie-category input[type=checkbox]:disabled + label {
  color: #bbb;
  opacity: 0.65;
  text-decoration: line-through;
}
.cookie-category label {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  color: #2B3B55;
}
.cookie-modal .cookie-btns {
  justify-content: flex-end;
  gap: 14px;
  margin-top: 5px;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 900px) {
  .container {
    max-width: 96vw;
  }
  .section {
    padding: 30px 8px;
    margin-bottom: 32px;
  }
}
@media (max-width: 600px) {
  h1 { font-size: 1.45rem; }
  h2 { font-size: 1.13rem; }
  .container { padding-left: 10px; padding-right: 10px; }
  .feature-grid, .card-container, .content-grid {
    flex-direction: column;
    gap: 13px;
  }
}

/* ========== ANIMATIONS & MICRO-INTERACTIONS ========== */
.cta, .card, .feature-grid > div, .testimonial-card, .section, .cookie-banner, .cookie-category, .cookie-btn, .mobile-menu {
  transition-timing-function: cubic-bezier(.5,1.6,.25,1);
}

/* ::selection for better visibility */
::selection {
  background: #F9C846;
  color: #2B3B55;
}

/* ======= SCROLLBAR for minimal look ======= */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: #F9C846;
  border-radius: 6px;
}
::-webkit-scrollbar-track {
  background: #fff;
}

/* ======= ACCESSIBILITY ======= */
[tabindex]:focus-visible, a:focus-visible {
  outline: 2px solid #F9C846;
  outline-offset: 1.5px;
}

/* ====== UTILITY CLASSES ====== */
.hide-mobile { display: block; }
@media (max-width: 768px) { .hide-mobile { display: none !important; } }

@media (max-width:460px) {
  .hero { padding: 18px 0 20px 0; }
  .section { padding: 18px 3vw; }
}
