@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&display=swap');

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  display: flex;
  flex-direction: column;
  font-family: 'Lexend', sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

a {
  color:#007aff; 
  text-decoration: none;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #eee;
}

.logo img {
  max-width: 50px;
  height: auto;
}

/* Nav */
.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: #333;
  transition: color 0.2s;
}

.nav a:hover {
  color: #007aff;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #333;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* Hero */
.hero.dark {
  position: relative;
  text-align: center;
  padding: 8rem 2rem;
  color: #fff;
  background: url("img/banner.jpg") center/cover no-repeat;
  width:100%;
}

.hero.dark .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero.dark h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.hero.dark .subtitle {
  font-size: 1.3rem;
  color: #00aaff;
  margin-bottom: 1rem;
}

.hero.dark .tagline {
  font-size: 1rem;
  color: #ddd;
  margin-bottom: 2rem;
}

.hero.dark .btn-cta {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: #00aaff;
  color: #fff;
  border-radius: 25px;
  transition: background 0.3s;
}

.hero.dark .btn-cta:hover {
  background: #0088cc;
}

.button_corsi{
    display: flex;
    justify-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    padding: 20px;
}
/* Alternanza sezioni */
section.alt {
  background: #f7f7f7; /* grigio chiaro */
}

section .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}


/* Sections */
section {
  padding: 4rem 2rem;
  margin: auto;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colonne fisse su desktop */
  gap: 2rem;
  margin-top: 2rem;
  text-align: center;
  padding: 2rem;
}

@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 colonne su tablet */
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr; /* 1 colonna su mobile */
  }
}


.role-badge {
  display: inline-block;
  background: #eee;
  color: #333;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin: 0.5rem 0 1rem;
}

.portfolio-card {
  background: #f9f9f9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  padding: 1rem;
}

.portfolio-card img {
  display: block;
  margin: 20px auto 10px; /* distacco dall’alto e centratura */
  max-width: 70%;         /* occupano max il 70% della larghezza del box */
  height: 120px;          /* altezza uniforme e più contenuta */
  object-fit: contain;    /* mantiene proporzioni */
  border-radius: 8px;
}


.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;           /* larghezza fissa */
  height: 50px;          /* stessa altezza */
  background: #333;
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;    /* cerchio perfetto */
  text-align: center;    /* centra orizzontalmente */
  line-height: 50px;     /* centra verticalmente */
  text-decoration: none;
  display: none;         /* nascosta all'inizio */
  transition: background 0.3s, transform 0.3s;
  z-index: 1000;
}

.back-to-top:hover {
  background: #555;
  transform: scale(1.1);
}



.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  align-items: center;
  justify-items: center;
  margin-top: 2rem;
}

.collab-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  box-shadow: none;
  padding: 0;
  transition: transform 0.2s ease;
}

.collab-card:hover {
  transform: scale(1.1);
}

.collab-card img {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s, transform 0.3s;
}

/* Mobile */
@media (max-width: 600px) {
  .collab-grid {
    grid-template-columns: 1fr 1fr; /* 2 loghi per riga */
    gap: 1.5rem;
  }

  .collab-card img {
    max-width: 100px;
    max-height: 50px;
  }
}

/* Citazione */
.quote {
  text-align: center;
  padding: 3rem 2rem;
  background: #fafafa;
  color: #555;
  font-size: 1.2rem;
  font-style: italic;
  position: relative;
  border-radius: 12px;
}

.quote blockquote {
  max-width: 800px;
  margin: auto;
  position: relative;
}

.quote blockquote::before,
.quote blockquote::after {
  font-size: 4rem;
  color: #ddd;
  position: absolute;
}

.quote blockquote::before {
  content: "“";
  top: -20px;
  left: -30px;
}

.quote blockquote::after {
  content: "”";
  bottom: -40px;
  right: -30px;
}

.quote .author {
  display: block;
  margin-top: 1rem;
  font-size: 1rem;
  font-style: normal;
  font-weight: bold;
  color: #333;
}

/* Footer */
footer {
  background: #111;
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
}

.footer-links {
  margin-top: 0.5rem;
}

.footer-links a {
  color: #ddd;
  margin: 0 0.8rem;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

/* About */
.about-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.profile-pic {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.about-text {
  flex: 1;
  min-width: 250px;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Animazioni on scroll */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    padding: 1rem;
  }

  .nav {
    position: absolute;
    top: 60px;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 1rem;
    display: none;
    width: 100%;
    border-top: 1px solid #eee;
  }

  .nav.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .hero.dark h1 {
    font-size: 2rem;
  }

  .hero.dark .subtitle {
    font-size: 1.1rem;
  }

  .hero.dark .tagline {
    font-size: 0.95rem;
  }
}

.course {
    padding:20px;
}
