/* RESET BASE */
* { margin:0; padding:0; box-sizing:border-box; font-family: Arial,sans-serif;}
body { line-height:1.6; color:#333; background-color:#f8f8f8; }

/* HEADER */
header{ display:flex; justify-content:space-between; align-items:center; padding:10px 20px; background-color:#004080; color:white; position:sticky; top:0; z-index:10;}
header .logo img{height:120px;}
nav#navbar a{color:white; margin-left:20px; text-decoration:none; font-weight:bold;}
nav#navbar.active{ display:block;}
.menu-toggle{ display:none; font-size:28px; cursor:pointer;}

/* HERO ANIMATA */
.hero{ height:500px; background-image:url('copertina.png'); background-size:cover; background-position:center; position:relative; display:flex; align-items:center; justify-content:center; text-align:center; color:white; overflow:hidden;}
.hero::before{ content:""; position:absolute; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.6); z-index:0;}
.hero-content{ position:relative; z-index:1; max-width:800px; opacity:0; transform:translateY(20px); animation:fadeInText 1.5s ease-out forwards;}
.hero-content h1,.hero-content p{ display:inline-block; background-color:rgba(0,0,0,0.3); padding:10px 20px; border-radius:6px;}
.hero h1{ font-size:3rem; margin-bottom:15px;} .hero p{ font-size:1.2rem;}
@keyframes fadeInText{from{opacity:0; transform:translateY(20px);} to{opacity:1; transform:translateY(0);}}
.hero-bg{position:absolute; top:0; left:0; right:0; bottom:0; background-image:inherit; background-size:cover; background-position:center; z-index:-1; animation:kenburns 20s infinite alternate;}
@keyframes kenburns{0%{transform:scale(1) translate(0,0);} 100%{transform:scale(1.1) translate(10px,10px);}}

/* SEZIONI */
section{ padding:60px 20px; max-width:1200px; margin:0 auto;}
section h2{text-align:center; margin-bottom:40px; color:#004080;}

/* SERVIZI GRID */
.grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:20px;}
.card{ background:white; padding:20px; border-radius:12px; box-shadow:0 4px 8px rgba(0,0,0,0.1); text-align:center; transition:transform 0.3s, box-shadow 0.3s;}
.card:hover{transform:translateY(-5px); box-shadow:0 10px 20px rgba(0,0,0,0.2);}

/* CAROSELLO AVANZATO */
.carousel-container { position: relative; max-width: 1200px; margin:0 auto; }
.carousel-track-container { overflow: hidden; }
.carousel-track { display:flex; transition: transform 0.5s ease; list-style:none; padding:0; margin:0; }
.course-card { flex:0 0 300px; margin-right:20px; background:white; padding:20px; border-radius:12px; box-shadow:0 4px 8px rgba(0,0,0,0.1); cursor:pointer; transition: transform 0.3s ease; }
.course-card:hover { transform: scale(1.02); box-shadow:0 10px 20px rgba(0,0,0,0.2); }
.carousel-btn { position:absolute; top:50%; transform:translateY(-50%); background-color: rgba(0,64,128,0.8); color:white; border:none; font-size:2rem; padding:10px; border-radius:50%; cursor:pointer; z-index:2; }
.carousel-btn:hover { background-color:#0066cc; }
.carousel-btn.prev { left:10px; } .carousel-btn.next { right:10px; }

/* DOTS */
.carousel-dots { text-align:center; margin-top:15px; }
.carousel-dots button { width:12px; height:12px; border-radius:50%; border:none; margin:0 5px; background:#ccc; cursor:pointer; }
.carousel-dots button.active { background:#004080; }

/* FORM */
form{ display:flex; flex-direction:column; gap:10px; background:white; padding:20px; border-radius:12px; box-shadow:0 4px 8px rgba(0,0,0,0.1);}
form input, form textarea, form select{ padding:10px; border-radius:6px; border:1px solid #ccc; width:100%;}
form button{ cursor:pointer; background-color:#004080; color:white; padding:10px; border-radius:8px; border:none;}
form button:hover{ background-color:#0066cc;}

/* FAQ */
.faq-question{ cursor:pointer; font-weight:bold; display:flex; justify-content:space-between; align-items:center;}
.faq-answer{ display:none; margin-top:10px; padding-left:10px; color:#333;}
.faq-question span{ font-weight:bold; }
.faq-question.active span::after{ content:'−';}

/* COOKIE BANNER */
#cookie-banner{ position:fixed; bottom:0; left:0; width:100%; background:#004080; color:white; padding:15px; display:none; z-index:1000; text-align:center;}
#cookie-banner button{ margin-left:15px; padding:5px 10px; border:none; border-radius:6px; background:#0066cc; color:white; cursor:pointer;}
#cookie-banner button:hover{ background:#0080ff;}

/* FOOTER */
footer{ background:#004080; color:white; text-align:center; padding:20px;}

/* RESPONSIVE */
@media(max-width:768px){
    .menu-toggle{ display:block;}
    nav#navbar{ display:none; flex-direction:column; background-color:#004080; position:absolute; top:60px; right:0; width:200px; padding:10px;}
    nav#navbar a{ margin:10px 0;}
    .hero h1{ font-size:2rem;}
    .hero p{ font-size:1rem;}
    .course-card { flex:0 0 80%; margin-right:10px; }
    .carousel-btn { font-size:1.5rem; padding:8px; }
}

