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

:root {
	--primary-color: #c7374f;
	--dark-color: #1a1a1a;
	--light-color: #f5f5f5;
	--text-color: #333;
	--text-light: #666;
	--white: #ffffff;
	--shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	--transition: all 0.3s ease;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	line-height: 1.6;
	color: var(--text-color);
	overflow-x: hidden;
}

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

/* Header */
header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: var(--white);
	box-shadow: var(--shadow);
	z-index: 1000;
	padding: 12px 0;
}

header .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}


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

/* Hamburger Menu */
.hamburger {
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
	z-index: 1001;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.hamburger span {
	display: block;
	width: 28px;
	height: 3px;
	background: var(--primary-color);
	transition: var(--transition);
	border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
	transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
	opacity: 0;
}

.hamburger.active span:nth-child(3) {
	transform: rotate(-45deg) translate(7px, -7px);
}

/* Navigation Menu */
.nav-menu {
	position: fixed;
	top: 0;
	right: -100%;
	width: 280px;
	height: 100vh;
	background: var(--white);
	box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
	transition: var(--transition);
	z-index: 999;
	overflow-y: auto;
	padding-top: 80px;
}

.nav-menu.active {
	right: 0;
}

.nav-menu ul {
	list-style: none;
}

.nav-menu ul li {
	border-bottom: 1px solid var(--light-color);
}

.nav-menu ul li a {
	display: block;
	padding: 15px 25px;
	color: var(--text-color);
	text-decoration: none;
	transition: var(--transition);
}

.nav-menu ul li a:hover {
	background: var(--light-color);
	color: var(--primary-color);
	padding-left: 30px;
}

/* Copertina */
.copertina {
	margin-top: 80px;
	height: 70vh;
	min-height: 500px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--white);
	overflow: hidden;
}

/* Immagine di sfondo */
.copertina-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
}

/* Filtro scuro sopra l'immagine - CORRETTO */
.copertina::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.4);
	z-index: 2;
}

/* Overlay per il contenuto */
.copertina-overlay {
	position: relative;
	z-index: 3;
	width: 100%;
}

.copertina h1 {
	font-size: clamp(2rem, 5vw, 3.5rem);
	margin-bottom: 20px;
	font-weight: 700;
}

.copertina p {
	font-size: clamp(1rem, 2.5vw, 1.5rem);
	margin-bottom: 30px;
	font-weight: 300;
}

.cta-button {
	display: inline-block;
	padding: 15px 40px;
	background: var(--primary-color);
	color: var(--white);
	text-decoration: none;
	border-radius: 50px;
	font-weight: 600;
	transition: var(--transition);
	box-shadow: 0 4px 15px rgba(199, 55, 79, 0.3);
}

.cta-button:hover {
	background: #a42d41;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(199, 55, 79, 0.4);
}

/* Sections */
.section {
	padding: 30px 0;
}

.section h2 {
	font-size: clamp(1.8rem, 4vw, 2.5rem);
	margin-bottom: 30px;
	color: var(--dark-color);
	position: relative;
	padding-bottom: 15px;
	width: fit-content;		/* Aggiunto per mettere linea rossa lunga come il titolo */
}

.section h2::after {	/*Linea rossa sotto i titoli*/
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	/*width: 60px;*/
	width: 100%;
	height: 3px;
	background: var(--primary-color);
}

.section h3 {
	font-size: clamp(1.3rem, 3vw, 1.8rem);
	margin-bottom: 20px;
	margin-top: 40px;
	color: var(--dark-color);
}

.section p {
	margin-bottom: 15px;
	color: var(--text-color);
	line-height: 1.8;
}

.bg-light {
	background: var(--light-color);
}

/* Content with Image */
.content-with-image {
	display: grid;
	grid-template-columns: 1fr 1fr;
	/*gap: 40px;*/
	align-items: center;
	margin-top: 30px;
}

.text-content p {
	margin-bottom: 20px;
	text-align: justify;
}

.image-content img {
	width: 80%;
	/*margin-left: 10%;
	height: auto;*/
	border-radius: 8px;
	box-shadow: var(--shadow);
}

/* Container Durata con immagine */
.durata-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 20px;
}

.durata-image img {
    width: 70%;
    height: auto;
    border-radius: 8px;
	margin-left: 10%;
    /*box-shadow: var(--shadow);*/
    position: sticky;
    top: 100px; /* Rimane visibile durante lo scroll */
}

/* Responsive */
@media (max-width: 768px) {
    .durata-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .durata-image {
        order: -1; /* Mostra l'immagine sopra il testo su mobile */
    }
    
    .durata-image img {
        position: static; /* Rimuove lo sticky su mobile */
    }
}


/* Lists */
.course-list,
.material-list {
	margin: 20px 0;
	padding-left: 50px;
}

.course-list li {
	margin-bottom: 12px;
	line-height: 1.8;
}

.material-list {
	list-style: none;
	padding-left: 0;
}

.material-list li {
	margin-bottom: 15px;
	padding-left: 35px;
	position: relative;
}

.material-list li i {
	position: absolute;
	left: 0;
	color: var(--primary-color);
	font-size: 1.2rem;
}

/* Subsections */
.subsection {
	margin-top: 50px;
}

.bg-light-box {
	background: var(--light-color);
	padding: 30px;
	border-radius: 8px;
	border-left: 4px solid var(--primary-color);
}


.highlight {
	background: var(--light-color);
	padding: 20px;
	border-radius: 8px;
	margin: 30px 0;
	text-align: center;
}

/* Contact Grid */
.contact-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 20px;
	margin-top: 40px;
}

.contact-card {
	background: rgba(255, 255, 255, 0.1);
	padding: 30px 20px;
	text-align: center;
	border-radius: 8px;
	text-decoration: none;
	color: var(--white);
	transition: var(--transition);
	border: 2px solid rgba(255, 255, 255, 0.2);
}

.contact-card:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: translateY(-5px);
}

.contact-card i {
	font-size: 2.5rem;
	margin-bottom: 10px;
	display: block;

	margin-left: auto;
	margin-right: auto;
	width: fit-content;
}

.contact-card span {
	display: block;
	font-weight: 600;
}

/* Background Dark */
.bg-dark {
	background: var(--dark-color);
	color: var(--white);
}

.bg-dark h2::after {
	background: var(--white);
}

.bg-dark h2,
.bg-dark p {
	color: rgba(255, 255, 255, 0.9);
}

/* Footer */
footer {
	background: #0a0a0a;
	color: var(--white);
	padding: 40px 0 20px 0;
}

.footer-content {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	margin-bottom: 30px;
}

.footer-section h4 {
	color: var(--white);
	font-size: 1.1rem;
	margin-bottom: 15px;
	font-weight: 600;
}

.footer-section p {
	margin: 8px 0;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.95rem;
}

.footer-section a {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	transition: var(--transition);
}

.footer-section a:hover {
	color: var(--primary-color);
	text-decoration: underline;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 20px;
	text-align: center;
}

.footer-bottom p {
	margin: 0;
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
	.footer-content {
		grid-template-columns: 1fr;
		gap: 30px;
	}
}


/* Responsive */
@media (max-width: 768px) {
	.content-with-image {
		grid-template-columns: 1fr;
	}

	.nav-menu {
		width: 100%;
		right: -100%;
	}
	
	.contact-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.section {
		padding: 60px 0;
	}
}

@media (max-width: 480px) {
	.logo img {
		height: 50px;
	}

	.contact-grid {
		grid-template-columns: 1fr;
	}
}

/* Smooth Animations */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.section {
	animation: fadeIn 0.6s ease-in-out;
}

/* Download Box */
.download-box {
    background: var(--white);
    border: 2px solid var(--light-color);
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
}

.download-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.download-content i {
    font-size: 3rem;
    color: var(--primary-color);
}

.download-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
}

.download-text p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.download-button:hover {
    background: #a42d41;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(199, 55, 79, 0.3);
}

@media (max-width: 768px) {
    .download-box {
        flex-direction: column;
        text-align: center;
    }
    
    .download-content {
        flex-direction: column;
    }
}

/* Griglia Corsi */
.corsi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.corso-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.corso-image {
    position: relative;
    width: 100%;
    padding-top: 125%; /* Ratio 4:5 per locandine verticali */
    overflow: hidden;
    background: var(--light-color);
}

.corso-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

/* Corso Attivo - Nessun filtro */
.corso-card.active .corso-image img {
    filter: none;
}

.corso-card.active {
    border: 2px solid var(--primary-color);
}

/* Corsi Passati - Sfocatura e grigio */
.corso-card.past .corso-image img {
    filter: grayscale(100%) blur(2px) brightness(0.7);
}

.corso-card.past:hover .corso-image img {
    filter: grayscale(100%) blur(1px) brightness(0.8);
}

/* Informazioni del corso */
.corso-info {
    padding: 15px;
}

.corso-info h3 {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
    color: var(--dark-color);
}

.corso-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0 0 10px 0;
}

/* Badge disponibile/terminato */
.corso-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.corso-badge.disponibile {
    background: #d4edda;
    color: #155724;
}

.corso-badge.terminato {
    background: #f8d7da;
    color: #721c24;
}

/* Slot vuoto */
.corso-card.empty {
    border: 2px dashed #ddd;
    background: transparent;
    box-shadow: none;
}

.corso-card.empty:hover {
    transform: none;
    box-shadow: none;
}

.empty-slot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

.empty-slot i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.empty-slot p {
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .corsi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .corsi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .corsi-grid {
        grid-template-columns: 1fr;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Cursore pointer sulle immagini cliccabili */
.corso-card.active .corso-image,
.corso-card.past .corso-image {
    cursor: pointer;
}

/* Responsive Lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
    }
    
    .lightbox-content img {
        max-height: 70vh;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Container Materiale Didattico con immagine */
.materiale-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 20px;
}

.materiale-image img {
    width: 70%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
	margin-left: 10%;
}

/* Responsive */
@media (max-width: 768px) {
    .materiale-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .materiale-image {
        order: -1; /* Mostra l'immagine sopra la lista su mobile */
    }
}

/* Bottone Home per pagina Privacy Policy */
.home-button {
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--primary-color);
	font-size: 1.8rem;
	transition: var(--transition);
	text-decoration: none;
}

.home-button:hover {
	color: #a42d41;
	transform: scale(1.1);
}

.home-button i {
	display: block;
}

/* Sezione Privacy Policy - margine superiore per header fisso */
#privacy-policy {
	margin-top: 100px;
	padding-top: 20px;
}