/* --- CSS RESET & NORMALIZE --- */
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  border: 0;
}
html, body {
  height: 100%;
  font-size: 16px;
  background: #f7fafc;
  color: #20344A;
  min-height: 100vh;
}
body {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
ul, ol {
  list-style: none;
  padding-left: 0;
}
a {
  color: #8b99a9;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #F6A200;
  outline: none;
}
img {
  max-width: 100%;
  height: auto;
  display: inline-block;
}
button, input, textarea, select {
  font-family: inherit;
  font-size: 100%;
}

/* --- BRAND COLORS AS CSS VARIABLES --- */
:root {
  --brand-primary: #20344A;  /* blue/navy */
  --brand-secondary: #F6A200; /* orange */
  --brand-accent: #FFFFFF;   /* white */
  --brand-bg: #f7fafc;
  --brand-gray: #e6ebf2;
  --brand-dark: #142032;
  --brand-link-hover: #194173;
  --brand-shadow: rgba(32,52,74,0.08);
  --focus-outline: 0 0 0 3px #F6A20033;
}

/* --- BASE LAYOUT & TYPOGRAPHY --- */
.container {
  max-width: 1160px;
  padding: 0 16px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
}
.content-wrapper {
  width: 100%;
}
body, p, li, ul, ol, nav, label {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: #20344A;
  letter-spacing: 0.01em;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: #142032;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.01em;
}
h1 {
  font-size: 2.4rem;
  margin-bottom: 16px;
}
h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  font-weight: 600;
}
strong {
  font-weight: 700;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
  border-radius: 20px;
}
@media (max-width: 768px) {
  .section {
    padding: 28px 8px;
    margin-bottom: 36px;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.4rem;
  }
}

/* --- NAVIGATION --- */
header {
  width: 100%;
  background: var(--brand-accent);
  border-bottom: 1.5px solid var(--brand-gray);
  position: sticky;
  top: 0;
  z-index: 50;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0 16px;
  min-height: 70px;
  gap: 22px;
  justify-content: flex-start;
}
.main-nav a {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--brand-primary);
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
  position: relative;
}
.main-nav a:not(.cta-btn):hover, .main-nav a:not(.cta-btn):focus {
  background: var(--brand-gray);
  color: var(--brand-secondary);
}
.main-nav img {
  width: 148px;
  margin-right: 10px;
  margin-left: 0;
}

.cta-btn {
  background: var(--brand-secondary);
  color: var(--brand-primary)!important;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 9px 22px;
  border: none;
  border-radius: 28px;
  box-shadow: 0 2px 10px var(--brand-shadow);
  cursor: pointer;
  transition: background 0.19s, color 0.22s, box-shadow 0.28s;
  margin-left: 10px;
  display: inline-block;
  text-align: center;
}
.cta-btn:hover, .cta-btn:focus {
  background: #ffb933;
  color: var(--brand-dark)!important;
  box-shadow: 0 4px 22px rgba(32,52,74,0.13);
  outline: none;
}
.mini-cta-btn {
  background: var(--brand-primary);
  color: var(--brand-accent);
  border-radius: 20px;
  padding: 7px 20px;
  font-size: 1rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  border: none;
  box-shadow: 0 2px 8px var(--brand-shadow);
  margin-top: 10px;
  margin-bottom: 0;
  display: inline-block;
  cursor: pointer;
  transition: background 0.15s, color 0.22s, box-shadow 0.24s;
}
.mini-cta-btn:hover, .mini-cta-btn:focus {
  background: #32527a;
  color: var(--brand-secondary);
  outline: none;
}

/* --- MOBILE MENU --- */
.mobile-menu-toggle {
  display: none;
  background: var(--brand-accent);
  border: none;
  font-size: 2.1rem;
  color: var(--brand-primary);
  cursor: pointer;
  padding: 7px 12px;
  border-radius: 6px;
  margin-left: auto;
  z-index: 110;
  transition: background 0.2s, color 0.2s;
}
.mobile-menu-toggle:focus {
  outline: var(--focus-outline);
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--brand-accent);
  z-index: 120;
  transform: translateX(-100%);
  transition: transform 0.33s cubic-bezier(0.59,0.41,0.38,1.03);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  box-shadow: 2px 0 40px rgba(32,52,74,0.18);
  min-height: 100vh;
}
.mobile-menu.open {
  transform: translateX(0%);
}
.mobile-menu-close {
  background: transparent;
  border: none;
  font-size: 2.2rem;
  color: var(--brand-primary);
  align-self: flex-end;
  padding: 20px 30px 10px 0;
  cursor: pointer;
  transition: color 0.19s;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  color: var(--brand-secondary);
  outline: none;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
  padding: 0 32px;
}
.mobile-nav a {
  font-size: 1.24rem;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  color: var(--brand-primary);
  padding: 10px 0;
  border-radius: 8px;
  transition: background 0.16s, color 0.18s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--brand-gray);
  color: var(--brand-secondary);
}

@media (max-width: 1000px) {
  .main-nav {
    gap: 12px;
  }
  .main-nav img {
    width: 120px;
  }
}

@media (max-width: 900px) {
  .main-nav {
    gap: 0.3vw;
    font-size: 0.96rem;
  }
  .cta-btn { padding: 8px 12px; }
}

/* Responsive: Menu */
@media (max-width: 800px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
    position: absolute;
    right: 22px;
    top: 18px;
  }
}
@media (min-width: 801px) {
  .mobile-menu {
    display: none !important;
  }
}

/* --- SECTION & CARD PATTERNS --- */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 18px;
  margin-bottom: 10px;
}
.feature-item {
  background: var(--brand-accent);
  border-radius: 16px;
  box-shadow: 0 2px 10px var(--brand-shadow);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  padding: 30px 22px 26px 22px;
  min-width: 210px;
  flex: 1 0 265px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s, transform 0.15s;
}
.feature-item img {
  width: 46px; height: 46px;
  margin-bottom: 4px;
}
.feature-item:hover, .feature-item:focus {
  box-shadow: 0 6px 24px 0 var(--brand-shadow);
  transform: translateY(-4px) scale(1.025);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--brand-accent);
  border-radius: 16px;
  box-shadow: 0 2px 10px var(--brand-shadow);
  padding: 26px 22px;
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.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: 1000px) {
  .features-grid,
  .card-container,
  .content-grid {
    gap: 16px;
  }
  .feature-item, .card {
    min-width: 180px;
    padding: 18px 10px 12px 10px;
  }
}
@media (max-width: 768px) {
  .features-grid,
  .card-container,
  .content-grid {
    flex-direction: column;
    gap: 16px;
  }
  .feature-item, .card {
    min-width: 0;
    padding: 14px 5vw 14px 5vw;
  }
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

/* --- TESTIMONIALS --- */
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #f7fafc;
  border-radius: 14px;
  box-shadow: 0px 2px 16px var(--brand-shadow), 0px 1.5px 0 #dde3ea;
  margin-bottom: 20px;
  border-left: 5px solid var(--brand-secondary);
  color: var(--brand-primary);
  max-width: 700px;
  transition: box-shadow 0.15s, transform 0.15s;
}
.testimonial-card.short-quote {
  max-width: 410px;
}
.testimonial-card:hover, .testimonial-card:focus {
  box-shadow: 0 6px 28px 0 var(--brand-shadow);
  transform: translateY(-2px) scale(1.01);
}
.testimonial-card p {
  font-size: 1.05rem;
  color: #20344A;
  margin-bottom: 6px;
}
.testimonial-card span {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: #1d2b43;
  font-size: 1rem;
}

/* --- RESOURCES SECTION (Risorse) --- */
.resource-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
  margin-bottom: 16px;
}
.resource-card {
  background: var(--brand-accent);
  border-radius: 14px;
  box-shadow: 0 2px 10px var(--brand-shadow);
  padding: 24px 18px;
  min-width: 210px;
  flex: 1 0 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.resource-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.download-btn {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  padding: 8px 20px;
  border: none;
  text-align: center;
  cursor: pointer;
  transition: background 0.18s, color 0.22s;
  box-shadow: 0 1.5px 7px var(--brand-shadow);
  display: inline-block;
}
.download-btn:hover, .download-btn:focus {
  background: #ffb933;
  color: var(--brand-dark);
  outline: none;
}

@media (max-width: 768px) {
  .resource-preview-grid {
    flex-direction: column;
    gap: 14px;
  }
  .resource-card {
    min-width: 0;
    padding: 12px 6vw 12px 6vw;
  }
}

/* --- FOOTER --- */
footer {
  background: var(--brand-primary);
  color: var(--brand-accent);
  padding: 42px 0 24px 0;
  border-top: 3px solid var(--brand-secondary);
  margin-top: 64px;
}
.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 22px;
}
.footer-menu a {
  color: var(--brand-accent);
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 6px 15px;
  border-radius: 6px;
  transition: background 0.19s, color 0.19s;
}
.footer-menu a:hover, .footer-menu a:focus {
  color: var(--brand-secondary);
  background: #264b7c;
  outline: none;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
}
.footer-contact p {
  color: var(--brand-accent);
  font-size: 0.96rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-contact img {
  width: 22px; height: 22px;
}
@media (max-width: 800px) {
  footer { padding: 28px 0 14px 0; }
  .footer-menu { gap: 14px; }
}

/* --- FOR COMMON CONTENT LISTS IN SECTIONS --- */
section ul, section ol {
  margin-bottom: 18px;
  margin-left: 0;
  padding-left: 0;
  font-size: 1rem;
}
section ul li, section ol li {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 1rem;
}
section ul li img, section ol li img {
  width: 26px; height: 26px;
}
section ul li:last-child, section ol li:last-child {
  margin-bottom: 0;
}

/* --- SPACING UTILITY CLASSES --- */
.mt-20 { margin-top: 20px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mt-40 { margin-top: 40px !important; }
.mb-40 { margin-bottom: 40px !important; }
.text-center { text-align: center; }

/* --- FORMATTED ICON BUTTONS --- */
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-radius: 20px;
  padding: 7px 15px;
  font-weight: 600;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  transition: background 0.18s, color 0.22s, box-shadow 0.2s;
  border: none;
  box-shadow: 0 2px 6px var(--brand-shadow);
}
.icon-btn:hover, .icon-btn:focus {
  background: #ffb933;
  color: var(--brand-dark);
  outline: none;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1510;
  background: var(--brand-primary);
  color: var(--brand-accent);
  box-shadow: 0 -4px 32px var(--brand-shadow);
  padding: 22px 18px 18px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  justify-content: center;
  font-size: 1rem;
  animation: banner-appear 0.6s cubic-bezier(0.61,0.32,0.4,1.1);
}
@keyframes banner-appear {
  from { transform: translateY(80px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.cookie-banner p {
  flex: 1 1 200px;
  color: var(--brand-accent);
  margin-right: 14px;
  font-size: 1rem;
}
.cookie-banner .cookie-btn {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-radius: 16px;
  padding: 8px 20px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  border: none;
  font-weight: 700;
  margin: 0 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 7px var(--brand-shadow);
}
.cookie-banner .cookie-btn:hover, .cookie-banner .cookie-btn:focus {
  background: #ffb933;
  color: var(--brand-dark);
  outline: none;
}
.cookie-banner .cookie-settings-btn {
  background: transparent;
  color: var(--brand-secondary);
  border: 2px solid var(--brand-secondary);
  border-radius: 16px;
  padding: 8px 20px;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-weight: 600;
  margin: 0 8px;
  cursor: pointer;
  transition: background 0.16s, color 0.18s, border 0.18s;
}
.cookie-banner .cookie-settings-btn:hover, .cookie-banner .cookie-settings-btn:focus {
  background: var(--brand-gray);
  color: var(--brand-primary);
  outline: none;
}
@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 12px;
  }
  .cookie-banner .cookie-btn, .cookie-banner .cookie-settings-btn {
    margin: 8px 6px 0 0;
    width: 95%;
  }
}

/* --- COOKIE MODAL --- */
.cookie-modal-backdrop {
  position: fixed;
  left:0; top:0; width:100vw; height:100vh;
  background: rgba(32,52,74,0.33);
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInBackdrop 0.35s;
}
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal {
  background: var(--brand-accent);
  color: var(--brand-primary);
  border-radius: 22px;
  box-shadow: 0 10px 40px var(--brand-shadow);
  padding: 36px 30px 30px 30px;
  max-width: 375px;
  width: 98vw;
  font-size: 1rem;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  animation: modalDropIn 0.38s cubic-bezier(0.51,0.38,0.38,1.01);
}
@keyframes modalDropIn {
  from { transform: translateY(48px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-modal h3 {
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  font-size: 1.21rem;
  margin-bottom: 6px;
  color: var(--brand-primary);
}
.cookie-modal .cookie-modal-close {
  position: absolute;
  top: 16px; right: 18px;
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--brand-primary);
  cursor: pointer;
  transition: color .16s;
}
.cookie-modal .cookie-modal-close:hover,.cookie-modal .cookie-modal-close:focus {
  color: var(--brand-secondary);
  outline: none;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 13px;
}
.cookie-category label {
  font-weight: 600;
  color: var(--brand-primary);
  cursor: pointer;
}
.cookie-category input[type="checkbox"] {
  accent-color: var(--brand-secondary);
  width: 20px; height: 20px;
  border-radius: 4px;
  border: 1.5px solid var(--brand-gray);
  margin-right: 4px;
}
.cookie-category.essential label {
  color: #8db3c7;
  font-weight: 500;
}
.cookie-modal .cookie-btn {
  width: 100%;
  margin: 9px 0 0 0;
  padding: 11px 0;
  font-size: 1.04rem;
}

/* --- MICRO-INTERACTIONS, FOCUS, & ACCESSIBILITY --- */
a:focus-visible, button:focus-visible {
  outline: var(--focus-outline);
}
input[type="checkbox"]:focus, input[type="radio"]:focus {
  outline: var(--focus-outline);
}

/* --- GENERAL ACCESSIBILITY --- */
[tabindex="0"]:focus-visible {
  outline: var(--focus-outline);
}

/* --- HEADINGS IN SECTIONS --- */
section h1, section h2, section h3 {
  margin-top: 0;
}

/* --- MISC MEDIA QUERIES for SPACING & TOPOLOGY --- */
@media (max-width: 768px) {
  .container { padding: 0 8px; }
  section { padding: 24px 0 8px 0; }
}

/* --- SPACING & STRUCTURE CLARITY --- */
.section + .section {
  margin-top: 10px;
}

/* --- PREVENT TEXT OVERLAP for ALL FLEX LAYOUTS --- */
div, section, .card, .feature-item, .testimonial-card, .resource-card {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* --- HIDE DEFAULT LIST STYLES WHERE NEEDED --- */
section ul, section ol {
  list-style: none;
}

/* --- Z-INDEXS for OVERLAY ELEMENTS --- */
.mobile-menu { z-index: 120; }
.cookie-banner { z-index: 1510; }
.cookie-modal-backdrop { z-index: 1600; }

/* --- FORMS and LINKS in SECTIONS --- */
section a {
  text-decoration: underline;
  color: var(--brand-primary);
  font-weight: 600;
  transition: color 0.18s;
}
section a:hover, section a:focus {
  color: var(--brand-secondary);
}

/* --- ENSURE MOBILE BUTTONS FULL WIDTH --- */
@media (max-width: 480px) {
  .cta-btn, .mini-cta-btn, .cookie-btn {
    width: 100%;
    display: block;
  }
}

/* --- MISC --- */
::-webkit-scrollbar {
  width: 10px; background: var(--brand-gray);
}
::-webkit-scrollbar-thumb {
  background: #d3dae3; border-radius: 12px;
}

/* --- END CSS --- */
