/* ══════════════════════════════════════════════════════
   Pages Carousel Widget v2.3  –  CSS
   ══════════════════════════════════════════════════════ */

/* ── Wrapper & Track ── */
.pcw-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.pcw-track-outer { flex: 1; overflow: hidden; }
.pcw-track {
    display: flex;
    transition: transform 0.42s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}
.pcw-card-wrap {
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 0 6px;
}

/* ── Frecce ── */
.pcw-arrow {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.9);
    border: none;
    color: #333;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    transition: background .2s, transform .2s;
    flex-shrink: 0;
}
.pcw-arrow:hover   { background: #fff; transform: scale(1.08); }
.pcw-arrow:disabled { opacity: .3; cursor: default; transform: none; }
.pcw-prev { margin-right: 8px; }
.pcw-next { margin-left:  8px; }

/* ── Dots ── */
.pcw-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;   /* stacca le card */
    position: relative; /* evita sovrapposizioni da contesti flex/grid del tema */
    z-index: 1;
    clear: both;
}
.pcw-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    padding: 0;
    transition: background .25s, transform .25s;
}
.pcw-dot:hover,
.pcw-dot.active { background: #20a8a8; transform: scale(1.3); }

/* ══════════════════════════════════════════════════════
   LAYOUT 1 – OVERLAY
   ══════════════════════════════════════════════════════ */
.pcw-card-full {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    cursor: pointer;
}
.pcw-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(32,168,168,.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .35s ease;
}
.pcw-card-full:hover .pcw-overlay { opacity: 1; }

.pcw-overlay-inner {
    display: flex;
    flex-direction: column;
    align-items: center;   /* testo centrato di default nell'overlay */
    text-align: center;
    padding: 16px;
    color: #fff;
    width: 100%;
}

.pcw-icons { display: flex; justify-content: center; gap: 10px; margin-bottom: 10px; }
.pcw-icon-link {
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border: 2px solid rgba(255,255,255,.7);
    border-radius: 50%;
    transition: background .2s;
}
.pcw-icon-link:hover { background: rgba(255,255,255,.2); }

.pcw-overlay-title,
.pcw-overlay-title a {
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: #fff; text-decoration: none;
    margin: 0 0 8px; line-height: 1.3;
    display: block;
}
.pcw-overlay-title a:hover { text-decoration: underline; }
.pcw-overlay-excerpt { font-size: 12px; line-height: 1.5; color: #fff; margin: 0; }

/* ══════════════════════════════════════════════════════
   LAYOUT 2 – CARD VERTICALE (zoom immagine)
   ══════════════════════════════════════════════════════ */
.pcw-card-vertical {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.pcw-img-box {
    height: 220px;
    background-size: cover;
    background-position: center;
    transition: transform .45s ease;
}
.pcw-card-vertical:hover .pcw-img-box { transform: scale(1.07); }

.pcw-card-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    /* NON impostiamo align-items qui: il pulsante ha align-self inline */
}
.pcw-card-title {
    font-size: 15px; font-weight: 700;
    margin: 0; line-height: 1.3;
}
.pcw-card-title a { color: #222; text-decoration: none; }
.pcw-card-title a:hover { color: #20a8a8; }
.pcw-card-excerpt { font-size: 13px; color: #555; line-height: 1.5; margin: 0; flex: 1; }

/* ── Pulsante (card e pannelli): align-self viene iniettato inline dal PHP ── */
.pcw-btn {
    display: inline-block;
    background: #20a8a8;
    color: #fff;
    text-decoration: none;
    padding: 7px 18px;
    font-size: 13px; font-weight: 600;
    border-radius: 3px;
    transition: opacity .2s, transform .2s;
    /* width: fit-content garantisce che align-self funzioni correttamente */
    width: fit-content;
}
.pcw-btn:hover { opacity: .85; transform: translateY(-1px); }

/* ══════════════════════════════════════════════════════
   LAYOUT 3 – SLIDE-UP dal basso
   ══════════════════════════════════════════════════════ */
.pcw-slideup-title-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    padding: 10px 14px;
    transition: opacity .3s;
    z-index: 2;
}
.pcw-card-full:hover .pcw-slideup-title-bar { opacity: 0; }

.pcw-slideup-panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(32,168,168,.9);
    padding: 18px 16px 16px;
    transform: translateY(100%);
    transition: transform .38s cubic-bezier(.4,0,.2,1);
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pcw-card-full:hover .pcw-slideup-panel { transform: translateY(0); }

/* ══════════════════════════════════════════════════════
   LAYOUT 4 – CURTAIN laterale
   ══════════════════════════════════════════════════════ */
.pcw-curtain-panel {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 100%;
    background: rgba(32,168,168,.88);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    clip-path: inset(0 100% 0 0);
    transition: clip-path .4s cubic-bezier(.4,0,.2,1);
    z-index: 3;
}
.pcw-card-full:hover .pcw-curtain-panel { clip-path: inset(0 0% 0 0); }

/* ── Elementi comuni a pannelli slide-up e curtain ── */
.pcw-panel-title {
    font-size: 14px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: #fff; line-height: 1.3;
    margin: 0;
}
.pcw-panel-excerpt {
    font-size: 12px; color: #fff; line-height: 1.5;
    margin: 0; flex: 1;
}
.pcw-panel-btn {
    display: inline-block;
    background: rgba(255,255,255,.15);
    border: 2px solid #fff;
    color: #fff;
    text-decoration: none;
    padding: 6px 16px;
    font-size: 12px; font-weight: 700;
    border-radius: 3px;
    transition: background .2s;
    /* align-self iniettato inline dal PHP */
    width: fit-content;
}
.pcw-panel-btn:hover { background: rgba(255,255,255,.3); }

/* ── Responsive ── */
@media (max-width: 1024px) { .pcw-arrow { width: 32px; height: 32px; font-size: 15px; } }
@media (max-width: 768px)  { .pcw-card-body { padding: 10px 12px 14px; } }
