
:root {
    --colore-primario: #f4e4d6; /* quadrati */
}

/* ===================================
   AGRIFOOD FUTURE - CSS Stylesheet
   =================================== */

/* Import fonts */
@import url('fonts.css');

/* CSS Reset e Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #f4e4d6;
    background-color: var(--colore-primario);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Skip Link per accessibilità */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a8cba;
    color: white;
    padding: 10px 20px;
    z-index: 1000;
    border-radius: 0 0 5px 5px;
}

.skip-link:focus {
    top: 0;
}

/* ===================================
   HEADER - Allineato con contenuto
   =================================== */
#site-header {
    background-color: var(--colore-primario);
    padding: 20px 0;
    position: relative;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper .logo {
    height: 22px;
    width: auto;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.header-info .infodata-logo {
    height: 30px;
	margin-bottom: 4px;
    width: auto;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
    position: relative;
    background-color: var(--colore-primario);
    overflow: hidden;
    padding-bottom: 0;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 40px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content {
    max-width: 500px;
}

/* Titolo con Oswald */
.hero-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(65px, 7vw, 73.5px);
    font-weight: 200;
    line-height: 1.14;
    color: #02539a;
    margin-bottom: 25px;
     letter-spacing: -4.4px;
    /* NIENTE text-transform: uppercase - il titolo originale non ce l'ha */
}

.hero-title a {
    transition: color 0.3s ease;
}

.hero-title a:hover {
    color: #1a8cba;
}

.hero-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: clamp(30px, 2.5vw, 20px);
    font-weight: 200;
	letter-spacing: -3;
    color: #02539a;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* CTA più grande e meno margine sotto */
.hero-cta {
    font-size: 16px;
    color: #666;
    margin-bottom: 0;
}

.download-link {
    color: #1a8cba;
    font-weight: 600;
    font-size: 20px;
    transition: color 0.3s ease;
}

.download-link:hover {
    color: #0d6a94;
    text-decoration: underline;
}

.cta-extra {
    display: block;
    margin-top: 5px;
    font-size: 14px;
}

/* Illustrazione Hero - allineata a destra */
.hero-illustration {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.illustration-img {
    max-width: 450px;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.1));
}

.illustration-img:hover {
    transform: scale(1.02);
}

/* ===================================
   PARALLAX SECTION - Molto più vicina
   =================================== */
.parallax-section {
    position: relative;
    height: 55vh;
    min-height: 380px;
    overflow: hidden;
    margin-top: 30px;
}

.parallax-image {
    position: absolute;
    top: -20%;
    left: 0;
    right: 0;
    height: 140%;
    background-image: url('images/parallax.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    will-change: transform;
}

/* Fallback per dispositivi che non supportano background-attachment: fixed */
@supports (-webkit-touch-callout: none) {
    .parallax-image {
        background-attachment: scroll;
    }
}

/* ===================================
   FOOTER
   =================================== */
#site-footer {
    background-color: var(--colore-primario);
    padding: 35px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    font-size: 14px;
    color: #666;
}

.copyright a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: #1a8cba;
}

.back-to-top {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.back-to-top:hover {
    color: #1a8cba;
}

.back-to-top .arrow {
    font-size: 16px;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media screen and (max-width: 1024px) {
    .header-container,
    .hero-container,
    .footer-container {
        padding: 0 30px;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 40px;
        padding-bottom: 30px;
    }

    .hero-content {
        max-width: 100%;
        order: 1;
    }

    .hero-illustration {
        order: 2;
        justify-content: center;
    }

    .illustration-img {
        max-width: 380px;
    }

    .parallax-section {
        margin-top: 20px;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .header-container,
    .hero-container,
    .footer-container {
        padding: 0 20px;
    }

    #site-header {
        padding: 15px 0;
    }

    .header-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .header-info {
        justify-content: center;
        font-size: 12px;
        flex-wrap: wrap;
    }

    .logo-wrapper .logo {
        height: 45px;
    }

    .hero-container {
        padding: 25px 20px;
        gap: 25px;
    }

    .hero-title {
        font-size: 38px;
        margin-bottom: 18px;
    }

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

    .download-link {
        font-size: 16px;
    }

    .cta-extra {
        font-size: 13px;
    }

    .illustration-img {
        max-width: 300px;
    }

    .parallax-section {
        height: 45vh;
        min-height: 280px;
        margin-top: 15px;
    }

    /* Disabilita parallasse su mobile per performance */
    .parallax-image {
        background-attachment: scroll;
        top: 0;
        height: 100%;
    }

    #site-footer {
        padding: 25px 0;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Mobile Small */
@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

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

    .illustration-img {
        max-width: 250px;
    }

    .parallax-section {
        height: 40vh;
        min-height: 220px;
    }
}

/* ===================================
   UTILITIES & ANIMATIONS
   =================================== */

/* Smooth fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeIn 0.8s ease-out;
}

.hero-illustration {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* Focus styles per accessibilità */
a:focus,
button:focus {
    outline: 2px solid #1a8cba;
    outline-offset: 2px;
}

/* Riduci motion per utenti che lo preferiscono */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-content,
    .hero-illustration {
        animation: none;
    }
    
    .parallax-image {
        background-attachment: scroll;
    }
    
    .illustration-img {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-title,
    .hero-subtitle {
        color: #000;
    }
    
    .download-link {
        color: #005580;
    }
}

/* Stili per il download del PDF */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.download-icon {
    cursor: pointer;
    vertical-align: middle;
    transition: transform 0.2s ease, opacity 0.2s ease;
    display: inline-block;
}

.download-icon:hover {
    transform: scale(1.15);
    opacity: 0.8;
}

.download-icon:active {
    transform: scale(1.05);
}

.download-icon:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
    border-radius: 4px;
}

.download-link {
    display: inline-flex;
    align-items: center;
}