/* === ARTICLE NEWS CONTENT WRAPPER === */
.article-news-content {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: #1a1a1a;
}

/* === PARAGRAFI === */
.article-news-content p {
    margin-bottom: 1.5em;
    line-height: 1.8;
}

.article-news-content p:last-child {
    margin-bottom: 0;
}

/* === TITOLI === */
.article-news-content h1,
.article-news-content h2,
.article-news-content h3,
.article-news-content h4,
.article-news-content h5,
.article-news-content h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 1em;
    color: #1a1a1a;
}

.article-news-content h1 {
    font-size: 2.5em;
}

.article-news-content h2 {
    font-size: 2em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.3em;
}

.article-news-content h3 {
    font-size: 1.75em;
}

.article-news-content h4 {
    font-size: 1.5em;
}

.article-news-content h5 {
    font-size: 1.25em;
}

.article-news-content h6 {
    font-size: 1.1em;
}

/* === LINK === */
.article-news-content a {
    color: #0d47ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(13, 71, 255, 0.3);
    transition: all 0.2s ease;
}

.article-news-content a:hover {
    color: #0a38cc;
    border-bottom-color: #0d47ff;
}

/* === LISTE === */
.article-news-content ul,
.article-news-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.article-news-content ul {
    list-style-type: disc;
}

.article-news-content ol {
    list-style-type: decimal;
}

.article-news-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

.article-news-content ul ul,
.article-news-content ol ol,
.article-news-content ul ol,
.article-news-content ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* === IMMAGINI === */
.article-news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2em 0;
    display: block;
}

.article-news-content figure {
    margin: 2em 0;
}

.article-news-content figcaption {
    font-size: 0.875em;
    color: #666;
    text-align: center;
    margin-top: 0.5em;
    font-style: italic;
}

/* WordPress alignment classes */
.article-news-content .alignleft {
    float: left;
    margin: 0.5em 2em 1em 0;
}

.article-news-content .alignright {
    float: right;
    margin: 0.5em 0 1em 2em;
}

.article-news-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* === BLOCKQUOTE === */
.article-news-content blockquote {
    border-left: 4px solid #0d47ff;
    padding: 1em 1.5em;
    margin: 2em 0;
    background: #f8f9fa;
    font-style: italic;
    color: #333;
    border-radius: 0 8px 8px 0;
}

.article-news-content blockquote p {
    margin-bottom: 0.5em;
}

.article-news-content blockquote p:last-child {
    margin-bottom: 0;
}

.article-news-content blockquote cite {
    display: block;
    margin-top: 1em;
    font-size: 0.875em;
    color: #666;
    font-style: normal;
}

.article-news-content blockquote cite:before {
    content: "— ";
}

/* === CODE === */
.article-news-content code {
    background: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.article-news-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
}

.article-news-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.875em;
}

/* === TABELLE === */
.article-news-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-news-content table thead {
    background: #f8f9fa;
}

.article-news-content table th {
    padding: 1em;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #dee2e6;
    color: #1a1a1a;
}

.article-news-content table td {
    padding: 1em;
    border-bottom: 1px solid #f0f0f0;
}

.article-news-content table tbody tr:hover {
    background: #f8f9fa;
}

.article-news-content table tbody tr:last-child td {
    border-bottom: none;
}

/* === HR === */
.article-news-content hr {
    border: none;
    border-top: 2px solid #f0f0f0;
    margin: 3em 0;
}

/* === STRONG & EM === */
.article-news-content strong,
.article-news-content b {
    font-weight: 700;
    color: #000;
}

.article-news-content em,
.article-news-content i {
    font-style: italic;
}

/* === IFRAME & VIDEO === */
.article-news-content iframe,
.article-news-content video {
    max-width: 100%;
    margin: 2em 0;
    border-radius: 8px;
}

/* WordPress embed wrapper */
.article-news-content .wp-block-embed {
    margin: 2em 0;
}

.article-news-content .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.article-news-content .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

/* === GUTENBERG BLOCKS === */
.article-news-content .wp-block-image {
    margin: 2em 0;
}

.article-news-content .wp-block-quote {
    border-left: 4px solid #0d47ff;
    padding: 1em 1.5em;
    margin: 2em 0;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

.article-news-content .wp-block-pullquote {
    border-top: 4px solid #0d47ff;
    border-bottom: 4px solid #0d47ff;
    padding: 2em 0;
    margin: 3em 0;
    text-align: center;
    font-size: 1.25em;
}

.article-news-content .wp-block-button__link {
    display: inline-block;
    padding: 12px 30px;
    background: #0d47ff;
    color: white !important;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-news-content .wp-block-button__link:hover {
    background: #0a38cc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 71, 255, 0.3);
}

/* === GALLERY === */
.article-news-content .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1em;
    margin: 2em 0;
}

.article-news-content .gallery-item {
    margin: 0;
}

.article-news-content .gallery-item img {
    margin: 0;
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .article-news-content {
        font-size: 16px;
    }
    
    .article-news-content h1 {
        font-size: 2em;
    }
    
    .article-news-content h2 {
        font-size: 1.75em;
    }
    
    .article-news-content h3 {
        font-size: 1.5em;
    }
    
    .article-news-content h4 {
        font-size: 1.25em;
    }
    
    .article-news-content .alignleft,
    .article-news-content .alignright {
        float: none;
        margin: 1em 0;
        display: block;
    }
    
    .article-news-content ul,
    .article-news-content ol {
        padding-left: 1.5em;
    }
    
    .article-news-content blockquote {
        padding: 1em;
        margin: 1.5em 0;
    }
    
    .article-news-content table {
        font-size: 0.875em;
    }
    
    .article-news-content table th,
    .article-news-content table td {
        padding: 0.75em 0.5em;
    }
}

@media (max-width: 480px) {
    .article-news-content {
        font-size: 15px;
    }
    
    .article-news-content pre {
        padding: 1em;
        font-size: 0.8em;
    }
    
    /* Tabelle scrollabili su mobile */
    .article-news-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* === PRINT STYLES === */
@media print {
    .article-news-content {
        font-size: 12pt;
        color: #000;
    }
    
    .article-news-content a {
        color: #000;
        text-decoration: underline;
    }
    
    .article-news-content img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}