:root {
    --color-primary: #8bc34a;
    --color-primary-hover: #7cb342;
    --color-dark: #1f3b34;
    --color-light-bg: #f4f4f4;
    --color-text: #333;
    --color-text-secondary: #666;
    --color-white: #ffffff;
    --color-border: #eee;
    --color-footer-text: #aaa;
    --font-primary: 'Josefin Sans', 'Segoe UI', sans-serif;
    --font-heading: 'Abril Fatface', serif;
    --shadow-header: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-mobile: 0 5px 10px rgba(0,0,0,0.1);
    --max-width: 1200px;
    --transition-fast: 0.3s ease;
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
}

/* Header - Sticky */
header {
    background: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-header);
    transition: all var(--transition-fast);
}

header.scrolled {
    padding: 0;
}

header.scrolled .logo img {
    height: 60px;
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    transition: all var(--transition-fast);
}

.logo img {
    height: 80px;
    width: auto;
    transition: height var(--transition-fast);
}

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

nav a {
    font-family: var(--font-heading);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 400;
    font-size: 28px;
    letter-spacing: 1px;
    transition: color var(--transition-fast);
}

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

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all var(--transition-fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Add padding to body to account for fixed header */
body {
    padding-top: 100px;
}

/* Page Title */
.page-title {
    background: var(--color-dark);
    padding: 40px 30px;
    text-align: center;
}

.page-title h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    color: #FFD700;
    max-width: var(--max-width);
    margin: 0 auto;
    line-height: 1.2;
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: 20px;
    color: #FFFFFF;
    max-width: 800px;
    margin: 15px auto 0;
}

@media (max-width: 768px) {
    .page-title h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }
}

/* Content Section */
.content-section {
    padding: 20px 30px;
    background: white;
}

.content-row {
    max-width: var(--max-width);
    margin: 0 auto 40px;
    display: flex;
    gap: 4%;
    align-items: flex-start;
}

.content-text {
    flex: 0 0 48%;
}

.content-text h2,
.content-text h3 {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.content-text h3 {
    font-size: 28px;
}

.separator {
    width: 50px;
    height: 8px;
    background: var(--color-primary);
    margin: 10px 0 20px 0;
    border-radius: 0;
}

.content-text p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.content-text strong {
    font-weight: 600;
}

.content-text em {
    font-style: italic;
}

.content-images {
    flex: 0 0 48%;
}

.content-images img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    transition: transform var(--transition-fast);
}

.content-images img:hover {
    transform: scale(1.05);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

/* Features Section - 3 columns */
.features {
    padding: 40px 30px;
    background: var(--color-white);
}

.features-row {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 4%;
}

.feature-col {
    flex: 0 0 calc(33.33% - 2.67%);
    text-align: center;
}

.feature-icon {
    margin-bottom: 20px;
}

.feature-icon img {
    width: 300px;
    height: 300px;
    object-fit: contain;
}

.feature-col h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--color-text);
    margin-bottom: 15px;
    text-align: center;
}

.feature-col p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* About Section - 60/40 split with gray background */
.about {
    padding: 20px 30px;
    background: var(--color-light-bg);
}

.about-row {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 4%;
    align-items: center;
}

.about-text {
    flex: 0 0 60%;
}

.about-text h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.about-text p {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
}

.btn {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    border: none;
}

.btn:hover {
    background: var(--color-primary-hover);
}

.about-image {
    flex: 0 0 36%;
    text-align: right;
}

.about-image img {
    max-width: 100%;
    height: auto;
    transition: transform var(--transition-fast);
}

.about-image img:hover {
    transform: scale(1.05);
}

/* Products Section - 60/40 split with white background */
.products {
    padding: 20px 30px;
    background: var(--color-white);
}

.products-row {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 4%;
    align-items: center;
}

.products-gallery {
    flex: 0 0 60%;
}

.products-text {
    flex: 0 0 36%;
}

.products-text h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.products-text p {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
}

/* Product Section (for prodotti.html) */
.product-section {
    padding: 20px 30px;
    background: white;
}

.product-row {
    max-width: var(--max-width);
    margin: 0 auto 40px;
    display: flex;
    gap: 4%;
    align-items: center;
}

.product-text {
    flex: 0 0 48%;
}

.product-text h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.product-text h3 {
    font-family: var(--font-heading);
    font-size: 28px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.product-text p {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
}

.product-image {
    flex: 0 0 48%;
}

.product-image img {
    width: 100%;
    height: auto;
    transition: transform var(--transition-fast);
}

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

/* Contact Section - Dark background */
.contact {
    background: var(--color-dark);
    background-image: url('images/sfondo-mappa.png');
    background-position: center center;
    background-repeat: repeat;
    padding: 20px 30px;
    color: white;
}

.contact-row {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 4%;
}

.contact-info {
    flex: 0 0 33.33%;
}

.contact-info h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    color: white;
    margin-bottom: 10px;
}

.contact-info h4 {
    color: var(--color-primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
    margin-bottom: 5px;
}

.contact-info p {
    color: var(--color-white);
    font-size: 16px;
    margin-bottom: 5px;
}

.contact-info a {
    color: var(--color-primary);
    text-decoration: none;
}

.contact-info a:hover {
    color: var(--color-white);
}

.contact-map {
    flex: 0 0 62.66%;
}

.contact-map a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
}

.contact-map a:hover {
    color: var(--color-white);
}

.contact-map img {
    width: 100%;
    max-width: 800px;
    height: auto;
}

/* Certifications Section */
.certifications {
    padding: 40px 30px;
    background: var(--color-white);
}

.cert-row {
    max-width: var(--max-width);
    margin: 0 auto;
}

.cert-row h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--color-text);
    margin-bottom: 10px;
}

.cert-logo {
    margin-top: 20px;
}

.cert-logo img {
    max-width: 180px;
    height: auto;
}

/* Footer */
footer {
    background: var(--color-dark);
    color: white;
}

.footer-widgets {
    padding: 40px 30px;
}

.footer-row {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-col h4 {
    color: var(--color-primary);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col p {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.4;
}

.footer-col p.small {
    font-size: 50%;
    margin: 0;
    color: var(--color-footer-text);
    text-transform: uppercase;
}

.footer-col a {
    color: white;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    padding: 20px 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 16px;
}

.footer-bottom a {
    color: var(--color-primary);
    text-decoration: none;
}

/* Facebook icon link */
.facebook-link {
    display: inline-block;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.facebook-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.facebook-link svg {
    display: block;
}

/* Main Content (for azienda.html, funghi-freschi.html, asparagi-freschi.html, informativa-cookie.html) */
.main-content {
    padding: 40px 30px;
    background: white;
}

.content-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
}

.content-wrapper h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--color-text);
    margin-bottom: 20px;
}

.content-wrapper p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
}

.content-wrapper ul {
    margin-left: 30px;
    margin-bottom: 20px;
}

.content-wrapper ul li {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.content-wrapper a {
    color: var(--color-primary);
    text-decoration: none;
}

.content-wrapper a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    .header-content {
        padding: 10px 20px;
    }

    .logo img {
        height: 60px;
    }

    nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-mobile);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.active {
        max-height: 200px;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }

    nav ul li {
        border-bottom: 1px solid var(--color-border);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav a {
        display: block;
        padding: 15px 0;
        font-size: 14px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .features-row,
    .about-row,
    .products-row,
    .contact-row,
    .content-row,
    .product-row {
        flex-direction: column;
    }

    .feature-col,
    .about-text,
    .about-image,
    .products-gallery,
    .products-text,
    .contact-info,
    .contact-map,
    .product-text,
    .product-image,
    .content-text,
    .content-images {
        flex: 0 0 100%;
    }

    .product-row:nth-child(even) {
        flex-direction: column-reverse;
    }

    .content-row:nth-child(even) {
        flex-direction: column-reverse;
    }

    .feature-icon img {
        width: 200px;
        height: 200px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .content-wrapper ul {
        margin-left: 20px;
    }

    .footer-row {
        grid-template-columns: 1fr;
    }

    .carousel {
        height: 300px;
    }

    .carousel-slide img {
        height: 300px;
    }
}

/* Carousel Section */
.carousel-section {
    padding: 40px 30px;
    background: var(--color-light-bg);
}

.carousel-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.carousel-container h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    color: var(--color-text);
    margin-bottom: 30px;
}

.carousel {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    height: 500px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--color-primary);
}

.carousel-btn:hover svg {
    fill: white;
}

.carousel-btn svg {
    fill: var(--color-text);
    width: 24px;
    height: 24px;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.carousel-dot:hover {
    background: white;
}

/* 3-Column Carousel */
.carousel-3cols {
    height: auto;
    max-width: 100%;
}

.carousel-3cols .carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-3cols .carousel-slide {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    height: auto;
    padding: 0 5px;
    box-sizing: border-box;
}

.carousel-3cols .carousel-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

/* 2x2 Gallery Grid */
.gallery-grid-section {
    padding: 40px 30px;
    background: var(--color-light-bg);
}

.gallery-grid-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.gallery-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}

.gallery-grid-2x2 img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

@media (max-width: 768px) {
    .gallery-grid-2x2 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}
