/* 🌟 RESET E STILI BASE */

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

html, body {
    scroll-behavior: smooth;
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: url('main.gif') repeat;
}

html {
    overflow-y: scroll;
}

body {
    overflow-y: auto;
}

/* 🌟 HEADER CON LOGO, MENU E SFONDO */

.main-header {
    background: url('top-bg.jpg') no-repeat center center/cover;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-logo {
    width: 249px;
    height: auto;
}

/* 🌟 MENU DI NAVIGAZIONE */

.main-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: white;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 5px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* HAMBURGER MENU */

.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.5rem;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1000;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    width: 100%;
    height: 3px;
    background: white;
    transition: transform 0.3s ease-in-out;
}

.hamburger-inner::before {
    transform: translateY(-8px);
}

.hamburger-inner::after {
    transform: translateY(8px);
}

/* Effetto X quando il menu è aperto */

.hamburger.active .hamburger-inner {
    background: transparent;
}

.hamburger.active .hamburger-inner::before {
    transform: translateY(4px) rotate(45deg);
}

.hamburger.active .hamburger-inner::after {
    transform: translateY(-4px) rotate(-45deg);
}

/* 🌟 SLIDER HOME */

.slider {
    width: 100%;
    max-width: 2000px;
    height: 559px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

.slides {
    display: flex;
    width: 300%; /* Ripristina 300% per permettere lo scorrimento di 3 slide */
    height: 100%;
    transition: transform 1.5s ease-in-out;
}

.slides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

/* 🌟 CONTENUTO PRINCIPALE */

.main-content {
    max-width: 1200px;
    margin: auto;
    padding: 2rem;
    flex-grow: 1;
}

/* 🌟 FOOTER SEMPRE ATTACCATO AL BORDO */

.main-footer {
    background: url('top-bg.jpg') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 20px;
    width: 100%;
    height: 100px;
    margin-top: auto;
}

.main-footer p {
    position: relative;
    z-index: 1;
}

/* 🌟 LAYOUT PRODOTTI IN ORIZZONTALE */

.product-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.product-item {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease-in-out;
}

.product-item:hover {
    transform: scale(1.05);
}

/* 🌟 LAYOUT OLIO */

.olio-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.olio-card {
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 350px;
    text-align: center;
}

.olio-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 🌟 LAYOUT CEREALI */

.cereali-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.cereali-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 680px;
    text-align: center;
}

.cereali-image {
    width: 100%;
    height: auto;
    max-width: 680px;
    max-height: 551px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.cereali-text {
    padding: 15px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 🌟 LAYOUT FRAGOLE */

.fragole-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.fragole-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 680px;
    text-align: center;
}

.fragole-image {
    width: 100%;
    height: auto;
    max-width: 680px;
    max-height: 551px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.fragole-text {
    padding: 15px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 🌟 RESPONSIVE DESIGN */

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .main-nav {
        display: block !important;
        position: static;
        background: transparent;
        box-shadow: none;
    }

    .nav-list {
        display: flex;
        gap: 20px;
    }

    .nav-link {
        padding: 10px 15px;
        font-size: 18px;
        color: white;
    }

    .cereali-card {
        width: 680px;
    }

    .fragole-card {
        width: 680px;
    }
}

@media (max-width: 768px) {
    .olio-container {
        flex-direction: column;
        align-items: center;
    }

    .olio-card {
        width: 90%;
    }

    .main-nav {
        width: 100vw;
        right: 0;
        border-radius: 0;
    }

    .cereali-container {
        flex-direction: column;
        align-items: center;
    }

    .cereali-card {
        width: 90%;
    }

    .fragole-container {
        flex-direction: column;
        align-items: center;
    }

    .fragole-card {
        width: 90%;
    }
}

#varieta-olio {
    text-align: center;
    margin-top: 20px;
}

h2 {
    text-align: center;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        right: 0;
        background: rgba(0, 0, 0, 0.8);
        width: 100%;
        text-align: center;
        padding: 10px 0;
        transition: all 0.3s ease-in-out;
    }

    .main-nav.active {
        display: block;
    }
}

/* Stili per il menu desktop (orizzontale) */

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .main-nav {
        display: block;
    }

    .nav-list {
        display: flex;
        gap: 20px;
    }

    .nav-link {
        color: white;
        font-size: 16px;
    }
}

/* Stili per il menu mobile (hamburger) */

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        z-index: 1000;
    }

    .main-nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    .nav-item {
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        color: white;
        font-size: 16px;
    }
}

/* 🌟 HAMBURGER MENU */

.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0.5rem;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1000;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    display: block;
    top: 50%;
    margin-top: -2px;
    width: 100%;
    height: 3px;
    background: white;
    position: absolute;
    transition: all 0.3s;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    width: 100%;
    height: 3px;
    background: white;
    position: absolute;
    left: 0;
    transition: all 0.3s;
}

.hamburger-inner::before {
    top: -8px;
}

.hamburger-inner::after {
    top: 8px;
}

/* Effetto "X" quando il menu è attivo */

.hamburger.active .hamburger-inner {
    transform: rotate(45deg);
}

.hamburger.active .hamburger-inner::before {
    transform: rotate(90deg);
    top: 0;
}

.hamburger.active .hamburger-inner::after {
    transform: rotate(90deg);
    top: 0;
}

/* 🌟 RESPONSIVE DESIGN */

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        z-index: 1000;
    }

    .main-nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    .nav-item {
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-link {
        color: white;
        font-size: 16px;
    }
}

/* Stile per la sezione Didattica e Servizi */

.service-section {
    padding: 40px 20px;
    background: #f9f9f9;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.service-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.service-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 300px;
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
}

.service-item strong {
    font-size: 1.2rem;
    color: #2c3e50;
    display: block;
    margin-bottom: 10px;
}

.service-item p {
    font-size: 1rem;
    color: #34495e;
    line-height: 1.6;
}

/* Stile per la sezione Contattaci */

.contact-section {
    padding: 40px 20px;
    background: #556b2f93;
    color: white;
    text-align: center;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-info {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.map-container {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(5, 116, 1, 0.1);
}

/* Stile per la sezione Azienda Agricola */

.content-section {
    padding: 40px 20px;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('main.gif') no-repeat center center/cover;
    text-align: center;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2.5rem;
    color: #556B2F;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: bold;
}

.titoloContatti {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: bold;
}

.description-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #34495e;
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
}

/* Stile per i link dei product-item */

.product-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-item-link:hover .product-item {
    transform: scale(1.05);
}

.product-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
    align-items: stretch;
}

.product-item {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* Stili base per le frecce */

.slider button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    transition: background 0.3s ease, transform 0.3s ease;
}

/* Posizionamento specifico */

.prev-slide {
    left: 10px;
}

.next-slide {
    right: 10px;
}

/* Effetto hover per le frecce */

.slider button:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

/* Responsive: Nascondi le frecce sui dispositivi piccoli */

@media (max-width: 768px) {
    .slider button {
        font-size: 18px;
        padding: 10px;
    }
}

.slider button {
    z-index: 1;
    background: rgba(255, 255, 255, 0.3);
    color: #556B2F;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider button:hover {
    background: rgba(255, 255, 255, 0.7);
}