/* ======================================================
   NOTICIAS LATINAS — SINGLE ARTICLE
====================================================== */

.nl-single-page {
    width: 100%;
    padding: 46px 0 72px;
    background: #f4f2ef;
}

.nl-single-page .nl-article-wrap {
    width: min(1180px, calc(100% - 48px));
    max-width: 1180px;
    margin: 0 auto;
    padding: 0;
}

.nl-single-page .nl-article {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 52px 58px 58px;
    border: 1px solid #e3ddd7;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(53, 38, 29, 0.08);
    box-sizing: border-box;
}

.nl-single-page .nl-article-header,
.nl-single-page .nl-featured-image,
.nl-single-page .nl-article-content,
.nl-single-page .nl-article-actions,
.nl-single-page .nl-post-navigation,
.nl-single-page .nl-related {
    width: 100%;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* ======================================================
   ARTICLE HEADER
====================================================== */

.nl-article-header {
    margin-bottom: 30px;
}

.nl-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    color: #6f6f6f;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.nl-article-meta a {
    color: #16823c;
    text-decoration: none;
}

.nl-article-meta a:hover,
.nl-article-meta a:focus {
    text-decoration: underline;
}

.nl-single-page .nl-title {
    width: 100%;
    max-width: 920px;
    margin: 0;
    padding: 0 0 24px;
    border-bottom: 3px solid #9b6322;
    color: #4f2f20;
    font-size: clamp(42px, 4.2vw, 62px);
    line-height: 1.08;
    font-weight: 750;
    letter-spacing: -1px;
    text-align: left;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

/* ======================================================
   FEATURED IMAGE
====================================================== */

.nl-featured-image {
    margin-top: 34px;
    margin-bottom: 38px;
}

.nl-featured-image img {
    display: block;
    width: 100%;
    max-width: 920px;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
}

.nl-featured-image figcaption {
    margin-top: 11px;
    color: #727272;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

/* ======================================================
   ARTICLE CONTENT
====================================================== */

.nl-article-content {
    padding: 0;
    color: #222222;
    font-size: 20px;
    line-height: 1.92;
    overflow-wrap: anywhere;
}

.nl-article-content p {
    margin: 0 0 28px;
}

.nl-article-content > p:first-child {
    font-size: 21px;
    line-height: 1.85;
}

.nl-article-content h2,
.nl-article-content h3,
.nl-article-content h4 {
    color: #4f2f20;
    font-weight: 700;
}

.nl-article-content h2 {
    margin: 48px 0 20px;
    padding-left: 14px;
    border-left: 4px solid #16823c;
    font-size: 30px;
    line-height: 1.28;
}

.nl-article-content h3 {
    margin: 38px 0 16px;
    font-size: 24px;
    line-height: 1.35;
}

.nl-article-content h4 {
    margin: 32px 0 14px;
    font-size: 21px;
    line-height: 1.4;
}

.nl-article-content a {
    color: #16823c;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.nl-article-content a:hover,
.nl-article-content a:focus {
    color: #0e652d;
}

/* توحيد صور المقال مهما كان حجمها الأصلي */
.nl-article-content img,
.nl-article-content .alignnone,
.nl-article-content .aligncenter,
.nl-article-content .alignleft,
.nl-article-content .alignright {
    display: block;
    width: 100% !important;
    max-width: 920px !important;
    height: auto !important;
    margin: 34px auto 12px !important;
    border-radius: 10px;
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.08);
    object-fit: contain;
}

.nl-article-content figure,
.nl-article-content .wp-caption {
    width: 100% !important;
    max-width: 920px !important;
    margin: 34px auto !important;
}

.nl-article-content figure img,
.nl-article-content .wp-caption img {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.nl-article-content figcaption,
.nl-article-content .wp-caption-text {
    margin: 10px 0 0 !important;
    padding: 0 8px;
    color: #747474;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

.nl-article-content blockquote {
    position: relative;
    margin: 36px 0;
    padding: 24px 30px 24px 34px;
    border-left: 5px solid #16823c;
    border-radius: 0 8px 8px 0;
    background: #f3f7f4;
    color: #344239;
    font-size: 20px;
    line-height: 1.8;
    font-style: italic;
}

.nl-article-content blockquote p:last-child {
    margin-bottom: 0;
}

.nl-article-content ul,
.nl-article-content ol {
    margin: 0 0 30px;
    padding-left: 30px;
}

.nl-article-content li {
    margin-bottom: 10px;
}

.nl-article-content hr {
    margin: 42px 0;
    border: 0;
    border-top: 1px solid #dedede;
}

/* جداول متجاوبة */
.nl-article-content table {
    width: 100%;
    margin: 32px 0;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 16px;
}

.nl-article-content th,
.nl-article-content td {
    padding: 13px 15px;
    border: 1px solid #dddddd;
    text-align: left;
    vertical-align: top;
}

.nl-article-content th {
    background: #f1efec;
    color: #4f2f20;
    font-weight: 700;
}

/* فيديوهات ويوتيوب متجاوبة */
.nl-article-content iframe,
.nl-article-content video,
.nl-article-content embed,
.nl-article-content object {
    display: block;
    width: 100%;
    max-width: 920px;
    margin: 34px auto;
    border: 0;
    border-radius: 10px;
}

.nl-article-content iframe {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 480px;
}

.nl-article-content .wp-block-embed,
.nl-article-content .wp-block-video {
    width: 100%;
    max-width: 920px;
    margin: 34px auto;
}

/* إخفاء أزرار PrintFriendly القديمة */
.nl-article-content .printfriendly,
.nl-article-content #printfriendly,
.nl-article-content .pf-button,
.nl-article-content .pf-button-content,
.nl-article-content .printfriendly-button,
.nl-article-content a[href*="printfriendly"] {
    display: none !important;
}

/* ======================================================
   ARTICLE ACTIONS
====================================================== */

.nl-article-actions {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #dddddd;
}

.nl-article-actions h2 {
    margin: 0 0 18px;
    color: #333333;
    font-size: 22px;
    line-height: 1.3;
}

.nl-article-action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nl-action-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    border: 0;
    border-radius: 6px;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nl-action-button:hover,
.nl-action-button:focus {
    color: #ffffff !important;
    transform: translateY(-2px);
    opacity: 0.9;
}

.nl-action-button svg {
    display: block;
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    flex: 0 0 18px;
    fill: currentColor;
}

.nl-action-facebook { background: #1877f2; }
.nl-action-x { background: #000000; }
.nl-action-whatsapp { background: #25d366; }
.nl-action-telegram { background: #229ed9; }
.nl-action-linkedin { background: #0a66c2; }
.nl-action-reddit { background: #ff4500; }
.nl-action-email { background: #6b7280; }
.nl-action-copy-link { background: #77553d; }
.nl-action-copy-title { background: #594336; }
.nl-action-print { background: #4b5563; }
.nl-action-pdf { background: #9b2c2c; }

.nl-copy-status {
    display: none;
    width: fit-content;
    margin: 14px 0 0;
    padding: 9px 13px;
    border-radius: 5px;
    background: #eaf7ee;
    color: #176b35;
    font-size: 14px;
    font-weight: 600;
}

.nl-copy-status.is-visible {
    display: block;
}

.nl-pdf-help {
    margin: 14px 0 0;
    color: #666666;
    font-size: 13px;
    line-height: 1.6;
}

/* ======================================================
   POST NAVIGATION
====================================================== */

.nl-post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 52px;
    margin-bottom: 55px;
    padding-top: 26px;
    border-top: 1px solid #e1e1e1;
}

.nl-post-navigation > div {
    width: 50%;
}

.nl-post-navigation span {
    display: block;
    margin-bottom: 7px;
    color: #444444;
    font-size: 13px;
    font-weight: 600;
}

.nl-post-navigation a {
    color: #16823c;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
}

.nl-post-navigation a:hover,
.nl-post-navigation a:focus {
    text-decoration: underline;
}

.nl-next {
    text-align: right;
}

/* ======================================================
   RELATED ARTICLES
====================================================== */

.nl-related {
    margin-top: 65px;
}

.nl-related-heading h2 {
    margin: 0 0 25px;
    color: #333333;
    font-size: 25px;
    line-height: 1.3;
}

.nl-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.nl-related-card {
    min-width: 0;
}

.nl-related-image {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.nl-related-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.nl-related-card:hover img {
    transform: scale(1.03);
}

.nl-related-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 220px;
    background: #eeeeee;
    color: #777777;
    font-size: 30px;
    font-weight: 700;
}

.nl-related-meta {
    margin-top: 9px;
    color: #555555;
    font-size: 12px;
}

.nl-related-card h3 {
    margin: 10px 0 0;
    font-size: 18px;
    line-height: 1.4;
}

.nl-related-card h3 a {
    color: #4d3325;
    text-decoration: none;
}

.nl-related-card h3 a:hover,
.nl-related-card h3 a:focus {
    color: #16823c;
}

/* ======================================================
   TABLET
====================================================== */

@media (max-width: 900px) {
    .nl-single-page {
        padding-top: 34px;
        padding-bottom: 56px;
    }

    .nl-single-page .nl-article-wrap {
        width: calc(100% - 32px);
    }

    .nl-single-page .nl-article {
        padding: 42px 34px 46px;
        border-radius: 12px;
    }

    .nl-single-page .nl-title {
        font-size: 42px;
        line-height: 1.12;
    }

    .nl-article-content {
        font-size: 19px;
        line-height: 1.84;
    }

    .nl-article-content iframe {
        min-height: 400px;
    }

    .nl-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ======================================================
   MOBILE
====================================================== */

@media (max-width: 700px) {
    .nl-single-page {
        padding: 18px 0 38px;
        background: #ffffff;
    }

    .nl-single-page .nl-article-wrap {
        width: 100%;
    }

    .nl-single-page .nl-article {
        padding: 26px 18px 34px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .nl-single-page .nl-title {
        padding-bottom: 18px;
        font-size: 34px;
        line-height: 1.14;
        letter-spacing: -0.5px;
        text-wrap: wrap;
    }

    .nl-article-meta {
        margin-bottom: 16px;
        font-size: 13px;
    }

    .nl-featured-image {
        margin-top: 26px;
        margin-bottom: 30px;
    }

    .nl-featured-image img,
    .nl-article-content img,
    .nl-article-content .alignnone,
    .nl-article-content .aligncenter,
    .nl-article-content .alignleft,
    .nl-article-content .alignright {
        border-radius: 7px;
    }

    .nl-article-content {
        font-size: 18px;
        line-height: 1.78;
    }

    .nl-article-content > p:first-child {
        font-size: 19px;
        line-height: 1.75;
    }

    .nl-article-content h2 {
        margin-top: 38px;
        padding-left: 11px;
        font-size: 26px;
    }

    .nl-article-content h3 {
        margin-top: 32px;
        font-size: 22px;
    }

    .nl-article-content blockquote {
        padding: 19px 20px 19px 23px;
        font-size: 18px;
    }

    .nl-article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .nl-article-content iframe {
        min-height: 220px;
    }

    .nl-action-button {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
    }

    .nl-action-button span {
        display: none;
    }

    .nl-post-navigation {
        flex-direction: column;
        gap: 22px;
    }

    .nl-post-navigation > div {
        width: 100%;
    }

    .nl-next {
        text-align: left;
    }

    .nl-related-grid {
        grid-template-columns: 1fr;
    }

    .nl-related-card img,
    .nl-related-fallback {
        height: 230px;
    }
}

/* ======================================================
   PRINT / PDF
====================================================== */

@media print {
    .nl-header,
    .nl-network,
    .nl-footer,
    .nl-article-actions,
    .nl-post-navigation,
    .nl-related,
    #wpadminbar {
        display: none !important;
    }

    html,
    body {
        background: #ffffff !important;
    }

    .nl-single-page,
    .nl-single-page .nl-article-wrap,
    .nl-single-page .nl-article,
    .nl-single-page .nl-article-header,
    .nl-single-page .nl-featured-image,
    .nl-single-page .nl-article-content {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .nl-single-page .nl-title {
        max-width: none !important;
        color: #000000 !important;
        font-size: 30pt !important;
        line-height: 1.15 !important;
        border-color: #000000 !important;
    }

    .nl-featured-image img,
    .nl-article-content img {
        max-width: 100% !important;
        box-shadow: none !important;
    }

    .nl-article-content {
        color: #000000 !important;
        font-size: 12pt !important;
        line-height: 1.6 !important;
    }
}