/* ==========================================================
   BLU EST PORTAL — bluest.eu (v4 — Operatori, non vetrina)
   Tipografia: solo Manrope (200/400/600/800)
   Palette: navy logo + arancione tramonto + verde laguna
   Direzione: foto reali, niente decorazioni grafiche fragili,
   linguaggio diretto da operatori del territorio.
   ========================================================== */

:root {
    /* PALETTE TRE COLORI */
    --navy:        #1e3a5f;  /* Navy ufficiale del logo */
    --navy-deep:   #0f2540;  /* Footer + barra dati */
    --navy-soft:   #2a5078;
    --navy-deeper: #081a30;

    --orange:       #ee8033;  /* Arancione tramonto del logo */
    --orange-warm:  #f49b4d;
    --orange-deep:  #c4561b;

    --green:        #7a9d6e;  /* Verde laguna */
    --green-deep:   #5d8266;
    --green-soft:   #a3bc97;

    --cream:      #ffffff;  /* Sfondo principale (era cream, ora vero bianco) */
    --sand:       #f7f3ea;  /* Sabbia sezioni alternate */
    --sand-warm:  #ebe3d0;  /* Bordi sottili */

    --ink:        #1a2538;
    --ink-soft:   #4a5d75;
    --muted:      #6b7280;
    --line:       #e5e0d4;

    /* TIPOGRAFIA: SOLO MANROPE */
    --font:    'Manrope', system-ui, -apple-system, sans-serif;

    /* LAYOUT */
    --max-w: 1320px;
    --pad-x: clamp(20px, 4vw, 56px);

    --radius-md: 4px;
    --radius-lg: 8px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* Typography unificata */
h1, h2, h3, h4 {
    font-family: var(--font);
    letter-spacing: -0.025em;
    line-height: 1.1;
    color: var(--navy);
}

.eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--orange);
}


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 18px var(--pad-x);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1;
}

/* Logo immagine — forziamo altezza precisa per evitare che si espanda */
.brand-logo,
.brand-fallback img {
    height: 44px;
    width: auto;
    max-width: none; /* annulla il max-width:100% globale degli img */
    display: block;
}

/* Fallback CSS — versione che mostra logo PNG attuale.
   Quando avrete SVG ufficiale, sostituite tutto questo blocco
   nell'HTML con <img src="assets/img/logo.svg" class="brand-logo"> */
.brand-fallback {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav {
    display: flex;
    gap: 28px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.01em;
    transition: color 0.2s;
}

.main-nav a:hover { color: var(--orange); }

@media (max-width: 700px) {
    .main-nav { gap: 16px; }
    .main-nav a { font-size: 13px; }
    .brand-logo,
    .brand-fallback img { height: 32px; }
}


/* ============================================================
   HERO CON FOTO
   ============================================================ */

.hero {
    position: relative;
    min-height: clamp(420px, 60vh, 640px);
    background-image:
        linear-gradient(180deg,
            rgba(15, 37, 64, 0.15) 0%,
            rgba(15, 37, 64, 0.45) 50%,
            rgba(15, 37, 64, 0.85) 100%),
        url('../img/photos/hero-porto-caorle-tramonto.jpg?v=1');
    background-size: cover;
    background-position: center 55%;
    color: var(--cream);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(40px, 8vw, 80px) var(--pad-x);
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: var(--orange);
    color: var(--navy-deep);
    padding: 7px 14px;
    margin-bottom: 24px;
}

.hero h1 {
    font-family: var(--font);
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 200;
    color: var(--cream);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    max-width: 760px;
}

.hero h1 b {
    font-weight: 800;
    color: var(--cream);
}

.hero .lead {
    font-size: clamp(16px, 1.4vw, 19px);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    max-width: 560px;
    line-height: 1.55;
    margin-bottom: 28px;
}

.hero .lead em {
    font-style: normal;
    color: var(--orange-warm);
    font-weight: 600;
}


/* ============================================================
   BARRA DATI OPERATIVI (sotto hero)
   ============================================================ */

.stats-bar {
    background: var(--navy-deep);
    color: var(--cream);
    padding: 24px var(--pad-x);
}

.stats-bar-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: center;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-num {
    font-family: var(--font);
    font-size: 30px;
    font-weight: 800;
    color: var(--orange);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-num small {
    font-size: 0.6em;
    margin-left: 2px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(253, 250, 245, 0.75);
    letter-spacing: 0.04em;
    line-height: 1.3;
}

@media (max-width: 800px) {
    .stats-bar-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}


/* ============================================================
   BOTTONI
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border-radius: 0;
}

.btn-primary {
    background: var(--orange);
    color: var(--navy-deep);
}

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

.btn-ghost {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid var(--navy);
}

.btn-ghost:hover {
    background: var(--navy);
    color: var(--cream);
}

/* Variante per sfondi scuri (se servirà in futuro) */
.btn-ghost-light {
    background: transparent;
    color: var(--cream);
    border: 1.5px solid rgba(253, 250, 245, 0.5);
}

.btn-ghost-light:hover {
    border-color: var(--orange);
    color: var(--orange);
}


/* ============================================================
   SERVIZI — 7 CARD CON FOTO
   ============================================================ */

.services {
    padding: clamp(60px, 9vw, 110px) var(--pad-x);
    max-width: var(--max-w);
    margin: 0 auto;
}

.services-head {
    margin-bottom: clamp(40px, 5vw, 64px);
    max-width: 720px;
}

.services-head .eyebrow { margin-bottom: 14px; }

.services-head h2 {
    font-family: var(--font);
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 200;
    color: var(--navy);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.services-head h2 b { font-weight: 800; }

.services-head p {
    font-size: 16px;
    color: var(--ink-soft);
    line-height: 1.55;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.card {
    background: var(--cream);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s;
}

.card:hover {
    border-color: var(--orange);
    transform: translateY(-3px);
}

.card-img {
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    background-color: var(--navy-soft);
    position: relative;
}

/* Overlay sottile per card senza foto vera (placeholder) */
.card-img.is-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--placeholder-from, var(--navy-soft)), var(--placeholder-to, var(--navy-deep)));
}

.card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.card-num {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--orange);
}

.card-title {
    font-family: var(--font);
    font-size: 19px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.card-text {
    font-size: 13.5px;
    color: var(--ink-soft);
    line-height: 1.55;
    flex: 1;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.02em;
    margin-top: 4px;
}

.card-cta .arr {
    color: var(--orange);
    font-size: 14px;
    transition: transform 0.2s;
}

.card:hover .card-cta .arr { transform: translateX(4px); }

.card-host {
    font-size: 10.5px;
    color: var(--muted);
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    letter-spacing: -0.02em;
}

/* Card colorate per categoria (accento verde laguna sui servizi naturalistici) */
.card.is-nature .card-num { color: var(--green-deep); }
.card.is-nature .card-cta .arr { color: var(--green-deep); }
.card.is-nature:hover { border-color: var(--green-deep); }

@media (max-width: 1100px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .cards { grid-template-columns: 1fr; }
}


/* ============================================================
   CHI SIAMO — con foto del porto di Caorle a sinistra
   ============================================================ */

.about {
    background: var(--sand);
    padding: clamp(60px, 9vw, 110px) var(--pad-x);
}

.about-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
}

.about-photo {
    aspect-ratio: 4/5;
    background-image: url('../img/photos/porto-caorle-campanile.jpg');
    background-size: cover;
    background-position: center;
}

.about-text .eyebrow { margin-bottom: 14px; }

.about-text h2 {
    font-family: var(--font);
    font-size: clamp(30px, 4vw, 48px);
    font-weight: 200;
    color: var(--navy);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 24px;
}

.about-text h2 b { font-weight: 800; }

.about-text p {
    font-size: 16px;
    color: var(--ink-soft);
    line-height: 1.7;
    margin-bottom: 16px;
    max-width: 540px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-text strong {
    color: var(--navy);
    font-weight: 700;
}

@media (max-width: 900px) {
    .about-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-photo {
        aspect-ratio: 4/3;
    }
}


/* ============================================================
   CONTATTI
   ============================================================ */

.contact {
    padding: clamp(60px, 9vw, 110px) var(--pad-x);
    background: var(--cream);
}

.contact-inner {
    max-width: var(--max-w);
    margin: 0 auto;
}

.contact .eyebrow { margin-bottom: 14px; }

.contact h2 {
    font-family: var(--font);
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 200;
    color: var(--navy);
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 14px;
    max-width: 720px;
}

.contact h2 b { font-weight: 800; }

.contact > .contact-inner > p {
    font-size: 16px;
    color: var(--ink-soft);
    margin-bottom: 40px;
    max-width: 580px;
    line-height: 1.55;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 900px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px 22px;
    background: var(--sand);
    border-left: 3px solid var(--orange);
    transition: background 0.2s;
}

.contact-item:hover {
    background: var(--sand-warm);
}

.contact-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--orange);
    font-weight: 700;
}

.contact-value {
    font-family: var(--font);
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.01em;
    margin-top: 2px;
    word-break: break-word;
}

a.contact-value:hover { color: var(--orange); }

@media (max-width: 700px) {
    .contact-grid { grid-template-columns: 1fr; }
}


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

.site-footer {
    background: var(--navy-deeper);
    color: rgba(253, 250, 245, 0.7);
    padding: 56px var(--pad-x) 0;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    align-items: start;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(238, 128, 51, 0.15);
}

.footer-brand img {
    height: 56px;
    width: auto;
    max-width: none;
    margin-bottom: 12px;
    display: block;
}

/* Social icons sotto il logo */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(253, 250, 245, 0.08);
    color: rgba(253, 250, 245, 0.75);
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    background: var(--orange);
    color: var(--navy-deep);
    transform: translateY(-2px);
}

.footer-social a svg {
    width: 18px;
    height: 18px;
    display: block;
}

.footer-brand small {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(253, 250, 245, 0.5);
    display: block;
    margin-top: 4px;
}

.footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 32px;
}

.footer-nav a {
    font-size: 14px;
    font-weight: 500;
    color: rgba(253, 250, 245, 0.75);
    transition: color 0.2s;
}

.footer-nav a:hover { color: var(--orange); }

.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    font-size: 12px;
}

.footer-legal a {
    color: rgba(253, 250, 245, 0.7);
    text-decoration: none;
    border-bottom: 1px dotted rgba(238, 128, 51, 0.4);
}

.footer-legal a:hover {
    color: var(--orange);
    border-bottom-color: var(--orange);
}

/* Blocco "due marchi" */
.footer-group {
    background: var(--navy-deeper);
    padding: 32px var(--pad-x);
}

.footer-group-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    text-align: center;
}

.footer-group-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--orange);
    margin-bottom: 14px;
}

.footer-group-text {
    font-size: 14px;
    color: rgba(253, 250, 245, 0.78);
    line-height: 1.75;
    margin-bottom: 14px;
}

.footer-group-text strong {
    color: var(--cream);
    font-weight: 700;
}

.footer-group-text a {
    color: var(--cream);
    border-bottom: 1px dotted rgba(238, 128, 51, 0.5);
    transition: color 0.2s, border-color 0.2s;
}

.footer-group-text a:hover {
    color: var(--orange);
    border-bottom-color: var(--orange);
}

.footer-group-meta {
    font-size: 11.5px;
    color: rgba(253, 250, 245, 0.5);
    line-height: 1.7;
}

@media (max-width: 800px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: left;
    }
    .footer-legal { text-align: left; }
    .footer-nav { grid-template-columns: 1fr 1fr; }
}


/* ============================================================
   WHATSAPP FLOATING BUTTON
   Bottone flottante per messaggi rapidi
   Posizione: bottom-right (Iubenda usa bottom-left)
   ============================================================ */

.whatsapp-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;  /* sotto Iubenda (z-index ~999999) */
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;  /* verde WhatsApp ufficiale */
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.32),
                0 2px 6px rgba(0, 0, 0, 0.12);
    opacity: 0.92;
    transition: opacity 0.2s ease,
                transform 0.2s ease,
                box-shadow 0.2s ease;
}

.whatsapp-fab:hover,
.whatsapp-fab:focus {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45),
                0 3px 8px rgba(0, 0, 0, 0.16);
    outline: none;
}

.whatsapp-fab:active {
    transform: scale(0.98);
}

.whatsapp-fab svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* Tooltip "Scrivici!" — solo desktop, al hover */
.whatsapp-fab::before {
    content: "Scrivici su WhatsApp";
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: var(--navy-deep);
    color: var(--cream);
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.whatsapp-fab::after {
    content: "";
    position: absolute;
    right: calc(100% + 5px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--navy-deep);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.whatsapp-fab:hover::before {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.whatsapp-fab:hover::after {
    opacity: 1;
}

/* Mobile: più grande, più visibile, pulsazione delicata */
@media (max-width: 768px) {
    .whatsapp-fab {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
        opacity: 1;
        animation: whatsapp-pulse 2.4s ease-in-out infinite;
    }

    .whatsapp-fab svg {
        width: 32px;
        height: 32px;
    }

    /* Niente tooltip su mobile (no hover su touch) */
    .whatsapp-fab::before,
    .whatsapp-fab::after {
        display: none;
    }
}

@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.32),
                    0 2px 6px rgba(0, 0, 0, 0.12),
                    0 0 0 0 rgba(37, 211, 102, 0.6);
    }
    50% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.32),
                    0 2px 6px rgba(0, 0, 0, 0.12),
                    0 0 0 12px rgba(37, 211, 102, 0);
    }
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-fab {
        animation: none !important;
        transition: opacity 0.2s ease;
    }
    .whatsapp-fab:hover,
    .whatsapp-fab:focus {
        transform: none;
    }
}
