/* =====================================
   AZZAWAJ ARTICLE CSS (ULTRA PRO FINAL)
===================================== */

/* ================= LAYOUT ================= */

.article-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    margin-top: 60px;
}

.article-main {
    max-width: 750px;
    margin: 0 auto;
}

.article-sidebar .sticky {
    position: sticky;
    top: 100px;
}

/* ================= CATEGORY ================= */

.article-category {
    font-size: 12px;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
}

/* ================= TITLE ================= */

.article-title {
    font-size: 44px;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 20px;
}

/* ================= META ================= */

.article-meta {
    font-size: 14px;
    color: #777;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* REACTION BUTTONS */
.reaction-btn {
    border: none;
    background: #f3f3f3;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.reaction-btn:hover {
    background: #e0e0e0;
}

/* ================= FEATURED IMAGE ================= */

.article-hero img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    margin-bottom: 30px;
}

/* ================= SHARE BAR ================= */

.article-share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 25px 0 35px;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 600;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-4px) scale(1.1);
}

.share-btn.whatsapp { background: #25D366; }
.share-btn.facebook { background: #1877F2; }
.share-btn.twitter  { background: #000; }
.share-btn.linkedin { background: #0A66C2; }
.share-btn.tiktok   { background: #000; }

/* ================= CONTENT ================= */

.article-content {
    font-size: 19px;
    line-height: 1.9;
    color: var(--text);
}

/* PARAGRAPH */
.article-content p {
    margin-bottom: 22px;
}

/* HEADINGS */
.article-content h2 {
    font-size: 30px;
    margin-top: 40px;
    margin-bottom: 15px;
}

.article-content h3 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 12px;
}

/* LINKS */
.article-content a {
    color: var(--primary);
    text-decoration: underline;
}

/* LISTS */
.article-content ul,
.article-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

/* BLOCKQUOTE */
.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    font-style: italic;
    margin: 30px 0;
    color: var(--text-light);
    background: var(--bg-light);
    padding: 15px 20px;
    border-radius: 6px;
}

/* ================= IMAGE FIX (CRITICAL) ================= */

.article-content img,
.article-content figure img,
.wp-block-image img {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    border-radius: 12px;
    margin: 25px 0;
    object-fit: contain;
    display: block;
}

/* FIX WORDPRESS ALIGN CLASSES */
.alignleft,
.alignright,
.aligncenter {
    float: none !important;
    display: block;
    margin: 20px auto;
}

/* REMOVE HEIGHT BUG */
.article-content * {
    max-height: none !important;
}

/* ================= CTA ================= */

.article-cta {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 14px;
    margin-top: 50px;
    text-align: center;
}

/* ================= AUTHOR ================= */

.author-box {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.author-avatar img {
    border-radius: 50%;
}

.author-info h4 {
    margin-bottom: 5px;
}

/* ================= NAVIGATION ================= */

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.post-navigation a {
    color: var(--primary);
    font-weight: 600;
}

/* ================= SIDEBAR ================= */

.widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

/* ================= RELATED ================= */

.related-posts {
    margin-top: 70px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 25px;
}

.related-card {
    background: #fff;
    padding: 15px;
    border-radius: 10px;
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* ================= REACTIONS ================= */

.reaction-bar {
    margin-top: 40px;
}

.bar {
    display: flex;
    height: 6px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.bar-like { background: var(--secondary); }
.bar-dislike { background: #c62828; }

.emoji-reactions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.emoji-btn {
    border: none;
    background: #f5f5f5;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.emoji-btn:hover {
    transform: scale(1.15);
}

/* ================= RESPONSIVE ================= */

@media (max-width: 992px) {

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-main {
        max-width: 100%;
    }

    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {

    .article-title {
        font-size: 28px;
    }

    .article-content {
        font-size: 16px;
        line-height: 1.8;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .article-share-bar {
        justify-content: center;
    }
}
/* =====================================
   MOBILE FIX (CRITICAL)
===================================== */

@media (max-width: 768px) {

    /* LAYOUT FIX */
    .article-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 20px;
    }

    /* CONTENT WIDTH FIX */
    .article-main {
        max-width: 100%;
        padding: 0 10px;
    }

    /* TITLE FIX */
    .article-title {
        font-size: 26px;
        line-height: 1.3;
    }

    /* META WRAP */
    .article-meta {
        font-size: 13px;
        gap: 6px;
    }

    /* CONTENT TEXT */
    .article-content {
        font-size: 16px;
        line-height: 1.8;
    }

    /* HEADINGS */
    .article-content h2 {
        font-size: 22px;
    }

    .article-content h3 {
        font-size: 18px;
    }

    /* IMAGE FIX */
    .article-content img,
    .article-hero img {
        width: 100% !important;
        height: auto !important;
    }

    /* SHARE BAR */
    .article-share-bar {
        justify-content: center;
        gap: 10px;
    }

    /* BUTTON SIZE */
    .share-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    /* CTA */
    .article-cta {
        padding: 20px;
    }

    /* NAVIGATION STACK */
    .post-navigation {
        flex-direction: column;
        gap: 10px;
    }

    /* SIDEBAR */
    .article-sidebar {
        display: none;
    }
}

/* =====================================
   MOBILE PERFECT FIX (FINAL)
===================================== */

@media (max-width: 768px) {

    /* GLOBAL SAFE PADDING */
    body {
        overflow-x: hidden;
    }

    .container {
        width: 95%;
    }

    /* ARTICLE WRAPPER */
    .article-main {
        padding: 0 12px;
        margin: 0;
    }

    /* CONTENT SPACING FIX */
    .article-content {
        font-size: 15.8px;
        line-height: 1.85;
        word-break: break-word;
    }

    /* FIX ALL BLOCK ELEMENTS */
    .article-content > * {
        max-width: 100%;
        overflow-wrap: break-word;
    }

    /* IMAGE HARD FIX */
    .article-content img,
    .article-content figure,
    .wp-block-image,
    .wp-block-image img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* REMOVE SIDE OVERFLOW FROM WP BLOCKS */
    .wp-block-group,
    .wp-block-columns {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* TITLE BALANCE */
    .article-title {
        font-size: 24px;
        line-height: 1.35;
    }

    /* META CLEAN */
    .article-meta {
        line-height: 1.6;
    }

    /* SHARE CENTER */
    .article-share-bar {
        justify-content: center;
        text-align: center;
    }

    /* CTA CLEAN */
    .article-cta {
        margin-top: 30px;
    }

    /* FIX RANDOM OVERFLOW BUGS */
    * {
        max-width: 100%;
    }
}