/* =========================
   RESET & GLOBALI
========================= */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}


/* =========================
   HEADER
========================= */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative; /* così resta in alto */
    z-index: 10; /* sopra la hero */
    /* width: 100%; */
}

.header img {
    height: clamp(40px, 6vw, 60px);
    width: auto;
}

.header,
.footer {
    background-color: rgba(55, 83, 53, 0.65);
    color: rgba(252, 221, 154, 0.693);
}


/* =========================
   HERO / TOP BACKGROUND
========================= */
.background-image-top {
    background-image: url("../img/bhautik-patel-xF-G_9-gpIE-unsplash.jpg");
    background-size: cover;
    background-position: center;
    min-height: 100vh;
}

.background-image-top .hero {
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    text-align: center;
    padding: 80px 5%;
}

.hero h1 {
    color: #1E4C2C;
}


/* =========================
   ABOUT
========================= */
.about {
    padding: 80px 5%;
    background-image: url("../img/qingbao-meng-01_igFr7hd4-unsplash.jpg");
    background-size: cover;
    background-position: center;
    min-height: 100vh;
}

.about .text-container h3 {
    padding: 30px 0 10px 0;
}


/* =========================
   TEXT CONTAINER (riutilizzabile)
========================= */
.text-container {
    background-color: rgba(55, 83, 53, 0.65);
    color: rgba(252, 221, 154, 0.693);
    padding: 20px;
    border-radius: 6px;
    width: 100%;
}


/* =========================
   PROJECTS - MOBILE FIRST
========================= */
.projects {
    padding: 60px 20px;
    background-image: url("../img/andreas-gucklhorn-mawU2PoJWfU-unsplash.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.projects .text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects-container {
    display: flex;
    flex-direction: column; 
    gap: 20px;
    width: 100%;
    align-items: center;
}

.project {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: flex-start;
    max-width: 350px;
    width: 100%;
    padding: 20px;
    text-align: center;
    gap: 15px;
    flex: 1;
}

.project .image {
    width: 100%;
    aspect-ratio: 1;
    max-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.project .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project .content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.project .image img {
    border-radius: 8px;
}

.project .content {
    max-width: 250px;
}






/* =========================
   CONTACT
========================= */
.contact {
    padding: 80px 5%;
}

.background-image-bottom {
    min-height: 100vh;
    background-image: url("../img/noah-buscher-x8ZStukS2PM-unsplash.jpg");
    background-size: cover;
    background-position: center;
    flex-grow: 1;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    padding: 5%;
}

.about h2,
.contact h2 {
    text-align: center;
}


/* =========================
   BUTTONS
========================= */
.cta-button {
    padding: 12px 24px;
    background: #1E4C2C;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: 0.3s;
}

.cta-button:hover {
    background-color: #718F22;
    transition: background-color 0.3s ease;
}


/* =========================
   FOOTER
========================= */
.footer {
    padding: 2rem 1rem;
    text-align: center;
    /* align-self: flex-end; */
}

.footer ul.social-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0;
    margin: 1rem 0 0 0;
}

.footer ul.social-links li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(252, 221, 154, 0.693);
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s;
}

.footer ul.social-links li a img {
    width: 24px;
    height: 24px;
}

/* Hover effetto */
.footer ul.social-links li a:hover {
    transform: scale(1.1);
}

.footer ul.social-links li a span {
        display: none;
}

/* =========================
   MEDIA QUERY
========================= */
@media (min-width: 768px) {

    .contact h2,
    .about h2,
    .projects h2 {
        text-align: left;
    }

    .projects h2 {
        align-self: flex-start;
    }

    .contact h2 {
        padding-left: 5%;
    }

    form {
        align-items: flex-start;
    }

    .about h2 {
        margin-bottom: 20px;
    }

    .footer ul.social-links li a span {
        display: block;
    }

    .projects-container {
        flex-direction: row; 
        max-width: 1200px;
        align-items: stretch;
    }

    .project {
        flex: 1; 
        max-width: none; 
    }

    .text-container {        
        max-width: calc(100vw - 10%);
    }
}
