/* ============================================
   Yaoki Academy — Progetti Carousel
   Stile minimal, monocromatico, font eredità tema
   ============================================ */

/* Wrapper generale */
.yaoki-progetti-wrapper {
    position: relative;
    width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
}

/* Track carousel */
.yaoki-progetti-carousel {
    overflow: hidden;
    width: 100%;
}

.yaoki-progetti-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.yaoki-progetti-track::-webkit-scrollbar {
    display: none;
}

/* Card */
.yaoki-card {
    flex: 0 0 calc(33.333% - 16px);
    scroll-snap-align: start;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* Immagine / Placeholder SVG */
.yaoki-card-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yaoki-card-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.yaoki-card-placeholder {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yaoki-card-placeholder svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: #333;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Body */
.yaoki-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.yaoki-card-title {
    margin: 0 0 8px;
    font-size: 1em;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.01em;
}

/* Meta: Tipo · Anno */
.yaoki-card-meta {
    margin: 0;
    font-size: 0.78em;
    color: #888;
    line-height: 1.3;
}

/* Stato — interlina ridotta rispetto al meta */
.yaoki-card-stato {
    margin: 2px 0 12px;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #bbb;
}

/* Descrizione */
.yaoki-card-desc {
    margin: 0 0 14px;
    font-size: 0.88em;
    line-height: 1.6;
    color: #555;
    flex: 1;
}

/* Stack */
.yaoki-card-stack {
    margin: 0 0 16px;
    font-size: 0.74em;
    color: #999;
    letter-spacing: 0.02em;
}

.yaoki-card-stack span + span::before {
    content: ' · ';
}

/* Link bottoni */
.yaoki-card-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.yaoki-card-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74em;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    border: 1px solid #333;
    padding: 4px 10px;
    border-radius: 2px;
    letter-spacing: 0.03em;
    transition: background 0.15s, color 0.15s;
}

.yaoki-card-links a:hover {
    background: #111;
    color: #fff;
}

.yaoki-card-links a svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

/* Frecce navigazione */
.yaoki-prev,
.yaoki-next {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    background: #fff;
    border: 1px solid #333;
    border-radius: 2px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.15s, color 0.15s;
}

.yaoki-prev { left: 0; }
.yaoki-next { right: 0; }

.yaoki-prev:hover,
.yaoki-next:hover {
    background: #111;
}

.yaoki-prev:hover svg,
.yaoki-next:hover svg {
    stroke: #fff;
}

.yaoki-prev svg,
.yaoki-next svg {
    width: 16px;
    height: 16px;
    stroke: #333;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Dots navigazione */
.yaoki-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.yaoki-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s;
}

.yaoki-dot.active {
    background: #111;
}

/* Colonna in evidenza backend */
.column-in_evidenza {
    width: 80px;
    text-align: center;
}

/* ============================================
   Archivio Progetti [yaoki_progetti_archivio]
   Stile coerente con /regole-seo/
   ============================================ */

.ypa-wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* ── Ricerca ───────────────────────────────── */
.ypa-search-wrap {
    position: relative;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    background: #fff;
}

.ypa-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
}

.ypa-input {
    width: 100%;
    border: none;
    padding: 12px 40px 12px 44px;
    font-size: 0.95em;
    color: #111;
    background: transparent;
    outline: none;
    box-sizing: border-box;
}

.ypa-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 0.85em;
    padding: 4px;
}

.ypa-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    max-height: 320px;
    overflow-y: auto;
}

.ypa-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    text-decoration: none;
    color: #111;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.88em;
    transition: background .12s;
}
.ypa-item:hover { background: #f9f9f9; }
.ypa-item:last-child { border-bottom: none; }

.ypa-item-tipo {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    min-width: 56px;
}
.ypa-item-title { flex: 1; }
.ypa-item-title mark { background: #fff3cd; border-radius: 2px; padding: 0 2px; font-style: normal; }
.ypa-item-anno { font-size: 0.8em; color: #aaa; }
.ypa-item-arrow { color: #bbb; }

.ypa-view-all {
    display: block;
    padding: 10px 16px;
    font-size: 0.82em;
    font-weight: 700;
    color: #555;
    text-decoration: none;
    text-align: center;
    background: #f9f9f9;
}
.ypa-view-all:hover { color: #111; }

.ypa-status {
    padding: 12px 16px;
    font-size: 0.88em;
    color: #888;
}

/* ── Pills ─────────────────────────────────── */
.ypa-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ypa-pill {
    display: inline-block;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #888;
    border: 1px solid #ddd;
    padding: 4px 12px;
    border-radius: 2px;
    text-decoration: none;
    transition: border-color .15s, color .15s;
}
.ypa-pill:hover { color: var(--ypa-c, #111); border-color: var(--ypa-c, #999); }
.ypa-pill--active { color: #111; border-color: #111; }

/* ── Toolbar ────────────────────────────────── */
.ypa-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ypa-risultati {
    font-size: 0.82em;
    color: #888;
}
.ypa-risultati strong { color: #333; }

.ypa-toggle {
    display: flex;
    gap: 4px;
}
.ypa-toggle-btn {
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    background: none;
    border: 1px solid #ddd;
    border-radius: 2px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.ypa-toggle-btn svg {
    width: 14px; height: 14px;
    stroke: #aaa; stroke-width: 2;
    fill: none;
    stroke-linecap: round; stroke-linejoin: round;
}
.ypa-toggle-btn.active { background: #111; border-color: #111; }
.ypa-toggle-btn.active svg { stroke: #fff; }

/* ── Griglia ────────────────────────────────── */
.ypa-griglia {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.ypa-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.ypa-card:hover {
    border-color: #bbb;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.ypa-card-visual {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border-bottom: 1px solid;
    overflow: hidden;
}
.ypa-card-visual img {
    width: 100%; height: 100%; object-fit: cover;
}
.ypa-card-visual svg {
    width: 40px; height: 40px;
}

.ypa-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.ypa-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ypa-card-tipo {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 1px solid;
    padding: 1px 7px;
    border-radius: 2px;
}

.ypa-card-anno {
    font-size: 0.72em;
    color: #bbb;
    margin-left: auto;
}

.ypa-card-title {
    margin: 0;
    font-size: 0.95em;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}

.ypa-card-excerpt {
    margin: 0;
    font-size: 0.82em;
    line-height: 1.6;
    color: #666;
    flex: 1;
}

.ypa-card-stack {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.ypa-card-stack span {
    font-size: 0.7em;
    color: #999;
    border: 1px solid #eee;
    padding: 1px 6px;
    border-radius: 2px;
}

.ypa-card-cta {
    font-size: 0.78em;
    font-weight: 700;
    color: #333;
    margin-top: 4px;
}

/* ── Stato badge ────────────────────────────── */
.ypa-card-stato, .ypa-lista-stato, .ypa-single-stato {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 1px 8px;
    border-radius: 2px;
    display: inline-block;
    width: fit-content;
}
.ypa-stato-attivo   { color: #2ecc71; border: 1px solid #2ecc71; }
.ypa-stato-wip      { color: #f39c12; border: 1px solid #f39c12; }
.ypa-stato-archivio { color: #95a5a6; border: 1px solid #95a5a6; }

/* ── Lista ──────────────────────────────────── */
.ypa-lista {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.ypa-lista-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    text-decoration: none;
    color: #111;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.88em;
    transition: background .12s;
}
.ypa-lista-row:last-child { border-bottom: none; }
.ypa-lista-row:hover { background: #fafafa; }

.ypa-lista-visual {
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.ypa-lista-visual svg {
    width: 18px; height: 18px;
    stroke: currentColor; stroke-width: 1.5;
    fill: none; stroke-linecap: round; stroke-linejoin: round;
}

.ypa-lista-tipo {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 1px solid;
    padding: 1px 7px;
    border-radius: 2px;
    flex-shrink: 0;
}

.ypa-lista-titolo {
    flex: 1;
    font-weight: 600;
}

.ypa-lista-anno {
    font-size: 0.8em;
    color: #aaa;
    flex-shrink: 0;
}

.ypa-lista-arrow { color: #ccc; flex-shrink: 0; }

/* ── Paginazione ────────────────────────────── */
.ypa-paginazione {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.ypa-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px; height: 32px;
    padding: 0 8px;
    font-size: 0.82em;
    font-weight: 700;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 2px;
    text-decoration: none;
    transition: background .15s, color .15s, border-color .15s;
}
.ypa-page-btn:hover { background: #111; color: #fff; border-color: #111; }
.ypa-page-btn.active { background: #111; color: #fff; border-color: #111; pointer-events: none; }

.ypa-page-ellipsis {
    font-size: 0.82em;
    color: #aaa;
    padding: 0 4px;
}

.ypa-nessuno {
    font-size: 0.9em;
    color: #999;
    padding: 20px 0;
}

/* ── Singola pagina progetto ────────────────── */
.ypa-single-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ypa-single-tipo {
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 1px solid;
    padding: 3px 10px;
    border-radius: 2px;
}

.ypa-single-anno {
    font-size: 0.78em;
    color: #aaa;
}

.ypa-single-stack {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.ypa-single-stack span {
    font-size: 0.72em;
    color: #888;
    border: 1px solid #ddd;
    padding: 2px 8px;
    border-radius: 2px;
}

.ypa-single-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.ypa-single-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82em;
    font-weight: 700;
    color: #333;
    border: 1px solid #333;
    padding: 6px 14px;
    border-radius: 2px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.ypa-single-link:hover { background: #111; color: #fff; }
.ypa-single-link svg {
    width: 14px; height: 14px;
    stroke: currentColor; stroke-width: 1.5;
    fill: none; stroke-linecap: round; stroke-linejoin: round;
}

/* ── Mobile ─────────────────────────────────── */
@media (max-width: 768px) {
    .ypa-griglia {
        grid-template-columns: 1fr;
    }
    .ypa-lista-tipo,
    .ypa-lista-anno,
    .ypa-lista-stato {
        display: none;
    }
    .ypa-single-meta {
        gap: 8px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .yaoki-card {
        flex: 0 0 85%;
    }
    .yaoki-progetti-wrapper {
        padding: 0 36px;
    }
}