/* ========================================
   BLOG ARTICLE STYLES - PresenzaInRete
   v1.0.0 - 2026-01-08 - Extracted from inline styles
   ======================================== */

:root {
    --ink: #1A1D26;
    --ink-soft: #2D3142;
    --ink-muted: #5C6378;
    --paper: #FAFAF9;
    --paper-warm: #F5F4F1;
    --paper-dark: #EBEAE6;
    --accent: #D4A84B;
    --accent-light: #E0BE6F;
    --accent-pale: #F5EDD8;
    --accent-glow: rgba(212, 168, 75, 0.15);
    --warm: #8B7355;
    --text: #1a1a1a;
    --text-soft: #555555;
    --text-muted: #888888;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Source Sans 3', -apple-system, sans-serif;
    background-color: var(--paper);
    color: var(--text);
    line-height: 1.8;
    font-size: 19px;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--white); }

/* ========================================
   HEADER
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--ink);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(250, 250, 249, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.875rem 2rem;
    box-shadow: 0 1px 0 var(--paper-dark);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--white);
    transition: color 0.3s ease;
}

.header.scrolled .logo { color: var(--ink); }

.logo-icon { height: 28px; width: auto; }
.logo-icon--light { display: block; }
.logo-icon--dark { display: none; }
.header.scrolled .logo-icon--light { display: none; }
.header.scrolled .logo-icon--dark { display: block; }

.logo-accent { color: var(--accent); }

.header nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header nav a {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.header nav a:hover { color: var(--white); }
.header.scrolled nav a { color: var(--ink-muted); }
.header.scrolled nav a:hover { color: var(--ink); }

.nav-cta {
    background: var(--accent) !important;
    color: var(--ink) !important;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-cta:hover { background: var(--accent-light) !important; }
.header.scrolled .nav-cta { background: var(--ink) !important; color: var(--white) !important; }
.header.scrolled .nav-cta:hover { background: var(--ink-soft) !important; }

/* ========================================
   READING PROGRESS BAR
======================================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--warm));
    width: 0%;
    z-index: 101;
    transition: width 0.1s ease-out;
}

/* ========================================
   ARTICLE HERO
======================================== */
.article-hero {
    padding: 10rem 2rem 5rem;
    background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 60%, var(--ink) 100%);
    position: relative;
    overflow: hidden;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 100% 60% at 30% 20%, rgba(212, 168, 75, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 80% 80%, rgba(139, 115, 85, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.article-hero::after {
    content: '';
    position: absolute;
    top: 20%;
    right: -10%;
    width: 1px;
    height: 120%;
    background: linear-gradient(to bottom, transparent, rgba(212, 168, 75, 0.3), transparent);
    transform: rotate(25deg);
}

.hero-inner {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}

.article-category::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--accent);
}

.article-date {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

.article-reading-time {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.article-reading-time svg {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.article-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 500;
    color: white;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    max-width: 850px;
}

.article-title em {
    font-style: italic;
    color: var(--accent-light);
}

.article-excerpt {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    line-height: 1.7;
    font-weight: 300;
}

/* ========================================
   ARTICLE LAYOUT
======================================== */
.article-container {
    display: grid;
    grid-template-columns: 1fr minmax(auto, 720px) 280px 1fr;
    gap: 3rem;
    padding: 4rem 2rem;
    position: relative;
}

.article-content {
    grid-column: 2;
}

.article-sidebar {
    grid-column: 3;
    position: relative;
}

/* ========================================
   TABLE OF CONTENTS (Sidebar)
======================================== */
.toc-wrapper {
    position: sticky;
    top: 100px;
}

.toc {
    background: white;
    border: 1px solid var(--paper-dark);
    padding: 1.75rem;
}

.toc-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.toc-list {
    list-style: none;
    max-height: 35vh;
    overflow-y: auto;
}

.toc-list li {
    margin-bottom: 0.6rem;
}

.toc-list a {
    font-size: 0.9rem;
    color: var(--text-soft);
    text-decoration: none;
    display: block;
    padding: 0.35rem 0;
    padding-left: 1rem;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--ink);
    border-left-color: var(--accent);
    padding-left: 1.25rem;
}

.toc-list a.active {
    font-weight: 500;
}

/* Sidebar CTA */
.sidebar-cta {
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
    padding: 1.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sidebar-cta::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(212, 168, 75, 0.2) 0%, transparent 70%);
}

.sidebar-cta-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 0.75rem;
    position: relative;
}

.sidebar-cta p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.25rem;
    line-height: 1.5;
    position: relative;
}

.sidebar-cta-btn {
    display: inline-block;
    background: var(--accent);
    color: var(--ink);
    padding: 0.7rem 1.25rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-cta-btn:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

/* ========================================
   ARTICLE CONTENT STYLES
======================================== */
.article-content h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.9rem;
    font-weight: 500;
    color: var(--ink);
    margin: 3.5rem 0 1.5rem;
    line-height: 1.25;
    position: relative;
    padding-left: 1.25rem;
}

.article-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), var(--warm));
}

.article-content h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--ink);
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--text);
}

.article-content a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.article-content a:hover {
    color: var(--warm);
    text-decoration-color: var(--warm);
}

.article-content strong {
    font-weight: 600;
    color: var(--ink);
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.article-content ul li::marker {
    color: var(--accent);
}

.article-content ol li::marker {
    color: var(--ink);
    font-weight: 600;
}

/* Blockquote */
.article-content blockquote {
    margin: 2.5rem 0;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, var(--accent-pale) 0%, white 100%);
    border-left: 4px solid var(--ink);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--ink);
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 4rem;
    color: var(--accent);
    position: absolute;
    top: -10px;
    left: 15px;
    line-height: 1;
    opacity: 0.5;
}

/* Data highlight box */
.data-highlight {
    background: var(--accent-pale);
    border: 1px solid var(--accent);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.data-item {
    text-align: center;
}

.data-value {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.25rem;
    color: var(--ink);
    line-height: 1;
}

.data-label {
    font-size: 0.85rem;
    color: var(--text-soft);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Info box / Tip */
.info-box {
    background: white;
    border: 1px solid var(--paper-dark);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    position: relative;
    padding-left: 4rem;
}

.info-box::before {
    content: 'i';
    position: absolute;
    left: 1.5rem;
    top: 1.5rem;
    width: 24px;
    height: 24px;
    background: var(--ink);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
}

.info-box.tip::before {
    content: '!';
    background: var(--accent);
    color: var(--ink);
}

/* Code blocks */
.article-content pre {
    background: var(--ink);
    color: var(--paper);
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 2rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.article-content code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.9em;
    background: var(--paper-warm);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.article-content pre code {
    background: transparent;
    padding: 0;
}

/* Prompt example box */
.prompt-example {
    background: var(--paper-warm);
    border: 1px solid var(--paper-dark);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.prompt-example-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.prompt-example pre {
    margin: 0;
    background: var(--ink);
}

/* Comparison table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--paper-dark);
}

.comparison-table th {
    background: var(--paper-warm);
    font-weight: 600;
    font-size: 0.875rem;
}

.comparison-table td {
    font-size: 0.9375rem;
}

/* ========================================
   FAQ SECTION
======================================== */
.faq-section {
    margin: 4rem 0;
    padding: 3rem;
    background: linear-gradient(180deg, var(--paper-dark) 0%, var(--paper) 100%);
    border-top: 3px solid var(--ink);
}

.faq-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.75rem;
    color: var(--ink);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-title::before {
    content: '?';
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(26, 29, 38, 0.1);
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-question {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

.faq-answer {
    font-size: 1rem;
    color: var(--text-soft);
    line-height: 1.7;
}

/* ========================================
   CTA BOX (In-content)
======================================== */
.cta-box {
    margin: 3rem 0;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(212, 168, 75, 0.1) 0%, transparent 50%);
    animation: ctaPulse 4s ease-in-out infinite;
}

@keyframes ctaPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.cta-box h3 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: white;
    margin-bottom: 0.75rem;
    position: relative;
}

.cta-box h3 em {
    font-style: italic;
    color: var(--accent-light);
}

.cta-box p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    position: relative;
}

.cta-box-btn {
    display: inline-block;
    background: var(--accent);
    color: var(--ink);
    padding: 1rem 2.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.cta-box-btn:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 168, 75, 0.4);
}

/* ========================================
   AUTHOR BOX
======================================== */
.author-box {
    margin: 4rem 0;
    padding: 2rem;
    background: white;
    border: 1px solid var(--paper-dark);
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.author-avatar svg {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.author-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.1rem;
    color: var(--ink);
    margin-bottom: 0.25rem;
}

.author-info .author-role {
    font-size: 0.85rem;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.author-info p {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.6;
}

/* ========================================
   RELATED ARTICLES
======================================== */
.related-section {
    background: var(--ink);
    padding: 5rem 2rem;
}

.related-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.related-header {
    text-align: center;
    margin-bottom: 3rem;
}

.related-label {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.related-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2rem;
    color: white;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 168, 75, 0.15);
    padding: 2rem;
    transition: all 0.4s ease;
    text-decoration: none;
    display: block;
    position: relative;
}

.related-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.related-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
}

.related-card:hover::before {
    transform: scaleX(1);
}

.related-card-category {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.related-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.2rem;
    color: white;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.related-card-excerpt {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
    background: var(--ink);
    padding: 3rem 2rem 2rem;
    color: white;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-logo {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-logo span { color: var(--accent); }

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1200px) {
    .article-container {
        grid-template-columns: 1fr minmax(auto, 720px) 1fr;
    }

    .article-sidebar {
        display: none;
    }

    .article-content {
        grid-column: 2;
    }
}

@media (max-width: 900px) {
    .article-container {
        grid-template-columns: 1fr;
        padding: 3rem 1.5rem;
    }

    .article-content {
        grid-column: 1;
        max-width: 720px;
        margin: 0 auto;
    }

    .article-hero {
        padding: 8rem 1.5rem 4rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .header nav {
        display: none;
    }
}

@media (max-width: 600px) {
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .data-highlight {
        grid-template-columns: 1fr 1fr;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
