/* ========================================
   DENTAL FAMILY - ARTICLE STYLES v2.0
   Material Symbols + Blue Theme
   Sticky TOC Sidebar
   ======================================== */

:root {
    --article-primary: #2563eb;
    --article-primary-light: #3b82f6;
    --article-primary-dark: #1d4ed8;
    --article-text: #1f2937;
    --article-text-light: #6b7280;
    --article-bg: #f8fafc;
    --article-white: #ffffff;
    --article-border: #e5e7eb;
    --article-radius: 12px;
    --article-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ========================================
   LAYOUT WITH SIDEBAR
   ======================================== */
.dental-article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    padding-top: 120px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--article-text);
    line-height: 1.8;
    font-size: 1rem;
}

/* Desktop: Two column layout */
@media (min-width: 1024px) {
    .dental-article {
        display: grid;
        grid-template-columns: 1fr 280px;
        gap: 3rem;
        align-items: start;
    }

    .article-main {
        min-width: 0;
    }

    .article-sidebar {
        position: sticky;
        top: 140px;
        max-height: calc(100vh - 160px);
        overflow-y: auto;
    }
}

/* Mobile: Single column */
@media (max-width: 1023px) {
    .dental-article {
        display: block;
        max-width: 800px;
    }

    .article-sidebar {
        margin-bottom: 2rem;
    }
}

/* ========================================
   ARTICLE HEADER
   ======================================== */
.article-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--article-border);
}

@media (min-width: 1024px) {
    .article-header {
        grid-column: 1 / -1;
    }
}

.article-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-category {
    background: var(--article-primary);
    color: white;
}

.badge-format {
    background: var(--article-bg);
    color: var(--article-primary);
    border: 1px solid var(--article-primary);
}

.badge .material-symbols-outlined {
    font-size: 1rem;
}

.article-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--article-text);
    margin: 0 0 1.25rem;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--article-text-light);
    font-size: 0.9rem;
}

.article-meta>* {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.article-meta .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--article-primary);
}

/* ========================================
   FEATURED SNIPPET
   ======================================== */
.featured-snippet {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-left: 4px solid var(--article-primary);
    border-radius: var(--article-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.snippet-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--article-primary);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.snippet-badge .material-symbols-outlined {
    font-size: 1rem;
}

.snippet-text {
    margin: 0;
    font-size: 1rem;
    color: var(--article-text);
}

/* ========================================
   HIGHLIGHT BOX - NO TRUNCATION
   ======================================== */
.highlight-box {
    display: none !important;
    /* Nascosto - usiamo solo snippet */
}

/* ========================================
   TABLE OF CONTENTS - STICKY SIDEBAR
   ======================================== */
.article-toc {
    background: var(--article-white);
    border: 1px solid var(--article-border);
    border-radius: var(--article-radius);
    padding: 0;
    box-shadow: var(--article-shadow);
    overflow: hidden;
}

.article-toc details {
    margin: 0;
}

.article-toc summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--article-bg);
    cursor: pointer;
    font-weight: 600;
    color: var(--article-text);
    border-bottom: 1px solid var(--article-border);
    list-style: none;
}

.article-toc summary::-webkit-details-marker {
    display: none;
}

.article-toc summary::after {
    content: '';
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--article-primary);
    border-bottom: 2px solid var(--article-primary);
    transform: rotate(45deg);
    transition: transform 0.3s;
}

.article-toc details[open] summary::after {
    transform: rotate(-135deg);
}

.article-toc summary .material-symbols-outlined {
    color: var(--article-primary);
    font-size: 1.25rem;
}

.toc-list {
    margin: 0;
    padding: 1rem 1.25rem 1rem 2.5rem;
    list-style: none;
}

.toc-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--article-border);
}

.toc-item:last-child {
    border-bottom: none;
}

.toc-item a {
    color: var(--article-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.toc-item a:hover {
    color: var(--article-primary);
}

/* ========================================
   ARTICLE CONTENT
   ======================================== */
.article-intro p {
    font-size: 1.1rem;
    color: var(--article-text-light);
    line-height: 1.9;
    margin-bottom: 2rem;
}

.article-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--article-text);
    margin: 2.5rem 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--article-primary);
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--article-text);
    margin: 1.75rem 0 1rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

/* ========================================
   BLUE BULLET POINTS
   ======================================== */
.article-content ul,
.article-content ol {
    margin: 1.25rem 0;
    padding-left: 0;
    list-style: none;
}

.article-content ul li,
.article-content ol li {
    position: relative;
    margin-bottom: 0.75rem;
    padding-left: 1.75rem;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: var(--article-primary);
    border-radius: 50%;
}

.article-content ol {
    counter-reset: item;
}

.article-content ol li::before {
    content: counter(item);
    counter-increment: item;
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--article-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-content strong {
    color: var(--article-primary-dark);
    font-weight: 600;
}

.article-content a {
    color: var(--article-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Definition style for inline bold terms */
.article-content p strong:first-child {
    color: var(--article-primary-dark);
}

/* ========================================
   TIP BOX
   ======================================== */
.tip-box {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--article-radius);
    margin: 2rem 0;
    align-items: flex-start;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 1px solid #10b981;
}

.tip-box .tip-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #10b981;
}

.tip-box .tip-icon .material-symbols-outlined {
    color: white;
    font-size: 1.25rem;
}

.tip-box .tip-label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    color: #065f46;
}

.tip-box p {
    margin: 0;
    font-size: 0.95rem;
    color: #065f46;
}

/* ========================================
   CTA BOX - LEFT ALIGNED, TITLE/BUTTON CENTERED
   ======================================== */
.cta-box {
    background: linear-gradient(135deg, var(--article-primary), var(--article-primary-light));
    border-radius: var(--article-radius);
    padding: 2.5rem 2rem;
    margin: 3rem 0;
    color: white;
    /* NOT text-align center - content stays left */
}

@media (min-width: 1024px) {
    .cta-box {
        grid-column: 1 / -1;
    }
}

.cta-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

.cta-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.cta-header .material-symbols-outlined {
    font-size: 1.75rem;
}

/* CTA Box Content Alignment */
.cta-box>p,
.cta-card p {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0 0 1.5rem;
    text-align: left !important;
}

/* Desktop: ALL LEFT ALIGNED */
@media (min-width: 1024px) {

    .cta-header,
    .cta-card h3 {
        justify-content: flex-start;
        text-align: left !important;
        width: 100%;
        display: flex;
        margin: 0 0 1rem;
    }

    .cta-buttons,
    .cta-card .btn {
        margin: 0;
        display: inline-flex;
    }

    .cta-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left !important;
    }

    /* Override generic text-center */
    .cta-card.text-center h3,
    .cta-card.text-center .btn {
        text-align: left !important;
    }
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
}

.cta-phone {
    background: white;
    color: var(--article-primary);
}

.cta-phone:hover {
    background: #f0f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cta-whatsapp {
    background: #25d366;
    color: white;
}

.cta-whatsapp:hover {
    background: #1fb855;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.cta-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

.cta-info {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.cta-info p {
    margin: 0.4rem 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.cta-info .material-symbols-outlined {
    font-size: 1rem;
}

/* ========================================
   ARTICLE CONCLUSION
   ======================================== */
.article-conclusion {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--article-border);
}

.article-conclusion h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    border-bottom: none;
}

/* ========================================
   HIDE DISCLAIMER
   ======================================== */
.medical-disclaimer {
    display: none !important;
}

/* ========================================
   ARTICLE FOOTER
   ======================================== */
.article-footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--article-border);
    color: var(--article-text-light);
    font-size: 0.85rem;
}

@media (min-width: 1024px) {
    .article-footer {
        grid-column: 1 / -1;
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .dental-article {
        padding: 1rem;
        padding-top: 100px;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .article-meta {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .cta-box {
        padding: 2rem 1.5rem;
        text-align: center;
    }

    .cta-header {
        flex-direction: column;
        text-align: center;
    }

    .cta-header h3 {
        font-size: 1.25rem;
        text-align: center !important;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cta-btn {
        width: 100%;
        justify-content: center;
    }

    .tip-box {
        flex-direction: column;
        text-align: center;
    }

    .tip-box .tip-icon {
        margin: 0 auto;
    }
}

/* Fix CTA Spacing & Colors */
.cta-box h3,
.cta-box p {
    color: white !important;
}

.cta-header .material-symbols-outlined {
    color: white !important;
}

/* Ensure buttons have gaps */
.cta-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Specific button styling to avoid "white on white" or alignment issues */
.cta-phone {
    background: #ffffff !important;
    color: var(--article-primary) !important;
    border: 1px solid white;
    font-weight: 700;
}

.cta-whatsapp {
    background: #25d366 !important;
    color: white !important;
    border: 1px solid #25d366;
    font-weight: 700;
}

.cta-phone:hover,
.cta-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}