/* ==== 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,
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;
}
body {
  line-height: 1.5;
  background: #F3F5F9;
  color: #153055;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
*, *::before, *::after {
  box-sizing: inherit;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: #17426D;
  text-decoration: none;
  transition: color .18s;
}
a:hover, a:focus {
  color: #ED4C67;
  outline: none;
}
ul, ol {
  list-style: none;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

:root {
  --color-primary: #17426D;
  --color-secondary: #A4BFB7;
  --color-accent: #F3F5F9;
  --color-electric-blue: #1AB7FF;
  --color-electric-pink: #ED4C67;
  --color-electric-green: #00DE8F;
  --color-dark: #153055;
  --color-light: #ffffff;
  --box-shadow: 0 8px 32px rgba(23,66,109,0.10), 0 2px 8px rgba(237,76,103,0.04);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

/* ==== TYPOGRAPHY ==== */
h1, h2, h3, h4, h5 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 800;
  letter-spacing: -0.5px;
}
h1 {
  font-size: 2.375rem;
  color: var(--color-electric-blue);
  margin-bottom: 20px;
  line-height: 1.1;
}
h2 {
  font-size: 1.8rem;
  color: var(--color-electric-pink);
  margin-bottom: 16px;
  line-height: 1.2;
}
h3 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 10px;
  font-weight: 700;
}
h4, h5, h6 {
  font-size: 1rem;
  font-weight: 600;
}
p, li, blockquote {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-dark);
}
blockquote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-electric-pink);
  margin-bottom: 8px;
  quotes: "\201C" "\201D";
  border-left: 4px solid var(--color-electric-blue);
  padding-left: 18px;
}
strong {
  font-weight: 700;
  color: var(--color-electric-blue);
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.55rem;
  }
  h2 {
    font-size: 1.15rem;
  }
  h3 {
    font-size: 1.05rem;
  }
  p, li, blockquote {
    font-size: .98rem;
  }
}

/* ==== LAYOUT CONTAINERS ==== */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-light);
  box-shadow: var(--box-shadow);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  position: relative;
  transition: box-shadow .18s, transform .18s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 24px;
}
.card:hover {
  box-shadow: 0 12px 32px rgba(23,66,109,0.23), 0 2px 8px rgba(237,76,103,0.08);
  transform: translateY(-4px) scale(1.01);
  z-index: 2;
}
.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;
    gap: 18px;
    align-items: flex-start;
  }
  .container {
    padding: 0 8px;
  }
  .section {
    padding: 28px 6px;
    margin-bottom: 32px;
  }
}

/* ==== HEADER STYLES ==== */
header {
  background: var(--color-primary);
  padding: 0 20px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 11;
  box-shadow: 0 2px 10px rgba(23,66,109,0.06);
}
.logo img {
  height: 44px;
  width: auto;
  display: block;
}
.main-nav {
  display: flex;
  flex-direction: row;
  gap: 34px;
  align-items: center;
}
.main-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--color-light);
  font-size: 1.03rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 6px 0;
  position: relative;
  transition: color .12s;
}
.main-nav a::after {
  content: '';
  display: block;
  height: 2px;
  width: 0%;
  background: var(--color-electric-pink);
  transition: width .22s cubic-bezier(.32,.81,.62,1);
  margin-top: 2px;
  border-radius: 2px;
  margin-left: auto;
  margin-right: auto;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--color-electric-blue);
}
.main-nav a:hover::after, .main-nav a:focus::after {
  width: 100%;
}
.btn-primary {
  background: var(--color-electric-blue);
  color: var(--color-light);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.06rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(26,183,255,0.11);
  padding: 15px 38px;
  border: none;
  transition: background .17s, color .16s, box-shadow .22s;
  margin-left: 30px;
  letter-spacing: 0.03em;
  outline: none;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-electric-pink);
  color: var(--color-light);
  box-shadow: 0 6px 24px rgba(237,76,103,0.11);
}
.btn-secondary {
  background: var(--color-light);
  color: var(--color-electric-green);
  border: 2px solid var(--color-electric-green);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.03rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0,222,143,0.07);
  padding: 13px 32px;
  margin-top: 24px;
  letter-spacing: 0.02em;
  transition: background .15s, color .15s, border-color .18s;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--color-electric-green);
  color: var(--color-light);
  border-color: var(--color-electric-green);
}

@media (max-width: 1024px) {
  .main-nav {
    gap: 18px;
  }
  .btn-primary {
    margin-left: 10px;
    padding: 14px 22px;
  }
}
@media (max-width: 768px) {
  header {
    padding: 0 10px;
    height: 62px;
  }
  .logo img {
    height: 36px;
  }
  .main-nav, .btn-primary {
    display: none;
  }
}

/* ==== MOBILE MENU ==== */
.mobile-menu-toggle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  z-index: 30;
  width: 44px;
  height: 44px;
  background: var(--color-electric-blue);
  color: var(--color-light);
  border-radius: 50%;
  font-size: 2rem;
  border: none;
  transition: background .17s;
}
.mobile-menu-toggle:focus,
.mobile-menu-toggle:hover {
  background: var(--color-electric-pink);
}
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
}
.mobile-menu {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 100vw;
  background: var(--color-dark);
  z-index: 200;
  transform: translateX(-100vw);
  transition: transform 0.35s cubic-bezier(.76,.17,.36,1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 24px;
  visibility: hidden;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}
.mobile-menu-close {
  font-size: 1.9rem;
  color: var(--color-electric-pink);
  background: none;
  border: none;
  margin: 12px 0 0 18px;
  align-self: flex-start;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
  width: 100%;
  align-items: flex-start;
}
.mobile-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--color-light);
  font-size: 1.23rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 36px;
  border-radius: 6px;
  transition: background .16s, color .16s;
  width: 100%;
  display: block;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  background: var(--color-electric-blue);
  color: var(--color-light);
}

/* ==== HERO SECTION ==== */
.hero {
  background: linear-gradient(82deg, var(--color-electRIC-BLUE), var(--color-accent));
  background-color: var(--color-accent);
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  box-shadow: 0 3px 24px rgba(26,183,255,0.07);
  margin-bottom: 64px;
}
.hero .container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  min-height: 320px;
}
.hero .content-wrapper {
  background: rgba(255,255,255,0.91);
  box-shadow: 0px 8px 42px rgba(26,183,255,0.07);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
  margin: 38px 0;
}
.hero h1 {
  color: var(--color-electric-blue);
  margin-bottom: 7px;
}
.hero p {
  color: var(--color-dark);
  font-weight: 500;
  margin-bottom: 10px;
}
@media (max-width: 900px) {
  .hero .content-wrapper { padding: 36px 16px;   max-width: 100%;}  
  .hero { min-height: unset; }
}
@media (max-width: 768px) {
  .hero { margin-bottom: 36px; }
  .hero .container { min-height: 220px; }
}

/* ==== FEATURES/GRID SECTION ==== */
.features, .services, .about, .contact, .faq, .legal, .confirmation {
  margin-bottom: 60px;
  padding: 0;
}
.feature-grid, .features ul, .services ul, .about ul {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 22px;
}
.feature-grid li, .features ul li, .services ul li, .about ul li {
  flex: 1 1 210px;
  min-width: 210px;
  background: var(--color-light);
  border-radius: var(--radius-md);
  box-shadow: var(--box-shadow);
  padding: 26px 21px 21px 21px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  transition: box-shadow .19s, transform .18s;
  margin-bottom: 20px;
  position: relative;
}
.feature-grid li img,
.features ul li img,
.services ul li img,
.about ul li img {
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
}
.feature-grid li:hover,
.features ul li:hover,
.services ul li:hover,
.about ul li:hover {
  box-shadow: 0 14px 32px rgba(26,183,255,0.11);
  transform: translateY(-3px) scale(1.02);
}
@media (max-width: 900px) {
  .feature-grid, .features ul, .services ul, .about ul {
    gap: 16px;
  }
  .feature-grid li, .features ul li, .services ul li, .about ul li {
    min-width: 155px; padding: 18px 12px;
  }
}
@media (max-width: 600px) {
  .feature-grid, .features ul, .services ul, .about ul {
    flex-direction: column;
    gap: 14px;
  }
  .feature-grid li, .features ul li, .services ul li, .about ul li {
    min-width: 0;
    width: 100%;
  }
}

/*==== TESTIMONIAL CARDS ====*/
.testimonials {
  background: var(--color-accent);
  margin-bottom: 32px;
  padding: 16px 0 26px 0;
}
.testimonials .container {
  background: none;
  box-shadow: none;
  border-radius: 0;
}
.testimonials h2 {
  color: var(--color-electric-green);
  font-size: 1.7rem;
  margin-bottom: 16px;
}
.testimonial-card {
  background: var(--color-light);
  color: var(--color-dark);
  border-radius: var(--radius-md);
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  position: relative;
  transition: box-shadow .17s, transform .15s;
  min-width: 270px;
}
.testimonial-card:hover {
  box-shadow: 0 12px 32px rgba(26,183,255,0.15);
  transform: translateY(-2px) scale(1.015);
}
.testimonial-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 100px;
}
.testimonial-info span {
  color: var(--color-primary);
  font-size: .96rem;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
}
.testimonial-card blockquote {
  color: var(--color-electric-pink);
  font-size: 1.03rem;
  margin-bottom: 6px;
  flex: 1;
  border-left: 3px solid var(--color-electric-blue);
  padding-left: 16px;
}
@media (max-width: 800px) {
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 12px;
    gap: 10px;
    min-width: 0;
  }
}

/*==== PROJECTS/LAVORI ESEGUITI ====*/
.project-summary {
  background: var(--color-light);
  border-radius: var(--radius-md);
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.project-summary h2 {
  font-size: 1.15rem;
  color: var(--color-electric-pink);
}
.project-summary ul li {
  font-size: .98rem;
  color: var(--color-dark);
  line-height: 1.7;
  padding-left: 0;
}

/*==== FAQ ====*/
.faq-accordion h2 {
  font-size: 1rem;
  color: var(--color-electric-blue);
  margin-top: 18px;
  margin-bottom: 7px;
}
.faq-accordion p {
  color: var(--color-dark);
  margin-bottom: 10px;
}

/*==== CONTACT/INFO ====*/
.contact-info,
.contact ul {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 18px;
}
.contact-info li,
.contact ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-dark);
  font-weight: 500;
}
.location-map {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 19px;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--color-electric-green);
}
.location-map img {
  width: 32px;
  height: 32px;
}

/*==== LEGAL (privacy, gdpr, cookie, termini) ====*/
.legal {
  background: var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px rgba(23,66,109,0.07);
  margin-bottom: 32px;
  padding: 26px 0;
}
.legal .container,
.confirmation .container {
  background: none;
  padding: 0 15px;
}
.legal h1, .confirmation h1 {
  color: var(--color-electric-green);
}

/*==== CONFIRMATION ====*/
.confirmation .container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}
.confirmation .content-wrapper {
  align-items: center;
  text-align: center;
  gap: 20px;
}
.confirmation .btn-primary {
  margin: 18px auto 0 auto;
}


/*==== FOOTER ====*/
footer {
  background: var(--color-primary);
  color: var(--color-light);
  padding: 32px 0 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 48px;
}
.footer-menu {
  display: flex;
  flex-direction: row;
  gap: 28px;
  justify-content: center;
  margin-bottom: 10px;
}
.footer-menu a {
  color: var(--color-accent);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  font-size: .98rem;
  transition: color .16s;
}
.footer-menu a:hover,
.footer-menu a:focus {
  color: var(--color-electric-green);
}
.footer-contact {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: .95rem;
}
.footer-contact img {
  width: 32px;
  height: 32px;
}
@media (max-width: 600px) {
  .footer-menu {
    flex-direction: column;
    gap: 10px;
  }
  footer {
    padding: 20px 0 12px 0;
    gap: 7px;
  }
  .footer-contact img { width: 24px; height: 24px; }
}

/*==== COOKIE CONSENT BANNER & MODAL ====*/
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: var(--color-light);
  color: var(--color-dark);
  box-shadow: 0 -3px 22px rgba(23,66,109,0.11);
  z-index: 9999;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 23px 18px;
  gap: 32px;
  font-size: 1.01rem;
  transition: transform 0.35s cubic-bezier(.6,.12,.55,1);
}
.cookie-banner.hide {
  transform: translateY(200px);
  pointer-events: none;
  opacity: 0;
}
.cookie-banner .cookie-buttons {
  display: flex;
  flex-direction: row;
  gap: 18px;
}
.cookie-btn {
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  border: none;
  font-size: 1.01rem;
  padding: 10px 28px;
  margin-left: 0;
  transition: background .15s, color .13s;
  cursor: pointer;
}
.cookie-btn.accept {
  background: var(--color-electric-blue);
  color: var(--color-light);
}
.cookie-btn.accept:hover {
  background: var(--color-electric-green);
}
.cookie-btn.reject {
  background: var(--color-light);
  color: var(--color-electric-pink);
  border: 2px solid var(--color-electric-pink);
}
.cookie-btn.reject:hover,
.cookie-btn.reject:focus {
  background: var(--color-electric-pink);
  color: var(--color-light);
}
.cookie-btn.settings {
  background: var(--color-light);
  color: var(--color-dark);
  border: 2px solid var(--color-secondary);
}
.cookie-btn.settings:hover {
  border-color: var(--color-electric-blue);
  color: var(--color-electric-blue);
}
@media (max-width: 900px) {
  .cookie-banner {
    flex-direction: column;
    gap: 16px;
    padding: 13px 5px;
    font-size: .98rem;
  }
  .cookie-banner .cookie-buttons {
    flex-direction: row;
    gap: 10px;
  }
}

/*==== COOKIE PREFERENCES MODAL ====*/
.cookie-modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw; height: 100vh;
  background: rgba(23,66,109,.31);
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .33s cubic-bezier(.17,.81,.58,1);
}
.cookie-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal-dialog {
  background: var(--color-light);
  color: var(--color-dark);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 24px rgba(237,76,103,0.09), 0 8px 42px rgba(23,66,109,0.14);
  padding: 32px 36px;
  min-width: 320px;
  max-width: 98vw;
  max-height: 93vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  overflow-y: auto;
  position: relative;
}
.cookie-modal-dialog h2 {
  color: var(--color-electric-blue);
  font-size: 1.14rem;
  margin-bottom: 8px;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.cookie-category input[type='checkbox'] {
  width: 21px;
  height: 21px;
  accent-color: var(--color-electric-green);
}
.cookie-category label {
  color: var(--color-dark);
  font-size: 1.01rem;
  cursor: pointer;
  font-weight: 600;
}
.cookie-category.essential label {
  color: var(--color-dark);
  font-weight: bold;
}
.cookie-modal-close {
  position: absolute;
  right: 12px;
  top: 11px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--color-electric-pink);
  cursor: pointer;
}
.cookie-modal-actions {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 14px;
  margin-top: 16px;
  justify-content: flex-end;
}
.cookie-modal .cookie-btn {
  min-width: 84px;
}
@media (max-width: 520px) {
  .cookie-modal-dialog {
    padding: 15px 7px;
    min-width: unset;
  }
}

/*==== SPACING HELPERS ====*/
.mt-16 { margin-top: 16px !important; }
.mt-24 { margin-top: 24px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mb-24 { margin-bottom: 24px !important; }
.mb-40 { margin-bottom: 40px !important; }
.gap-20 {
  gap: 20px !important;
}
.gap-24 {
  gap: 24px !important;
}
.pb-40 {
  padding-bottom: 40px !important;
}

/* === FOCUS / ACCESSIBILITY === */
.btn-primary:focus,
.btn-secondary:focus,
.cookie-btn:focus,
.main-nav a:focus,
.mobile-nav a:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-electric-blue), 0 0 0 5px #fff;
}

/* ===== UTILITY FLEX CLASSES (for custom patterns if needed) ==== */
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.flex-row {
  flex-direction: row;
}
.flex-wrap {
  flex-wrap: wrap;
}
.align-center {
  align-items: center;
}
.align-start {
  align-items: flex-start;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}

/* ==== MICRO-INTERACTIONS ==== */
a, button, .btn-primary, .btn-secondary, .cookie-btn {
  transition: background 0.15s, color 0.14s, border .16s, box-shadow .17s, transform .17s;
}
.card, .testimonial-card, .project-summary, .feature-grid li, .services ul li, .about ul li, .location-map {
  will-change: transform, box-shadow;
}

/* ========== END ========== */
