/* ==========================================================
   AGRICOLA PADERI
   STYLE.CSS — HOME HERO MARE
   ========================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #F8F5EE;
    color: #2D2D2D;
    line-height: 1.7;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('../images/filigrana.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    opacity: 0.18;
    pointer-events: none;
    z-index: -1;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ==========================================================
   HEADER
   ========================================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(248, 245, 238, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    box-shadow: 0 3px 18px rgba(0, 0, 0, 0.08);
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 88px;
    width: auto;
    border-radius: 12px;
}

/* ==========================================================
   MENU
   ========================================================== */

nav ul {
    display: flex;
    align-items: center;
    gap: 34px;
}

nav a {
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    color: #405633;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #C5A44B;
}

/* ==========================================================
   WHATSAPP
   ========================================================== */

.btn-whatsapp {
    background: #5B6F3B;
    color: #fff;
    padding: 13px 25px;
    border-radius: 40px;
    font-weight: 600;
    white-space: nowrap;
    transition: 0.3s;
}

.btn-whatsapp:hover {
    background: #47592F;
    transform: translateY(-2px);
}

/* ==========================================================
   BUTTONS
   ========================================================== */

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 16px 38px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 17px;
    transition: 0.3s ease;
}

.btn-primary {
    background: #5B6F3B;
    color: #fff;
}

.btn-primary:hover {
    background: #46582C;
    transform: translateY(-3px);
}

.btn-primary span {
    margin-left: 12px;
    font-size: 22px;
    line-height: 1;
}

.btn-secondary {
    border: 2px solid #C5A44B;
    color: #405633;
    background: rgba(248, 245, 238, 0.82);
    margin-left: 14px;
}

.btn-secondary:hover {
    background: #C5A44B;
    color: #fff;
}

/* ==========================================================
   HERO
   Immagine hero_mare posizionata SOLO a destra
   ========================================================== */

.hero {
    position: relative;
    width: 100%;
    height: calc(100svh - 96px);
    min-height: 650px;
    overflow: hidden;
    isolation: isolate;

    background-color: #F8F5EE;

    background-image:
        /* Sfumatura da sinistra */
        linear-gradient(90deg,
            #F8F5EE 0%,
            #F8F5EE 25%,
            rgba(248, 245, 238, 0.94) 34%,
            rgba(248, 245, 238, 0.35) 46%,
            rgba(248, 245, 238, 0) 58%
        ),

        /* Sfumatura completa dal basso */
        linear-gradient(0deg,
            #F8F5EE 0%,
            rgba(248, 245, 238, 0.95) 4%,
            rgba(248, 245, 238, 0.70) 8%,
            rgba(248, 245, 238, 0.30) 14%,
            rgba(248, 245, 238, 0) 50%
        ),

        /* Immagine principale */
        url("../images/hero_mare.webp");

    background-repeat: no-repeat;

    background-position:
        center center,
        center center,
        right center;

    background-size:
        100% 100%,
        100% 100%,
        72% auto;

    display: flex;
    align-items: center;
}


/* ==========================================================
   HERO CONTENT
   ========================================================== */

.hero-content {
    position: relative;
    z-index: 5;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px;
}

.hero-text {
    width: 47%;
    max-width: 620px;
    text-align: left;
    color: #405633;
}

.hero-kicker {
    margin-bottom: 18px;
    font-size: 17px;
    letter-spacing: 5px;
    font-weight: 500;
    color: #405633;
}

.hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(52px, 5vw, 78px);
    line-height: 0.98;
    font-weight: 700;
    color: #405633;
    margin-bottom: 28px;
    max-width: 620px;
}

.hero-line {
    width: 125px;
    height: 2px;
    background: #C5A44B;
    margin-bottom: 28px;
}

.hero p {
    max-width: 560px;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(20px, 1.45vw, 25px);
    line-height: 1.35;
    color: #405633;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* ==========================================================
   HERO FEATURES
   ========================================================== */

.hero-features {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);

    width: min(1100px, 86%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;

    color: #405633;
}

.hero-feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;

    min-height: 42px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 21px;
    font-weight: 600;
}

.hero-feature + .hero-feature {
    border-left: 1px solid rgba(64, 86, 51, 0.45);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-family: 'Inter', sans-serif;
    font-size: 27px;
    color: #405633;
}

/* ==========================================================
   SECTIONS
   ========================================================== */

section {
    padding: 70px 0;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 54px;
    text-align: center;
    margin-bottom: 20px;
    color: #2D2D2D;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 70px;
}

/* ==========================================================
   CARDS
   ========================================================== */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
}

.card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    transition: 0.35s;
}

.card:hover {
    transform: translateY(-8px);
}

.card img {
    height: 260px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.card-content {
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 34px;
    margin-bottom: 15px;
}

.card p {
    margin-bottom: 20px;
    text-align: justify;
}

/* ==========================================================
   DUE COLONNE
   ========================================================== */

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.two-columns p {
    text-align: justify;
}

/* ==========================================================
   GALLERY
   ========================================================== */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    transition: 0.4s;
}

.gallery img:hover {
    transform: scale(1.04);
}

.gallery-frantoio img,
.gallery-frantoio video {
    width: 100%;
    aspect-ratio: 340 / 620;
    object-fit: cover;
    display: block;
    border-radius: 14px;
}

/* ==========================================================
   FOOTER
   ========================================================== */

footer {
    background: #2D2D2D;
    color: white;
    padding: 70px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
}

footer h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    margin-bottom: 20px;
    color: #C5A44B;
}

footer p {
    color: #ddd;
}

.copyright {
    text-align: center;
    margin-top: 60px;
    color: #aaa;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
}

/* ==========================================================
   HAMBURGER
   ========================================================== */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #405633;
    transition: 0.3s;
    border-radius: 3px;
}

/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1100px) {

    nav ul {
        gap: 20px;
    }

    nav a {
        font-size: 13px;
    }

    .hero-text {
        width: 50%;
    }

    .hero {
        background-size:
            100% 100%,
            100% 100%,
            68% auto;
    }

    .hero h1 {
        font-size: clamp(50px, 6vw, 68px);
    }
}

@media (max-width: 992px) {

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #F8F5EE;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav li {
        border-bottom: 1px solid #ddd;
    }

    nav a {
        display: block;
        padding: 18px;
        text-align: center;
        font-size: 15px;
    }

    .hamburger {
        display: flex;
    }

    .btn-whatsapp {
        display: none;
    }

    .hero {
        min-height: 620px;
        background-size:
            100% 100%,
            100% 100%,
            68% auto;
        background-position:
            center center,
            center center,
            right center;
    }

    .hero-content {
        padding-top: 50px;
    }

    .hero-text {
        width: 54%;
    }

    /* Evita la duplicazione dell'immagine già presente nello sfondo */
    .hero::after {
        content: none;
        display: none;
    }

    .hero-features {
        width: 94%;
    }
}

/* ==========================================================
   SMARTPHONE
   ========================================================== */

@media (max-width: 768px) {

    header {
        height: 96px;
    }

    header .container {
        height: 96px;
        padding: 8px 18px;
    }

    .logo img {
        height: 72px;
        max-width: 70vw;
        object-fit: contain;
    }

    /* HERO smartphone: altezza adattiva, immagine proporzionata */
    .hero {
        height: auto;
        min-height: 0;
        margin-top: 96px;
        padding: 32px 0 0;
        background: #F8F5EE;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: hidden;
    }

    .hero-content {
        position: relative;
        z-index: 5;
        width: 92%;
        padding: 0;
        margin: 0 auto;
    }

    .hero-text {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    .hero-kicker {
        font-size: 13px;
        letter-spacing: 3px;
        margin-bottom: 12px;
    }

    .hero h1 {
        font-size: clamp(38px, 10vw, 52px);
        line-height: 1;
        margin-bottom: 18px;
    }

    .hero-line {
        margin: 0 auto 18px;
        width: 90px;
    }

    .hero p {
        max-width: 480px;
        margin: 0 auto 24px;
        font-size: 19px;
        line-height: 1.3;
    }

    .hero-buttons {
        display: none;
    }

    /* Immagine completa senza deformazioni */
    .hero::after {
        content: "";
        display: block;
        position: relative;
        width: 100%;
        aspect-ratio: 1145 / 941;
        flex: 0 0 auto;
        background-image: url("../images/hero_mare_mobile.webp");
        background-repeat: no-repeat;
        background-position: center center;
        background-size: contain;
        pointer-events: none;
    }

    .hero-features {
        position: relative;
        left: auto;
        bottom: auto;
        transform: none;
        width: 94%;
        margin: 0 auto;
        padding: 12px 0 16px;
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-feature {
        flex-direction: column;
        gap: 3px;
        min-height: 54px;
        font-size: 14px;
        line-height: 1.15;
        text-align: center;
    }

    .hero-feature + .hero-feature {
        border-left: 1px solid rgba(64, 86, 51, 0.35);
    }

    .feature-icon {
        width: 28px;
        height: 28px;
        font-size: 21px;
    }

    section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 40px;
    }

    .two-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .two-columns p {
        text-align: left;
    }
}

/* ==========================================================
   SMARTPHONE PICCOLO
   ========================================================== */

@media (max-width: 480px) {

    header,
    header .container {
        height: 88px;
    }

    header .container {
        padding: 7px 15px;
    }

    .logo img {
        height: 66px;
    }

    .hero {
        margin-top: 88px;
        padding-top: 28px;
    }

    .hero-content {
        width: 94%;
        padding: 0;
    }

    .hero-kicker {
        font-size: 12px;
        letter-spacing: 2.5px;
    }

    .hero h1 {
        font-size: clamp(34px, 10vw, 43px);
    }

    .hero p {
        font-size: 17px;
    }

    .hero-feature {
        font-size: 12px;
    }
}

/* ==========================================================
   SCHERMI MOLTO ALTI / EVITA SPAZI BIANCHI
   ========================================================== */

@media (min-width: 769px) and (min-height: 900px) {

    .hero {
        min-height: 760px;
    }

    .hero-content {
        padding-top: 90px;
    }

    .hero {
        background-size:
            100% 100%,
            100% 100%,
            72% auto;
    }
}
