.article-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
}

.article-content {
    width: 100%;
}

.article-header {
    background: #6f42c1;
    padding: 0;
    border-radius: 8px;
    margin-bottom: 2rem;
    color: white;
    overflow: hidden;
    display: flex;
    align-items: stretch;
}

.article-header-content {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-image {
    width: 50%;
    min-height: 300px;
    padding: 1.5rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.article-image-inner {
    width: 100%;
    height: auto;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    border-radius: 10px;
    min-height: 300px;
}

.article-image-mobile {
    display: none;
    width: 100%;
    margin-bottom: 0rem;
}

.article-image-mobile img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.article-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: white;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: white;
    line-height: 1.3;
    font-weight: 700;
}

.article-meta {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.article-excerpt {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.article-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
    padding: 0 1rem;
    max-width: 70%;
    margin: 0;
}

.article-text p {
    margin-bottom: 1.5rem;
}

.article-text h1,
.article-text h2,
.article-text h3,
.article-text h4,
.article-text h5,
.article-text h6 {
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.3;
}

.article-text h1 { font-size: 1.8rem; }
.article-text h2 { font-size: 1.6rem; }
.article-text h3 { font-size: 1.4rem; }
.article-text h4 { font-size: 1.2rem; }
.article-text h5 { font-size: 1.1rem; }
.article-text h6 { font-size: 1rem; }

.article-text a {
    color: #ff9800;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 152, 0, 0.3);
    transition: all 0.2s ease;
}

.article-text a:hover {
    color: #f57c00;
    border-bottom-color: #f57c00;
}

.article-text strong {
    color: #ff9800;
    font-weight: 600;
}

.article-text em {
    color: #666;
    font-style: italic;
}

.article-text ul,
.article-text ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-text li {
    margin-bottom: 0.5rem;
}

.article-text blockquote {
    border-left: 4px solid #ff9800;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #666;
    font-style: italic;
}

/* CTA box styles */
.article-cta {
    background: linear-gradient(135deg, #6f42c1, #8150E6);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    color: white;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(111, 66, 193, 0.2);
    position: relative;
    overflow: hidden;
}

.article-cta::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwMCAyMDBDMTU1LjIyOCAyMDAgMjAwIDE1NS4yMjggMjAwIDEwMEMyMDAgNDQuNzcxNiAxNTUuMjI4IDAgMTAwIDBDNDQuNzcxNiAwIDAgNDQuNzcxNiAwIDEwMEMwIDE1NS4yMjggNDQuNzcxNiAyMDAgMTAwIDIwMFoiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcikiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXIiIHgxPSIwIiB5MT0iMCIgeDI9IjIwMCIgeTI9IjIwMCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IndoaXRlIiBzdG9wLW9wYWNpdHk9IjAuMSIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0id2hpdGUiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==') no-repeat;
    background-size: cover;
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
}

.article-cta-icon {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    margin-right: 1.5rem;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.article-cta-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.article-cta-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.article-cta-content h3 {
    color: white !important;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0 !important;
    font-weight: 600;
}

.article-cta-content .product-description {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 1rem !important;
    font-size: 0.95rem;
    line-height: 1.4;
    max-width: 90%;
}

.article-cta-content p {
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 1rem !important;
    font-size: 1rem;
}

.article-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #6f42c1 !important;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: all 0.2s;
}

.article-cta-button:hover {
    background: #f2f2f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #6f42c1 !important;
    border-bottom: none !important;
}

.article-cta-button svg {
    width: 16px;
    height: 16px;
    margin-left: 8px;
    fill: #6f42c1;
}

.article-cta-button svg:not(.marketplace-icon) {
    transition: transform 0.2s;
}

.article-cta-button .marketplace-icon {
    margin-right: 8px;
    margin-left: 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.article-cta-button:hover svg:not(.marketplace-icon) {
    transform: translateX(3px);
}

/* Telegram banner styles */
.telegram-news-banner {
    margin-bottom: 2rem;
}

.telegram-banner-content {
    background: linear-gradient(135deg, #0088cc, #005f8c);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.telegram-banner-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEwMCAyMDBDMTU1LjIyOCAyMDAgMjAwIDE1NS4yMjggMjAwIDEwMEMyMDAgNDQuNzcxNiAxNTUuMjI4IDAgMTAwIDBDNDQuNzcxNiAwIDAgNDQuNzcxNiAwIDEwMEMwIDE1NS4yMjggNDQuNzcxNiAyMDAgMTAwIDIwMFoiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcikiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXIiIHgxPSIwIiB5MT0iMCIgeDI9IjIwMCIgeTI9IjIwMCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IndoaXRlIiBzdG9wLW9wYWNpdHk9IjAuMSIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0id2hpdGUiIHN0b3Atb3BhY2l0eT0iMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjwvc3ZnPg==') no-repeat;
    background-size: cover;
    opacity: 0.2;
    z-index: 1;
    pointer-events: none;
}

.telegram-banner-icon {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    margin-right: 1.5rem;
}

.telegram-banner-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
}

.telegram-banner-text {
    flex: 1;
}

.telegram-banner-text h3 {
    color: white !important;
    font-size: 1.5rem;
    margin: 0 0 0.3rem 0 !important;
    font-weight: 600;
}

.telegram-banner-text p {
    color: rgba(255, 255, 255, 0.8) !important;
    margin-bottom: 0 !important;
    font-size: 1rem;
}

.telegram-banner-cta {
    flex: 0 0 auto;
    background: white;
    color: #0088cc !important;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none !important;
    border-bottom: none !important;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    margin-left: 1.5rem;
    position: relative;
    z-index: 2;
}

.telegram-banner-cta svg {
    width: 16px;
    height: 16px;
    margin-left: 8px;
    fill: #0088cc;
    transition: transform 0.2s;
}

.telegram-banner-cta:hover {
    background: #f2f2f2;
    color: #0088cc !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-bottom: none !important;
}

.telegram-banner-cta:hover svg {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .article-cta, .telegram-banner-content {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .article-cta-icon, .telegram-banner-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .article-cta-content p, .telegram-banner-text p {
        margin-bottom: 1.5rem !important;
    }
    
    .telegram-banner-cta {
        margin-left: 0;
    }
    
    .article-cta-button {
        justify-content: center;
        width: 100%;
    }
    
    .article-cta-button .marketplace-icon {
        width: 18px;
        height: 18px;
    }
    
    .mobile-only-button {
        display: block;
        margin-top: 1rem;
    }
    
    .desktop-only-button {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-only-button {
        display: none;
    }
}

@media (max-width: 991px) {
    .article-container {
        padding: 1rem 0;
        padding-top: 0 !important;
    }

    .article-header {
        flex-direction: column;
        margin-bottom: 2rem;
        border-radius: 0;
        margin-bottom: 0;
    }

    .article-header-content {
        padding: 2rem;
    }

    .article-image {
        display: none;
    }

    .article-image-mobile {
        display: block;
    }

    .article-text {
        max-width: 100%;
        padding: 0;
        margin-top: 2rem;
    }

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

    #page-top {
        background-color: #fff;
    }
    .masthead-article {
        background: white;
        /* margin: 0 !important; */
        margin-bottom: 0;
        padding-bottom: 0;
        padding: 0 !important;
        padding-top: 5px !important;
    }
    .container-article-header {
        padding: 0 !important;
    }
    .breadcrumb-nav {
        margin-bottom: 1rem !important;
        display: none;
    }
    ol.breadcrumb {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        margin: 0;
        background: #6f42c1;
    }
    .article-container {
        box-shadow: none;
        padding-bottom: 0;
    }
}

/* Stili per gli articoli correlati - assicurarsi che siano identici a quelli in news.php */
.related-articles {
    padding-top: 3rem;
    padding-bottom: 3rem;
    background-color: #14122c;
}

.related-articles .article-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #1e1b3f;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-articles .article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.related-articles .article-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-articles .article-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.related-articles .article-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.related-articles .article-card-content {
    padding: 1.5rem;
    background: #1e1b3f;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-articles .article-card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 600;
}

.related-articles .article-card-excerpt {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 10px;
    flex-grow: 1;
}

.related-articles .article-card-meta {
    margin-top: auto;
}

.related-articles .article-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.related-articles .featured-section-title {
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-articles .featured-section-title::before,
.related-articles .featured-section-title::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: #fff;
}

.related-articles .featured-section-title::before {
    margin-right: 10px;
}

.related-articles .featured-section-title::after {
    margin-left: 10px;
}