/* ══════════════ RESET & ROOT VARS ══════════════ */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Palette ispirata a grano, terra e logistica */
    --clr-primary: #7C5A35;           /* Marrone caldo */
    --clr-primary-light: #CBAF87;     /* Caramello sabbia */
    --clr-secondary: #738C3D;         /* Verde campo */
    --clr-accent: #264A85;            /* Blu istituzionale (dal logo) */
    --clr-bg: #fdfaf5;                /* Beige chiaro */
    --clr-text: #2B2B2B;              /* Grigio scuro */
    --clr-card:#ffff;
    --ff-title: "Merriweather", serif;
    --ff-base: "Inter", sans-serif;

    --radius: 6px;
    --transition: .3s ease;
}

/* ══════════════ GLOBAL ══════════════ */
html { scroll-behavior: smooth; }

body {
    font-family: var(--ff-base);
    line-height: 1.6;
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-size: 1rem;
}

h1, h2, h3, h4 {
    font-family: var(--ff-title);
    color: var(--clr-primary);
}

.container {
    width: min(90%, 1200px);
    margin-inline: auto;
}

/* ══════════════ HEADER ══════════════ */
.site-header {
    background: #fff;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 999;
}
.header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}


.brand img {
    width: 200px;
    height: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    font-weight: 600;
}
.main-nav {
    justify-self: center;
}


.main-nav a {
    color: var(--clr-primary);
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
}

.main-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background-color: var(--clr-secondary);
    transition: width var(--transition);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
    width: 100%;
}

/* Lingue */
.lang-switcher {
    margin-left: auto;
    display: flex;
    gap: .35rem;
}

.lang {
    padding: .35rem .6rem;
    border: 1px solid var(--clr-primary-light);
    border-radius: var(--radius);
    font-size: .875rem;
    text-decoration: none;
    color: var(--clr-primary);
    background: transparent;
    transition: background var(--transition), color var(--transition);
}

.lang:hover,
.lang.active {
    background: var(--clr-primary-light);
    color: #fff;
}

/* ══════════════ HERO ══════════════ */
.hero-banner img {
    width: 100%;
    max-height: 400px; 
    object-fit: cover;
    display: block;
    margin: auto;
}
.passione__determinazione {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spiga-passione {
    position: static;
    width: 220px;
    transform: rotate(-20deg);
    /*opacity: 0.5;*/
    margin-bottom: -1.2rem;
}

/* ══════════════ ABOUT ══════════════ */
.about {
    padding: 4rem 0;
    position: relative;
}

.about__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
}

.passione{
    margin-top:50px;
}
.about__last{
    text-align: center;
}
.about h2 {
    margin-bottom: 1rem;
}
.about__title {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about__title h2 {
    z-index: 2;
    position: relative;
}

.spiga-deco {
    position: absolute;
    top: -9.2rem;
    left: 180px;
    width: 232px;
    /* opacity: 0.5; */
    transform: rotate(-20deg);
    pointer-events: none;
    z-index: 1;
}


.spiga-deco1 {
        position: absolute;
    top: -8.4rem;
    left: 170px;
    width: 229px;
    /* opacity: 0.5; */
    transform: rotate(-20deg);
    pointer-events: none;
    z-index: -1;
}
.about__media img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
    margin-bottom: 41px;
}


.about__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.about__row.reverse {
    flex-direction: row-reverse;
}

.about__media img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    object-fit: cover;
}

.about__media,
.about__text {
    flex: 1 1 300px;
    min-width: 280px;
}

.about__text h2 {
    margin-bottom: 1rem;
}

.about__text p {
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ══════════════ PRODUCTS ══════════════ */
.products {
    background: #fff;
    padding: 4rem 0;
}

.products h2 {
    margin-bottom: 2rem;
    text-align: center;
}


.products__grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-card {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;   /* Testo centrato verticalmente */
    justify-content: center; /* Testo centrato orizzontalmente */
    width: 100%;            /* OCCUPA 100% */
}


.product-overlay {
    color: var(--clr-card); /* Marrone caldo */
    font-size: 1.7rem;
    font-weight: bold;
    font-family: var(--ff-title);
    /*background-color: rgba(255, 255, 255, 0.6); /* sfondo semi-trasparente */
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    text-align: center;
    z-index: 2;
}



/* ══════════════ CONTACT ══════════════ */
.contact {
    padding: 4rem 0;
}

.contact__grid {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: center;
}

.contact__media img {
    border-radius: var(--radius);
    object-fit: cover;
}

    .contact__details{
        margin: 10px;
        text-align: center;
    }
.contact__details h2 {
    margin: 10px;
}
.contact__details ul {
    list-style: none;
    display: grid;
    gap: .75rem;
    font-size: 1.1rem;
}

.contact__details a {
    color: var(--clr-accent);
    text-decoration: none;
}

.contact__details a:hover {
    text-decoration: underline;
}
.contact__details i {
    margin: 0 8px;
    color: var(--clr-accent);
    transition: color 0.2s ease;
}
.contact__details i:hover {
    color: var(--clr-primary);
}

.world-image {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.world-image img {
    max-width: 100%;
    height: auto;
}


/* ══════════════ FOOTER ══════════════ */
.site-footer {
    background: var(--clr-primary);
    color: #fff;
    text-align: center;
    padding: 1.25rem 0;
    font-size: .875rem;
}

/* ══════════════ MEDIA QUERIES ══════════════ */

@media (max-width: 700px) {
    .header__inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        text-align: center;
    }

    .main-nav ul {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        padding: 0;
    }

    .lang-switcher {
        display: flex;
        margin-left: 0;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        margin-bottom: 3px;
    }
    .main-nav a {
        font-size: 0.9rem;
        padding: 0.25rem 0.5rem;
    }
    .spiga-deco {
    position: absolute;
    top: -2.2rem;
    left: 212px;
    width: 90px;
    opacity: 0.5;
    transform: rotate(-20deg);
    pointer-events: none;
    z-index: 1;
}
    .contact__media{
        margin:auto;
    }
    .contact__details{
        margin: auto;
        text-align: center;
    }
      .about__row {
    flex-direction: column !important;
    text-align: center;
  }
      .spiga-deco1 {
        position: absolute;
        top: -2.4rem;
        left: 273px;
        width: 90px;
        opacity: 0.5;
        transform: rotate(-20deg);
        pointer-events: none;
        z-index: 1;
    }
}
