/* Reset e Stili Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

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

/* Header */
header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

header h1 {
    font-size: 1.8rem;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* Hero Section */
#hero {
    height: 100vh;
    background: url('assets/img/img1background.jpeg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 60px; /* compensa l'header fixed */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    #hero {
        background-position: 60% center;
    }
}

/* Sezioni Generiche */
.section {
    padding: 80px 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: #2c3e50;
}

.highlight {
    background-color: #f1f1f1;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-img {
    flex: 1;
}

.about-img img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
}



/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
     display: flex;
    flex-direction: column;
    height: 100%; /* Assicura che tutte le card abbiano la stessa altezza */
}
.project-card p {
    flex-grow: 1; /* Fa espandere il paragrafo per occupare lo spazio disponibile */
    margin-bottom: 20px; /* Aggiunge spazio tra il testo e il pulsante */
}

.project-card .btn {
    align-self: flex-start; /* Allinea il pulsante a sinistra */
    margin-top: auto; /* Spinge il pulsante verso il basso */
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 20px 20px 10px;
    color: #2c3e50;
}

.project-card p {
    padding: 0 20px 20px;
    color: #666;
}

/* Final Project Section */
/* Stili per la sezione progetto finale */
.highlight {
    background-color: #f8f9fa;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.project-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.project-img {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-img img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
}

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

.project-text {
    flex: 1;
}

.project-text h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.project-text ul {
    margin: 15px 0;
    padding-left: 20px;
}

.project-text ul li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.tech-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 10px 0 10px 15px !important;
}

.tech-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px !important;
}

.tech-list i {
    color: #3498db;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.github-btn {
    background-color: #333;
}

.github-btn:hover {
    background-color: #444;
}

@media (max-width: 768px) {
    .project-content {
        flex-direction: column;
    }
    
    .tech-list {
        grid-template-columns: 1fr;
    }
    
    .project-links {
        flex-direction: column;
    }
}

/* Experience Section */
/* Timeline Styling */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: #3498db;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

.timeline-date {
    position: absolute;
    width: 120px;
    background: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    text-align: center;
    font-weight: bold;
    top: 15px;
}

.timeline-item:nth-child(odd) .timeline-date {
    right: -140px;
}

.timeline-item:nth-child(even) .timeline-date {
    left: -140px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border: 4px solid #3498db;
    border-radius: 50%;
    top: 30px;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.job-location {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-style: italic;
}

.job-description {
    margin: 15px 0;
    padding-left: 0;
    list-style: none;
}

.job-description li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.job-description i {
    color: #3498db;
    margin-top: 3px;
}

.tech-used, .skills-used {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tech-tag, .skill-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.tech-tag {
    background: #e3f2fd;
    color: #1976d2;
}

.skill-tag {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::before {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item:nth-child(even) {
        left: 0;
    }
    
    .timeline-date {
        left: 0 !important;
        right: auto !important;
        top: -15px;
        width: auto;
    }
    
    .timeline-item::after {
        left: 21px !important;
    }
}

/* Contact Section */
.contact-content {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.contact-info {
    flex: 1;
}

.contact-info p {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 10px;
    color: #3498db;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: translateX(5px);
}

.social-links a.github {
    background-color: #333;
}

.social-links a.instagram {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

.social-links i {
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .social-links {
        flex-direction: row;
        justify-content: center;
    }
    
    .social-links a {
        padding: 8px 12px;
    }
}
.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
}

/* Bottoni */
.btn {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    nav ul {
        margin-top: 20px;
    }

    nav ul li {
        margin-left: 15px;
    }

    .about-content, .project-content, .contact-content {
        flex-direction: column;
    }

    .timeline::before {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-date {
        left: 40px !important;
        right: auto !important;
        top: 0;
    }

    .timeline-item::after {
        left: 21px !important;
    }

    /* Aggiungi queste regole a style.css */

/* Pulsante presentazione */
.btn.presentation-btn {
    background-color: #00C4CC;
}

.btn.presentation-btn:hover {
    background-color: #008a8f;
}

/* Icona presentazione */
.fa-presentation-screen:before {
    content: "\f685";
}

/* Layout responsive per i pulsanti del progetto */
.project-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.project-links .btn {
    flex: 1 1 auto;
    min-width: 200px;
    text-align: center;
}

}

/* ECMS Video - Stessa dimensione esatta dell'immagine */
.project-video {
    margin: 25px 0;
}

.project-video h4 {
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 1.2rem;
}

.video-wrapper {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: #000; /* Sfondo nero per eventuali bordi */
}

/* Dimensioni fisse uguali all'immagine */
.video-wrapper,
.ecms-demo {
    width: 100%;
    height: auto;
    max-height: 400px; /* Altezza fissa come l'immagine */
    object-fit: cover; /* Mantiene le proporzioni */
}

/* Controlli video personalizzati */
.ecms-demo::-webkit-media-controls {
    background: rgba(0,0,0,0.3);
    border-radius: 0 0 8px 8px;
}

/* Velocità aumentata */
.ecms-demo {
    playbackRate: 1.25;
}

@media (max-width: 768px) {
    .video-wrapper,
    .ecms-demo {
        max-height: 250px; /* Più piccolo su mobile */
    }
}