/**
 * Homepage Improvements - Typography & Layout
 * Miglioramenti per homepage: liste, link, tipografia, tabelle
 */

/* ===== HOMEPAGE CONTENT AREA ===== */
.home .entry-content,
.page .entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* ===== MIGLIORAMENTO LISTE E LINK ===== */

/* Liste principali homepage */
.entry-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 32px 0;
}

.entry-content ul li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 14px;
    line-height: 1.8;
    transition: transform 0.2s ease;
}

/* Icona lista personalizzata */
.entry-content ul li::before {
    content: "▸";
    position: absolute;
    left: 8px;
    color: #0066cc;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.2s ease;
}

/* Hover su item lista */
.entry-content ul li:hover {
    transform: translateX(4px);
}

.entry-content ul li:hover::before {
    transform: translateX(-2px);
}

/* ===== LINK STYLING MIGLIORATO ===== */

/* Link generali */
.entry-content a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
}

.entry-content a:hover,
.entry-content a:focus {
    color: #004999;
    border-bottom-color: #004999;
    transform: translateX(2px);
}

.entry-content a:focus {
    outline: 3px solid #0066cc;
    outline-offset: 3px;
    border-radius: 2px;
}

/* ===== TITOLI E SEZIONI ===== */

/* Titoli sezioni (H2, H3) */
.entry-content h2,
.entry-content h3 {
    color: #0066cc;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    line-height: 1.3;
    text-transform: none;
    /* Rimuove MAIUSCOLO forzato */
}

.entry-content h2 {
    font-size: 28px;
    border-bottom: 3px solid #0066cc;
    padding-bottom: 12px;
}

.entry-content h3 {
    font-size: 22px;
    border-left: 4px solid #0066cc;
    padding-left: 16px;
}

/* Strong/Bold text */
.entry-content strong {
    color: #0066cc;
    font-weight: 700;
    font-size: 18px;
    display: block;
    margin-bottom: 12px;
    text-transform: capitalize;
    /* Capitalizza invece di MAIUSCOLO */
}

/* ===== GRIGLIA A DUE COLONNE ===== */

/* Container griglia */
.entry-content>p:has(strong) {
    margin-bottom: 32px;
}

/* Spaziatura tra blocchi */
.entry-content>*+* {
    margin-top: 24px;
}

/* ===== SEZIONE ULTIMI AGGIORNAMENTI ===== */

/* Widget aggiornamenti */
.widget_recent_entries ul,
.widget_recent_posts ul,
.updates-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_recent_entries li,
.widget_recent_posts li,
.update-item {
    background-color: #f8f9fa;
    border-left: 4px solid #0066cc;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.widget_recent_entries li:hover,
.widget_recent_posts li:hover,
.update-item:hover {
    background-color: #e9ecef;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

/* Titoli aggiornamenti - NO MAIUSCOLO */
.widget_recent_entries a,
.widget_recent_posts a,
.update-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    text-transform: none !important;
    /* Forza rimozione MAIUSCOLO */
    line-height: 1.5;
}

.widget_recent_entries a:hover,
.widget_recent_posts a:hover {
    color: #0066cc;
}

/* Date aggiornamenti */
.widget_recent_entries .post-date,
.widget_recent_posts .post-date,
.update-date {
    display: block;
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 6px;
    font-weight: 500;
}

/* ===== TABELLE DATI ===== */

/* Tabelle generali */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Header tabella */
.entry-content table thead {
    background-color: #0066cc;
    color: #ffffff;
}

.entry-content table th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 15px;
    border-bottom: 2px solid #004999;
}

/* Celle tabella */
.entry-content table td {
    padding: 14px 16px;
    border-bottom: 1px solid #dee2e6;
    font-size: 15px;
    line-height: 1.6;
}

/* Zebra striping */
.entry-content table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Hover su righe */
.entry-content table tbody tr:hover {
    background-color: #e9ecef;
    cursor: pointer;
}

/* Link in tabella */
.entry-content table a {
    color: #0066cc;
    font-weight: 500;
    border-bottom: none;
}

.entry-content table a:hover {
    color: #004999;
    text-decoration: underline;
}

/* ===== CARDS/BOXES ===== */

/* Box informativi */
.info-box,
.notice-box {
    background-color: #e7f3ff;
    border-left: 5px solid #0066cc;
    padding: 20px;
    margin: 24px 0;
    border-radius: 4px;
}

.info-box h4,
.notice-box h4 {
    color: #0066cc;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 700;
}

.info-box p,
.notice-box p {
    margin: 0;
    line-height: 1.7;
}

/* ===== RESPONSIVE MOBILE ===== */

@media (max-width: 768px) {

    /* Typography mobile */
    .entry-content {
        font-size: 15px;
        line-height: 1.7;
    }

    .entry-content h2 {
        font-size: 24px;
    }

    .entry-content h3 {
        font-size: 20px;
    }

    .entry-content strong {
        font-size: 17px;
    }

    /* Liste mobile */
    .entry-content ul li {
        padding-left: 24px;
        margin-bottom: 12px;
    }

    /* Tabelle responsive */
    .entry-content table {
        font-size: 14px;
    }

    .entry-content table th,
    .entry-content table td {
        padding: 10px 12px;
    }

    /* Scroll orizzontale per tabelle larghe */
    .entry-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Updates mobile */
    .widget_recent_entries li,
    .widget_recent_posts li,
    .update-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .entry-content h2 {
        font-size: 22px;
    }

    .entry-content h3 {
        font-size: 18px;
    }

    .entry-content ul li {
        padding-left: 20px;
        font-size: 14px;
    }
}

/* ===== PRINT STYLES ===== */

@media print {
    .entry-content a {
        color: #000;
        text-decoration: underline;
    }

    .entry-content a::after {
        content: " (" attr(href) ")";
        font-size: 11px;
        color: #666;
    }

    .entry-content table {
        box-shadow: none;
        border: 1px solid #000;
    }

    .entry-content table thead {
        background-color: #ccc !important;
        color: #000 !important;
    }

    .entry-content table tbody tr:hover {
        background-color: transparent;
    }
}

/* ===== ACCESSIBILITÀ ===== */

/* Skip to content */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0066cc;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus visibile su tutti gli elementi interattivi */
.entry-content a:focus,
.entry-content button:focus,
.entry-content input:focus {
    outline: 3px solid #0066cc;
    outline-offset: 3px;
}

/* ===== UTILITY CLASSES ===== */

/* Spaziatura */
.mt-small {
    margin-top: 16px;
}

.mt-medium {
    margin-top: 24px;
}

.mt-large {
    margin-top: 32px;
}

.mb-small {
    margin-bottom: 16px;
}

.mb-medium {
    margin-bottom: 24px;
}

.mb-large {
    margin-bottom: 32px;
}

/* Testo */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #6c757d;
}

.text-primary {
    color: #0066cc;
}

/* Font weight */
.fw-normal {
    font-weight: 400;
}

.fw-medium {
    font-weight: 500;
}

.fw-bold {
    font-weight: 700;
}