/* --- 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; }
*, *:before, *:after { box-sizing: inherit; }
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section { display: block; }
body {
  line-height: 1.5;
  background: #F7F7F2;
  color: #22365D;
  font-family: 'Roboto', Arial, sans-serif;
  scroll-behavior: smooth;
  min-height: 100vh;
}
ol, ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  background: none;
  border: none;
  outline: none;
  appearance: none;
}
button { cursor: pointer; }

/* --- CSS CUSTOM PROPERTIES --- */
:root {
  --ff-display: 'Montserrat', 'Arial Black', Arial, sans-serif;
  --ff-body: 'Roboto', Arial, sans-serif;
  --color-primary: #22365D;
  --color-secondary: #A95B26;
  --color-accent: #F7F7F2;
  --color-electric-blue: #2196f3;
  --color-hot-pink: #F02475;
  --color-lime: #AAF51D;
  --color-orange: #FF8300;
  --color-white: #FFF;
  --color-black: #111;
  --color-grey: #e8eaf6;
  --color-shadow: rgba(34, 54, 93, 0.08);
  --border-radius: 16px;
  --transition: 0.25s cubic-bezier(.68,-0.55,.27,1.55);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, .display {
  font-family: var(--ff-display);
  letter-spacing: 0.5px;
}
h1 { font-size: 2.8rem; font-weight: 800; color: var(--color-electric-blue); letter-spacing: 0.03em; margin-bottom: 18px; line-height: 1.1; }
h2 { font-size: 2rem; font-weight: 700; color: var(--color-hot-pink); letter-spacing: 0.01em; margin-bottom: 14px; line-height: 1.18; }
h3 { font-size: 1.4rem; font-weight: 700; color: var(--color-secondary); margin-bottom: 8px; }
h4 { font-size: 1.1rem; font-weight: 600; color: var(--color-primary); margin-bottom: 6px; }
h5 { font-size: 1rem; font-weight: 600; color: var(--color-secondary); }
p, li, dd {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--color-primary);
  margin-bottom: 10px;
}
strong { color: var(--color-orange); font-weight: bold; }
a { color: var(--color-electric-blue); transition: color .15s; }
a:hover, a:focus { color: var(--color-hot-pink); text-decoration: underline; }

/* --- BASIC LAYOUT --- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
  align-items: stretch;
}

/* --- HERO --- */
.hero {
  background: linear-gradient(90deg, var(--color-electric-blue) 0%, var(--color-hot-pink) 100%);
  color: var(--color-white);
  border-radius: 0 0 48px 48px;
  box-shadow: 0 8px 32px -8px rgba(34, 54, 93, 0.22);
  margin-bottom: 60px;
  padding: 54px 0;
}
.hero .container { align-items: center; justify-content: center; }
.hero .content-wrapper {
  align-items: center;
  text-align: center;
  gap: 26px;
}
.hero h1 { color: var(--color-white); }

/* --- CARDS, FEATURE ITEMS, GRIDS --- */
.feature-grid,
.card-grid,
.service-grid,
.blog-card-grid,
.event-teaser-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  margin: 18px 0 0 0;
}
.feature {
  background: var(--color-white);
  box-shadow: 0 2px 22px -2px var(--color-shadow);
  border-radius: var(--border-radius);
  padding: 24px 24px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 270px;
  max-width: 358px;
  flex: 1 1 270px;
  margin-bottom: 20px;
  gap: 15px;
  transition: transform .17s, box-shadow .17s;
  border: 2px solid transparent;
}
.feature:hover, .service:hover, .blog-card:hover, .event-teaser:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 42px -4px var(--color-hot-pink);
  border-color: var(--color-electric-blue);
}
.feature img, .service img { width: 50px; height: 50px; margin-bottom: 10px; }

.service-grid { gap: 24px 24px; justify-content: flex-start; }
.service {
  background: var(--color-grey);
  box-shadow: 0 2px 24px -4px var(--color-shadow);
  border-radius: var(--border-radius);
  padding: 26px 20px 20px 20px;
  flex: 1 1 240px;
  margin-bottom: 20px;
  min-width: 220px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  border-left: 6px solid var(--color-lime);
  transition: box-shadow .18s, border-color .13s;
}
.service strong { color: var(--color-hot-pink); font-weight: bold; }

.blog-card-grid { gap: 24px; justify-content: flex-start; }
.blog-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 18px -4px var(--color-shadow);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 240px;
  max-width: 410px;
  flex: 1 1 220px;
  margin-bottom: 20px;
  transition: box-shadow .19s, border .13s;
  border: 2px solid transparent;
}
.event-teaser-list { gap: 20px; }
.event-teaser {
  background: var(--color-accent);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 16px -5px var(--color-electric-blue);
  padding: 20px 24px;
  flex: 1 1 270px;
  margin-bottom: 20px;
  transition: box-shadow .17s, transform .13s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 6px solid var(--color-hot-pink);
}

/* --- FLEXBOX LAYOUT UTILITY CLASSES --- */
.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;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border-radius: var(--border-radius);
  background: var(--color-accent);
  box-shadow: 0 4px 24px -8px var(--color-hot-pink);
  margin-bottom: 20px;
}
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* --- TESTIMONIAL CARD --- */
.testimonial-card p { color: var(--color-primary); font-size: 1.08rem; line-height: 1.7; margin-bottom: 8px; font-style: italic; }
.testimonial-card strong { color: var(--color-hot-pink); font-weight: bold; }
.testimonial-card div { color: var(--color-primary); font-size: 0.99rem; opacity: .82; }

/* --- FAQ ACCORDION (SCIENZA-TECNOLOGIE) --- */
.faq-accordion { margin: 0; padding: 0; }
.faq-accordion dt {
  font-family: var(--ff-display); font-weight: 700; color: var(--color-electric-blue); cursor: pointer; margin-top: 16px; transition: color .17s; font-size: 1.12rem;
}
.faq-accordion dt:hover { color: var(--color-hot-pink); }
.faq-accordion dd {
  color: var(--color-primary); font-family: var(--ff-body); margin-bottom: 10px; margin-left: 0; padding-left: 16px; border-left: 2px solid var(--color-lime); font-size: 1rem;
}

/* --- BUTTONS / CTAs --- */
.cta, a.cta, button.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg,var(--color-electric-blue),var(--color-hot-pink));
  color: var(--color-white);
  padding: 12px 34px;
  font-family: var(--ff-display);
  font-size: 1.15rem;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  box-shadow: 0 2px 10px -1px var(--color-hot-pink);
  transition: background .22s, transform .17s, box-shadow .19s;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 10px;
  min-width: 160px;
}
.cta:hover, .cta:focus {
  background: linear-gradient(90deg,var(--color-lime),var(--color-hot-pink));
  transform: scale(1.06);
  box-shadow: 0 6px 20px -5px var(--color-electric-blue), 0 6px 14px -4px var(--color-hot-pink);
  color: var(--color-primary);
}

/* --- HEADER & NAVIGATION --- */
header {
  background: var(--color-accent);
  box-shadow: 0 1px 16px -4px var(--color-electric-blue);
  padding: 0;
  position: relative;
  z-index: 30;
}
.logo {
  display: flex;
  align-items: center;
  height: 68px;
  margin-right: 18px;
}
header .container {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0 20px;
  height: 88px;
  justify-content: space-between;
}
.main-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
.main-nav a {
  font-family: var(--ff-display);
  font-size: 1.07rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  padding: 8px 10px;
  border-radius: 8px;
  transition: background .11s, color .18s;
}
.main-nav a:hover, .main-nav a:focus:not(.cta) {
  background: var(--color-hot-pink);
  color: var(--color-white);
}
.main-nav .cta { margin-left: 12px; }

/* --- MOBILE MENU --- */
.mobile-menu-toggle {
  display: none;
  background: var(--color-hot-pink);
  color: var(--color-white);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 2.3rem;
  align-items: center;
  justify-content: center;
  border: 0;
  margin-left: 14px;
  transition: box-shadow .17s;
  box-shadow: 0 2px 16px -4px var(--color-hot-pink);
  z-index: 41;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  box-shadow: 0 4px 28px -3px var(--color-electric-blue);
  background: var(--color-electric-blue);
}
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 86vw;
  max-width: 400px;
  background: var(--color-white);
  box-shadow: -4px 0 24px 0 rgba(34,54,93,.22);
  z-index: 50;
  transform: translateX(110%);
  transition: transform .34s var(--transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 40px 26px 36px 24px;
}
.mobile-menu.open {
  transform: translateX(0);
  transition: transform .38s cubic-bezier(.68,-0.55,.27,1.55);
}
.mobile-menu-close {
  position: absolute;
  right: 16px;
  top: 14px;
  background: var(--color-electric-blue);
  color: var(--color-white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  z-index: 51;
  transition: background .17s, color .12s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-hot-pink);
  color: var(--color-white);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
}
.mobile-nav a {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-primary);
  padding: 14px 8px;
  border-radius: 10px;
  background: transparent;
  transition: background .13s, color .14s;
}
.mobile-nav a:hover, .mobile-nav a:active {
  background: var(--color-hot-pink);
  color: var(--color-white);
}

/* --- FOOTER --- */
footer {
  background: var(--color-primary);
  color: var(--color-accent);
  padding: 38px 0 0 0;
  box-shadow: 0 -2px 16px -1px rgba(34,54,93,0.09);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  justify-content: center;
  font-size: 1.04rem;
}
.footer-nav a {
  color: var(--color-lime);
  transition: color .15s;
}
.footer-nav a:hover { color: var(--color-hot-pink); }
.footer-info {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  margin-bottom: 24px;
  justify-content: center;
}
.footer-info img {
  width: 52px;
  height: 52px;
  margin-right: 12px;
}
.footer-info h4 {
  color: var(--color-lime);
  margin-bottom: 8px;
}
.footer-info p, .footer-info a { color: #E3EFFF; opacity: .92; font-size: 0.99rem; }
.footer-info a:hover { color: var(--color-hot-pink); }
.footer-copy {
  padding: 16px 0 20px 0;
  border-top: 1px solid rgba(255,255,255,0.11);
  color: var(--color-lime);
  text-align: center;
  font-size: 0.93rem;
  opacity: .87;
}

/* --- TABLES & LISTS (used for policies/info) --- */
ul, ol {
  margin-left: 18px;
  margin-bottom: 20px;
  line-height: 1.75;
  list-style: disc outside;
}
li {
  padding-left: 2px;
  margin-bottom: 12px;
}


/* --- COOKIE CONSENT BANNER & MODAL --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: var(--color-primary);
  color: var(--color-accent);
  box-shadow: 0 -6px 32px -8px var(--color-hot-pink);
  z-index: 1009;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 24px 24px;
  font-size: 1.045rem;
  animation: cookieBannerSlideIn .6s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes cookieBannerSlideIn {
  from { transform: translateY(100%) }
  to   { transform: translateY(0) }
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
.cookie-banner button {
  padding: 9px 19px;
  border-radius: 9px;
  font-family: var(--ff-display);
  font-weight: 700;
  background: var(--color-hot-pink);
  color: var(--color-white);
  font-size: 1rem;
  border: none;
  box-shadow: 0 2px 12px -5px var(--color-electric-blue);
  margin-right: 4px;
  min-width: 120px;
  transition: background .14s, color .11s, transform .125s;
}
.cookie-banner button.accept {
  background: var(--color-electric-blue);
  color: var(--color-white);
}
.cookie-banner button.reject {
  background: var(--color-lime);
  color: var(--color-primary);
}
.cookie-banner button.settings {
  background: var(--color-hot-pink);
}
.cookie-banner button:hover, .cookie-banner button:focus {
  filter: brightness(1.12);
  transform: scale(1.04);
}

.cookie-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(31,26,36,0.65);
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInOverlay .25s;
}
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  background: var(--color-white);
  color: var(--color-primary);
  border-radius: 18px;
  box-shadow: 0 6px 44px -6px var(--color-electric-blue);
  width: 96vw;
  max-width: 425px;
  padding: 34px 24px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  animation: cookieModalPop .38s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes cookieModalPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.cookie-modal h2 { color: var(--color-hot-pink); font-size: 1.5rem; margin-bottom: 6px; }
.cookie-modal .cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px 0 18px 0;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.09rem;
  padding: 6px 0 5px 0;
}
.cookie-modal .switch {
  display: inline-block;
  width: 44px;
  height: 24px;
  position: relative;
}
.cookie-modal .switch input[type='checkbox'] {
  opacity: 0;
  width: 0;
  height: 0;
}
.cookie-modal .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--color-electric-blue);
  border-radius: 24px;
  transition: background .19s;
}
.cookie-modal .switch input:checked + .slider {
  background: var(--color-hot-pink);
}
.cookie-modal .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 3px;
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: 0 2px 4px -2px var(--color-lime);
  transition: transform .19s;
}
.cookie-modal .switch input:checked + .slider:before {
  transform: translateX(18px);
}
.cookie-modal .category-label { flex: 1 1 auto; color: var(--color-primary); }
.cookie-modal .category-label.essential { color: var(--color-lime); font-weight: bold; }
.cookie-modal .cookie-modal-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 18px;
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  right: 16px;
  top: 14px;
  background: var(--color-electric-blue);
  color: var(--color-white);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.29rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  z-index: 12;
  transition: background .18s, color .11s;
}
.cookie-modal .cookie-modal-close:hover {
  background: var(--color-hot-pink);
  color: var(--color-white);
}

/* --- RESPONSIVE DESIGN (MOBILE FIRST)-- */
@media (max-width: 992px) {
  .container { max-width: 96vw; }
  .hero { padding: 32px 0; }
  .feature, .service, .blog-card, .event-teaser {
    min-width: 180px; max-width: 100vw;
  }
  .feature-grid, .service-grid, .blog-card-grid, .event-teaser-list {
    gap: 18px;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2.07rem; }
  h2 { font-size: 1.42rem; }
  h3 { font-size: 1.13rem; }
  .section { margin-bottom: 38px; padding: 20px 8px; }
  .container { padding: 0 8px; }
  .content-wrapper { gap: 18px; }
  .feature-grid, .service-grid, .event-teaser-list, .blog-card-grid {
    flex-direction: column;
    gap: 18px;
  }
  .feature, .service, .event-teaser, .blog-card { max-width: 100%; }
  .footer-info {
    flex-direction: column;
    align-items: center;
    gap: 18px;
  }
  .footer-info img { margin-bottom: 10px; }
  header .container { flex-direction: row; height: 64px; padding: 0 8px; }
}
@media (max-width: 700px) {
  .text-image-section { flex-direction: column; gap: 16px; }
}
@media (max-width: 640px) {
  .testimonial-card, .feature, .service, .event-teaser, .blog-card {
    padding: 14px 9px;
    font-size: 0.98rem;
  }
  .hero { border-radius: 0 0 26px 26px; }
}
/* Mobile Burger Menu on Small Screens */
@media (max-width: 900px) {
  .main-nav { display: none !important; }
  .mobile-menu-toggle { display: flex; }
}
@media (min-width: 901px) {
  .mobile-menu, .mobile-menu-toggle { display: none !important; }
  .main-nav { display: flex !important; }
}

/* --- UTILITIES & EFFECTS --- */
.box-shadow { box-shadow: 0 2px 24px -6px var(--color-shadow); }
.rounded { border-radius: var(--border-radius); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.uppercase { text-transform: uppercase; }
.hide { display: none !important; }
.flex { display: flex; }
.column { flex-direction: column; }
.align-center { align-items: center; }
.gap-20 { gap: 20px; }
.gap-30 { gap: 30px; }

/* --- MICRO-INTERACTIONS & FOCUS --- */
a, button, .cta, .mobile-menu-close, .cookie-banner button, .cookie-modal-close {
  outline: none;
  box-shadow: none;
  transition: box-shadow .13s, outline-color .13s;
}
a:focus,
button:focus,
.cta:focus,
.mobile-menu-close:focus,
.cookie-banner button:focus,
.cookie-modal-close:focus {
  outline: 2.5px solid var(--color-lime);
  box-shadow: 0 0 0 2px var(--color-hot-pink);
}

/* --- ICON UTILS --- */
li img {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 10px;
  margin-bottom: 3px;
  display: inline-block;
}

/* --- Hide Inline Cookie Modal & Banner By Default (shown via JS) --- */
.cookie-banner.hide, .cookie-modal-bg.hide { display: none !important; }
