/* CSS LEGACY COMPATIBILITY FOR DARK MODE
   Restores wis-* classes but with colors suitable for the new dark theme.
*/

:root {
    /* Override legacy variables with new theme colors */
    --wis-bg: #141e28;
    --wis-border: rgba(0, 240, 255, 0.2);
    --wis-text: #e2e8f0;
    --wis-heading: #ffffff;
    --wis-accent: #00F0FF;
    --wis-muted: #94a3b8;
}

/* WIS SECTION / CONTAINER */
.wis-section {
    padding: 60px 0;
    background: transparent;
    /* Let body bg show through */
}

.wis-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.wis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 768px) {
    .wis-grid {
        grid-template-columns: 1fr;
    }
}

/* WIS CARD */
.wis-card {
    background: var(--wis-bg);
    border: 1px solid var(--wis-border);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.wis-card h2 {
    color: var(--wis-heading);
    font-size: 1.8rem;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--wis-border);
    padding-bottom: 12px;
}

.wis-card p,
.wis-card ul li {
    color: var(--wis-text);
    font-size: 1.05rem;
    line-height: 1.6;
}

.wis-card ul {
    padding-left: 20px;
    margin-bottom: 24px;
}

.wis-card ul li {
    margin-bottom: 10px;
}

/* WIS PILLS */
.wis-pill-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.wis-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--wis-border);
    border-radius: 16px;
    padding: 16px;
    transition: transform 0.2s;
}

.wis-pill:hover {
    background: rgba(0, 240, 255, 0.05);
    transform: translateX(5px);
}

.wis-pill-title {
    color: var(--wis-accent);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wis-pill p {
    font-size: 0.95rem;
    margin: 0;
    color: var(--wis-muted);
}

/* WIS FAQ */
.wis-faq {
    margin-top: 30px;
    border-top: 1px solid var(--wis-border);
    padding-top: 20px;
}

.wis-faq-item {
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--wis-accent);
    padding: 12px 16px;
    margin-bottom: 12px;
    color: var(--wis-text);
    font-weight: 500;
    font-size: 0.95rem;
}

/* INFOGRAPHICS & IMAGES */
/* INFOGRAPHICS & IMAGES (Enhanced Isolation) */
img.infografica,
.wis-card img,
.figure img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    object-fit: contain;
    /* Prevents cropping */
}

/* "Solare meglio": Create a visual island for the figure */
.figure,
figure,
.emfigure,
.infografica-sport {
    background: rgba(0, 0, 0, 0.4);
    /* Darker background to isolate */
    border: 1px solid var(--wis-border);
    border-radius: 20px;
    padding: 24px;
    /* Internal spacing */
    margin: 40px 0;
    /* Vertical separation from KPI box */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.figcap {
    margin-top: 16px;
    color: var(--wis-muted);
    font-size: 0.95rem;
    text-align: center;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

/* Forces readable text on anything inside a wis-card even if global styles fight it */
.wis-card * {
    text-shadow: none;
}