/* =====================================================================
   Studio Taglione - Restyling 2026
   Foglio di stile condiviso da index.php, slug/modello.php, slug/guida.php
   Si appoggia a Bootstrap 4 (assets/css/bootstrap.min.css).
   NON richiede style.css del vecchio template.
   ===================================================================== */

:root {
    --st-ink: #1a2b3c;
    --st-text: #33414f;
    --st-muted: #4a5768;
    --st-soft: #5b6878;
    --st-line: #e3e7ec;
    --st-field: #c9d1db;
    --st-bg: #f5f6f8;
    --st-dark: #111111;
    --st-navy: #1a2b3c;
    --st-accent: #c84b06;
    --st-accent-dark: #a8380a;
    --st-accent-text: #9a3412;
    --st-peach: #ffb38a;
    --st-radius: 14px;
}

html { scroll-behavior: smooth; }
body.st {
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--st-ink);
    background: #ffffff;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body.st.st-grey { background: var(--st-bg); }
.st h1, .st h2, .st h3, .st h4, .st h5, .st h6 { font-family: inherit; color: var(--st-ink); font-weight: 600; line-height: 1.25; }
.st p { color: inherit; }
:where(.st) a { color: var(--st-accent-dark); }
:where(.st) a:hover { color: var(--st-accent-text); }
.st img { max-width: 100%; height: auto; }
.st-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; color: var(--st-ink); padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600; }
.st-skip:focus { left: 0; }
/* I link nel testo si riconoscono anche senza colore */
.st-prose a, .st-about a, .st-lead a, .st-box a, .st-contact a, .st-side-card p a, .st-author a, .st-share a { text-decoration: underline; text-underline-offset: 2px; }
.st :focus-visible { outline: 3px solid var(--st-accent); outline-offset: 2px; }

.st-wrap { max-width: 1180px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 575.98px) { .st-wrap { padding-left: 16px; padding-right: 16px; } }

.st-eyebrow { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--st-accent-text); }
.st-eyebrow.caps { text-transform: uppercase; letter-spacing: .08em; }
.st-h2 { font-size: 32px; font-weight: 700 !important; margin: 0 0 8px; }
.st-lead { font-size: 16px; color: var(--st-muted); margin: 0 0 28px; }
.st-section { padding-top: 72px; padding-bottom: 72px; }
.st-bg-grey { background: var(--st-bg); }
@media (max-width: 767.98px) {
    .st-section { padding-top: 48px; padding-bottom: 48px; }
    .st-h2 { font-size: 26px; }
}

/* ---------- Pulsanti ---------- */
.st-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-weight: 700; font-size: 16px; line-height: 1.2;
    padding: 13px 22px; min-height: 48px; border-radius: 8px; border: 1px solid transparent;
    text-decoration: none !important; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.st-btn-accent { background: var(--st-accent); color: #fff !important; }
.st-btn-accent:hover { background: var(--st-accent-dark); color: #fff !important; }
.st-btn-light { background: #fff; color: var(--st-ink) !important; border-color: var(--st-field); font-weight: 600; }
.st-btn-light:hover { border-color: var(--st-ink); }
.st-btn-navy { background: var(--st-navy); color: #fff !important; font-weight: 600; font-size: 14px; }
.st-btn-navy:hover { background: #0e1a26; }
.st-btn-lg { font-size: 19px; padding: 14px 26px; }
.st-btn-block { width: 100%; }
.st-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- Header ---------- */
.st-header { background: var(--st-dark); }
.st-header .navbar { padding-top: 12px; padding-bottom: 12px; }
.st-header .navbar.st-wrap { padding-left: 24px; padding-right: 24px; }
@media (max-width: 575.98px) { .st-header .navbar.st-wrap { padding-left: 16px; padding-right: 16px; } }
.st-header .navbar-brand { padding: 0; margin-right: 24px; }
.st-header .navbar-brand img { height: 56px; width: auto; display: block; }
.st-header .nav-link { color: #fff !important; font-size: 14px; font-weight: 500; padding: 10px 12px !important; }
.st-header .nav-link:hover, .st-header .nav-link.active { color: var(--st-peach) !important; }
.st-header .nav-link::after, .st-header .nav-link::before { content: none !important; display: none !important; }
.st-header ul { margin: 0; padding: 0; }
.st-header .navbar-toggler {
    width: 48px; height: 48px; border: 1px solid #3a4048; border-radius: 8px; color: #fff; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.st-header .st-cta { padding: 11px 20px; min-height: 44px; font-size: 15px; }
@media (min-width: 992px) { .st-header .navbar-toggler { display: none; } }
@media (max-width: 991.98px) {
    .st-header .navbar-collapse { padding: 12px 0 8px; border-top: 1px solid #2e3338; margin-top: 12px; }
    .st-header .nav-link { font-size: 16px; padding: 12px 4px !important; }
    .st-header .st-cta { width: 100%; margin-top: 10px; }
}
@media (max-width: 575.98px) { .st-header .navbar-brand img { height: 46px; } }

/* ---------- Hero home ---------- */
.st-hero { background: var(--st-bg); }
.st-hero h1 { font-size: 48px; line-height: 1.1; font-weight: 700; margin: 0 0 18px; }
.st-hero .st-hero-sub { font-size: 18px; line-height: 1.7; color: var(--st-muted); max-width: 560px; margin: 0 0 28px; }
.st-hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.st-stats { display: flex; flex-wrap: wrap; gap: 28px; font-size: 14px; color: var(--st-text); }
.st-stats strong { display: block; font-size: 22px; color: var(--st-ink); }
.st-hero-photo { width: 100%; max-width: 380px; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 18px; display: block; margin: 0 auto; }
@media (max-width: 767.98px) {
    .st-hero h1 { font-size: 34px; }
    .st-hero .st-hero-sub { font-size: 17px; }
    .st-hero-photo { max-width: 300px; }
}

/* ---------- Servizi ---------- */
.st-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 26px; }
.st-chip {
    font-family: inherit; font-size: 14px; font-weight: 600; padding: 10px 16px; min-height: 44px;
    border-radius: 22px; cursor: pointer; border: 1px solid var(--st-field); background: #fff; color: var(--st-ink);
}
.st-chip[aria-pressed="true"] { background: var(--st-navy); border-color: var(--st-navy); color: #fff; }
.st-grid-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.st-svc {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--st-line);
    border-radius: var(--st-radius); overflow: hidden; text-decoration: none !important; color: var(--st-ink) !important;
    transition: box-shadow .15s, transform .15s;
}
.st-svc:hover { box-shadow: 0 8px 24px rgba(26, 43, 60, .10); transform: translateY(-2px); }
.st-svc[hidden] { display: none; }
.st-svc-img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; background: var(--st-line); }
.st-svc-ph {
    width: 100%; aspect-ratio: 2 / 1; background: var(--st-navy); color: var(--st-peach);
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 0 16px; font-size: 14px; font-weight: 600;
}
.st-svc-body { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 16px 18px; flex-grow: 1; }
.st-svc-cat { font-size: 11px; font-weight: 600; color: var(--st-soft); text-transform: uppercase; letter-spacing: .04em; }
.st-svc-name { margin: 6px 0 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.st-svc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.st-svc-price { font-size: 18px; font-weight: 700; }
.st-svc-cta { font-size: 14px; font-weight: 600; color: var(--st-accent-dark); }

/* ---------- Come funziona ---------- */
.st-steps { background: var(--st-navy); color: #fff; border-radius: 18px; padding: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.st-steps .n { margin: 0 0 8px; font-size: 28px; font-weight: 700; color: var(--st-peach); }
.st-steps h3 { color: #fff; font-size: 18px; margin: 0 0 6px; }
.st-steps p { margin: 0; font-size: 14px; line-height: 1.6; color: #d7e0ea; }
@media (max-width: 575.98px) { .st-steps { padding: 28px 22px; } }

/* ---------- Card generiche ---------- */
.st-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.st-card { background: #fff; border-radius: var(--st-radius); padding: 26px; color: var(--st-ink) !important; text-decoration: none !important; display: block; }
.st-card.bordered { border: 1px solid var(--st-line); }
a.st-card:hover { box-shadow: 0 8px 24px rgba(26, 43, 60, .08); }
.st-card h3 { font-size: 18px; margin: 0 0 8px; }
.st-card p { margin: 0; font-size: 14px; line-height: 1.7; color: var(--st-muted); }
.st-card .st-more { display: inline-block; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--st-accent-dark); }
.st-card .st-kicker { font-size: 12px; font-weight: 600; color: var(--st-soft); text-transform: uppercase; letter-spacing: .04em; }
.st-card .st-card-title { margin: 8px 0 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--st-ink); }
.st-card-img { width: calc(100% + 52px); margin: -26px -26px 16px; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: var(--st-radius) var(--st-radius) 0 0; }

/* ---------- Chi sono ---------- */
.st-about-photo { width: 100%; max-width: 300px; aspect-ratio: 1 / 1; object-fit: cover; object-position: top; border-radius: 50%; display: block; margin: 0 auto; }
.st-about p { font-size: 16px; line-height: 1.8; color: var(--st-text); margin: 0 0 14px; }

/* ---------- Libri ---------- */
.st-books { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.st-book { display: flex; gap: 18px; align-items: center; border: 1px solid var(--st-line); border-radius: var(--st-radius); padding: 20px; background: #fff; }
.st-book img { width: 78px; height: 110px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: #20395c; }
.st-book h3 { margin: 0 0 6px; font-size: 16px; }
.st-book a { font-size: 14px; font-weight: 600; }

/* ---------- Recapiti ---------- */
.st-contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 28px; }
.st-contact { display: flex; gap: 16px; align-items: center; background: #fff; border-radius: var(--st-radius); padding: 22px; }
.st-contact .ico { width: 56px; height: 56px; border-radius: 50%; background: var(--st-navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.st-contact .ico img { max-width: 26px; }
.st-contact .lbl { margin: 0; font-size: 12px; font-weight: 600; color: var(--st-soft); text-transform: uppercase; }
.st-contact .val { margin: 2px 0 0; font-size: 16px; font-weight: 600; color: var(--st-ink); word-break: break-word; }
.st-contact .val a { color: var(--st-ink); text-decoration: none; }
.st-contact .sub { margin: 0; font-size: 14px; color: var(--st-muted); }
.st-map-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 40px; }
.st-map { flex: 999 1 520px; min-width: 0; min-height: 340px; border-radius: var(--st-radius); overflow: hidden; background: #dfe4ea; }
.st-map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }
.st-map-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.st-box { background: #fff; border-radius: var(--st-radius); padding: 24px; }
.st-box .lbl { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--st-soft); text-transform: uppercase; }
.st-stars { color: #b45309; letter-spacing: 3px; }
@media (max-width: 575.98px) { .st-map, .st-map iframe { min-height: 260px; } }

/* ---------- Form ---------- */
.st-form label { font-size: 13px; font-weight: 500; display: flex; flex-direction: column; gap: 6px; margin: 0; color: var(--st-ink); }
.st-form input[type=text], .st-form input[type=email], .st-form textarea {
    font-family: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--st-field);
    border-radius: 8px; width: 100%; color: var(--st-ink); background: #fff;
}
.st-form input:focus, .st-form textarea:focus { border-color: var(--st-accent); outline: none; box-shadow: 0 0 0 3px rgba(200, 75, 6, .18); }
.st-form textarea { resize: vertical; }
.st-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 575.98px) { .st-form-grid { grid-template-columns: 1fr; } }
.st-form-grid .full { grid-column: 1 / -1; }
.st-check { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-size: 12px !important; line-height: 1.5; color: var(--st-muted) !important; font-weight: 400 !important; }
.st-check input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.st-msg { display: none; margin-top: 12px; padding: 10px 14px; border-radius: 8px; font-size: 14px; }
.st-msg.err { display: block; background: #fdecea; color: #b3261e; }
.st-msg.ok { display: block; background: #e6f4ea; color: #1e7b34; }
.st-hp { position: absolute !important; left: -9999px !important; }

/* ---------- Footer ---------- */
.st-footer { background: var(--st-dark) url('/assets/img/footer-bg.jpg') center / cover; color: #b8bec6; font-size: 14px; }
.st-footer .st-wrap { padding-top: 48px; }
.st-footer-top { display: flex; flex-wrap: wrap; gap: 40px; padding-bottom: 32px; }
.st-footer-top img { height: 72px; width: auto; display: block; }
.st-footer ul { flex: 1 1 260px; list-style: none; margin: 0; padding: 0; line-height: 2; }
.st-footer ul li:first-child.strong { color: #fff; font-weight: 600; }
.st-footer a { color: #b8bec6; }
.st-footer a:hover { color: #fff; }
.st-footer-pay { border-top: 1px solid #2e3338; padding: 18px 0; text-align: center; font-size: 28px; }
.st-footer-pay .fa { margin: 0 8px; color: #b8bec6; }
.st-footer-bottom { border-top: 1px solid #2e3338; padding: 18px 0 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }
.st-footer-bottom nav { display: flex; gap: 20px; }

/* ---------- Pagine modello e guida ---------- */
.st-pagehead { background: #fff; border-bottom: 1px solid var(--st-line); }
.st-pagehead .st-wrap { padding-top: 28px; padding-bottom: 36px; }
.st-crumbs { font-size: 13px; color: var(--st-soft); margin-bottom: 18px; }
.st-crumbs a { color: var(--st-soft); text-decoration: none; }
.st-crumbs a:hover { text-decoration: underline; }
.st-tag { display: inline-block; background: #fff1e8; color: var(--st-accent-text); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; margin-bottom: 14px; }
.st-pagehead h1 { margin: 0 0 12px; font-size: 40px; line-height: 1.15; font-weight: 700; max-width: 860px; }
.st-pagehead .st-sub { margin: 0 0 20px; font-size: 18px; line-height: 1.6; color: var(--st-muted); max-width: 760px; }
.st-pills { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--st-text); }
.st-pills span { background: #f1f3f6; padding: 7px 12px; border-radius: 8px; }
.st-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 14px; color: var(--st-muted); }
.st-byline img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; }
.st-byline strong { color: var(--st-ink); }
@media (max-width: 767.98px) {
    .st-pagehead h1 { font-size: 30px; }
    .st-pagehead .st-sub { font-size: 16px; }
}

.st-main { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 36px; padding-bottom: 40px; }
.st-article { flex: 999 1 560px; min-width: 0; background: #fff; border: 1px solid var(--st-line); border-radius: var(--st-radius); padding: 40px 48px; }
.st-aside { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 992px) { .st-aside.sticky { position: sticky; top: 20px; } }
@media (max-width: 767.98px) { .st-article { padding: 24px 20px; } }

/* Testo proveniente dal database */
.st-prose { font-size: 17px; line-height: 1.85; color: var(--st-text); overflow-wrap: anywhere; }
.st-prose > *:first-child { margin-top: 0; }
.st-prose h2 { font-size: 26px; margin: 32px 0 12px; scroll-margin-top: 20px; }
.st-prose h3 { font-size: 21px; margin: 26px 0 10px; }
.st-prose h4 { font-size: 18px; margin: 22px 0 8px; }
.st-prose p { margin: 0 0 18px; }
.st-prose ul, .st-prose ol { padding-left: 1.5em; margin: 0 0 18px; }
.st-prose ul { list-style: disc; }
.st-prose ol { list-style: decimal; }
.st-prose li { margin-bottom: 6px; }
.st-prose li ul { list-style: circle; margin: 6px 0 0; }
.st-prose img { border-radius: 10px; margin: 8px 0 18px; }
.st-prose table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; display: block; overflow-x: auto; }
.st-prose th, .st-prose td { border: 1px solid var(--st-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.st-prose th { background: var(--st-bg); font-weight: 600; }
.st-prose blockquote { border-left: 4px solid var(--st-accent); background: var(--st-bg); margin: 0 0 18px; padding: 14px 20px; border-radius: 0 10px 10px 0; }
@media (max-width: 767.98px) {
    .st-prose { font-size: 16px; }
    .st-prose h2 { font-size: 22px; }
    .st-prose h3 { font-size: 19px; }
}

.st-side-card { background: #fff; border: 1px solid var(--st-line); border-radius: var(--st-radius); padding: 28px; }
.st-side-card h2 { margin: 0 0 6px; font-size: 20px; }
.st-side-card .st-side-sub { margin: 0 0 18px; font-size: 14px; line-height: 1.6; color: var(--st-soft); }
.st-side-dark { background: var(--st-navy); color: #fff; border-radius: var(--st-radius); padding: 26px 28px; }
.st-side-dark h2 { color: #fff; margin: 0 0 10px; font-size: 20px; }
.st-side-dark p { color: #d7e0ea; font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
.st-side-dark .small-lbl { margin: 0 0 4px; font-size: 13px; color: #b8c5d1; }
.st-side-dark .price { font-size: 22px; font-weight: 700; }
.st-side-dark a.st-white-btn { background: #fff; color: var(--st-ink) !important; text-decoration: none; padding: 11px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; display: inline-block; }
.st-side-dark a { color: #fff; }
.st-side-dark .st-form label { color: #d7e0ea; }
.st-side-dark .st-form input, .st-side-dark .st-form textarea { border: none; }
.st-author { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--st-line); border-radius: var(--st-radius); padding: 18px 20px; font-size: 13px; line-height: 1.5; color: var(--st-muted); }
.st-author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: top; flex-shrink: 0; }
.st-author strong { color: var(--st-ink); font-size: 14px; }

.st-toc { background: #fff; border: 1px solid var(--st-line); border-radius: var(--st-radius); padding: 24px 26px; }
.st-toc .lbl, .st-side-lbl { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--st-soft); text-transform: uppercase; letter-spacing: .06em; }
.st-toc ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--st-text); }
.st-toc li { margin-bottom: 8px; }
.st-toc a { color: var(--st-ink); text-decoration: none; }
.st-toc a:hover { color: var(--st-accent-dark); text-decoration: underline; }
.st-share { background: #fff; border: 1px solid var(--st-line); border-radius: var(--st-radius); padding: 18px 22px; font-size: 13px; color: var(--st-muted); }
.st-share a { font-weight: 600; }

.st-dl-stats { display: inline-flex; gap: 6px; align-items: center; }
.st-sent { text-align: center; }
.st-sent .fa { font-size: 40px; color: #1e7b34; margin-bottom: 8px; }
.st-sent h3 { font-size: 20px; margin: 0 0 8px; }
.st-sent p { font-size: 15px; margin: 0 0 10px; color: var(--st-text); }
.st-sent .em { color: var(--st-accent-dark); font-weight: 600; word-break: break-all; }
.st-sent ol { text-align: left; display: inline-block; margin: 6px 0 14px; padding-left: 1.4em; font-size: 14px; color: var(--st-text); }
.st-sent small { display: block; color: var(--st-soft); font-size: 13px; }
#downloadArea { display: none; }
.st-dl-btns { display: flex; flex-direction: column; gap: 10px; }
.st-btn-pdf { background: #b3261e; color: #fff !important; }
.st-btn-word { background: #2b5797; color: #fff !important; }

.st-below { padding-bottom: 64px; }
.st-below > * + * { margin-top: 40px; }
.st-below .st-h3 { margin: 0 0 18px; font-size: 22px; }

/* I box inclusi (cta_libro.php, servizio_correlato.php) restano con il loro stile:
   qui si uniformano solo margini e angoli */
.st .stlb-box, .st .stsvc-box { border-radius: var(--st-radius) !important; margin-left: 0 !important; margin-right: 0 !important; }

@media print {
    .st-header, .st-footer, .st-aside, .st-below, .stlb-box, .stsvc-box { display: none !important; }
    .st-article { border: none; padding: 0; }
}

/* Indice della guida su tablet e smartphone: apribile, in cima al testo */
.st-toc-mobile { background: var(--st-bg); border-radius: 10px; padding: 14px 18px; margin: 0 0 24px; font-size: 15px; }
.st-toc-mobile summary { font-weight: 600; color: var(--st-ink); cursor: pointer; min-height: 28px; }
.st-toc-mobile ol { margin: 10px 0 0; padding-left: 20px; line-height: 1.6; }
.st-toc-mobile li { margin-bottom: 6px; }
.st-toc-mobile a { color: var(--st-ink); }

/* Box inclusi: pulsante del servizio correlato con contrasto sufficiente, link della privacy riconoscibile */
.st .stsvc-btn { background: var(--st-accent) !important; border-color: var(--st-accent) !important; color: #fff !important; }
.st .stsvc-btn:hover { background: var(--st-accent-dark) !important; }
.st-check a { text-decoration: underline; text-underline-offset: 2px; }
