/**
 * IDS Provincia Shortcodes — Stili
 *
 * Incluso automaticamente quando uno shortcode ids_provincia_* è presente nella pagina.
 * Ottimizzato per integrarsi con il tema SmartMag e i layout Elementor.
 */

/* ── Header provincia ──────────────────────────────────────────────────── */

.ids-provincia-header {
    margin-bottom: 1.5rem;
}

.ids-ph-breadcrumb {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ids-ph-breadcrumb a {
    color: #e8642c;
    text-decoration: none;
}

.ids-ph-breadcrumb a:hover {
    text-decoration: underline;
}

.ids-ph-sep {
    color: #bbb;
}

.ids-ph-current {
    font-weight: 600;
    color: #444;
}

.ids-ph-pills {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.ids-ph-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    min-width: 110px;
    text-align: center;
}

.ids-ph-pill-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.1;
}

.ids-ph-pill-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-top: 3px;
}

.ids-ph-area {
    font-size: 0.8rem;
    color: #aaa;
    margin: 0;
    font-style: italic;
}

/* ── Stats table ────────────────────────────────────────────────────────── */

.ids-provincia-stats {
    margin-bottom: 1.5rem;
}

.ids-ps-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    border-left: 4px solid #e8642c;
    padding-left: 10px;
}

.ids-ps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ids-ps-table th,
.ids-ps-table td {
    padding: 7px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: top;
}

.ids-ps-table th {
    width: 40%;
    font-weight: 600;
    color: #555;
    background: #fafafa;
    white-space: nowrap;
}

.ids-ps-table td {
    color: #333;
}

.ids-ps-table tr:last-child th,
.ids-ps-table tr:last-child td {
    border-bottom: none;
}

.ids-ps-table a {
    color: #e8642c;
    text-decoration: none;
}

.ids-ps-table a:hover {
    text-decoration: underline;
}

/* ── Comuni grid ────────────────────────────────────────────────────────── */

.ids-comuni-grid {
    display: grid;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.ids-cg-cols-1 {
    grid-template-columns: 1fr;
}

.ids-cg-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ids-cg-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ids-cg-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {

    .ids-cg-cols-3,
    .ids-cg-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {

    .ids-cg-cols-2,
    .ids-cg-cols-3,
    .ids-cg-cols-4 {
        grid-template-columns: 1fr;
    }
}

.ids-cg-item {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ids-cg-item.ids-cg-linked:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #e8642c;
}

.ids-cg-link,
.ids-cg-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    text-decoration: none;
    color: inherit;
    gap: 6px;
}

.ids-cg-link {
    width: 100%;
    box-sizing: border-box;
}

.ids-cg-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2c3e50;
    line-height: 1.2;
}

.ids-cg-linked .ids-cg-name {
    color: #e8642c;
}

.ids-cg-no-link {
    color: #999;
}

/* Comuni con post scritto a mano (post_name ≠ 'il-comune-di-...') */
.ids-cg-manual {
    background: #fff8f4;
    border-color: #e8642c;
    border-left-width: 3px;
}

.ids-cg-manual .ids-cg-name {
    color: #c0440f;
    font-weight: 700;
}

.ids-cg-manual:hover {
    background: #fff0e8;
}

.ids-cg-pop {
    font-size: 0.72rem;
    color: #aaa;
    white-space: nowrap;
    flex-shrink: 0;
}

.ids-cg-empty {
    color: #bbb;
    font-style: italic;
}

/* ── Articoli provincia / regione ──────────────────────────────────────── */

.ids-articoli-provincia {
    margin-bottom: 1.5rem;
}

.ids-ap-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    border-left: 4px solid #e8642c;
    padding-left: 10px;
}

.ids-ap-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ids-ap-item {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.ids-ap-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ids-ap-link {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.ids-ap-link:hover .ids-ap-title-post {
    color: #e8642c;
}

.ids-ap-thumb {
    width: 70px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.ids-ap-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ids-ap-title-post {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    transition: color 0.15s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ids-ap-date {
    font-size: 0.72rem;
    color: #aaa;
}

.ids-ap-empty {
    color: #bbb;
    font-style: italic;
    font-size: 0.85rem;
}