/* ===================================
   MOBILE ARTICLE - Complete Redesign
   =================================== */

/* Prevent ALL horizontal scroll */
html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

@media (max-width: 768px) {

    /* ===== CONTAINER ===== */
    .container {
        padding: 0 1rem !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    /* ===== ARTICLE LAYOUT ===== */
    .article-full {
        padding: 1rem !important;
        margin: 0;
        border-radius: 8px !important;
    }

    /* ===== TYPOGRAPHY - RIDOTTA ===== */
    .article-header h1 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
        word-wrap: break-word;
    }

    .article-meta-full {
        font-size: 0.8rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .article-meta-full .meta-item {
        font-size: 0.75rem !important;
    }

    .article-body,
    .article-content {
        font-size: 0.95rem !important;
        line-height: 1.6;
        overflow-x: hidden;
    }

    .article-body h2,
    .article-content h2 {
        font-size: 1.3rem !important;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .article-body h3,
    .article-content h3 {
        font-size: 1.15rem !important;
        margin-top: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .article-body p,
    .article-content p {
        font-size: 0.95rem !important;
        margin-bottom: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* ===== IMAGES - RIDOTTE ===== */
    .article-featured-image {
        margin: 1rem -1rem !important;
        max-height: 200px !important;
        overflow: hidden;
    }

    .article-featured-image img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover;
    }

    .article-body img,
    .article-content img {
        max-width: 100% !important;
        height: auto !important;
        margin: 1rem 0;
        border-radius: 4px;
    }

    /* ===== TAGS ===== */
    .article-tags {
        margin: 0.75rem 0;
    }

    .article-tags .tag {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem;
    }

    /* ===== TABLES - SCROLL WRAPPER ===== */
    .article-content table,
    .article-body table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 1rem 0;
        font-size: 0.85rem !important;
    }

    .article-content table td,
    .article-content table th,
    .article-body table td,
    .article-body table th {
        padding: 0.5rem;
        white-space: nowrap;
    }

    /* ===== SOCIAL SHARE ===== */
    .social-share {
        margin: 1.5rem 0;
    }

    .social-share h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem;
    }

    .social-share-buttons {
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .social-btn {
        width: 36px !important;
        height: 36px !important;
    }

    /* ===== COMMENTS ===== */
    .comments-section h2 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem;
    }

    .comment {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }

    .comment-header {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .comment-body {
        font-size: 0.9rem !important;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .comment-form textarea {
        font-size: 0.95rem !important;
        min-height: 100px;
    }

    /* ===== SIDEBAR ===== */
    .sidebar-widget {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }

    .sidebar-widget h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.75rem;
    }

    .related-article h4,
    .popular-article .popular-title {
        font-size: 0.9rem !important;
        line-height: 1.4;
    }

    .related-article p {
        font-size: 0.85rem !important;
    }

    .related-meta,
    .popular-views {
        font-size: 0.75rem !important;
    }

    /* ===== BREADCRUMBS ===== */
    .breadcrumbs {
        font-size: 0.8rem !important;
        margin: 0.5rem 0;
        padding: 0 1rem;
    }

    /* ===== BUTTONS ===== */
    .btn {
        font-size: 0.9rem !important;
        padding: 0.6rem 1.2rem !important;
    }

    /* ===== TEXT WRAPPING - GLOBALE ===== */
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Prevent code blocks from breaking layout */
    pre,
    code {
        max-width: 100%;
        overflow-x: auto;
        font-size: 0.85rem !important;
    }

    /* Links */
    a {
        word-break: break-word;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .article-header h1 {
        font-size: 1.3rem !important;
    }

    .article-body,
    .article-content {
        font-size: 0.9rem !important;
    }

    .container {
        padding: 0.75rem !important;
    }
}