/* ==== 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%;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*, *::before, *::after {
  box-sizing: inherit;
}
body {
  line-height: 1.5;
  background: #F3F4EF;
  color: #2F2F2F;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: inline-block;
}
a {
  color: #2F6656;
  text-decoration: none;
  transition: color 0.2s cubic-bezier(.58,0,.42,1);
}
a:hover, a:focus {
  color: #F8C039;
  outline: none;
}
ul, ol {
  list-style: none;
}
button, input[type="button"], input[type="submit"] {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

/* ==== BRAND VARIABLES ==== */
:root {
  --primary: #2F6656;
  --secondary: #F8C039;
  --accent: #F3F4EF;
  --text: #2F2F2F;
  --heading: #1E2E28;
  --white: #fff;
  --error: #D63C3C;
  --shadow: 0 4px 16px rgba(47,102,86,0.07), 0 1.5px 8px rgba(47,102,86,0.10);
  --border-radius: 18px;
  --radius-btn: 32px;
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
  --focus-outline: 2px solid #F8C039;
}

/* ==== TYPOGRAPHY ==== */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.5px;
}
h1 {
  font-size: 2.5rem;
  line-height: 1.18;
  margin-bottom: 20px;
}
h2 {
  font-size: 2rem;
  line-height: 1.22;
  margin-bottom: 16px;
}
h3 {
  font-size: 1.3rem;
  line-height: 1.15;
  margin-bottom: 12px;
}
h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
p, li {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.7em;
}
p:last-child, li:last-child {
  margin-bottom: 0;
}
strong {
  font-weight: 700;
}

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

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  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;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: var(--accent);
  border-left: 8px solid var(--secondary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  color: var(--text);
}
.testimonial-card p {
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 500;
}
.testimonial-info, .testimonial-stars {
  display: flex;
  align-items: center;
  gap: 8px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ==== HEADER & NAV ==== */
header {
  background: var(--white);
  box-shadow: 0 1.5px 10px rgba(47,102,86,0.05);
  width: 100%;
  z-index: 90;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 24px;
}
img[alt="Sempre Attivi"] {
  height: 42px;
  width: auto;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  font-family: var(--font-display);
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  padding: 6px 18px;
  border-radius: var(--border-radius);
  transition: background 0.18s cubic-bezier(.6,0,.4,1), color 0.18s cubic-bezier(.6,0,.4,1);
  position: relative;
}
.main-nav a:not(.btn-primary):hover, .main-nav a:not(.btn-primary):focus {
  background: var(--accent);
  color: var(--secondary);
}
.btn-primary,
.btn-secondary {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: var(--radius-btn);
  padding: 12px 30px;
  border: none;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  cursor: pointer;
  text-align: center;
  display: inline-block;
  letter-spacing: 1px;
  box-shadow: 0 1.5px 5px rgba(47,102,86,0.07);
}
.btn-primary {
  background: var(--secondary);
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(248,192,57,0.1);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(47,102,86,0.15);
}
.btn-secondary {
  background: var(--primary);
  color: var(--white);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--secondary);
  color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  color: var(--primary);
  background: none;
  border: none;
  margin-left: 18px;
  z-index: 102;
  border-radius: 50%;
  padding: 8px 12px;
  transition: background 0.17s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--accent);
}

/* ==== MOBILE MENU ==== */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--primary);
  color: var(--white);
  z-index: 110;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  transform: translateX(-100%);
  transition: transform 0.33s cubic-bezier(.78,0,.23,1);
  box-shadow: 0 0 40px rgba(47,102,86,0.2);
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  align-self: flex-end;
  margin: 20px 24px 18px 0;
  font-size: 2.2rem;
  color: var(--secondary);
  background: none;
  border: none;
  border-radius: 50%;
  transition: background 0.17s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: rgba(255,255,255,0.06);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  padding-left: 36px;
}
.mobile-nav a {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  padding: 10px 0;
  display: block;
  border-radius: var(--border-radius);
  transition: background 0.17s, color 0.17s;
}
.mobile-nav a:active, .mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--secondary);
  color: var(--primary);
}

/* ==== HERO SECTION ==== */
.hero {
  background: var(--primary);
  color: var(--white);
  padding: 64px 0;
  position: relative;
  width: 100%;
}
.hero .container, .hero .content-wrapper {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 30px;
}
.hero h1 {
  color: var(--white);
}
.hero p {
  color: var(--accent);
  font-weight: 500;
  font-size: 1.18rem;
}
.hero .btn-primary {
  margin-top: 18px;
  background: var(--secondary);
  color: var(--primary);
}
.hero .btn-primary:hover,
.hero .btn-primary:focus {
  background: var(--white);
  color: var(--primary);
}

/* ==== FEATURES / GRID SECTIONS ==== */
.features, .values-section, .courses-grid, .personal-programs {
  background: var(--accent);
  border-bottom: 2px solid var(--secondary);
}
.features .feature-grid,
.values-section ul,
.courses-grid .course-catalog-grid,
.personal-programs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  justify-content: flex-start;
  margin-top: 24px;
}
.features .feature-grid li,
.values-section ul li,
.courses-grid .course-catalog-grid li,
.personal-programs ul li {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 28px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 240px;
  max-width: 330px;
  flex: 1 1 220px;
  gap: 12px;
}
.features .feature-grid img, .values-section ul img,
.courses-grid .course-catalog-grid img, .personal-programs ul img {
  width: 42px;
  height: 42px;
}
.features h2, .values-section h2, .team-section h2, .personal-programs h2 {
  color: var(--primary);
}

/* ==== ABOUT & SERVICE PREVIEW SECTIONS ==== */
.about-preview, .about-section, .service-preview, .team-section, .case-studies-section {
  background: var(--white);
}

.service-preview ul, .team-section ul, .blog-preview ul, .benefits-section ul, .faq-section ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.service-preview ul li,
.team-section ul li,
.blog-preview ul li,
.benefits-section ul li,
.faq-section ul li {
  min-width: 220px;
  max-width: 350px;
  background: var(--accent);
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(47,102,86,0.07);
  padding: 18px 18px 16px 18px;
  flex: 1 1 180px;
  color: var(--text);
}

/* ==== TESTIMONIALS ==== */
.testimonials-section, .testimonials-preview {
  background: var(--accent);
  padding-top: 48px;
  padding-bottom: 48px;
}
.testimonials-section h2, .testimonials-preview h2 {
  color: var(--primary);
}
.testimonials-section .testimonial-card, .testimonials-preview .testimonial-card {
  background: var(--white);
  border-left: 8px solid var(--primary);
  color: var(--text);
  margin-bottom: 20px;
}
.testimonials-section .testimonial-card:last-child, .testimonials-preview .testimonial-card:last-child {
  margin-bottom: 0;
}
.testimonials-section .testimonial-stars img {
  width: 24px;
  height: 24px;
}

/* ==== BLOG / ARTICLE GRID ==== */
.blog-list .article-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 22px;
  justify-content: flex-start;
}
.blog-list .article-grid article {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 26px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
  max-width: 340px;
  flex: 1 1 220px;
}
.blog-list .article-grid h3 a {
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  transition: color 0.18s;
}
.blog-list .article-grid h3 a:hover, .blog-list .article-grid h3 a:focus {
  color: var(--secondary);
  text-decoration: underline;
}
.categories-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 1rem;
}
.categories-filter a {
  color: var(--primary);
  font-weight: 700;
}
.categories-filter a:hover, .categories-filter a:focus {
  color: var(--secondary);
}

/* ==== CTA & NEWSLETTER ==== */
.cta-section, .newsletter-signup {
  background: var(--secondary);
  color: var(--primary);
  padding-top: 50px;
  padding-bottom: 50px;
  text-align: center;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: 40px 0 0 0;
}
.cta-section .btn-primary, .newsletter-signup .btn-primary {
  margin-top: 20px;
}
.cta-section h2, .newsletter-signup h2 {
  color: var(--primary);
}

/* ==== FOOTER ==== */
footer {
  background: var(--primary);
  color: var(--accent);
  padding: 44px 0 32px 0;
}
footer .container {
  flex-direction: row;
  gap: 60px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: bold;
  color: var(--white);
  margin-bottom: 20px;
}
.footer-brand img {
  height: 36px;
  width: auto;
}
.footer-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-menu a {
  color: var(--secondary);
  font-family: var(--font-display);
  font-weight: 500;
  transition: color 0.16s;
  font-size: 1rem;
}
.footer-menu a:hover, .footer-menu a:focus {
  color: var(--accent);
}
.footer-contact {
  font-size: 1rem;
  color: var(--accent);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.footer-contact img {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

/* ==== LEGAL SECTION (GDPR/COOKIE/PRIVACY) ==== */
.legal-section {
  background: var(--accent);
  border-radius: var(--border-radius);
  padding: 36px 20px;
  margin: 45px 0;
  color: var(--text);
}
.legal-section h1, .legal-section h2 {
  color: var(--primary);
}
.legal-section ul {
  padding-left: 20px;
  margin-bottom: 15px;
}
.legal-section li {
  list-style: disc inside;
  margin-bottom: 7px;
}

/* ==== FAQ SECTION ==== */
.faq-section ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.faq-section ul li {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px 18px;
  flex: 1 1 240px;
}

/* ==== COOKIE CONSENT BANNER ==== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: var(--primary);
  color: var(--accent);
  padding: 22px 16px;
  box-shadow: 0 -6px 14px rgba(47,102,86,0.08);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  transition: transform 0.3s cubic-bezier(.6,0,.4,1), opacity 0.3s;
  opacity: 1;
}
.cookie-banner.hide {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner-text {
  font-size: 1rem;
  font-family: var(--font-body);
  flex: 1 1 auto;
  margin-right: 24px;
}
.cookie-banner-btns {
  display: flex;
  gap: 10px;
  align-items: center;
}
.cookie-banner .cookie-btn {
  padding: 8px 18px;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.17s, color 0.17s, box-shadow 0.18s;
  border: none;
}
.cookie-banner .accept {
  background: var(--secondary);
  color: var(--primary);
}
.cookie-banner .accept:hover, .cookie-banner .accept:focus {
  background: var(--accent);
}
.cookie-banner .reject {
  background: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--secondary);
}
.cookie-banner .reject:hover, .cookie-banner .reject:focus {
  background: var(--error);
  color: var(--white);
  border-color: var(--error);
}
.cookie-banner .settings {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.cookie-banner .settings:hover, .cookie-banner .settings:focus {
  background: var(--accent);
  color: var(--primary);
}

/* ==== COOKIE PREFERENCES MODAL ==== */
.cookie-modal {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(47,102,86, 0.33);
  backdrop-filter: blur(2px);
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
  opacity: 1;
}
.cookie-modal.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal-content {
  background: var(--white);
  border-radius: var(--border-radius);
  max-width: 370px;
  width: 94vw;
  padding: 32px 26px 26px 26px;
  box-shadow: 0 6px 28px rgba(47,102,86,0.18);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  margin-bottom: 8px;
  color: var(--primary);
}
.cookie-modal-close {
  position: absolute;
  right: 18px; top: 18px;
  font-size: 1.4rem;
  background: none;
  border: none;
  color: var(--primary);
  border-radius: 50%;
  transition: background 0.15s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  background: var(--accent);
}
.cookie-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.cookie-switch {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cookie-switch input[type=checkbox] {
  accent-color: var(--primary);
  width: 20px; height: 20px;
}
.cookie-switch span {
  font-size: 1rem;
  color: var(--primary);
  font-family: var(--font-display);
}
.cookie-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ==== THANK YOU SECTION ==== */
.thank-you-section {
  min-height: 420px;
  background: var(--accent);
  padding: 64px 0;
}
.thank-you-section h1 {
  color: var(--primary);
}

/* ==== ACCESSIBILITY & UTILITY CLASSES ==== */
:focus {
  outline: var(--focus-outline);
  outline-offset: 2px;
}
.sr-only {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
  border: 0;
}

/* ==== RESPONSIVE DESIGN ==== */
@media (max-width: 1020px) {
  .container {
    max-width: 94vw;
    padding-left: 10px;
    padding-right: 10px;
  }
  .footer-brand img {
    height: 30px;
  }
}
@media (max-width: 900px) {
  .main-nav {
    gap: 18px;
  }
  .footer-contact {
    font-size: 0.96rem;
  }
  .footer-menu {
    font-size: 0.95rem;
  }
  .blog-list .article-grid article, .features .feature-grid li, .values-section ul li, .personal-programs ul li {
    max-width: 98vw;
  }
}
@media (max-width: 768px) {
  h1 { font-size: 2.0rem; }
  h2 { font-size: 1.42rem; }
  .section {
    margin-bottom: 34px;
    padding: 28px 8px;
  }
  .container {
    flex-direction: column;
    gap: 30px;
    padding: 0 4vw;
  }
  header .container {
    flex-direction: row;
    gap: 10px;
    min-height: 60px;
  }
  .footer-contact {
    font-size: 0.93rem;
    gap: 5px;
  }
  footer .container {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-block;
  }
  .features .feature-grid, .service-preview ul, .team-section ul, .values-section ul, .benefits-section ul, .courses-grid .course-catalog-grid, .personal-programs ul, .blog-list .article-grid, .faq-section ul {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  .text-image-section {
    flex-direction: column;
    gap: 16px;
  }
}
@media (max-width: 600px) {
  .hero {
    padding: 32px 0 38px 0;
  }
  .hero .btn-primary, .cta-section .btn-primary {
    width: 100%;
    font-size: 1.05rem;
    padding: 14px;
  }
  .card, .testimonials-section .testimonial-card, .testimonials-preview .testimonial-card {
    padding: 18px 10px;
  }
  .legal-section {
    padding: 20px 8px;
    margin: 16px 0;
  }
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .cookie-banner-btns {
    width: 100vw;
    gap: 8px;
  }
}

/* ==== MICRO-INTERACTIONS & TRANSITIONS ==== */
.btn-primary, .btn-secondary, .cookie-btn {
  transition: background 0.2s, color 0.2s, box-shadow 0.18s, border 0.2s;
}
.card, .testimonial-card {
  transition: box-shadow 0.17s, transform 0.13s;
}
.card:hover, .testimonial-card:hover {
  box-shadow: 0 8px 24px rgba(47,102,86,0.17);
  transform: translateY(-3px) scale(1.03);
}
input, select, textarea {
  border-radius: var(--border-radius);
  border: 1.5px solid var(--primary);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border 0.18s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--secondary);
}

/* ==== OVERRIDES FOR ACCESSIBLE CONTRAST IN TESTIMONIALS ==== */
.testimonial-card, .testimonials-section .testimonial-card, .testimonials-preview .testimonial-card {
  color: var(--text);
  background: var(--accent);
}
.testimonial-card * {
  color: var(--text) !important;
}

/* ==== Z-INDEX ENSURANCE ==== */
header, .mobile-menu, .cookie-banner, .cookie-modal {
  z-index: 100;
}
.mobile-menu {
  z-index: 110;
}
.cookie-banner, .cookie-modal {
  z-index: 200;
}

/* ==== EXTRA: BLOCKQUOTE AND HR ==== */
blockquote {
  background: #F8C03922;
  border-left: 6px solid #F8C039;
  padding: 14px 18px;
  margin: 18px 0 12px 0;
  border-radius: var(--border-radius);
  font-style: italic;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 600;
}
hr {
  border: 0;
  height: 1.5px;
  background: var(--secondary);
  margin: 36px 0 30px 0;
}
