/* ========================================================
   TascaPiena — Blog & Article Styles
   Coerente con il design system del sito principale:
   - Font: Poppins (heading) + Inter (body)
   - Colori: #1E1B4B (navy), #3B82F6 (blue), #10B981 (green)
   - Background: #fafafa
   ======================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: #fafafa;
    color: #1E293B;
    overflow-x: hidden;
}

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 40px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 27, 75, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.navbar-brand img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}
.navbar-brand span {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #fff;
}
.navbar-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.navbar-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}
.navbar-links a:hover,
.navbar-links a.active {
    color: #fff;
}
.btn-accedi {
    background: #3B82F6 !important;
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600 !important;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn-accedi:hover {
    background: #2563EB !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

@media (max-width: 700px) {
    .navbar { padding: 0 20px; height: 60px; }
    .navbar-brand img { width: 34px; height: 34px; }
    .navbar-brand span { font-size: 17px; }
    .navbar-links { gap: 16px; }
    .navbar-links a:not(.btn-accedi) { display: none; }
    .btn-accedi { padding: 8px 18px; font-size: 13px !important; }
}

/* ========== ARTICLE HERO ========== */
.article-hero {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 40%, #3B82F6 100%);
    padding: 120px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.article-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    border-radius: 50%;
}
.article-hero::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
}
.article-hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.article-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 40px;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 20px;
}
.article-category {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.9);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}
.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}
.meta-sep {
    color: rgba(255,255,255,0.3);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 24px;
    font-size: 13px;
}
.breadcrumb a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover {
    color: rgba(255,255,255,0.9);
}
.breadcrumb .sep {
    color: rgba(255,255,255,0.25);
    margin: 0 8px;
}
.breadcrumb .current {
    color: rgba(255,255,255,0.8);
}

@media (max-width: 700px) {
    .article-hero { padding: 100px 20px 48px; }
    .article-hero h1 { font-size: 28px; }
    .breadcrumb .current { display: none; }
}

/* ========== TABLE OF CONTENTS ========== */
.toc {
    background: #F0F4FF;
    border: 1px solid #DBEAFE;
    border-left: 4px solid #3B82F6;
    border-radius: 0 12px 12px 0;
    padding: 24px 28px;
    margin: 28px 0 32px;
}
.toc h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: #1E1B4B;
    margin: 0 0 14px;
}
.toc ol {
    margin: 0;
    padding: 0 0 0 20px;
}
.toc li {
    margin-bottom: 6px;
    line-height: 1.5;
    list-style-type: decimal;
}
.toc a {
    color: #3B82F6;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}
.toc a:hover {
    color: #1D4ED8;
    text-decoration: underline;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}
/* Offset for fixed navbar */
h2[id] {
    scroll-margin-top: 90px;
}

/* ========== BLOG HERO (index page) ========== */
.blog-hero {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 40%, #3B82F6 100%);
    padding: 120px 24px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    top: -150px;
    right: -100px;
    border-radius: 50%;
}
.blog-hero::after {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    bottom: -80px;
    left: -80px;
    border-radius: 50%;
}
.blog-hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.blog-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 44px;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 16px;
}
.blog-hero h1 .highlight {
    background: linear-gradient(135deg, #10B981, #34D399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.blog-hero-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255,255,255,0.7);
    max-width: 560px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    .blog-hero { padding: 100px 20px 48px; }
    .blog-hero h1 { font-size: 32px; }
}

/* ========== BLOG LIST ========== */
.blog-list-section {
    padding: 60px 24px 80px;
}
.blog-list-container {
    max-width: 900px;
    margin: 0 auto;
}
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.blog-card {
    display: block;
    background: #fff;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
    overflow: hidden;
}
.blog-card:hover {
    border-color: #3B82F6;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}
.blog-card-body {
    padding: 28px 32px;
}
.blog-card-category {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #3B82F6;
    margin-bottom: 12px;
}
.blog-card h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #1E1B4B;
    line-height: 1.3;
    margin-bottom: 10px;
}
.blog-card p {
    font-size: 15px;
    line-height: 1.7;
    color: #6B7280;
    margin-bottom: 16px;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #9CA3AF;
}
.blog-card-meta .meta-sep {
    color: #D1D5DB;
}
.no-articles {
    text-align: center;
    font-size: 16px;
    color: #9CA3AF;
    padding: 80px 0;
}

@media (max-width: 580px) {
    .blog-card-body { padding: 20px 24px; }
    .blog-card h2 { font-size: 18px; }
}

/* ========== SOCIAL SHARING ========== */
.social-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 32px 0;
    padding: 20px 0;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}
.social-share-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    margin-right: 4px;
}
.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.social-share a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.social-share .share-facebook { background: #1877F2; }
.social-share .share-twitter { background: #000000; }
.social-share .share-linkedin { background: #0A66C2; }
.social-share .share-whatsapp { background: #25D366; }
.social-share .share-telegram { background: #0088cc; }
.social-share .share-copy {
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    cursor: pointer;
}
.social-share .share-copy:hover { background: #E5E7EB; }
.social-share svg { width: 20px; height: 20px; fill: #fff; }
.social-share .share-copy svg { fill: #374151; }

@media (max-width: 580px) {
    .social-share { flex-wrap: wrap; gap: 8px; }
    .social-share a { width: 36px; height: 36px; }
    .social-share svg { width: 18px; height: 18px; }
}

/* ========== ARTICLE CONTENT ========== */
.article-content {
    padding: 60px 24px 80px;
}
.article-container {
    max-width: 760px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.8;
    color: #374151;
}

/* Typography */
.article-container h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #1E1B4B;
    margin: 48px 0 16px;
    line-height: 1.3;
}
.article-container h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 22px;
    color: #1E1B4B;
    margin: 36px 0 12px;
    line-height: 1.35;
}
.article-container h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: #374151;
    margin: 28px 0 10px;
}
.article-container p {
    margin-bottom: 20px;
}
.article-container a {
    color: #3B82F6;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.article-container a:hover {
    color: #1D4ED8;
}
.article-container strong {
    font-weight: 600;
    color: #1E293B;
}
.article-container em {
    font-style: italic;
}

/* Lists */
.article-container ul,
.article-container ol {
    margin: 0 0 24px 24px;
}
.article-container li {
    margin-bottom: 8px;
    line-height: 1.7;
}
.article-container ul li {
    list-style-type: disc;
}

/* Blockquote */
.article-container blockquote {
    margin: 32px 0;
    padding: 20px 28px;
    border-left: 4px solid #3B82F6;
    background: #EEF2FF;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #4B5563;
}
.article-container blockquote p:last-child {
    margin-bottom: 0;
}

/* Code */
.article-container code {
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    color: #1E1B4B;
}
.article-container pre {
    background: #1E1B4B;
    color: #E2E8F0;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.6;
}
.article-container pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Images */
.article-container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}
.article-container figure {
    margin: 32px 0;
    text-align: center;
}
.article-container figcaption {
    font-size: 13px;
    color: #9CA3AF;
    margin-top: 8px;
}

/* Tables */
.article-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.article-container thead {
    background: #1E1B4B;
    color: #fff;
}
.article-container th {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    padding: 14px 18px;
    text-align: left;
}
.article-container td {
    padding: 12px 18px;
    border-bottom: 1px solid #F3F4F6;
}
.article-container tbody tr:hover {
    background: #F8FAFC;
}

/* Horizontal rule */
.article-container hr {
    border: none;
    height: 1px;
    background: #E5E7EB;
    margin: 48px 0;
}

/* Mark (highlight) */
.article-container mark {
    background: rgba(59, 130, 246, 0.1);
    color: #1E1B4B;
    padding: 2px 6px;
    border-radius: 4px;
}

@media (max-width: 700px) {
    .article-content { padding: 40px 20px 60px; }
    .article-container { font-size: 16px; }
    .article-container h2 { font-size: 24px; margin-top: 36px; }
    .article-container h3 { font-size: 20px; }
}

/* ========== ARTICLE CTA ========== */
.article-cta {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #3B82F6 100%);
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.article-cta::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, transparent 70%);
    top: -120px;
    right: -80px;
    border-radius: 50%;
}
.article-cta-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.article-cta h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.2;
}
.article-cta p {
    font-size: 16px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 32px;
    line-height: 1.6;
}
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #10B981;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    padding: 16px 36px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    border: none;
    cursor: pointer;
}
.btn-cta:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

@media (max-width: 580px) {
    .article-cta { padding: 60px 20px; }
    .article-cta h2 { font-size: 24px; }
}

/* ========== RELATED ARTICLES ========== */
.related-articles {
    padding: 60px 24px;
    background: #F3F4F6;
}
.related-articles h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: #1E1B4B;
    text-align: center;
    margin-bottom: 32px;
}
.related-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.related-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    text-decoration: none;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}
.related-card:hover {
    border-color: #3B82F6;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}
.related-card h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #1E1B4B;
    margin-bottom: 8px;
    line-height: 1.3;
}
.related-card p {
    font-size: 14px;
    line-height: 1.6;
    color: #6B7280;
}

@media (max-width: 700px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .related-articles { padding: 48px 20px; }
}

/* ========== FOOTER ========== */
.site-footer {
    background: #1E1B4B;
    padding: 60px 40px 0;
    color: rgba(255,255,255,0.7);
}
.footer-container {
    max-width: 1100px;
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.footer-logo img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}
.footer-brand h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    margin-bottom: 0;
}
.footer-brand p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 280px;
}
.footer-col h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col li {
    margin-bottom: 10px;
}
.footer-col a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}
.footer-col a:hover {
    color: #3B82F6;
}
.footer-bottom {
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
}

@media (max-width: 700px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .site-footer { padding: 48px 24px 0; }
}
@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
