/* ============================================================
   guide.css — Layout editoriale per la sezione /guide/
   Import automatico via pageStyles in guide.php
   ============================================================ */

/* ── Hub index ───────────────────────────────────────────── */
.guide-hub { max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.guide-hub-hero { text-align: center; padding: 3rem 1rem 2.5rem; }
.guide-hub-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -.02em;
    color: #1c2434;
    margin: 0 0 .75rem;
    line-height: 1.1;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.guide-hub-hero h1::after {
    content: '';
    display: block;
    width: 72px;
    height: 4px;
    background: var(--accent, #2563eb);
    border-radius: 2px;
    margin-top: .75rem;
}
.guide-hub-hero p { font-size: 1.1rem; color: #64748b; max-width: 640px; margin: 1.1rem auto 0; line-height: 1.6; }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.guide-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0 !important;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.guide-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.1); }
.guide-card-img { width: 100%; height: 180px; object-fit: cover; background: #f1f5f9; }
.guide-card-img-placeholder { width: 100%; height: 180px; background: linear-gradient(135deg, #1e3a5f 0%, #0e7490 100%); display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.guide-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.guide-card-schema { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent, #2563eb); margin-bottom: .4rem; }
.guide-card h2 { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin: 0 0 .5rem; line-height: 1.35; }
.guide-card-subtitle { font-size: .88rem; color: #64748b; flex: 1; }
.guide-card-cta { display: inline-flex; align-items: center; gap: .3rem; margin-top: 1rem; font-size: .85rem; font-weight: 600; color: var(--accent, #2563eb); }

/* ── Singola guida ───────────────────────────────────────── */
.guide-layout { max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem 4rem; display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; align-items: start; }
.guide-main { min-width: 0; } /* Safety for grid overflow */
.guide-sidebar { position: sticky; top: 90px; }

/* Breadcrumb */
.guide-breadcrumb { font-size: .82rem; color: #64748b; margin-bottom: 1.5rem; }
.guide-breadcrumb a { color: #64748b; text-decoration: none; }
.guide-breadcrumb a:hover { color: var(--accent, #2563eb); text-decoration: underline; }
.guide-breadcrumb span { margin: 0 .35rem; color: #cbd5e1; }

/* Sidebar boxes */
.guide-sidebar-box {
    padding: 0;
    margin-bottom: 2rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.guide-sidebar-box h3 {
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #1c2434;
    margin: 0 0 .8rem;
    display: inline-block;
}
.guide-sidebar-box h3::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent, #2563eb);
    border-radius: 2px;
    margin-top: .45rem;
}
.guide-sidebar-links { list-style: none; padding: 0; margin: .5rem 0 0; }
.guide-sidebar-links li { margin-bottom: .8rem; line-height: 1.4; }
.guide-sidebar-links a {
    display: inline;
    padding: 0;
    background: transparent !important;
    color: #1e293b !important;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none !important;
    transition: color .2s;
    border-radius: 0 !important;
}
.guide-sidebar-links a:hover { color: var(--accent, #2563eb) !important; }
.guide-sidebar-links a.current { color: var(--accent, #2563eb) !important; }

.guide-sidebar-cta {
    background: #1c2434 !important;
    background: linear-gradient(160deg, #1c2434 0%, #2d3748 100%) !important;
    padding: 2rem 1.5rem;
    color: #fff;
    text-align: center;
    border-radius: 0 !important;
}
.guide-sidebar-cta h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 .75rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.guide-sidebar-cta p {
    font-size: .88rem;
    line-height: 1.5;
    margin: 0 0 1.5rem;
    opacity: .9;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.guide-sidebar-cta a {
    display: block;
    background: #2563eb !important; /* Explicit blue */
    color: #fff !important;
    text-decoration: none !important;
    padding: .85rem;
    font-weight: 800;
    font-size: .85rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: background .2s, transform .2s;
    border-radius: 0 !important;
    margin-top: 1rem;
}
.guide-sidebar-cta a:hover {
    background: #1d4ed8 !important;
    transform: scale(1.02);
}

/* Header articolo */
.guide-header { margin-bottom: 2.5rem; }
.guide-schema-badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff !important; background: var(--accent, #2563eb) !important; border-radius: 0 !important; padding: .3rem .8rem; margin-bottom: .75rem; }
.guide-header h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 800; color: #0f172a; line-height: 1.2; margin: 0 0 .75rem; }
.guide-header .guide-subtitle { font-size: 1.1rem; color: #475569; line-height: 1.6; margin: 0; }
.guide-featured-img { 
    width: 100%; 
    aspect-ratio: 21 / 9; 
    object-fit: cover; 
    border-radius: 0 !important; 
    margin: 1.5rem 0; 
    display: block; 
}

/* Corpo articolo — classi disponibili per l'HTML caricato */
.guide-body { font-size: 1rem; line-height: 1.8; color: #1e293b; }
.guide-body h2 { font-size: 1.45rem; font-weight: 700; color: #0f172a; margin: 2.5rem 0 .75rem; padding-bottom: .4rem; border-bottom: 2px solid #e2e8f0; }
.guide-body h3 { font-size: 1.15rem; font-weight: 700; color: #0f172a; margin: 2rem 0 .5rem; }
.guide-body h4 { font-size: 1rem; font-weight: 700; color: #334155; margin: 1.5rem 0 .4rem; }
.guide-body p  { margin: 0 0 1.1rem; }
.guide-body ul, .guide-body ol { margin: 0 0 1.1rem 1.5rem; }
.guide-body li { margin-bottom: .4rem; }
.guide-body a  { color: #0e7490; text-decoration: underline; text-underline-offset: 2px; }
.guide-body a:hover { color: #0c4a6e; }
.guide-body strong { font-weight: 700; color: #0f172a; }
.guide-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .92rem; }
.guide-body table th { background: #f1f5f9; font-weight: 700; padding: .6rem .9rem; text-align: left; border: 1px solid #cbd5e1; }
.guide-body table td { padding: .6rem .9rem; border: 1px solid #e2e8f0; }
.guide-body table tr:nth-child(even) td { background: #f8fafc; }
.guide-body blockquote { border-left: 4px solid #0e7490; background: #f0f9ff; margin: 1.5rem 0; padding: 1rem 1.25rem; border-radius: 0 8px 8px 0; color: #0c4a6e; font-style: italic; }

/* Callout boxes — disponibili nell'HTML dell'articolo */
.guide-callout { border-radius: 10px; padding: 1rem 1.25rem; margin: 1.5rem 0; display: flex; gap: .75rem; align-items: flex-start; }
.guide-callout-icon { font-size: 1.2rem; flex-shrink: 0; }
.guide-callout-body { flex: 1; }
.guide-callout-body strong { display: block; margin-bottom: .2rem; }
.guide-callout { background: #f0f9ff; border: 1px solid #bae6fd; color: #0c4a6e; }        /* default: info */
.guide-callout.tip  { background: #f0fdf4; border-color: #86efac; color: #14532d; }
.guide-callout.warn { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
.guide-callout.important { background: #fef2f2; border-color: #fca5a5; color: #7f1d1d; }

/* Steps (per guide HowTo) */
.guide-steps { list-style: none; margin: 1.5rem 0; padding: 0; counter-reset: step; }
.guide-steps li { counter-increment: step; display: flex; gap: 1rem; margin-bottom: 1.25rem; align-items: flex-start; }
.guide-steps li::before { content: counter(step); background: #0e7490; color: #fff; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; margin-top: .1rem; }

/* ── Sidebar ─────────────────────────────────────────────── */
.guide-sidebar-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; }
.guide-sidebar-box h3 { font-size: .9rem; font-weight: 700; color: #0f172a; margin: 0 0 .9rem; text-transform: uppercase; letter-spacing: .05em; }
.guide-sidebar-links { list-style: none; margin: 0; padding: 0; }
.guide-sidebar-links li { border-bottom: 1px solid #f1f5f9; }
.guide-sidebar-links li:last-child { border-bottom: none; }
.guide-sidebar-links a { display: block; padding: .5rem 0; font-size: .88rem; color: #0e7490; text-decoration: none; line-height: 1.35; }
.guide-sidebar-links a:hover { color: #0c4a6e; }
.guide-sidebar-links a.current { color: #0f172a; font-weight: 600; cursor: default; }
.guide-sidebar-cta { background: linear-gradient(135deg, #0e7490, #0369a1); color: #fff; border-radius: 12px; padding: 1.25rem; text-align: center; }
.guide-sidebar-cta h3 { color: #fff; margin: 0 0 .5rem; font-size: .95rem; }
.guide-sidebar-cta p  { font-size: .82rem; margin: 0 0 .9rem; opacity: .9; }
.guide-sidebar-cta a  { display: block; background: #fff; color: #0e7490; font-weight: 700; border-radius: 8px; padding: .6rem; text-decoration: none; font-size: .88rem; }
.guide-sidebar-cta a:hover { background: #f0f9ff; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
    .guide-layout { grid-template-columns: 1fr; }
    .guide-sidebar { position: static; }
}
@media (max-width: 600px) {
    .guide-hub { padding: 1rem .75rem 3rem; }
    .guide-grid { grid-template-columns: 1fr; }
}
