:root {
  --accent: #d32f2f;
  --dark: #222;
  --muted: #666;
  --bg: #fff;
  --maxw: 1100px;
  --radius: 8px;
}

/* ========== BASE STYLES ========== */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth; 
}

body {
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial;
  color: var(--dark);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h2.corsi{
	margin:0;
	padding:0;
}

#CamminaCorriCombatti {
  scroll-margin-top: 100px;
}

/* ========== LAYOUT ========== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px;
}

header {
  border-bottom: 1px solid #eee;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.02), transparent);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(4px);
}

footer {
  border-top: 1px solid #eee;
  padding: 28px 0;
  margin-top: 36px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ========== TYPOGRAPHY ========== */
.hero h1,
.hero_full h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.1rem;
  line-height: 1.05;
  margin: 0;
}

.hero p.lead,
p.lead {
  color: var(--muted);
  margin: 12px 0 20px;
}

.feature strong,
.red {
  color: var(--accent);
}

h2.titolo_corsi{
	text-align:center;
}

h2.GDP {
  padding-top: 10px;
  padding-bottom: 10px;
}


/* ========== HEADER NAVIGATION ========== */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.container.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-list {
  display: flex;
  gap: 18px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.logo {
  width: 192px;
  height: 96px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-list {
  display: flex;
  gap: 16px;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list li a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
}

.nav-list li a:hover {
  color: var(--accent);
}

.nav-list li.social-icon a svg {
  stroke: var(--dark);
  transition: stroke 0.3s ease;
}

.nav-list li.social-icon a:hover svg {
  stroke: var(--accent);
}

/* Mobile nav */
.menu-toggle {
  font-size: 1rem;
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-list.mobile-visible {
  display: flex !important;
  flex-direction: column;
  background: white;
  position: absolute;
  top: 72px;
  right: 60px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-radius: var(--radius);
  padding: 12px;
  z-index: 99;
}

/* ========== HERO ========== */
.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  align-items: center;
  padding: 48px 0;
}

.hero_full {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  padding: 28px 0;
}

.hero_full h1 {
  text-align: center;
}

/* ========== COMPONENTS ========== */
.cta {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-weight: 700;
}

a:hover{
  color: var(--dark);
}


.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(12, 12, 12, 0.06);
  padding: 10px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.feature {
  background: #f5f5f5;
  padding: 18px;
  border-radius: 10px;
  text-align: center;
}

.highlight-box {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px 30px;
  border-left: 6px solid var(--accent);
  border-right: 6px solid var(--accent);
  background-color: #f9f9f9;
  text-align: center;
}

.highlight-box h2 {
  font-size: 2.4rem;
  font-weight: bold;
  color: #111;
  margin: 0;
  line-height: 1.3;
}

/* ========== FORM STYLES ========== */
label, input, textarea, button {
  font-size: 1rem;
}

input,
textarea {
  background: #fff;
  color: #000;
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* ========== GALLERY / COLLAGE ========== */
.masonry-collage {
  padding: 60px 20px;
  display: flex;
  justify-content: center;
}

.collage-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
  flex-wrap: nowrap;
}

.collage-wrapper img {
  object-fit: cover;
  border-radius: 5px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  margin-left: -40px;
  position: relative;
  transition: transform 0.3s ease;
}

.collage-wrapper img:first-child {
  margin-left: 0;
}

.img-small { width: 140px; }
.img-medium { width: 180px; }
.img-large { width: 220px; }

.up { top: -20px; }
.down { top: 20px; }

.collage-wrapper img:hover {
  transform: scale(1.20);
  z-index: 10;
}

/* ========== TIMELINE ========== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 20px 0;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.timeline-item .year {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
  font-family: 'Montserrat', sans-serif;
}

.timeline-item .description {
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.95rem;
}

/* ========== CONTACT FORM ========== */
.contact-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  nav ul {
    display: none;
  }

  .mobile-nav {
    display: block;
  }
}

@media (min-width: 901px) {
  .mobile-nav {
    display: none;
  }
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 320px;
  }

  .timeline {
    flex-direction: row;
    justify-content: space-between;
  }

  .timeline-item {
    border-left: none;
    border-top: 3px solid var(--accent);
    border-bottom: 3px solid var(--accent);
    padding: 16px 0;
    align-items: center;
    text-align: center;
    max-width: 240px;
  }

  .timeline-item .year {
    margin-bottom: 6px;
  }
}

@media (max-width: 768px) {
  #gallery {
    display: none;
  }

  .collage-wrapper img {
    margin-left: -40px;
  }
  
  .highlight-box {
    padding: 15px 20px;
    border-left: 4px solid var(--accent);
    border-right: 4px solid var(--accent);
  }

  .highlight-box h2 {
    font-size: 1.6rem;
  }
  
  .nav-list {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 72px;
    right: 60px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius);
    padding: 12px;
    z-index: 99;
  }

  .nav-list.mobile-visible {
    display: flex !important;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  #gallery {
    display: none;
  }

  .collage-wrapper img {
    margin-left: -40px;
  }
  
  .highlight-box {
    padding: 15px 20px;
    border-left: 4px solid var(--accent);
    border-right: 4px solid var(--accent);
  }

  .highlight-box h2 {
    font-size: 1.4rem;
  }
  
  .nav-list {
    display: none;
    flex-direction: column;
    background: white;
    position: absolute;
    top: 72px;
    right: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--radius);
    padding: 12px;
    z-index: 99;
  }

  .nav-list.mobile-visible {
    display: flex !important;
  }
}

/* Rimuovere inline styles */

.img-contained {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

.img-corso {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 12px;
}

.muted {
  color: var(--muted);
}

.mb-8 {
  margin-bottom: 8px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.fs-small {
  font-size: 0.85rem;
}

.w-full {
  width: 100%;
}

.input-base {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* FADE IN */

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* CTA BUTTON */

.cta {
  position: relative;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta:hover, .cta:focus {
  background-color: var(--accent-color);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 1px solid #d32f2f;
  color: #222;
}