:root {
    --primary-color: #532396ff;
    --secondary-color: #0388A6;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --web-dev-color: #0cb2a1ff;
    --blockchain-color: #ed7a0fff;
    --xr-color: #e91e63ff;
    --social-media-color: #2196F3;
}

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

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
}

body.dark-mode {
    --text-color: #f5f5f5;
    --bg-color: #333;
}

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

header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

body.dark-mode header {
    background-color: #222;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-icon {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    text-align: center;
    padding: 150px 0 100px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background-color: #fff;
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.services {
    padding: 80px 0;
    flex-grow: 1;
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.service-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

body.dark-mode .service-card {
    background-color: #444;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.service-card h3 i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.service-card p {
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-card a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    padding: 10px;
    text-align: center;
    border-radius: 0 0 10px 10px;
    margin: -30px;
    margin-top: 20px;
}

.service-card.web-dev h3 { color: var(--web-dev-color); }
.service-card.blockchain h3 { color: var(--blockchain-color); }
.service-card.xr h3 { color: var(--xr-color); }
.service-card.social-media h3 { color: var(--social-media-color); }

.service-card.web-dev a { background-color: var(--web-dev-color); }
.service-card.blockchain a { background-color: var(--blockchain-color); }
.service-card.xr a { background-color: var(--xr-color); }
.service-card.social-media a { background-color: var(--social-media-color); }

.service-card a:hover {
    filter: brightness(1.1);
}

.about-us {
    background-color: #fff;
    padding: 80px 0;
}

body.dark-mode .about-us {
    background-color: #444;
}

.about-us h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.about-us p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
}

.team-members {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
}

.team-member {
    text-align: center;
    width: 250px;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.team-member h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.team-member p {
    font-size: 0.9rem;
    color: #666;
}

.contact {
    padding: 80px 0;
    background-color: #f9f9f9;
}

body.dark-mode .contact {
    background-color: #2a2a2a;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.contact form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.contact input,
.contact textarea {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.contact textarea {
    height: 150px;
}

footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

.dark-mode-toggle,
.language-toggle {
    background-color: var(--bg-color);
    color: var(--text-color);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover,
.language-toggle:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.language-toggle {
    display: flex;
    align-items: center;
}

.language-toggle img {
    width: 20px;
    height: 15px;
    margin-right: 5px;
}

/* Styles for Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: var(--bg-color);
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left {
    left: 0;
}

.right {
    left: 50%;
}

.left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid var(--primary-color);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--primary-color);
}

.right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid var(--primary-color);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--primary-color) transparent transparent;
}

.right::after {
    left: -16px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: #f9f9f9;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body.dark-mode .timeline-content {
    background-color: #333;
}

.timeline-content h2 {
    color: var(--primary-color);
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: #fff;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    body.dark-mode .nav-links {
        background-color: #222;
    }

    .nav-links li {
        opacity: 0;
    }

    .nav-links.nav-active li {
        opacity: 1;
    }

    .burger {
        display: block;
    }

    .nav-active {
        transform: translateX(0%);
    }

    .timeline::after {
        left: 47px;
    }

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

    .timeline-item.left::before, 
    .timeline-item.right::before {
        left: 10px;
        border: none;
    }

    .timeline-item.left::after, 
    .timeline-item.right::after {
        left: 10px;
    }

    .timeline-content {
        padding-left: 50px;
    }

    .timeline-item.right {
        left: 0px; /* Aumenta il valore di left per spostare l'elemento più a destra */
    }

    .service-cards {
        grid-template-columns: 1fr;
    }

    .right::before {
        content: " ";
        height: 0;
        position: absolute;
        top: 22px;
        width: 0;
        z-index: 1;
        left: 30px;
        border: medium solid var(--primary-color);
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--primary-color) transparent transparent;
    }
}

@media screen and (max-width: 480px) {
    .timeline-content {
        padding: 15px;
    }

    .timeline-item {
        padding-left: 50px;
    }
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}


.project-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: #333;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.project-card:hover h3 {
    color: var(--primary-color);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

body.dark-mode .project-card {
    background-color: #333;
}

body.dark-mode .project-card:hover {
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

body.dark-mode .project-card h3 {
    color: #f5f5f5;
}

body.dark-mode .project-card:hover h3 {
    color: var(--primary-color);
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.2);
}

/* Stili per h2 in modalità scura */
body.dark-mode h2 {
    color: #f5f5f5;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.logo img {
    width: 70px;
    /* Regola la dimensione dell'immagine secondo le tue necessità */
    height: auto;
}

body.dark-mode .logo img {
    content: url('../../assets/images/logo/Phas_w.png');
}

.logo img {
    max-height: 1.8rem; /* Regola l'altezza massima in base alla dimensione desiderata */
    width: auto;
}