/* Reset e Base */
*,
*::after,
*::before {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/* Stili globali */
html {
    scroll-behavior: smooth;

}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

}

a {
    color: #007BFF;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* Container principale */
.container {
    max-width: 900px;
    margin: 8px auto;
    padding: 30px;
    box-sizing: border-box;
  }

/* Header */
header {
    background: #333;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    width: 100%;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

/* Contenuto principale */
.content {
    flex: 3;
    padding: 2rem;
    background: #fff;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Main flessibile */
.main {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 2rem 0;
    flex: 1;
}

section {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  /* Aumento la distanza verticale tra le sezioni per maggiore respiro */
  margin: 3.5rem 0;
  /* Migliora il comportamento degli anchor link con header fisso */
  scroll-margin-top: 90px;
    width: 100%;
}

section h2 {
    color: rgb(194, 34, 34);
    font-size: 2rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: rgb(194, 34, 34);
}

/* Tipografia */
h1, h2, h3 {
    margin-bottom: 1rem;
}

p {
    color: #000;
    /* Evita spaziature eccessive tra le parole su righe corte */
    text-align: left;
    margin: 0 0 1rem 0;
    line-height: 1.6;
    hyphens: auto; /* migliora la sillabazione quando necessario */
}

/* Usa questa classe solo quando vuoi il testo giustificato */
p.justify {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}



/* --- COVER BASE --- */

.cover {
  display: flex;
  flex-direction: column; /* MOBILE BASE */
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: auto;

  padding: 2rem 1rem;
  box-sizing: border-box;

  background: linear-gradient(135deg, #5e0b0b 0%, #210101 100%);
  color: #fff;

  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

/* ======================================
   NOME (Mobile)
====================================== */

.cover-name {
  writing-mode: horizontal-tb;
  transform: none;
  text-align: center;
  margin-bottom: 1.5rem;
}

.cover-name h1 {
  font-family: "Great Vibes", cursive;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(0,0,0,0.4);
  margin: 0;
  padding: 20px;
}

/* ======================================
   CONTENUTO
====================================== */

.cover-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
}

.cover-text {
  text-align: center;
  font-family: 'Poppins', sans-serif;
  max-width: 100%;
}

.cover-text h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.cover-text p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #e6e6e6;
  text-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* ======================================
   VIDEO
====================================== */

.cover-video {
  width: 100%;
  max-width: 100%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  transition: transform 0.4s ease;
}

.cover-video video {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.cover-video:hover {
  transform: scale(1.02);
}

/* ======================================
   BOTTONE
====================================== */

.cover button {
  padding: 0.7rem 1.4rem;
  font-family: "Great Vibes", cursive;
  font-size: 1.1rem;
  font-weight: 400;
  color: #ffffff;

  background: linear-gradient(135deg, #a91313 0%, #5e0b0b 100%);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  cursor: pointer;

  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  letter-spacing: 1px;

  position: relative;
  overflow: hidden;
}

.cover button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.cover button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 30px rgba(169, 19, 19, 0.4);
  background: linear-gradient(135deg, #c22222 0%, #a91313 100%);
  border-color: #ffffff;
}

.cover button:hover::before {
  left: 100%;
}

/* ======================================
   TABLET (768px+)
====================================== */

@media (min-width: 768px) {

  .cover {
    padding: 3rem 2rem;
  }

  .cover-name h1 {
    font-size: 2.8rem;
  }

  .cover-text h2 {
    font-size: 2rem;
  }

  .cover-text p {
    font-size: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .cover button {
    padding: 0.9rem 2rem;
    font-size: 1.4rem;
  }
}

/* ======================================
   DESKTOP (1024px+)
====================================== */

@media (min-width: 1024px) {

  .cover {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 2rem 4rem;
  }

  .cover-name {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin-bottom: 0;
    padding-right: 2rem;
  }

  .cover-name h1 {
    font-size: 3.5rem;
  }

  .cover-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    flex: 1;
  }

  .cover-text {
    text-align: left;
    max-width: 600px;
  }

  .cover-video {
    max-width: 550px;
  }
}

/* ======================================
   LARGE DESKTOP (1600px+)
====================================== */

@media (min-width: 1600px) {

  .cover {
    padding: 2rem 8rem;
  }

  .cover-name h1 {
    font-size: 4.5rem;
  }

  .cover-text h2 {
    font-size: 2.8rem;
  }

  .cover-text p {
    font-size: 1.1rem;
  }

  .cover-video {
    max-width: 650px;
  }

  .cover button {
    font-size: 1.6rem;
    padding: 1rem 2.5rem;
  }
}



/* Menu */
nav.hamburger-menu {
    position: fixed;
  background: linear-gradient(135deg, #5e0b0b 0%, #210101 100%);
    color: #ffffff;
    padding: 10px;
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    z-index: 20;
}

nav.hamburger-menu .logo {
    margin: 0 70px 0 40px;
}

nav.hamburger-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav.hamburger-menu li {
    display: inline;
    margin: 0 40px 0 0;
}

nav.hamburger-menu a {
    color: #ffffff;
    text-decoration: none;
}

nav.hamburger-menu a:hover {
    color: #f5e505;
    text-decoration: underline;
}

/* Menu Desktop - Hover Behavior */
@media all and (min-width: 769px) {
    .has-submenu {
        position: relative;
    }

    .has-submenu .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
  background: linear-gradient(135deg, #5e0b0b 0%, #210101 100%);
        min-width: 200px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 1000;
        border-radius: 4px;
        padding: 5px 0;
    }

    .has-submenu:hover .submenu {
        display: block;
    }

    .has-submenu .submenu li {
        padding: 0;
        margin: 0;
        list-style: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .has-submenu .submenu li:last-child {
        border-bottom: none;
    }

    .has-submenu .submenu a {
        display: block;
        padding: 12px 20px;
        color: white;
        text-decoration: none;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .has-submenu .submenu a:hover {
        background-color: rgba(255, 255, 255, 0.15);
        padding-left: 25px;
    }
}

/* Menu Mobile - Click Behavior */
@media all and (max-width: 768px) {
    .has-submenu {
        position: relative;
    }

    .has-submenu .submenu {
        display: none;
        position: static;
        width: 100%;
  background: linear-gradient(135deg, #5e0b0b 0%, #210101 100%);
        margin-top: 0;
        padding: 0;
    }

    .has-submenu.active .submenu {
        display: block;
    }

    .has-submenu .submenu li {
        padding: 0;
        margin: 0;
        list-style: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .has-submenu .submenu li:last-child {
        border-bottom: none;
    }

    .has-submenu .submenu a {
        display: block;
        padding: 12px 20px;
        color: white;
        text-decoration: none;
        transition: all 0.3s ease;
        padding-left: 30px; /* Indentazione per i submenu items */
    }

    .has-submenu .submenu a:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }

    /* Stile per il link del menu principale quando il submenu è attivo */
    .has-submenu.active > a {
        background-color: rgba(255, 255, 255, 0.1);
    }

    nav.hamburger-menu .label-controllo {
        position: fixed;
        top: 18px;
        left: 20px;
        width: 26px;
        height: 26px;
        cursor: pointer;
        z-index: 10;
    }

    nav.hamburger-menu .label-controlloChiuso {
        display: none;
        position: fixed;
        top: 18px;
        left: 20px;
        width: 26px;
        height: 26px;
        cursor: pointer;
        z-index: 1;
    }

    nav.hamburger-menu .label-controllo>span,
    nav.hamburger-menu .label-controllo>span::before,
    nav.hamburger-menu .label-controllo>span::after {
        position: absolute;
        width: 20px;
        height: 2px;
        background-color: #ffffff;
    }

    nav.hamburger-menu .label-controllo>span::before {
        content: '';
        top: -8px;
    }

    nav.hamburger-menu .label-controllo>span::after {
        content: '';
        top: 8px;
    }

    nav.hamburger-menu .label-controlloChiuso>span,
    nav.hamburger-menu .label-controlloChiuso>span::before,
    nav.hamburger-menu .label-controlloChiuso>span::after {
        position: absolute;
        width: 20px;
        height: 2px;
        background-color: #ffffff;
    }

    nav.hamburger-menu .label-controlloChiuso>span::before {
        content: '';
        top: -8px;
    }

    nav.hamburger-menu .label-controlloChiuso>span::after {
        content: '';
        top: 8px;
    }

    nav.hamburger-menu #menu {
        display: block;
        position: fixed;
        top: 0;
        left: -100%;
        width: 90%;
        height: 100%;
        padding: 80px 0;
  background: linear-gradient(135deg, #5e0b0b 0%, #210101 100%);
        box-shadow: 2px 2px 6px rgba(0, 0, 0, .4);
        transition-duration: .25s;
    }

    nav.hamburger-menu .vociMenu {
        display: block;
        padding: 12px 24px;
        color: #ffffff;
        font-size: 1.5rem;
        font-weight: 600;
        transition-duration: .25s;
    }

    nav.hamburger-menu .vociMenu:hover {
        background-color: #ff8dbb;
        color: #000000;
    }

    nav.hamburger-menu:target .label-controllo {
        display: none;
    }

    nav.hamburger-menu:target .label-controlloChiuso {
        display: block;
    }

    nav.hamburger-menu:target .label-controlloChiuso>span {
        transform: rotate(45deg);
    }

    nav.hamburger-menu:target .label-controlloChiuso>span::before {
        top: 0;
        transform: rotate(0deg);
    }

    nav.hamburger-menu:target .label-controlloChiuso>span::after {
        top: 0;
        transform: rotate(90deg);
    }

    nav.hamburger-menu:target #menu {
        left: 0 !important;
    }
}

/* Stili per le pagine dei servizi */

/* ===== SEZIONE SKILL ===== */
.skills-section {
  padding: 80px 20px;
  background-color: #f8f9fa;
  text-align: center;
}

.skills-section .container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #222;
}

.section-intro {
  font-size: 1rem;
  color: #555;
  margin-bottom: 50px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.skill-card {
  background: #fff;
  border-radius: 16px;
  padding: 30px 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.skill-card i {
  font-size: 2rem;
  color: #0077ff;
  margin-bottom: 15px;
}

.skill-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #222;
}

.skill-card p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
}

/* ===== MEDIA QUERY ===== */
@media (max-width: 480px) {
  .section-title {
    font-size: 1.8rem;
  }
  .skill-card {
    padding: 25px 15px;
    }

/* Cinematic slider styles (bottoni avanti/indietro e overlay) */
.cinematic-slider {
  position: relative;
  max-width: 720px;
  margin: 20px auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  background: #000;
}
.cinematic-slider .slider-track {
  display: flex;
  transition: transform 0.6s ease;
}
.cinematic-slider .slide {
  min-width: 100%;
  position: relative;
}
.cinematic-slider .slide img {
  display: block;
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.cinematic-slider .overlay {
  position: absolute;
  left: 20px;
  bottom: 18px;
  color: #fff;
  text-shadow: 0 6px 18px rgba(0,0,0,0.5);
}
.cinematic-slider .overlay h2 { margin: 0 0 6px; font-size: 1.4rem; }
.cinematic-slider .overlay p { margin: 0; font-size: 0.95rem; opacity: 0.95; }

@media (max-width: 480px) {
  .cinematic-slider .slide img { height: 300px; }
}

  }


/* ===== SEZIONE COMPETENZE CREATIVE ===== */
.creative-section {
  padding: 100px 20px;
  background-color: #fff;
}

.creative-section .container {
  max-width: 1200px;
  margin: 0 auto;
}

.creative-content {
  display: flex;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
}

.creative-text {
  flex: 1 1 350px;
}

.creative-text .section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 15px;
}

.creative-text p {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
}

/* Colonna destra - grafici */
.creative-skills {
  flex: 1 1 400px;
}

.skill-bar {
  margin-bottom: 25px;
}

.skill-bar .label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.skill-bar .bar {
  background: #e5e5e5;
  border-radius: 50px;
  overflow: hidden;
  height: 10px;
  position: relative;
}

.skill-bar .bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0077ff, #00b7ff);
  border-radius: 50px;
  width: 0;
  animation: growBar 1.8s ease forwards;
}

/* Animazione delle barre */
@keyframes growBar {
  from {
    width: 0;
  }
}

/* Responsività */
@media (max-width: 768px) {
  .creative-content {
    flex-direction: column;
    text-align: center;
  }

  .creative-skills {
    width: 100%;
  }
}

/* --- SEZIONE PERCORSO ACCADEMICO --- */
.percorso-accademico {
  background: linear-gradient(135deg, #5e0b0b 0%, #210101 100%);
  padding: 80px 20px;
  text-align: center;
}

.percorso-accademico .container {
  max-width: 1200px;
  margin: 0 auto;
}

.percorso-accademico h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: #ffffff;
}

.percorso-accademico .descrizione {
  max-width: 700px;
  margin: 0 auto 50px;
  font-size: 1.1rem;
  color: #ffffff;
  line-height: 1.6;
}

.percorso-accademico .statistiche {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  justify-items: center;
}

.percorso-accademico .stat {
  background: linear-gradient(135deg, #4d0808 0%, #160000 100%);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  padding: 30px 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.percorso-accademico .stat:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.percorso-accademico .stat i {
  font-size: 2.5rem;
  color: #fefefe;
  margin-bottom: 15px;
}

.percorso-accademico .stat h3 {
  font-size: 2rem;
  margin: 0;
    color: #fefefe;

}

.percorso-accademico .stat p {
  margin-top: 5px;
  font-size: 1rem;
    color: #fefefe;

}

/* 🔹 Responsive */
@media (max-width: 600px) {
  .percorso-accademico h2 {
    font-size: 1.8rem;
  }

  .percorso-accademico .descrizione {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .percorso-accademico .stat i {
    font-size: 2rem;
  }

  .percorso-accademico .stat h3 {
    font-size: 1.6rem;
  }
}


/* NUOVO PORTFOLIO PROGETTI */

.sezione-progetti {
  background-color: #f9f9f9;
  padding: 100px 20px;
}

.sezione-progetti .container {
  max-width: 1200px;
  margin: 0 auto;
}

.sezione-progetti h2 {
  text-align: center;
  font-size: 2.2rem;
  color: #222;
  margin-bottom: 10px;
}

.sezione-progetti .intro {
  text-align: center;
  color: #555;
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 70px;
  line-height: 1.6;
}

/* Ogni blocco progetto */
.progetto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}

.progetto.invertito {
  flex-direction: row-reverse;
}

.progetto .testo {
  flex: 1 1 500px;
}

.progetto .testo h3 {
  font-size: 1.8rem;
  color: #222;
  margin-bottom: 15px;
}

.progetto .testo p {
  font-size: 1.05rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 25px;
}

.progetto .btn-progetti {
  display: inline-block;
  padding: 10px 22px;
  background: #0077b6;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s ease, transform 0.3s ease;
}

.progetto .btn-progetti:hover {
  background: #005f8e;
  transform: translateY(-2px);
}

.progetto .immagine {
  flex: 1 1 500px;
  text-align: center;
}

.progetto .immagine img {
  width: 100%;
  max-width: 500px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.progetto .immagine img:hover {
  transform: scale(1.03);
}

/* 🔹 Responsive */
@media (max-width: 900px) {
  .progetto {
    flex-direction: flex !important;
    text-align: flex;
  }

  .progetto .immagine img {
    max-width: 400px;
  }

  .progetto .testo h3 {
    font-size: 1.6rem;
  }

  .progetto .testo p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .sezione-progetti {
    padding: 70px 15px;
  }

  .sezione-progetti h2 {
    font-size: 1.8rem;
  }

  .progetto {
    margin-bottom: 60px;
  }

  .progetto .immagine img {
    max-width: 320px;
  }
}

/* --- Stile sezione bottone branding e product--- */

/* Stile base per le icone */
.icon {
  font-size: 2rem;               /* dimensione visibile e leggibile */
  color: #333;                   /* colore neutro di base */
  margin: 0 10px;                /* spazio orizzontale tra icone */
  transition: all 0.3s ease;     /* transizione per hover elegante */
  vertical-align: middle;
  cursor: pointer;
}

/* Effetto hover */
.icon:hover {
  color: #a91313;                /* blu professionale */
  transform: scale(1.2);         /* effetto zoom */
}

/* Variante su sfondo scuro */
.dark-theme .icon {
  color: #eee;
}

.dark-theme .icon:hover {
  color: #00bfff;
}

/* Dimensioni responsive */
@media (max-width: 768px) {
  .icon {
    font-size: 1.6rem;
    margin: 0 8px;
  }
}

@media (max-width: 480px) {
  .icon {
    font-size: 1.4rem;
    margin: 0 6px;
  }
}




/* --- Sezione Carosello progetto 4 --- */

/* =========================
   CAROUSEL MODERNO LATERALE
========================= */
/* ======================================
   CAROUSEL SECTION — MOBILE FIRST
====================================== */

.carousel-section {
    width: 100%;
    padding: 60px 20px;
    background: #f4f6f9;
    display: flex;
    justify-content: center;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    overflow: hidden;
}

/* TRACK */

.carousel-track {
    display: flex;
    transition: transform 0.6s ease;
}

/* SLIDE (Mobile Base) */

.carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column; /* MOBILE FIRST */
    gap: 30px;
    align-items: center;
    text-align: center;
}

/* IMMAGINE */

.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: 20px;
}

/* CONTENUTO */

.carousel-content {
    width: 100%;
    position: relative;
}

.carousel-content h2 {
    font-size: 1.6rem;
    margin-bottom: 18px;
    font-weight: 600;
    color: #111;
    position: relative;
}

.carousel-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
    max-width: 100%;
    margin: 0 auto;
}

/* ======================================
   FRECCE (Mobile)
====================================== */

.carousel-btn {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    color: #111;
    transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.carousel-btn:hover {
    background: #111;
    color: #fff;
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

/* ======================================
   DOTS
====================================== */

.carousel-dots {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.carousel-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dots button.active {
    width: 22px;
    border-radius: 20px;
    background: #111;
}

/* ======================================
   TABLET (768px+)
====================================== */

@media (min-width: 768px) {

    .carousel-section {
        padding: 80px 30px;
    }

    .carousel-content h2 {
        font-size: 2rem;
    }

    .carousel-content p {
        font-size: 1rem;
        max-width: 500px;
    }

    .carousel-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}

/* ======================================
   DESKTOP (992px+)
====================================== */

@media (min-width: 992px) {

    .carousel-slide {
        flex-direction: row; /* passa a layout affiancato */
        align-items: center;
        justify-content: space-between;
        gap: 60px;
        text-align: left;
    }

    .carousel-slide img {
        width: 55%;
        height: 500px;
        max-height: none;
    }

    .carousel-content {
        width: 45%;
    }

    .carousel-content h2 {
        font-size: 2.4rem;
        padding-left: 20px;
    }

    .carousel-content h2::before {
        content: "";
        position: absolute;
        left: 0;
        top: 6px;
        width: 4px;
        height: 80%;
        background: #111;
        border-radius: 2px;
    }

    .carousel-dots {
        position: absolute;
        bottom: -50px;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0;
    }

    .carousel-btn.prev {
        left: 20px;
    }

    .carousel-btn.next {
        right: 20px;
    }
}

/* ======================================
   LARGE DESKTOP (1600px+)
====================================== */

@media (min-width: 1600px) {

    .carousel-section {
        padding: 120px 40px;
    }

    .carousel-container {
        max-width: 1400px;
    }

    .carousel-content h2 {
        font-size: 2.8rem;
    }

    .carousel-content p {
        font-size: 1.1rem;
    }

    .carousel-btn {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }
}


/* --- Sezione Percorso di studio --- */

/* Sezione Percorso di Studio */
.study-section {
  padding: 80px 20px;
  background-color: #f9f9f9;
}

.study-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto 50px;
  gap: 30px;
}

.study-content:last-child {
  margin-bottom: 0;
}

.study-text {
  flex: 1 1 450px;
}

.study-text h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: #222;
}

.study-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
}

.study-image {
  flex: 1 1 350px;
  text-align: center;
}

.study-image img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease;
}

.study-image img:hover {
  transform: scale(1.03);
}

/* Layout alternato */
.study-content.alternate {
  flex-direction: row-reverse;
}

/* Responsività */
@media (max-width: 768px) {
  .study-content,
  .study-content.alternate {
    flex-direction: column;
    text-align: center;
    margin-bottom: 30px;
    gap: 15px;
  }

  .study-text h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
  }

  .study-text p {
    font-size: 0.95rem;
  }

  .study-image img {
    max-width: 85%;
  }
}

/* --- Sezione Recensioni --- */

.testimonials {
  background: linear-gradient(135deg, #5e0b0b 0%, #210101 100%);
  max-width: 1100px;
  margin: 80px auto;
  padding: 40px 20px;
  text-align: center;
  overflow: hidden; 
}

.testimonials-header h2 {
  font-size: 2rem;
  color: rgb(202, 206, 206);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.testimonials-header p {
  color: rgb(202, 206, 206);
  font-size: 1rem;
  margin-bottom: 40px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}


.testimonial-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 30px 25px;
  text-align: left;
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.testimonial-image {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 15px;
  border: 2px solid rgb(202, 206, 206);
;
}

.testimonial-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-content {
  color: #eaeef3;
}

.testimonial-text {
  font-style: italic;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 15px;
}

.testimonial-name {
  font-size: 1.1rem;
  color: rgb(255, 255, 255);
  margin: 0;
}

.testimonial-role {
  color: #94a3b8;
  font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .testimonials {
    padding: 30px 15px;
  }

  .testimonials-header h2 {
    font-size: 1.6rem;
  }

  .testimonial-card {
    padding: 25px 20px;
  }
}


/* --- Sezione Chi Siamo --- */
/* --- Sezione Chi Siamo --- */
.about {
  padding: 100px 20px;
  background: linear-gradient(135deg, #f9fafc 0%, #ffffff 100%);
  color: #333;
  overflow: hidden; /* FIX overflow mobile */
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Header --- */
.about-header {
  text-align: center;
  margin-bottom: 60px;
}

.about-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  position: relative;
  display: inline-block;
}

.about-header h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #0077ff;
  border-radius: 2px;
}

.about-header .subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-top: 20px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Contenuto principale --- */
.about-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 80px;
}

.about-image {
  flex: 1 1 45%;
  text-align: center;
}

.about-image img {
  width: 100%;
  max-width: 480px;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease;
}

.about-text {
  flex: 1 1 50%;
}

.about-text h3 {
  font-size: 1.8rem;
  color: #0077ff;
  margin-bottom: 20px;
}

.about-text p {
  line-height: 1.7;
  color: #444;
  margin-bottom: 15px;
}

/* --- Mission & Vision --- */
.mission-vision {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* FIX mobile */
  gap: 32px;
  text-align: center;
}

.mission,
.vision {
  background-color: #f5f8ff;
  border-radius: 16px;
  padding: 36px 28px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mission h3,
.vision h3 {
  font-size: 1.6rem;
  color: #1a1a1a;
  margin-bottom: 15px;
}

.mission p,
.vision p {
  color: #555;
  line-height: 1.6;
  font-size: 1rem;
}

/* --- Hover SOLO desktop --- */
@media (hover: hover) {
  .about-image img:hover {
    transform: scale(1.03);
  }

  .mission:hover,
  .vision:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-text h3 {
    margin-top: 30px;
  }
}

@media (max-width: 480px) {
  .about {
    padding: 80px 15px;
  }

  .about-header h2 {
    font-size: 2rem;
  }

  .about-text h3 {
    font-size: 1.4rem;
  }
}

/* --- Link indietro --- */
.back-link {
  display: inline-block;
  margin-top: 1rem;
  color: #000;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #b30000;
  text-decoration: underline;
}


/* Stile sezione per accedere al mio curriculum */
.cv-download-section {
    background: linear-gradient(135deg, #b31217 0%, #240b36 100%);
    padding: 70px 16px;
    text-align: center;
    color: #fff;
    border-radius: 18px;
    margin: 60px 0;
    box-shadow: 0 8px 32px rgba(36,11,54,0.12);
}

.cv-download-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 10px;
}

.cv-download-content h1 {
    font-size: 2.1em;
    margin-bottom: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffe4c4;
    text-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.cv-download-content p {
    font-size: 1.08em;
    margin-bottom: 28px;
    color: #f3e9e9;
    line-height: 1.7;
}

.btn-cv-download {
    display: inline-block;
    padding: 13px 32px;
    background: linear-gradient(90deg, #ffe259 0%, #ffa751 100%);
    color: #240b36;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.08em;
    letter-spacing: 0.5px;
    transition: background 0.25s, color 0.25s, transform 0.2s;
    box-shadow: 0 4px 18px rgba(36,11,54,0.18);
    border: none;
}

.btn-cv-download:hover {
    background: linear-gradient(90deg, #ffa751 0%, #ffe259 100%);
    color: #b31217;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 28px rgba(36,11,54,0.22);
}

/* Responsive */
@media (max-width: 600px) {
    .cv-download-section {
        padding: 40px 6px;
        margin: 30px 0;
        border-radius: 10px;
    }
    .cv-download-content h1 {
        font-size: 1.3em;
    }
    .btn-cv-download {
        padding: 10px 18px;
        font-size: 1em;
    }
}




/* Footer */
footer {
    background-color: #000000c8;
    color: #ffffff;
    text-align: center;
    padding: 2rem 0;
    width: 100%;
    margin-top: auto;
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

footer p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: #ffffff;
}

/* Form */
fieldset {
    border: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

legend {
    display: none;
    margin: 0;
    padding: 0;
}

label {
    margin: 0;
    padding: 0 0 0 3px;
    color: #aaa;
}

label.checkbox {
    color: #333;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0 1.5rem 0;
    display: inline-block;
    border: none;
    border-bottom: 1px solid #ccc;
    box-sizing: border-box;
    outline: none;
    font-size: 1.1em;
    background-color: #efefef;
}

textarea {
    min-height: 150px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border: none;
    color: #ce5c00;
    background-color: #ffe4c4;
    border-bottom: 1px solid #ce5c00;
}

.button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    color: white;
    background-color: #007BFF;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.button:hover {
    background-color: #0056b3;
}

.errore {
    color: red;
}
/* ===============================
   PORTFOLIO – VERSIONE RESPONSIVE
================================ */

/* Section */
.portfolio {
    padding: 3rem 1rem;
}

/* Grid */
.works-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mobile default */
    gap: 1.5rem;
}

/* Card */
.work-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    padding: 1.5rem 1rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.08);
}

/* Image */
.work-card img {
    width: clamp(70px, 18vw, 100px);
    height: auto;
    display: block;
    margin: 0 auto 1rem;
}

/* Typography */
.work-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.work-card .category {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.work-card p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

/* Work Detail */
.work-detail {
    max-width: 900px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.work-detail img {
    width: clamp(160px, 40%, 260px);
    height: auto;
    display: block;
    margin: 2rem auto;
}

/* Button */
.btn-details {
    display: inline-block;
    padding: 0.75rem 1.6rem;
    background-color: #007BFF;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-details:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}


/* ===============================
   TABLET ≥ 600px
================================ */

@media (min-width: 600px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ===============================
   DESKTOP ≥ 992px
================================ */

@media (min-width: 992px) {
    .works-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .work-card h3 {
        font-size: 1.2rem;
    }

    .work-card p {
        font-size: 0.95rem;
    }
}


/* ===============================
   LARGE DESKTOP ≥ 1600px
================================ */

@media (min-width: 1600px) {
    .works-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1400px;
        margin: 0 auto;
    }
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 0.7rem 1.4rem;
    background-color: #5e0b0b;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: #2d0505;
    color: #fff;
    transform: translateY(-2px);
}

.work-detail .btn-back {
    margin-bottom: 1rem;
}
