/*
Theme Name: Customify Child - GuidaPratiche
Theme URI: https://guidapratiche.it
Description: Tema hijo de Customify optimizado para SEO. Arquitectura silo, schema (Organization, Breadcrumb, Article, FAQ), breadcrumbs automáticos, tabla de contenidos y mejoras de rendimiento. Nicho: guías y trámites de la administración pública italiana (INPS, Codice Fiscale, Carta del Docente, Poste Italiane, Bollo Auto).
Author: GuidaPratiche
Author URI: https://guidapratiche.it
Template: customify
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: customify-child
Tags: seo, blog, custom-menu, custom-logo, featured-images, threaded-comments
*/

/* ============================================================
   1. TIPOGRAFÍA Y LECTURA (mejora dwell time / Core Web Vitals)
   ============================================================ */
:root {
    --gp-primary: #0b5cab;        /* azul institucional */
    --gp-primary-dark: #08447e;
    --gp-accent: #e8f1fb;
    --gp-text: #1f2733;
    --gp-muted: #5b6675;
    --gp-border: #e2e6ec;
    --gp-radius: 10px;
    --gp-maxw: 760px;
}

.entry-content {
    font-size: 1.075rem;
    line-height: 1.75;
    color: var(--gp-text);
}
.entry-content p { margin: 0 0 1.15em; }
.entry-content h2 {
    margin-top: 1.9em;
    margin-bottom: .6em;
    font-size: 1.6rem;
    line-height: 1.3;
    scroll-margin-top: 90px; /* para anclas de la tabla de contenidos */
}
.entry-content h3 {
    margin-top: 1.4em;
    font-size: 1.28rem;
    scroll-margin-top: 90px;
}
.entry-content a { color: var(--gp-primary); text-decoration: underline; }
.entry-content a:hover { color: var(--gp-primary-dark); }

/* ============================================================
   2. BREADCRUMBS
   ============================================================ */
.gp-breadcrumbs {
    font-size: .875rem;
    color: var(--gp-muted);
    margin: 0 0 1.4em;
    line-height: 1.5;
}
.gp-breadcrumbs a { color: var(--gp-muted); text-decoration: none; }
.gp-breadcrumbs a:hover { color: var(--gp-primary); text-decoration: underline; }
.gp-breadcrumbs .sep { margin: 0 .45em; opacity: .55; }
.gp-breadcrumbs [aria-current="page"] { color: var(--gp-text); font-weight: 600; }

/* ============================================================
   3. TABLA DE CONTENIDOS (TOC)
   ============================================================ */
.gp-toc {
    background: var(--gp-accent);
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius);
    padding: 1.1em 1.3em;
    margin: 0 0 1.8em;
    max-width: var(--gp-maxw);
}
.gp-toc__title {
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 .6em;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--gp-primary-dark);
}
.gp-toc ol { margin: 0; padding-left: 1.2em; }
.gp-toc li { margin: .25em 0; }
.gp-toc a { color: var(--gp-primary); text-decoration: none; }
.gp-toc a:hover { text-decoration: underline; }

/* ============================================================
   4. FAQ (acordeón + schema)
   ============================================================ */
.gp-faq { margin: 2em 0; max-width: var(--gp-maxw); }
.gp-faq__title { font-size: 1.5rem; margin: 0 0 .8em; }
.gp-faq details {
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius);
    margin-bottom: .7em;
    background: #fff;
    overflow: hidden;
}
.gp-faq summary {
    cursor: pointer;
    padding: .95em 1.15em;
    font-weight: 600;
    list-style: none;
    position: relative;
    padding-right: 2.5em;
}
.gp-faq summary::-webkit-details-marker { display: none; }
.gp-faq summary::after {
    content: "+";
    position: absolute;
    right: 1.1em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4em;
    color: var(--gp-primary);
    transition: transform .2s ease;
}
.gp-faq details[open] summary::after { content: "\2013"; }
.gp-faq details[open] summary { color: var(--gp-primary-dark); }
.gp-faq__answer { padding: 0 1.15em 1.1em; color: var(--gp-text); }

/* ============================================================
   5. HUB / PILAR (índice de silo)
   ============================================================ */
.gp-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.1em;
    margin: 1.8em 0;
}
.gp-hub-card {
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius);
    padding: 1.1em 1.2em;
    transition: box-shadow .2s ease, transform .2s ease;
    background: #fff;
}
.gp-hub-card:hover {
    box-shadow: 0 6px 20px rgba(11, 92, 171, .12);
    transform: translateY(-2px);
}
.gp-hub-card h3 { margin: 0 0 .35em; font-size: 1.1rem; }
.gp-hub-card p { margin: 0; font-size: .92rem; color: var(--gp-muted); }
.gp-hub-card a { text-decoration: none; }

/* Página pilar (silo) */
.gp-pilar .gp-pilar__header { margin-bottom: 1.2em; }
.gp-pilar__lead {
    font-size: 1.15rem;
    line-height: 1.55;
    color: var(--gp-muted);
    margin: .4em 0 0;
}
.gp-silo__title {
    margin: 1.8em 0 .2em;
    font-size: 1.35rem;
    color: var(--gp-primary-dark);
}

/* ============================================================
   6. TABLA DE DATOS (sedi INPS, codici catastali, esercenti)
   ============================================================ */
.gp-datatable { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .98rem; }
.gp-datatable th, .gp-datatable td { padding: .7em .85em; border: 1px solid var(--gp-border); text-align: left; }
.gp-datatable th { background: var(--gp-accent); color: var(--gp-primary-dark); }
.gp-datatable tr:nth-child(even) td { background: #fafbfc; }

/* Fac-simile / modelli di testo (es. ricorso, autocertificazione) */
.gp-facsimile {
    background: #fafbfc;
    border: 1px solid var(--gp-border);
    border-left: 4px solid var(--gp-primary);
    border-radius: var(--gp-radius);
    padding: 1.1em 1.3em;
    margin: 1.6em 0;
    font-family: "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: .9rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    color: var(--gp-text, #1a1a1a);
}

/* ============================================================
   7. AUTOR / E-E-A-T
   ============================================================ */
.gp-author-box {
    display: flex;
    gap: 1em;
    align-items: flex-start;
    border: 1px solid var(--gp-border);
    border-radius: var(--gp-radius);
    padding: 1.1em 1.2em;
    margin: 2.4em 0 1em;
    background: #fafbfc;
}
.gp-author-box img { border-radius: 50%; width: 64px; height: 64px; object-fit: cover; flex-shrink: 0; }
.gp-author-box .gp-author-name { font-weight: 700; margin: 0 0 .25em; }
.gp-author-box .gp-author-bio { margin: 0; font-size: .92rem; color: var(--gp-muted); }

/* ============================================================
   8. RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
    .entry-content { font-size: 1.02rem; }
    .entry-content h2 { font-size: 1.4rem; }
    .gp-author-box { flex-direction: column; }
}