/* ============================================================
   RESET & BASE
   ============================================================ */
:root {
    --c-gold: #ddad6c;
    --c-gold-rgb: 221, 173, 108;
    --c-brown: #3a2a10;
    --c-wa: #25d366;
    --c-wa-bg: #e8fdf1;
}

@media (max-width: 600px) {
    :root{
        font-size: 14px;
    }
}

@media (max-width: 400px) {
    :root{
        font-size: 11px;
    }
}


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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'trenda', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

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

ul {
    list-style: none;
}

address {
    font-style: normal;
}

/* ============================================================
   LAYOUT — container e spaziatura sezioni
   ============================================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.site-main {
    flex: 1;
}

.section {
    padding-block: 4rem;
}

.section--centered {
    text-align: center;
}

.lead {
    font-size: 1.2rem;
    margin-top: 0.75rem;
    color: #444;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; font-weight: 900;}
h2 { font-size: clamp(1.4rem, 3vw, 2rem);   line-height: 1.3; }
h3 { font-size: 1.25rem; }

/* ============================================================
   OVER-NAVBAR (disabilitata di default)
   ============================================================ */

.over-navbar {
    background: #1a1a1a;
    color: #fff;
    font-size: 0.85rem;
    text-align: center;
    padding: 0.4rem 0;
}

/* ============================================================
   NAVBAR
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
}

.navbar__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 90px;
    transition: height 0.3s ease;
}

.site-header.is-scrolled .navbar__inner {
    height: 56px;
}

/* Brand */
.navbar__brand {
    font-size: 1.25rem;
    font-weight: 900;
    white-space: nowrap;
    flex: 1;
}

/* Destra: toggle + icone + menu */
.navbar__right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

/* Icone contatto — stessa altezza dei link nav (padding + font inclusi) */
.navbar__icons {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    margin-right: 0.3rem;
}

.navbar__icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.5rem;   /* stesso padding verticale dei link nav */
    border-radius: 4px;
    font-size: 1.9rem;         /* ~2× i link nav (0.95rem) */
    line-height: 1;
    color: #1a1a1a;
    transition: background 0.15s, color 0.15s;
}

.navbar__icon-btn:hover      { background: #f0f0f0; }
.navbar__icon-btn--wa:hover  { background: #f0f0f0; }

.navbar__menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar__menu a {
    display: block;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background 0.15s;
}

.navbar__menu a:hover,
.navbar__menu a.active { background: #f0f0f0; }

/* Hamburger */
.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
}

.navbar__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1a1a1a;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

.navbar__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hamburger attivo sotto 900px ── */
@media (max-width: 900px) {
    .navbar__toggle { display: flex; }

    .navbar__menu {
        display: none;
        position: absolute;
        top: 100%; /* segue l'altezza reale dell'header */
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 1.5rem 1rem;
        gap: 0.25rem;
    }

    .navbar__menu.is-open { display: flex; }

    .navbar__menu a {
        padding: 0.6rem 0.5rem;
        font-size: 1rem;
    }
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: #2a2a2a;
    border-top: 1px solid #3a3a3a;
    margin-top: auto;
    color: #c0c0c0;
}

.footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    padding-block: 3rem;
}

.footer__brand-name {
    font-size: 1.1rem;
    font-weight: 900;
    color: #f0f0f0;
}

.footer__slogan {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: #aaa;
}

.footer__col-title {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 0.75rem;
}

.footer__col--nav ul,
.footer__col--contacts ul {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer__col--nav a,
.footer__col--contacts a {
    font-size: 0.9rem;
    color: #bbb;
    transition: color 0.15s;
}

.footer__col--nav a:hover,
.footer__col--contacts a:hover {
    color: #fff;
}

.footer__col--contacts li {
    font-size: 0.9rem;
    color: #bbb;
}

.footer__label {
    display: block;
    font-size: 0.75rem;
    color: #999;
}

.footer__bottom {
    border-top: 1px solid #3a3a3a;
    padding-block: 1rem;
    font-size: 0.8rem;
    color: #999;
}

.footer__bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================================
   HERO SECTIONS
   ============================================================ */

/* Separatore SVG — incollato al fondo del hero, fill bianco taglia il background */
.hero-separator {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: auto;
    display: block;
    z-index: 3;
    pointer-events: none;
    margin-bottom: -2px;
    max-width: 1400px;
    align-self: center;
}

.hero {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Placeholder grigio scuro finché non c'è l'immagine di sfondo */
.hero__bg {
    position: absolute;
    inset: 0;
    background: white;
    /* Quando aggiungi l'immagine:
       background: url('../images/nome.jpg') center/cover no-repeat;
    */
    z-index: 0;
}

/* Overlay scuro sopra l'immagine per leggibilità del testo */
.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.hero__content {
    position: relative;
    z-index: 1;
    color: #fff;
    padding-block: 3rem;
}

.hero__content h1 {
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero__sub {
    margin-top: 0.75rem;
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    max-width: 600px;
}

/* Home: 70vh */
.hero--full {
    min-height: 45vh;
}

/* Altre pagine: 35vh */
.hero--slim {
    min-height: 35vh;
}

/* ── Hero Home ── */

.hero--home {
    background: rgba(var(--c-gold-rgb), 0.56);
    align-items: center;
    justify-content: flex-start; /* testo parte da sinistra (metà schermo) */
}

.hero--home .hero__bg,
.hero--home .hero__bg::after {
    display: none;
}

/* Finestra 1: centrata verticalmente, lato destro a 50% schermo */
.hero-window1 {
    position: absolute;
    right: 60%;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: auto;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(10px 10px 12px rgba(54, 27, 16, 0.388));

}

/* 1200px → 641px: finestra si rimpicciolisce proporzionalmente con la viewport,
   testo rimane a destra come sul desktop */
@media (max-width: 1200px) {
    .hero-window1 {
        height: clamp(200px, 55vw, 70%);
    }
}

/* Testo: parte dal centro (40%) verso destra, allineato a sinistra */
.hero__content--home {
    position: relative;
    z-index: 2;
    margin-left: 40%;
    padding-left: 3rem;
    padding-right: 2rem;
    color: #1a1a1a;
    text-align: left;
}

.hero__content--home h1 { text-shadow: none; }

.hero__sub--home {
    text-shadow: none;
    color: var(--c-brown);
    opacity: 1;
}

/* Mobile: basso a destra */
.hero-prod {
    position: absolute;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.hero-prod--mobile {
    right: 0;
    width: 25%;
    height: auto;
}

/* Sotto 640px: layout verticale — finestra centrata in alto, testo sotto */
@media (max-width: 480px) {
    .hero--home {
        flex-direction: column;
        justify-content: flex-end;
        padding-bottom: 2rem;
    }

    .hero-window1 {
        top: calc(4vh - 5vw);
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        height: auto;
        width: 50%;
    }

    .hero__content--home {
        position: absolute;
        bottom: calc(10vh - 5vw);
        margin-left: 0;
        padding-inline: 1.5rem;
        text-align: center;
    }

    .hero-prod--mobile { width: 40%; }
}

/* ============================================================
   SERVICE CARDS (sc-*)
   ============================================================ */

.sc-section {
    padding-top: calc(4rem + 6vh);
}

.sc-section__title {
    text-align: center;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.sc-section__sub {
    text-align: center;
    color: #555;
    font-size: 1.05rem;
    margin-bottom: 2.5rem;
}

.sc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.2rem;
}

.sc-card {
    position: relative;
    aspect-ratio: 1.05 / 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
}

.sc-card__bg {
    position: absolute;
    inset: 0;
    background: #c8c8c8 center / cover no-repeat;
    transition: transform 0.4s ease;
}

.sc-card:hover .sc-card__bg {
    transform: scale(1.04);
}

.sc-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.3s ease;
}

.sc-card:hover .sc-card__overlay {
    background: rgba(var(--c), 0.9);
}

.sc-card__num {
    position: relative;
    z-index: 1;
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.sc-card__title {
    position: relative;
    z-index: 1;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    font-weight: 700;
    text-align: center;
    padding-inline: 1rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    margin-top: 0.4rem;
}

@media (max-width: 700px) {
    .sc-grid {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .sc-card {
        aspect-ratio: 3 / 1;
        flex-direction: row;
        justify-content: flex-start;
        padding-inline: 1.5rem;
        gap: 1.5rem;
    }

    .sc-card__num {
        font-size: 3rem;
        flex-shrink: 0;
    }

    .sc-card__title {
        text-align: left;
        padding-inline: 0;
    }
}

/* ============================================================
   SERVICE DETAIL SECTIONS (svc-detail)
   ============================================================ */

.svc-detail {
    position: relative;
    overflow: hidden;
}

.svc-detail__icon-bg {
    position: absolute;
    font-size: clamp(10rem, 28vw, 20rem);
    line-height: 1;
    opacity: 0.08;
    pointer-events: none;
    top: 50%;
    right: -2rem;
    transform: translateY(-50%);
    color: #1a1a1a;
}

.svc-detail--alt .svc-detail__icon-bg {
    right: auto;
    left: -2rem;
}

.svc-detail__inner {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.svc-detail--alt .svc-detail__inner {
    flex-direction: row-reverse;
}

.svc-detail__text {
    flex: 1;
}

.svc-detail__text h2 {
    margin-bottom: 1rem;
}

.svc-detail__text p {
    color: #444;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.svc-detail__photos {
    flex-shrink: 0;
    display: flex;
    gap: 1.25rem;
}

.svc-photo {
    width: clamp(100px, 14vw, 180px);
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    object-fit: cover;
}

.svc-photo--placeholder {
    background: #e0e0e0;
}

@media (max-width: 760px) {
    .svc-detail__inner,
    .svc-detail--alt .svc-detail__inner {
        flex-direction: column;
        gap: 2rem;
    }

    .svc-detail__icon-bg {
        font-size: 40vw;
        top: auto;
        bottom: -2rem;
        right: -2rem;
        transform: none;
    }

    .svc-detail--alt .svc-detail__icon-bg {
        left: auto;
        right: -2rem;
    }

    .svc-detail__photos {
        justify-content: center;
    }

    .svc-photo {
        width: clamp(80px, 22vw, 140px);
    }
}

/* ============================================================
   LAZY LOADING — scheletro stile YouTube
   ============================================================ */

.img-wrapper {
    position: relative;
    overflow: hidden;
    background: #e8e8e8;
    /* Imposta una dimensione minima per evitare collasso prima del caricamento */
    min-height: 120px;
}

/* Shimmer */
.img-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.55) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

.img-wrapper.img-loaded::after {
    display: none;
}

.img-wrapper img {
    opacity: 0;
    transition: opacity 0.35s ease;
    width: 100%;
    height: auto;
}

.img-wrapper img.img-loaded {
    opacity: 1;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */

.cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    width: min(480px, calc(100vw - 2rem));
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    padding: 1.25rem 1.5rem;
    display: none; /* visibile via JS se cookie non accettato */
}

.cookie-banner.is-visible {
    display: block;
}

.cookie-banner p {
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 1rem;
}

.cookie-banner__actions {
    display: flex;
    gap: 0.75rem;
}

/* ============================================================
   PULSANTI
   ============================================================ */

.btn {
    display: inline-block;
    padding: 0.55rem 1.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn--primary {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.btn--primary:hover {
    background: #333;
    border-color: #333;
}

.btn--ghost {
    background: transparent;
    color: #555;
    border-color: #ccc;
}

.btn--ghost:hover {
    background: #f5f5f5;
}

/* ============================================================
   CONTACTS HOME
   ============================================================ */

.contacts-home {
    position: relative;
    background: var(--c-gold);
    padding-block: 4rem;
    margin-top: 60px;
}

.contacts-home::before {
    content: '';
    position: absolute;
    top: -59px;
    left: -5%;
    width: 110%;
    height: 60px;
    background: var(--c-gold);
    border-radius: 50% 50% 0 0 / 60px 60px 0 0;
}

.contacts-home__title {
    text-align: center;
    margin-bottom: 5rem;
}

.contacts-home__grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 4rem;
    align-items: start;
}

.contacts-home__col-owner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.contacts-home__photo-wrap {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(0,0,0,0.15);
    overflow: hidden;
}

.contacts-home__photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contacts-home__info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
}

.contacts-home__name {
    font-size: 2.1rem;
    font-weight: 800;
    display: block;
    color: #fff;
    margin-bottom: 0.2rem;
}

.contacts-home__info a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: #fff;
    transition: opacity 0.15s;
}

.contacts-home__info a i { font-size: 1.2em; flex-shrink: 0; }

.contacts-home__info a:hover { opacity: 0.7; }

.contacts-home__col-location {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.contacts-home__address-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
}

.contacts-home__pin {
    font-size: 4.5rem;
    line-height: 1;
    color: #fff;
}

.contacts-home__address-wrap address {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #fff;
}

.contacts-home__map-wrap {
    position: relative;
    width: 240px;
}

.contacts-home__frame-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.contacts-home__map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 0;
}

@media (max-width: 767px) {
    .contacts-home__grid {
        grid-template-columns: 1fr;
    }
    .contacts-home__col-owner {
        align-items: center;
    }
}
