/* --- CSS RESET & NORMALIZATION --- */
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;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  background: #F2F5FA;
  color: #203552;
  font-family: 'Roboto', Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
ul, ol {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
img {
  border: none;
  max-width: 100%;
  vertical-align: middle;
  display: inline-block;
}
input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
  color: inherit;
}
* { box-sizing: border-box; }

/* --- CSS VARIABLES FOR COLORS & FONTS --- */
:root {
  --primary: #203552;
  --secondary: #28A87D;
  --accent: #F2F5FA;
  --accent-bright: #E4EDFA;
  --highlight: #5A73C7;
  --cta: #FFD95A;
  --error: #E34850;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow-md: 0 4px 16px rgba(32,53,82,0.11);
  --shadow-lg: 0 6px 32px rgba(40,168,125,0.16);
  --font-display: 'Montserrat', 'Roboto', Arial, sans-serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

/* --- TYPOGRAPHY SCALE --- */
h1 {
  font-family: var(--font-display);
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin-bottom: 22px;
  line-height: 1.16;
}
h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 16px;
  line-height: 1.22;
}
h3 {
  font-family: var(--font-display);
  font-size: 1.21rem;
  font-weight: 700;
  color: var(--highlight);
  margin-bottom: 14px;
  line-height: 1.28;
}
h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--primary);
}
p, ul li, ol li {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.8;
}
strong {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cta-note {
  font-size: 0.93rem;
  color: var(--secondary);
  margin-top: 8px;
}

/* --- LAYOUT CONTAINERS --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  width: 100%;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  position: relative;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.card:hover {
  transform: translateY(-4px) scale(1.012);
  box-shadow: var(--shadow-lg);
}
.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;
  justify-content: center;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  flex-direction: row;
  position: relative;
  transition: box-shadow .15s, transform .15s;
}
.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.01) rotate(-1.2deg);
}
.testimonial-card p {
  color: #222;
  font-size: 1.08rem;
  font-family: var(--font-body);
}
.testimonial-card span {
  color: var(--secondary);
  font-size: 0.98rem;
  font-style: italic;
  font-family: var(--font-body);
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}
.text-section {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* --- HEADER/NAVIGATION --- */
header {
  background: linear-gradient(90deg, var(--primary) 60%, var(--highlight) 100%);
  padding-top: 0;
  color: #fff;
  box-shadow: 0 5px 20px rgba(32,53,82,0.04);
  position: relative;
  z-index: 100;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 22px 16px 17px 16px;
  gap: 20px;
}
header img {
  max-height: 52px;
  height: 52px;
  width: auto;
  margin-right: 12px;
}
nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
nav a {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 500;
  border-radius: 40px;
  padding: 6px 16px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  letter-spacing: 0.01em;
  position: relative;
}
nav a:hover, nav a:focus {
  background: var(--cta);
  color: var(--primary);
}
.cta-btn {
  background: var(--secondary);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
  display: inline-block;
  padding: 13px 30px;
  border-radius: 70px;
  margin-left: 16px;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s;
  box-shadow: 0 2px 16px 0 rgba(40,168,125,0.12);
  border: 2px solid var(--secondary);
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--primary);
  color: var(--cta);
  border-color: var(--cta);
  box-shadow: 0 6px 24px 0 rgba(40,168,125,0.25);
  transform: translateY(-1px) scale(1.03);
}

/* --- MOBILE BURGER MENU --- */
.mobile-menu-toggle {
  display: none;
  position: absolute;
  right: 24px;
  top: 22px;
  font-size: 2rem;
  background: var(--cta);
  color: var(--primary);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  z-index: 201;
  border: none;
  box-shadow: 0 2px 8px rgba(32,53,82,0.10);
  cursor: pointer;
  transition: background 0.18s;
}
.mobile-menu-toggle:active,
.mobile-menu-toggle:focus {
  background: var(--secondary);
  color: #fff;
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 300;
  transform: translateX(-100%);
  transition: transform 0.37s cubic-bezier(.72,0,.21,1);
  box-shadow: 0 8px 44px 0 rgba(32,53,82,.16);
  padding: 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  font-size: 2.1rem;
  background: none;
  color: var(--primary);
  align-self: flex-end;
  margin: 26px 28px 4px 0;
  border-radius: 44px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  border: none;
  transition: background 0.17s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  background: var(--accent);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 38px 0 0 38px;
}
.mobile-nav a {
  font-size: 1.17rem;
  color: var(--primary);
  background: var(--accent);
  border-radius: 14px;
  padding: 13px 28px 13px 12px;
  font-family: var(--font-display);
  font-weight: 600;
  transition: background 0.16s, color 0.16s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--secondary);
  color: #fff;
}

@media (max-width: 1030px) {
  header .container {
    flex-direction: row;
    flex-wrap: wrap;
  }
  nav {
    gap: 14px;
  }
}
@media (max-width: 860px) {
  nav {
    gap: 8px;
  }
  .cta-btn {
    margin-left: 8px;
    padding: 11px 22px;
    font-size: 1em;
  }
  header img {
    max-height: 45px;
  }
}
@media (max-width: 740px) {
  nav { display: none; }
  .cta-btn { display: none; }
  .mobile-menu-toggle {
    display: flex;
  }
  header .container {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    padding-right: 60px;
  }
}
@media (max-width: 500px) {
  .mobile-menu-close {
    margin-top: 15px;
    margin-right: 15px;
  }
  .mobile-nav {
    margin: 54px 0 0 18px;
  }
}

/* --- MAIN SECTIONS & FLEX SPACING --- */
main {
  width: 100%;
  min-height: 60vh;
  margin-top: 0px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--accent-bright);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0;
}
section:last-child {
  margin-bottom: 0;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.card-container, .content-grid {
  gap: 20px;
}
@media (max-width: 960px) {
  main { padding: 0; }
  .container { max-width: 96vw; }
  section { padding: 36px 10px; }
  .content-wrapper { gap: 18px; }
}
@media (max-width: 680px) {
  section {
    padding: 30px 4px;
    margin-bottom: 36px;
  }
  .section { padding: 24px 2px; }
  .content-wrapper { gap: 12px; }
}

/* --- FLEX DIRECTION ON RESPONSIVE --- */
.text-image-section {
  flex-direction: row;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}
@media (max-width: 600px) {
  .container {
    padding: 0 2px;
  }
}

/* --- COURSE GRID CUSTOMIZATION (corsi-python.html) --- */
.course-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
.course-grid .text-section {
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  flex: 1 1 280px;
  padding: 28px 18px;
  min-width: 230px;
  max-width: 340px;
  margin-bottom: 10px;
  position: relative;
  transition: box-shadow 0.15s, transform .18s;
}
.course-grid .text-section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px) scale(1.013);
}
@media (max-width: 900px) {
  .course-grid {
    gap: 14px;
  }
  .course-grid .text-section {
    min-width: 170px;
    max-width: 100%;
    flex-basis: 100%;
    margin-bottom: 14px;
  }
}
@media (max-width: 640px) {
  .course-grid {
    flex-direction: column;
    gap: 12px;
  }
  .course-grid .text-section {
    padding: 21px 5px;
  }
}

/* --- FAQ LIST --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.faq-list h2 {
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 1.09rem;
  color: var(--highlight);
  font-family: var(--font-display);
  font-weight: 700;
}
.faq-list p {
  font-size: 1rem;
  color: var(--primary);
}

/* --- BUTTONS --- */
button, .cta-btn {
  cursor: pointer;
  outline: none;
  text-decoration: none;
  transition: background 0.17s, box-shadow 0.17s, color 0.17s, transform .08s;
  user-select: none;
}
button:active, .cta-btn:active {
  transform: scale(0.98);
}

/* --- FOOTER --- */
footer {
  background: var(--primary);
  color: #fff;
  padding: 34px 0 24px 0;
  width: 100%;
}
footer .container {
  flex-direction: row;
  align-items: flex-start;
  gap: 50px;
  justify-content: space-between;
}
.footer-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-nav a {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.01rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 10px;
  transition: background 0.13s, color 0.13s;
}
.footer-nav a:hover, .footer-nav a:focus {
  background: var(--secondary);
  color: var(--cta);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.97rem;
  font-family: var(--font-body);
}
.footer-contact img {
  margin-right: 8px;
  vertical-align: middle;
  width: 18px;
}
footer .copyright {
  width: 100%;
  margin-top: 24px;
  font-size: 0.89rem;
  color: #D8E5F7;
  letter-spacing: 0.03em;
  text-align: left;
}
@media (max-width: 760px) {
  footer .container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-nav { margin-bottom: 5px; }
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  background: #203552cc;
  color: #fff;
  z-index: 401;
  padding: 25px 14px 20px 14px;
  box-shadow: 0 -4px 18px rgba(32,53,82,0.11);
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  font-size: 1rem;
  animation: cookie-in 0.6s cubic-bezier(.8,0,.22,1);
}
@keyframes cookie-in {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  flex: 2 1 260px;
  margin: 0;
}
.cookie-btn-group {
  display: flex;
  flex-direction: row;
  gap: 14px;
}
.cookie-banner button,
.cookie-banner .cookie-btn {
  padding: 10px 22px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  transition: background 0.17s, color 0.17s, transform .06s;
  cursor: pointer;
  margin: 0;
}
.cookie-banner .cookie-btn.accept {
  background: var(--secondary);
  color: #fff;
}
.cookie-banner .cookie-btn.accept:hover {
  background: var(--cta);
  color: var(--primary);
}
.cookie-banner .cookie-btn.reject {
  background: #fff;
  color: var(--primary);
}
.cookie-banner .cookie-btn.reject:hover {
  background: var(--error);
  color: #fff;
}
.cookie-banner .cookie-btn.settings {
  background: var(--highlight);
  color: #fff;
}
.cookie-banner .cookie-btn.settings:hover {
  background: var(--primary);
  color: var(--cta);
}
@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 5px 15px 5px;
  }
  .cookie-btn-group {
    gap: 9px;
  }
}

/* --- COOKIE MODAL PREFERENCES --- */
.cookie-modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(32,53,82, 0.62);
  align-items: center;
  justify-content: center;
  animation: cookie-modal-in 0.4s cubic-bezier(.8,0,.23,1);
}
@keyframes cookie-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-modal.show {
  display: flex;
}
.cookie-modal-content {
  background: #fff;
  color: var(--primary);
  border-radius: 20px;
  max-width: 420px;
  width: 93vw;
  padding: 38px 28px 24px 28px;
  box-shadow: 0 8px 40px 0 rgba(32,53,82,.25);
  display: flex;
  flex-direction: column;
  gap: 19px;
  position: relative;
  animation: cookie-content-in 0.5s cubic-bezier(.7,0,.31,1);
}
@keyframes cookie-content-in {
  from { transform: scale(0.93); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.cookie-modal-content h2 {
  font-size: 1.22rem;
  color: var(--secondary);
  font-family: var(--font-display);
  margin-bottom: 8px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 7px;
}
.cookie-category label {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
}
.cookie-modal-content .cookie-note {
  font-size: 0.95rem;
  color: var(--highlight);
}
.cookie-modal-close {
  position: absolute;
  right: 15px;
  top: 12px;
  background: none;
  border: none;
  color: var(--secondary);
  font-size: 1.45rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: background .15s;
}
.cookie-modal-close:hover {
  background: var(--accent);
}
.cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 8px;
  justify-content: flex-end;
}
.cookie-modal-actions button {
  padding: 10px 20px;
  border-radius: 26px;
  font-family: var(--font-display);
  font-size: 1rem;
  background: var(--secondary);
  color: #fff;
  transition: background 0.15s, color 0.15s;
}
.cookie-modal-actions button.secondary {
  background: var(--primary);
  color: var(--cta);
}
.cookie-modal-actions button:hover {
  background: var(--highlight);
  color: #fff;
}

/* --- ARTISTIC/CREATIVE TOUCHES --- */
h1, h2, h3 {
  text-shadow: 0 2px 14px rgba(40,168,125,0.10), 0 1px 0 #fff;
}
section {
  border: 3px solid var(--highlight);
  box-shadow: 0 2px 14px 0 rgba(40,168,125,0.07);
  position: relative;
  overflow: hidden;
}
section:before {
  content: '';
  position: absolute;
  top: -54px;
  right: -54px;
  width: 115px;
  height: 115px;
  background: var(--secondary);
  opacity: 0.14;
  z-index: 0;
  border-radius: 50%;
}
section:after {
  content: '';
  position: absolute;
  bottom: -44px;
  left: -38px;
  width: 85px;
  height: 85px;
  background: var(--highlight);
  opacity: 0.07;
  z-index: 0;
  border-radius: 50%;
}
.content-wrapper, .text-section, .card, .testimonial-card, .course-grid .text-section {
  position: relative;
  z-index: 1;
}
@media (max-width: 700px) {
  section:before, section:after {
    display: none;
  }
}

/* --- LISTS & ICONS --- */
ul, ol {
  margin-left: 0;
  margin-bottom: 12px;
}
ul li, ol li {
  position: relative;
  padding-left: 33px;
  margin-bottom: 9px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--primary);
}
ul li img, ol li img {
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  margin-right: 8px;
  filter: drop-shadow(0 2px 6px rgba(40,168,125,0.05));
}

ol {
  counter-reset: custom-ol;
}
ol li {
  list-style: none;
  counter-increment: custom-ol;
  font-weight: 500;
  padding-left: 39px;
}
ol li:before {
  content: counter(custom-ol) '.';
  position: absolute;
  left: 7px;
  top: 2px;
  color: var(--secondary);
  font-size: 1.1em;
  font-family: var(--font-display);
  font-weight: 700;
}

/* --- FORMS (if present) --- */
input[type="text"], input[type="email"], textarea {
  width: 100%;
  padding: 13px 16px;
  background: #fff;
  border: 2px solid var(--secondary);
  border-radius: 13px;
  margin-bottom: 14px;
  font-size: 1rem;
  color: var(--primary);
  font-family: var(--font-body);
  transition: border-color 0.16s;
}
input:focus, textarea:focus {
  border-color: var(--highlight);
}

/* --- ERRORS/NOTES --- */
.error-msg {
  color: var(--error);
  background: #fff3f5;
  border-radius: 9px;
  padding: 8px 12px;
  margin-bottom: 8px;
  font-size: 0.96rem;
  font-weight: 600;
}

/* --- ANIMATIONS AND HOVER EFFECTS --- */
.card, .testimonial-card, .course-grid .text-section {
  transition: box-shadow .16s, transform .16s;
}
.card:hover, .course-grid .text-section:hover, .testimonial-card:hover {
  transform: translateY(-2px) scale(1.016);
  box-shadow: 0 6px 30px 0 rgba(40,168,125,0.16);
}

/* Misc transitions */
nav a, .footer-nav a {
  transition: background 0.13s, color 0.13s;
}

/* --- SELECTION COLOR --- */
::selection { background: var(--secondary); color: #fff; }

/* --- SCROLLBAR (artistic touch) --- */
::-webkit-scrollbar {
  width: 10px;
  background: var(--accent);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 20px;
}

/* --- ADDITIONAL RESPONSIVE & UTILITIES --- */
@media (max-width: 500px) {
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.03rem; }
}

@media (max-width: 340px) {
  .footer-nav a, nav a, .mobile-nav a { font-size: 0.87em; }
}

/* --- UNIQUE DECORATIVE ELEMENTS (Artistic) --- */
.card:after, .testimonial-card:after {
  content: '';
  display: block;
  position: absolute;
  bottom: 3px; right: 6px;
  width: 32px;
  height: 32px;
  border-radius: 16px 32px 19px 21px / 15px 27px 15px 23px;
  background: var(--cta);
  opacity: 0.12;
  filter: blur(1px);
  pointer-events: none;
}
.testimonial-card:before {
  content: '';
  position: absolute;
  top: 6px; left: 7px;
  width: 19px;
  height: 19px;
  border-radius: 70% 30% 49% 42%/43% 38% 71% 38%;
  background: var(--secondary);
  opacity: 0.13;
  z-index: 0;
  filter: blur(0.5px);
}

/* --- Z-INDEX FOR MODALS, BURGER, ETC. --- */
.mobile-menu, .mobile-menu.open { z-index: 300; }
.cookie-modal { z-index: 999; }
header { z-index: 100; }

/* --- END OF CSS FILE --- */
