/*
Theme Name: Executive Profile
Description: Tema WordPress per profili imprenditoriali di alto livello — hero video/immagine, ticker borse e materie prime, timeline carriera, articoli via WordPress nativo (nessun limite), sidebar social, menu animato. Tutti i contenuti modificabili da Personalizza (Customizer), nessuna modifica al codice richiesta per l'uso quotidiano.
Author: Sergio Vaccaro
Version: 1.1
Text Domain: exec-profile
*/

:root {
    --bg-deep: #030610;
    --bg-mid: #05080f;
    --bg-panel: #0d1b2a;
    --bg-panel-2: #13233a;
    --gold: #c9a84c;
    --gold-soft: rgba(201,168,76,0.7);
    --cyan: #00d4ff;
    --green: #4ade80;
    --red: #f87171;
    --amber: #fbbf24;
    --text: #f8f9fa;
    --text-muted: rgba(248,249,250,0.6);
    --text-faint: rgba(248,249,250,0.35);
    --border: rgba(255,255,255,0.08);
    --border-gold: rgba(201,168,76,0.25);

    /* Dimensioni testo — modificabili qui per applicare a tutto il sito */
    --fs-hero: clamp(2.4rem, 6vw, 4.2rem);
    --fs-h2: clamp(1.8rem, 4vw, 2.6rem);
    --fs-h3: 1.25rem;
    --fs-body: 1rem;

    /* Spaziatura sezioni — modificabile qui */
    --section-padding: 100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg-deep);
    color: var(--text);
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    margin: 0;
    line-height: 1.65;
    font-size: var(--fs-body);
}

h1, h2, h3, h4 { font-family: 'Inter', sans-serif; font-weight: 700; margin: 0; color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
    font-weight: 600;
}

/* ============ TICKER BAR (borse + materie prime) ============ */
.ticker-bar {
    background: var(--bg-mid);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    white-space: nowrap;
    padding: 9px 0;
    position: relative;
}
.ticker-track {
    display: inline-flex;
    animation: ticker-scroll var(--ticker-speed, 40s) linear infinite;
}
.ticker-bar:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 26px;
    font-size: 0.82rem;
    border-right: 1px solid var(--border);
}
.ticker-item .flag { font-size: 0.95rem; }
.ticker-item .name { color: var(--text-muted); }
.ticker-item .value { font-weight: 600; }
.ticker-item .change.up { color: var(--green); }
.ticker-item .change.down { color: var(--red); }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ============ SEZIONE MEDIA INTRODUTTIVA — a piena pagina, stile ambientale ============ */
.media-intro {
    position: relative; width: 100%; height: 85vh; min-height: 520px;
    overflow: hidden; background: var(--bg-deep);
}
.media-intro-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; border: 0;
}
.media-intro-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(3,6,16,0.15) 0%, rgba(3,6,16,0.55) 75%, var(--bg-deep) 100%);
}
.media-intro-carousel { position: absolute; }
.media-intro-carousel .carousel-slide {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 1.4s ease;
}
.media-intro-carousel .carousel-slide.active { opacity: 1; }
.media-intro-caption {
    position: absolute; left: 28px; bottom: 24px; z-index: 2;
    color: var(--text-muted); font-size: 0.85rem; margin: 0;
    background: rgba(6,10,20,0.55); padding: 8px 16px; border-radius: 4px;
    backdrop-filter: blur(6px);
}
.media-intro-mute {
    position: absolute; right: 24px; bottom: 24px; z-index: 2;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-gold);
    background: rgba(6,10,20,0.6); color: var(--text); font-size: 1.1rem; cursor: pointer;
    backdrop-filter: blur(6px); transition: border-color 0.2s ease;
}
.media-intro-mute:hover { border-color: var(--gold); }
@media (max-width: 600px) { .media-intro { height: 60vh; min-height: 380px; } }
.site-header {
    position: sticky; top: 0; z-index: 200;
    background: transparent;
}
.home .site-header {
    /* Sulla home il menù galleggia trasparente sopra l'hero, senza barra/bordo */
    margin-bottom: -80px;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0;
}
.site-title { font-size: 1.15rem; letter-spacing: 0.06em; text-transform: uppercase; }
.site-title span { color: var(--gold); }
.site-title-link { display: flex; align-items: center; gap: 12px; }
.site-logo-img { height: 36px; width: auto; max-width: 44px; object-fit: contain; }

.main-nav ul {
    list-style: none; display: flex; gap: 6px; margin: 0; padding: 0;
}
.main-nav li { position: relative; }
.main-nav a {
    display: block;
    padding: 10px 16px;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    transition: color 0.25s ease;
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 16px; right: 16px; bottom: 6px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { transform: scaleX(1); }

.lang-switch { display: flex; gap: 10px; font-size: 0.75rem; color: var(--text-faint); }
.lang-switch a:hover { color: var(--gold); }
.lang-switch a.lang-active { color: var(--gold); font-weight: 700; border-bottom: 1px solid var(--gold); }

/* ============ SEZIONE TICKER (prima di Pensiero Strategico) ============ */
.ticker-section { padding-top: 60px; padding-bottom: 60px; }
.ticker-block { margin-bottom: 26px; }
.ticker-block:last-of-type { margin-bottom: 0; }
.ticker-block-title { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px; letter-spacing: 0.04em; }
.ticker-section .ticker-bar { border: 1px solid var(--border); border-radius: 6px; background: var(--bg-mid); }

.mobile-menu-toggle {
    display: none; background: none; border: 1px solid var(--border-gold);
    color: var(--gold); font-size: 1.2rem; padding: 6px 12px; border-radius: 4px; cursor: pointer;
}
@media (max-width: 960px) {
    .mobile-menu-toggle { display: block; }
    #exec-main-nav.mobile-open {
        display: flex; flex-direction: column; position: absolute;
        top: 100%; left: 0; right: 0; background: var(--bg-mid);
        border-bottom: 1px solid var(--border); padding: 8px 0;
    }
    /* .main-nav ul ha già un suo display:flex (riga, per il menu desktop):
       senza questa riga le voci restavano in fila orizzontale e sconfinavano
       fuori dallo schermo invece di impilarsi in verticale. */
    #exec-main-nav.mobile-open ul { flex-direction: column; }
    #exec-main-nav.mobile-open a { padding: 14px 24px; } /* target tattile più ampio */
}

.screen-reader-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link.screen-reader-text:focus {
    position: fixed; width: auto; height: auto; clip: auto; left: 0; top: 0;
}

/* ============ HERO — video/immagine di sfondo configurabile ============ */
.hero { position: relative; padding: 160px 0 90px; overflow: hidden; text-align: center; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media video, .hero-media iframe, .hero-media img {
    width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0;
}
.hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(3,6,16,0.55) 0%, rgba(3,6,16,0.85) 70%, var(--bg-deep) 100%);
}
.hero-content { position: relative; z-index: 2; }
.hero h1 { font-size: var(--fs-hero); max-width: 900px; margin: 18px auto 24px; }
.hero h1 .accent { color: var(--gold); }
.hero p.subtitle { max-width: 620px; margin: 0 auto 36px; color: var(--text-muted); font-size: 1.08rem; }

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.btn-gold {
    padding: 15px 34px; background: linear-gradient(135deg, var(--gold), #e8c876);
    color: var(--bg-deep); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.05em;
    text-transform: uppercase; border-radius: 3px;
    box-shadow: 0 12px 30px rgba(201,168,76,0.25);
    transition: transform 0.2s ease;
}
.btn-gold:hover { transform: translateY(-2px); color: var(--bg-deep); }
.btn-outline {
    padding: 15px 34px; border: 1px solid var(--border-gold); color: var(--text);
    font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; border-radius: 3px;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.stats-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    max-width: 900px; margin: 0 auto;
}
.stat-item { border-left: 1px solid var(--border-gold); padding-left: 18px; text-align: left; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--gold); }
.stat-label { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

/* ============ DI COSA MI OCCUPO — layout a due colonne con media ============ */
.about-grid { display: block; }
.about-grid.has-media {
    display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center;
}
.about-media { border-radius: 8px; overflow: hidden; border: 1px solid var(--border-gold); }
.about-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-media video { width: 100%; display: block; background: #000; }
.about-media-embed { position: relative; width: 100%; padding-top: 125%; } /* verticale, come la foto di riferimento */
.about-media-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 960px) {
    .about-grid.has-media { grid-template-columns: 1fr; gap: 32px; }
    .about-media-embed { padding-top: 56.25%; }
}
.section { padding: var(--section-padding) 0; border-top: 1px solid var(--border); }
.section h2 { font-size: var(--fs-h2); max-width: 680px; margin-bottom: 30px; }
.accent-italic { color: var(--gold); font-style: italic; font-weight: 400; }
.about-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 24px; }
.section-lead { color: var(--text-muted); max-width: 760px; font-size: 1.02rem; margin-bottom: 20px; }

/* ============ SERVIZI ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.service-card {
    background: linear-gradient(160deg, var(--bg-panel-2), var(--bg-panel));
    border: 1px solid var(--border); border-radius: 8px; padding: 32px 26px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}
.service-card:hover { transform: translateY(-6px); border-color: var(--border-gold); }
.service-icon { font-size: 1.4rem; color: var(--gold); margin-bottom: 16px; }
.service-card h3 { font-size: var(--fs-h3); margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* ============ TIMELINE CARRIERA ============ */
.timeline { position: relative; margin-top: 40px; padding-left: 36px; border-left: 2px solid var(--border-gold); }
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: ""; position: absolute; left: -43px; top: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--gold); box-shadow: 0 0 0 4px rgba(201,168,76,0.15);
}
.timeline-year { color: var(--gold); font-weight: 700; font-size: 0.95rem; }
.timeline-item h3 { font-size: 1.1rem; margin: 6px 0 4px; }
.timeline-role { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 8px; font-style: italic; }
.timeline-item p.desc { color: var(--text-muted); font-size: 0.95rem; max-width: 640px; }

/* ============ CITAZIONE ============ */
.quote-block { text-align: center; padding: 70px 0; }
.quote-block blockquote { font-size: 1.5rem; max-width: 780px; margin: 0 auto 18px; font-style: italic; color: var(--text); }
.quote-block cite { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ============ BANDI / OPPORTUNITÀ (repeatable via customizer) ============ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 36px; }
.opp-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; padding: 22px 24px; }
.opp-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.opp-tag { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.opp-badge-new { background: rgba(251,191,36,0.15); color: var(--amber); font-size: 0.65rem; padding: 2px 8px; border-radius: 20px; margin-left: 8px; }
.opp-amount { color: var(--gold); font-weight: 700; }
.opp-card h3 { font-size: 1rem; margin-bottom: 6px; }
.opp-source { color: var(--text-faint); font-size: 0.82rem; }
.opp-deadline { color: var(--text-muted); font-size: 0.8rem; margin-top: 10px; }
.opp-link { color: var(--gold); font-size: 0.82rem; margin-top: 10px; display: inline-block; }

/* ============ ARTICOLI (WordPress nativo, nessun limite) ============ */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 40px; }
.article-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-panel); transition: transform 0.25s ease; }
.article-card:hover { transform: translateY(-4px); }
.article-card img { height: 190px; object-fit: cover; width: 100%; }
.article-body { padding: 22px; }
.article-meta { font-size: 0.72rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.article-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.article-card p { color: var(--text-muted); font-size: 0.9rem; }
.article-link { color: var(--gold); font-size: 0.85rem; margin-top: 12px; display: inline-block; }
.pagination { margin-top: 50px; display: flex; gap: 10px; justify-content: center; }
.pagination a, .pagination span { padding: 8px 16px; border: 1px solid var(--border); border-radius: 4px; font-size: 0.85rem; }
.pagination .current { border-color: var(--gold); color: var(--gold); }

/* ============ CONDIVISIONE ARTICOLO (fondo pagina singolo articolo) ======= */
.share-buttons { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.share-buttons-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; letter-spacing: 0.02em; }
.share-buttons-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg-panel); border: 1px solid var(--border);
    color: var(--text); padding: 9px 16px; border-radius: 999px;
    font-size: 0.8rem; font-family: inherit; cursor: pointer; text-decoration: none;
    letter-spacing: 0.02em; transition: border-color .2s ease, background .2s ease;
}
.share-btn-icon { display: inline-flex; width: 16px; height: 16px; }
.share-btn-icon svg { width: 100%; height: 100%; }
.share-btn:hover { border-color: var(--border-gold); background: var(--bg-panel-2); }
.share-feedback { display: block; margin-top: 10px; font-size: 0.8rem; color: var(--gold); opacity: 0; transition: opacity .25s ease; }
.share-feedback.is-visible { opacity: 1; }

/* ============ COLLABORAZIONI / AZIENDE ============ */
.logo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; margin-top: 40px; align-items: center; }
.logo-grid img { filter: grayscale(1) brightness(1.6); opacity: 0.6; transition: opacity 0.25s ease, filter 0.25s ease; }
.logo-grid img:hover { filter: none; opacity: 1; }

/* Carosello loghi partner — scorrimento automatico orizzontale */
.partners-section { overflow: hidden; }
.logo-scroller {
    overflow: hidden; position: relative; margin-top: 24px;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.logo-track {
    display: flex; gap: 4rem; align-items: center; width: max-content;
    animation: logo-scroll 28s linear infinite;
}
.partners-section:hover .logo-track { animation-play-state: paused; }
.logo-item { flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logo-item img {
    height: 100%; width: auto; max-width: 100%; object-fit: contain;
    filter: grayscale(1); opacity: 0.75; transition: opacity 0.3s ease, filter 0.3s ease;
}
.logo-item:hover img { filter: none; opacity: 1; }
@keyframes logo-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.companies-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.company-card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px; padding: 26px; text-align: center; }
.company-card img { max-height: 60px; margin: 0 auto 16px; }
.company-card h3 { font-size: 1rem; margin-bottom: 8px; }
.company-card p { color: var(--text-muted); font-size: 0.88rem; }

/* ============ SIDEBAR SOCIAL — trasparente, icone semplici (stile overlay su hero) ============ */
.social-sidebar {
    position: fixed; left: 26px; top: 50%; transform: translateY(-50%);
    z-index: 150; display: flex; flex-direction: column; align-items: center;
    gap: 20px;
    background: none; border: none; border-radius: 0; backdrop-filter: none;
}
.social-sidebar .follow-label {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 2px;
}
.social-sidebar .follow-line {
    width: 1px; height: 44px; background: var(--border-gold); margin-bottom: 4px;
}
.social-sidebar a {
    width: auto; height: auto;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none;
    position: relative;
}
.social-sidebar a svg {
    width: 18px; height: 18px; color: var(--text);
    transition: color 0.25s ease, transform 0.25s ease, filter 0.25s ease;
}
.social-sidebar a:hover svg {
    color: var(--brand-color, var(--gold));
    filter: drop-shadow(0 0 8px var(--brand-glow, rgba(201,168,76,0.6)));
    transform: scale(1.15);
}
.social-sidebar .count {
    position: absolute; left: 30px; top: 50%; transform: translateY(-50%);
    font-size: 0.7rem; color: var(--text-faint); white-space: nowrap;
    opacity: 0; transition: opacity 0.25s ease; background: var(--bg-panel);
    padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border);
    pointer-events: none;
}
.social-sidebar a:hover .count { opacity: 1; }
@media (max-width: 1100px) { .social-sidebar a svg { width: 16px; height: 16px; } }

/* ============ TESTO ANIMATO — effetto macchina da scrivere (Hero e Sezione Media) ============ */
.hero-typed {
    font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--gold);
    max-width: 900px; margin: 0 auto 18px; min-height: 1.3em;
}
.exec-typed-cursor {
    display: inline-block; margin-left: 2px; color: inherit;
    animation: exec-typed-blink 0.9s steps(1) infinite;
}
@keyframes exec-typed-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* ============ TESTO CENTRALE — sezione media introduttiva (allineato a sinistra) ============ */
.media-intro-center {
    position: absolute; inset: 0; z-index: 2;
    display: flex; align-items: center; text-align: left; pointer-events: none;
}
.media-intro-center .container { width: 100%; }
.media-intro-center-text {
    font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; color: var(--text);
    max-width: 640px; min-height: 1.3em;
}

/* ============ BARRA INFO in basso sulla sezione media introduttiva ============ */
.media-intro-infobar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
    display: flex; flex-wrap: wrap;
    background: linear-gradient(0deg, rgba(3,6,16,0.8) 0%, rgba(3,6,16,0) 100%);
    padding: 22px 28px 18px;
}
.media-intro-infobar .infobar-item {
    flex: 1 1 160px; padding: 0 24px; border-left: 1px solid var(--border);
}
.media-intro-infobar .infobar-item:first-child { border-left: none; padding-left: 0; }
.media-intro-infobar .infobar-label {
    display: block; font-weight: 700; font-size: 0.85rem; color: var(--text); margin-bottom: 4px;
}
.media-intro-infobar .infobar-value { display: block; color: var(--text-muted); font-size: 0.85rem; }
@media (max-width: 700px) {
    .media-intro-infobar { flex-direction: column; gap: 10px; padding: 16px 20px; }
    .media-intro-infobar .infobar-item { border-left: none; padding: 0; }
}

/* ============ PUNTATORE PERSONALIZZATO — anello che segue il mouse con un leggero ritardo ============ */
.custom-cursor-dot, .custom-cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
    border-radius: 50%; transform: translate(-50%, -50%);
}
.custom-cursor-dot { width: 6px; height: 6px; background: var(--gold); }
.custom-cursor-ring { width: 36px; height: 36px; border: 1px solid var(--gold-soft); }

/* ============ CONTATTI ============ */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; margin-top: 40px; }
.contact-info-item { margin-bottom: 22px; }
.contact-info-item .label { color: var(--gold); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 4px; }
.contact-form input, .contact-form select, .contact-form textarea {
    width: 100%; background: var(--bg-panel); border: 1px solid var(--border);
    color: var(--text); padding: 13px 16px; margin-bottom: 16px; border-radius: 4px;
    font-family: inherit; font-size: 0.92rem;
}
.contact-form textarea { min-height: 120px; }
.contact-form button { width: 100%; }

/* ============ FOOTER ============ */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; text-align: center; color: var(--text-faint); font-size: 0.82rem; }
.site-footer a:hover { color: var(--gold); }

/* ============ ACCESSIBILITÀ ============ */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--gold); color: var(--bg-deep); padding: 12px 20px;
    font-weight: 700; border-radius: 0 0 4px 0;
}
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--gold); outline-offset: 2px;
}

/* ============ ASSISTENTE AI FLOTTANTE — anello + nucleo che respira ============ */
.ai-assistant { position: fixed; bottom: 26px; right: 26px; z-index: 300; }
.ai-toggle {
    width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
    padding: 0; position: relative; background: rgba(6,20,28,0.6);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
/* Anello esterno */
.ai-toggle::before {
    content: "";
    position: absolute; inset: 0; border-radius: 50%;
    border: 2.5px solid var(--cyan);
    box-shadow: 0 0 16px rgba(0,212,255,0.55), inset 0 0 10px rgba(0,212,255,0.25);
}
/* Nucleo centrale pieno che respira (scala + luminosità) */
.ai-toggle::after {
    content: "";
    position: absolute; top: 50%; left: 50%; width: 20px; height: 20px;
    margin: -10px 0 0 -10px; border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #5fdcff, var(--cyan) 65%, #0aa8d4 100%);
    box-shadow: 0 0 18px rgba(0,212,255,0.9);
    animation: ai-breathe-core 2.6s ease-in-out infinite;
}
.ai-toggle-icon { display: none; }

@keyframes ai-breathe-core {
    0%, 100% { transform: scale(0.82); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}
.ai-panel {
    display: none; position: absolute; bottom: 74px; right: 0;
    width: 320px; max-width: calc(100vw - 40px);
    background: var(--bg-panel); border: 1px solid var(--border-gold); border-radius: 12px;
    overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.ai-panel.open { display: block; }
.ai-header {
    display: flex; align-items: center; gap: 10px; padding: 16px 18px;
    background: linear-gradient(135deg, var(--bg-panel-2), var(--bg-panel));
    border-bottom: 1px solid var(--border);
}
.ai-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74,222,128,0.2); flex-shrink: 0; }
.ai-name { font-weight: 700; font-size: 0.92rem; }
.ai-status { font-size: 0.72rem; color: var(--green); }
.ai-close { margin-left: auto; background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.ai-close:hover { color: var(--gold); }
.ai-body { padding: 18px; max-height: 380px; overflow-y: auto; }
.ai-message { background: var(--bg-panel-2); border-radius: 8px; padding: 12px 14px; font-size: 0.88rem; color: var(--text); margin-bottom: 16px; }
.ai-quick-replies { display: flex; flex-direction: column; gap: 8px; }
.ai-quick-btn {
    text-align: left; background: transparent; border: 1px solid var(--border-gold);
    color: var(--gold); padding: 10px 14px; border-radius: 6px; font-size: 0.85rem; cursor: pointer;
    transition: background 0.2s ease;
}
.ai-quick-btn:hover { background: rgba(201,168,76,0.1); }
@media (max-width: 600px) {
    .ai-assistant { bottom: 16px; right: 16px; }
    .ai-toggle { width: 52px; height: 52px; }
}
@media (max-width: 1024px) {
    :root { --section-padding: 70px; }
    .grid-3, .companies-grid { grid-template-columns: repeat(2, 1fr); }
    .logo-grid { grid-template-columns: repeat(3, 1fr); }
    .social-sidebar a { width: 40px; height: 40px; }
    .social-sidebar a svg { width: 17px; height: 17px; }
    .contact-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero { padding: 130px 0 70px; }
}

/* ============ RESPONSIVE — TABLET PICCOLO / GRANDI SMARTPHONE (≤960px) ============ */
@media (max-width: 960px) {
    .grid-2, .articles-grid { grid-template-columns: 1fr; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .main-nav { display: none; } /* sostituito da menu mobile via JS */
    .main-nav.mobile-open { display: flex !important; }
}

/* ============ RESPONSIVE — MOBILE (≤600px) ============ */
@media (max-width: 600px) {
    :root { --section-padding: 54px; --fs-hero: clamp(1.9rem, 9vw, 2.6rem); }
    .container { padding: 0 18px; }

    .header-inner { padding: 14px 0; }
    .site-title { font-size: 1rem; }
    .mobile-menu-toggle { padding: 8px 14px; font-size: 1.3rem; min-width: 44px; min-height: 44px; }

    .ticker-bar { padding: 7px 0; }
    .ticker-item { padding: 0 16px; font-size: 0.72rem; }

    .hero { padding: 110px 0 50px; text-align: left; }
    .hero h1 { margin: 14px 0 18px; }
    .hero p.subtitle { margin: 0 0 28px; }
    .hero-cta { justify-content: flex-start; }
    .btn-gold, .btn-outline { padding: 15px 26px; width: 100%; text-align: center; }
    .stats-bar { grid-template-columns: repeat(2, 1fr); max-width: none; }
    .stat-number { font-size: 1.5rem; }

    .grid-3, .grid-2, .articles-grid, .companies-grid { grid-template-columns: 1fr; }
    .logo-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

    .section h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
    .timeline { padding-left: 26px; }
    .timeline-item::before { left: -33px; width: 12px; height: 12px; }

    .quote-block blockquote { font-size: 1.15rem; }

    .social-sidebar {
        position: static; transform: none; flex-direction: row;
        justify-content: center; flex-wrap: wrap; padding: 16px 0; gap: 18px;
    }
    .social-sidebar .follow-label, .social-sidebar .follow-line { display: none; }
    .social-sidebar .count { display: none; } /* su mobile il tooltip non serve, niente hover */

    .contact-form input, .contact-form select, .contact-form textarea { font-size: 16px; } /* evita zoom automatico iOS */
}
