/* Test deploy v2 - webhook attivo! */
/* ═══════════════════════════════════════════════════════════════════
   ICORI THEME — main.css
   Variabili, reset, utility, tipografia, layout base
   ═══════════════════════════════════════════════════════════════════ */

/* ── Variabili ─────────────────────────────────────────────────────── */
:root {
    --blu:       #074671;
    --azzurro:   #3CADCC;
    --verde:     #46A54A;
    --blu-mid:   #0a5a8f;
    --blu-light: #e6f0f8;
    --az-light:  #e0f5fb;
    --vd-light:  #edf7ed;
    --bg:        #f4f8fc;
    --white:     #ffffff;
    --text:      #0e2233;
    --text-mid:  #2e5068;
    --text-soft: #5a7a90;
    --border:    rgba(7,70,113,0.10);

    --shadow-sm: 0 1px 4px rgba(7,70,113,0.07);
    --shadow-md: 0 4px 16px rgba(7,70,113,0.10);
    --shadow-lg: 0 8px 32px rgba(7,70,113,0.14);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;

    --transition: 0.2s ease;

    --container-max: 1200px;
    --container-pad: 24px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Barlow', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--azzurro); outline-offset: 2px; border-radius: 2px; }
button { cursor: pointer; font: inherit; border: none; background: none; }
ul, ol { list-style: none; }

/* ── Tipografia ────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Barlow Condensed', 'Barlow', sans-serif;
    font-weight: 700;
    color: var(--blu);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Container ─────────────────────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* ── Sezione generica ──────────────────────────────────────────────── */
.section {
    padding-block: 80px;
}
.section--sm { padding-block: 56px; }
.section--lg { padding-block: 104px; }
.section--bg  { background: var(--bg); }
.section--white { background: var(--white); }
.section--blu { background: var(--blu); color: var(--white); }

.section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.section__header--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.section__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--azzurro);
    margin-bottom: 10px;
}
.section__title { margin-bottom: 0; }
.section__subtitle {
    color: var(--text-soft);
    font-size: 1rem;
    margin-top: 10px;
}
.section__link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--azzurro);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: gap var(--transition);
}
.section__link:hover { gap: 10px; }

/* ── Bottoni ───────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-family: 'Barlow', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
    background: var(--blu);
    color: var(--white);
    border-color: var(--blu);
}
.btn--primary:hover {
    background: var(--blu-mid);
    border-color: var(--blu-mid);
    box-shadow: 0 4px 14px rgba(7,70,113,0.3);
}

.btn--accent {
    background: var(--azzurro);
    color: var(--white);
    border-color: var(--azzurro);
}
.btn--accent:hover {
    background: #2a9db8;
    border-color: #2a9db8;
    box-shadow: 0 4px 14px rgba(60,173,204,0.35);
}

.btn--green {
    background: var(--verde);
    color: var(--white);
    border-color: var(--verde);
}
.btn--green:hover {
    background: #3a8e3d;
    box-shadow: 0 4px 14px rgba(70,165,74,0.35);
}

.btn--outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.55);
}
.btn--outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

.btn--outline {
    background: transparent;
    color: var(--blu);
    border-color: var(--blu);
}
.btn--outline:hover {
    background: var(--blu-light);
}

.btn--sm { padding: 9px 18px; font-size: 0.875rem; }
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }

/* ── Badge / Pill ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.03em;
}
.badge--blu   { background: var(--blu-light);  color: var(--blu);     }
.badge--az    { background: var(--az-light);   color: #1a8aab;        }
.badge--green { background: var(--vd-light);   color: #2d7a30;        }
.badge--white { background: rgba(255,255,255,0.15); color: var(--white); }

/* ── Card generica ─────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--azzurro);
}

/* ── Form elementi base ────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-mid);
}
.form-group label .req { color: var(--azzurro); margin-left: 2px; }

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font: 400 15px/1.4 'Barlow', sans-serif;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
}
.form-control:focus {
    outline: none;
    border-color: var(--azzurro);
    box-shadow: 0 0 0 3px rgba(60,173,204,0.18);
}
.form-control::placeholder { color: var(--text-soft); }
textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a7a90' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* ── Griglie ───────────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Scroll reveal ─────────────────────────────────────────────────── */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }

/* ── Lavoro card (usata ovunque) ───────────────────────────────────── */
.lavoro-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
}
.lavoro-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--azzurro);
}
.lavoro-card__img {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--blu-light);
}
.lavoro-card__img a { display: block; height: 100%; }
.lavoro-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.lavoro-card:hover .lavoro-card__img img { transform: scale(1.04); }
.lavoro-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--white);
}
.lavoro-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.lavoro-card__client {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--azzurro);
}
.lavoro-card__title { font-size: 1.1rem; margin: 0; }
.lavoro-card__title a { color: var(--text); }
.lavoro-card__title a:hover { color: var(--azzurro); }
.lavoro-card__excerpt { font-size: 0.9rem; color: var(--text-soft); line-height: 1.5; }
.lavoro-card__meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-soft);
}
.lavoro-card__meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Hero page generico ────────────────────────────────────────────── */
.page-hero {
    background: var(--blu);
    color: var(--white);
    padding: 64px 0 56px;
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--azzurro), var(--verde), var(--azzurro));
}
.page-hero__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--azzurro);
    margin-bottom: 12px;
}
.page-hero h1 { color: var(--white); margin-bottom: 14px; }
.page-hero__subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.72);
    max-width: 600px;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .section { padding-block: 64px; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .section { padding-block: 48px; }
    .section__header { flex-direction: column; align-items: flex-start; }
}

/* Contact Form 7 — ICORI Style */
.wpcf7-form p {
    margin-bottom: 16px;
}

.wpcf7-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #2e5068;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-family: 'Barlow', sans-serif;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(7,70,113,0.20);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Barlow', sans-serif;
    color: #0e2233;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: #3CADCC;
    box-shadow: 0 0 0 3px rgba(60,173,204,0.15);
}

.wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

.wpcf7-form input[type="submit"] {
    width: 100%;
    padding: 13px 28px;
    background: #074671;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Barlow', sans-serif;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin-top: 8px;
}

.wpcf7-form input[type="submit"]:hover {
    background: #3CADCC;
    transform: translateY(-1px);
}

.wpcf7-form .wpcf7-acceptance {
    font-size: 13px;
    color: #5a7a90;
}

.wpcf7-form .wpcf7-acceptance a {
    color: #3CADCC;
}

.wpcf7-form .wpcf7-checkbox label,
.wpcf7-form .wpcf7-radio label {
    font-size: 13px;
    color: #0e2233;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    display: inline;
    margin-left: 6px;
}

.wpcf7-form .wpcf7-not-valid-tip {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
}

/* ── Widget captcha esterni (Cloudflare Turnstile, reCAPTCHA) ─────── */
/* Il widget lo inserisce il plugin: qui gli diamo solo respiro e lo teniamo
   dentro i margini del form anche sugli schermi stretti. */
.wpcf7-form .cf-turnstile,
.wpcf7-form .wpcf7-recaptcha,
.wpcf7-form .h-captcha {
    margin: 18px 0 4px;
    max-width: 100%;
    overflow: hidden;
}

.wpcf7-form .cf-turnstile iframe,
.wpcf7-form .h-captcha iframe {
    max-width: 100%;
}

@media (max-width: 360px) {
    .wpcf7-form .cf-turnstile,
    .wpcf7-form .h-captcha {
        transform: scale(0.92);
        transform-origin: left top;
    }
}

/* ── Campo esca anti-spam ──────────────────────────────────────────── */
/* Invisibile all'utente, presente nel DOM solo per i bot. */
.icori-antibot__trap {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    white-space: nowrap;
}

.wpcf7-form .wpcf7-response-output {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    border: none !important;
}

.wpcf7-form.sent .wpcf7-response-output {
    background: #edf7ed;
    color: #46A54A;
}

.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.invalid .wpcf7-response-output {
    background: #fff5f5;
    color: #e53e3e;
}

/* ── Modal Lavoro ──────────────────────────────────────────────────── */
.lv-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.lv-modal[hidden] { display: none; }
.lv-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(7,30,50,0.72);
    backdrop-filter: blur(4px);
}
.lv-modal__box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 14px;
    max-width: 960px;
    width: 100%;
    max-height: 88vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(7,30,50,0.35);
    animation: lvModalIn 0.25s ease;
}
@keyframes lvModalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.lv-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #074671;
    transition: background 0.15s;
    z-index: 10;
}
.lv-modal__close:hover { background: #fff; }
.lv-modal__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px 0 0 14px;
    display: block;
}
.lv-modal__img[src=""] { display: none; }
.lv-modal__body {
    padding: 40px 32px 36px;
    overflow-y: auto;
    max-height: 88vh;
}
.lv-modal__badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
}
.lv-modal__badge:empty { display: none; }
.lv-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #074671;
    margin-bottom: 12px;
    line-height: 1.2;
}
.lv-modal__meta {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: #5a7a90;
}
.lv-modal__meta span { display: flex; align-items: center; gap: 5px; }
.lv-modal__meta:empty { display: none; }
.lv-modal__text {
    font-size: 1rem;
    line-height: 1.75;
    color: #2d3f50;
    white-space: pre-line;
}
.lv-modal__text:empty { display: none; }
body.lv-modal-open { overflow: hidden; }

/* badge-incorso — card e modal */
.badge-incorso,
.lv-modal__incorso {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f8ea;
    color: #2d7a30;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px 3px 6px;
    border-radius: 99px;
    border: 1px solid #b6e8bb;
    white-space: nowrap;
}
.badge-incorso__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2d7a30;
    flex-shrink: 0;
    animation: incorso-pulse 1.8s ease-in-out infinite;
}
@keyframes incorso-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.45; transform: scale(0.75); }
}
.lv-modal__badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.lv-modal__badges .lv-modal__badge { margin-bottom: 0; }
.lv-modal__incorso[hidden] { display: none; }
@media (max-width: 767px) {
    .lv-modal__box {
        grid-template-columns: 1fr;
        max-height: 92vh;
        overflow-y: auto;
        border-radius: 12px;
    }
    .lv-modal__img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        border-radius: 12px 12px 0 0;
    }
    .lv-modal__body {
        padding: 18px 18px 24px;
        overflow-y: visible;
        max-height: none;
    }
    .lv-modal__title { font-size: 1.2rem; }
    .lv-modal__close { background: rgba(7,70,113,0.08); }
}
