/*
Theme Name: Trade Sphare
Theme URI: https://tradesphare.com/blog
Author: Trade Sphare
Author URI: https://tradesphare.com/
Description: قالب WordPress مستقل لمنصة Trade Sphare للإعلانات والناشرين.
Version: 1.0.1
Text Domain: trade-sphare
*/

/* =========================================================
   1. BRAND TOKENS
========================================================= */

:root {

    /* Brand */
    --ts-primary: #2563eb;
    --ts-primary-hover: #1d4ed8;
    --ts-accent: #38bdf8;

    /* Navy */
    --ts-navy-950: #020617;
    --ts-navy-900: #0f172a;

    /* Text */
    --ts-text-950: #111827;
    --ts-text-800: #1f2937;
    --ts-text-700: #334155;
    --ts-text-600: #475569;
    --ts-text-500: #64748b;

    /* Borders */
    --ts-border: #e2e8f0;
    --ts-border-light: #e5e7eb;

    /* Surfaces */
    --ts-surface: #ffffff;
    --ts-surface-soft: #f8fafc;
    --ts-surface-blue: #eff6ff;

    /* Status */
    --ts-success: #16a34a;
    --ts-danger: #ef4444;

    /* Radius */
    --ts-radius-sm: 6px;
    --ts-radius-md: 10px;
    --ts-radius-lg: 16px;

    /* Shadows */
    --ts-shadow-sm: 0 2px 12px rgba(15, 23, 42, 0.04);
    --ts-shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --ts-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);

    /* Layout */
    --ts-container-width: 1180px;
    --ts-header-height: 76px;
}


/* =========================================================
   2. RESET
========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;

    background: var(--ts-surface);
    color: var(--ts-text-800);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.7;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

ul,
ol {
    margin-top: 0;
}

p {
    margin-top: 0;
}


/* =========================================================
   3. ACCESSIBILITY
========================================================= */

.screen-reader-text {
    position: absolute !important;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;
    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}

.screen-reader-text:focus {
    z-index: 100000;

    width: auto;
    height: auto;

    padding: 15px 20px;
    margin: 5px;

    overflow: visible;
    clip: auto;

    color: #ffffff;
    background: #000000;
}


/* =========================================================
   4. CONTAINER
========================================================= */

.ts-container {
    width: min(var(--ts-container-width),
            calc(100% - 40px));

    margin-inline: auto;
}


/* =========================================================
   5. MAIN
========================================================= */

.ts-site-main {
    min-height: 60vh;
}

.ts-content-area {
    padding-block: 60px;
}


/* =========================================================
   6. HEADER
========================================================= */

.ts-site-header {
    position: relative;
    z-index: 1000;

    width: 100%;

    background: var(--ts-surface);

    border-bottom: 1px solid #e8edf2;

    box-shadow: var(--ts-shadow-sm);
}

.ts-header-inner {
    position: relative;

    min-height: var(--ts-header-height);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================================
   7. BRANDING
========================================================= */

.ts-site-branding {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
}

.ts-site-branding a {
    display: inline-flex;
    align-items: center;

    text-decoration: none;
}

.ts-site-branding .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.ts-site-branding img {
    display: block;

    width: auto;
    max-width: 190px;
    max-height: 52px;
}

.ts-site-title {
    margin: 0;

    color: var(--ts-text-950);

    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.ts-site-title a {
    color: var(--ts-text-950);
    text-decoration: none;
}


/* =========================================================
   8. NAVIGATION
========================================================= */

.ts-navigation {
    flex: 1 1 auto;

    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-navigation .ts-menu {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.ts-navigation .ts-menu>li {
    position: relative;

    margin: 0;
    padding: 0;
}

.ts-navigation .ts-menu>li>a {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 44px;

    padding: 10px 14px;

    color: #344054;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;

    text-decoration: none;

    border-radius: 8px;

    transition:
        color .2s ease,
        background-color .2s ease;
}

.ts-navigation .ts-menu>li>a:hover,
.ts-navigation .ts-menu>li>a:focus-visible {
    color: var(--ts-primary);

    background: #f4f8ff;
}


/* =========================================================
   9. ACTIVE MENU ITEM
========================================================= */

.ts-navigation .ts-menu>li.current-menu-item>a,
.ts-navigation .ts-menu>li.current_page_item>a,
.ts-navigation .ts-menu>li.current-menu-ancestor>a,
.ts-navigation .ts-menu>li.current_page_ancestor>a {
    color: var(--ts-primary);
}

.ts-navigation .ts-menu>li.current-menu-item>a::after,
.ts-navigation .ts-menu>li.current_page_item>a::after {
    content: "";

    position: absolute;

    right: 14px;
    bottom: 4px;
    left: 14px;

    height: 2px;

    border-radius: 999px;

    background: var(--ts-primary);
}


/* =========================================================
   10. HEADER CTA
========================================================= */

.ts-header-cta {
    flex: 0 0 auto;
}

.ts-header-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 10px 20px;

    color: #ffffff;

    background: var(--ts-primary);

    border: 1px solid var(--ts-primary);
    border-radius: 9px;

    font-size: 14px;
    font-weight: 700;
    line-height: 1;

    text-decoration: none;
    white-space: nowrap;

    box-shadow:
        0 4px 12px rgba(37, 99, 235, .16);

    transition:
        background-color .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.ts-header-cta a:hover,
.ts-header-cta a:focus-visible {
    color: #ffffff;

    background: var(--ts-primary-hover);

    border-color: var(--ts-primary-hover);

    transform: translateY(-1px);

    box-shadow:
        0 6px 16px rgba(37, 99, 235, .22);
}


/* =========================================================
   11. MOBILE MENU TOGGLE
========================================================= */

.ts-menu-toggle {
    display: none;

    position: relative;

    flex: 0 0 auto;

    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    padding: 0;

    color: var(--ts-text-950);

    background: var(--ts-surface);

    border: 1px solid #dce3ea;
    border-radius: 8px;

    cursor: pointer;

    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease;
}


/* Hamburger Bars */

.ts-menu-toggle>span:not(.screen-reader-text) {
    position: absolute;

    right: 11px;

    width: 20px;
    height: 2px;

    border-radius: 999px;

    background: currentColor;

    transition:
        transform .2s ease,
        opacity .2s ease;
}

.ts-menu-toggle>span:nth-child(1) {
    transform: translateY(-6px);
}

.ts-menu-toggle>span:nth-child(2) {
    transform: translateY(0);
}

.ts-menu-toggle>span:nth-child(3) {
    transform: translateY(6px);
}


/* Hamburger -> X */

.ts-menu-toggle[aria-expanded="true"]>span:nth-child(1) {
    transform: rotate(45deg);
}

.ts-menu-toggle[aria-expanded="true"]>span:nth-child(2) {
    opacity: 0;
}

.ts-menu-toggle[aria-expanded="true"]>span:nth-child(3) {
    transform: rotate(-45deg);
}


/* Toggle Hover */

.ts-menu-toggle:hover,
.ts-menu-toggle:focus-visible {
    color: var(--ts-primary);

    background: #f4f8ff;

    border-color: #b9d2f7;
}


/* =========================================================
   12. CONTENT + SIDEBAR
========================================================= */

.ts-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) 320px;

    gap: 32px;

    align-items: start;
}

.ts-sidebar {
    min-width: 0;
}


/* Category */

.ts-post-category {
    margin-bottom: 15px;
}

.ts-post-category a {
    display: inline-flex;
    align-items: center;

    padding: 6px 14px;

    color: var(--ts-primary);

    background: var(--ts-surface-blue);

    border-radius: var(--ts-radius-sm);

    font-size: 14px;
    font-weight: 700;
}


/* Post Title */

.ts-post-title {
    margin: 0 0 15px;

    color: var(--ts-text-950);

    line-height: 1.25;
}

h1.ts-post-title {
    font-size: clamp(32px, 5vw, 52px);
}


/* Post Meta */

.ts-post-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    color: var(--ts-text-500);

    font-size: 14px;
}


/* =========================================================
   15. BUTTON
========================================================= */

.ts-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 15px;

    padding: 12px 24px;

    color: var(--ts-surface);

    background: var(--ts-primary);

    border-radius: var(--ts-radius-md);

    font-weight: 700;

    transition:
        background-color .2s ease,
        transform .2s ease;
}

.ts-button:hover {
    color: var(--ts-surface);

    background: var(--ts-primary-hover);

    transform: translateY(-1px);
}


/* =========================================================
   16. PAGINATION
========================================================= */

.ts-pagination {
    margin-top: 40px;
}

.ts-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 8px;
}

.ts-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 40px;
    min-height: 40px;

    padding: 6px 12px;

    color: var(--ts-text-700);

    background: var(--ts-surface);

    border: 1px solid var(--ts-border-light);
    border-radius: 8px;

    transition:
        border-color .2s ease,
        color .2s ease,
        background-color .2s ease;
}

.ts-pagination .page-numbers:hover {
    color: var(--ts-primary);

    border-color: var(--ts-primary);
}

.ts-pagination .current {
    color: var(--ts-surface);

    background: var(--ts-primary);

    border-color: var(--ts-primary);
}


/* =========================================================
   17. AUTHOR BOX
========================================================= */

.ts-author-box {
    display: flex;
    align-items: flex-start;

    gap: 20px;

    margin: 50px 0;

    padding: 30px;

    background: var(--ts-surface-soft);

    border: 1px solid var(--ts-border-light);
    border-radius: var(--ts-radius-lg);
}

.ts-author-avatar {
    flex: 0 0 auto;
}

.ts-author-avatar img {
    border-radius: 50%;
}

.ts-author-content {
    min-width: 0;
}

.ts-author-content h3 {
    margin: 0 0 10px;

    color: var(--ts-text-950);
}

.ts-author-content p {
    margin: 0;

    color: var(--ts-text-700);
}


/* =========================================================
   18. RELATED POSTS
========================================================= */

.ts-related-posts {
    margin: 60px 0;
}

.ts-related-title {
    margin: 0 0 30px;

    color: var(--ts-text-950);

    font-size: 28px;
    line-height: 1.3;
}

.ts-related-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 25px;
}

.ts-related-card {
    overflow: hidden;

    background: var(--ts-surface);

    border: 1px solid var(--ts-border-light);
    border-radius: var(--ts-radius-lg);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.ts-related-card:hover {
    transform: translateY(-4px);

    box-shadow: var(--ts-shadow-lg);
}


/* Related Thumbnail */

.ts-related-thumbnail {
    overflow: hidden;
}

.ts-related-thumbnail img {
    display: block;

    width: 100%;
    height: 180px;

    object-fit: cover;
}


/* Related Placeholder */

.ts-related-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;

    height: 180px;

    color: var(--ts-primary);

    background: var(--ts-surface-blue);

    font-size: 20px;
    font-weight: 800;
}


/* Related Content */

.ts-related-content {
    padding: 20px;
}

.ts-related-category {
    display: inline-block;

    margin-bottom: 10px;

    padding: 4px 10px;

    color: var(--ts-primary);

    background: var(--ts-surface-blue);

    border-radius: var(--ts-radius-sm);

    font-size: 13px;
    font-weight: 700;
}

.ts-related-card-title {
    margin: 0 0 12px;

    color: var(--ts-text-950);

    font-size: 18px;
    line-height: 1.5;
}

.ts-related-card-title a {
    color: var(--ts-text-950);
}

.ts-related-card-title a:hover {
    color: var(--ts-primary);
}

.ts-related-date {
    color: var(--ts-text-500);

    font-size: 13px;
}


/* =========================================================
   19. POST NAVIGATION
========================================================= */

.ts-post-navigation {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    margin: 40px 0;
}

.ts-post-navigation a {
    display: block;

    max-width: 50%;

    padding: 15px 20px;

    color: var(--ts-text-700);

    background: var(--ts-surface);

    border: 1px solid var(--ts-border-light);
    border-radius: var(--ts-radius-md);

    transition:
        border-color .2s ease,
        color .2s ease,
        background-color .2s ease;
}

.ts-post-navigation a:hover {
    color: var(--ts-primary);

    border-color: var(--ts-primary);

    background: var(--ts-surface-blue);
}


/* =========================================================
   20. FOOTER
========================================================= */

.ts-site-footer {
    position: relative;

    margin-top: 80px;
    padding: 70px 0 0;

    color: #ffffff;

    background:
        linear-gradient(135deg,
            var(--ts-navy-950) 0%,
            var(--ts-navy-900) 100%);
}


/* Footer Main */

.ts-footer-main {
    display: grid;

    grid-template-columns:
        minmax(280px, 1.7fr) repeat(3, minmax(140px, 1fr));

    gap: 50px;

    padding-bottom: 55px;
}


/* Footer Brand */

.ts-footer-brand {
    min-width: 0;
}

.ts-footer-logo {
    display: inline-flex;
    align-items: center;

    color: #ffffff;

    text-decoration: none;
}

.ts-footer-logo:hover,
.ts-footer-logo:focus-visible {
    color: #ffffff;
}

.ts-footer-logo .custom-logo {
    display: block;

    width: auto;
    max-width: 190px;
    max-height: 52px;
}

.ts-footer-logo-text {
    display: inline-block;

    color: #ffffff;

    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.ts-footer-description {
    max-width: 430px;

    margin: 18px 0 0;

    color: #cbd5e1;

    font-size: 15px;
    line-height: 1.8;
}

.ts-footer-tagline {
    max-width: 430px;

    margin: 12px 0 0;

    color: #94a3b8;

    font-size: 14px;
    line-height: 1.8;
}


/* Footer Columns */

.ts-footer-column {
    min-width: 0;
}

.ts-footer-heading {
    margin: 0 0 18px;

    color: #ffffff;

    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.ts-footer-nav {
    margin: 0;
}

.ts-footer-menu {
    display: flex;
    flex-direction: column;

    gap: 10px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.ts-footer-menu li {
    margin: 0;
    padding: 0;
}

.ts-footer-menu a {
    display: inline-flex;
    align-items: center;

    padding: 2px 0;

    color: #94a3b8;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;

    text-decoration: none;

    transition:
        color .2s ease,
        transform .2s ease;
}

.ts-footer-menu a:hover,
.ts-footer-menu a:focus-visible {
    color: #ffffff;

    transform: translateX(3px);
}


/* Footer Bottom */

.ts-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    min-height: 70px;

    border-top: 1px solid rgba(255, 255, 255, .10);
}

.ts-footer-copyright {
    color: #64748b;

    font-size: 13px;
    line-height: 1.6;
}

.ts-footer-bottom-links {
    display: flex;
    align-items: center;

    gap: 15px;
}


/* =========================================================
   21. RESPONSIVE - TABLET
========================================================= */

@media (max-width: 900px) {

    .ts-site-footer {
        margin-top: 60px;

        padding-top: 55px;
    }

    .ts-footer-main {
        grid-template-columns:
            minmax(0, 1.5fr) repeat(2, minmax(140px, 1fr));

        gap: 40px;
    }

    .ts-footer-brand {
        grid-column: 1 / -1;
    }

    .ts-footer-description,
    .ts-footer-tagline {
        max-width: 650px;
    }
}


/* =========================================================
   22. RESPONSIVE - MOBILE
========================================================= */

@media (max-width: 600px) {

    /* Container */

    .ts-site-header .ts-container {
        width: min(calc(100% - 24px),
                var(--ts-container-width));
    }


    /* Header */

    .ts-header-inner {
        min-height: 64px;
    }


    /* Logo */

    .ts-site-branding img {
        max-width: 155px;
        max-height: 44px;
    }

    .ts-site-title {
        font-size: 21px;
    }


    /* CTA */

    .ts-header-cta a {
        min-height: 40px;

        padding: 9px 13px;

        font-size: 13px;
    }


    /* Menu Toggle */

    .ts-menu-toggle {
        width: 42px;
        height: 42px;
    }


    /* Mobile Navigation */

    .ts-navigation {
        right: 12px;
        left: 12px;
    }


    /* Content */

    .ts-content-area {
        padding-block: 40px;
    }


    /* Posts */

    .ts-post {
        margin-bottom: 40px;
    }

    .ts-post-thumbnail {
        margin-bottom: 22px;

        border-radius: var(--ts-radius-md);
    }

    .ts-post-header {
        margin-bottom: 22px;
    }

    h1.ts-post-title {
        font-size: clamp(30px, 9vw, 42px);
    }


    /* CTA */

    .ts-post-cta {
        margin: 35px 0;

        padding: 25px 20px;
    }


    /* Author */

    .ts-author-box {
        margin: 35px 0;

        padding: 22px;
    }


    /* Related Posts */

    .ts-related-posts {
        margin: 40px 0;
    }

    .ts-related-title {
        margin-bottom: 20px;

        font-size: 24px;
    }

    .ts-related-grid {
        grid-template-columns: 1fr;

        gap: 18px;
    }

    .ts-related-thumbnail img,
    .ts-related-placeholder {
        height: 200px;
    }


    /* Post Navigation */

    .ts-post-navigation {
        margin: 30px 0;

        gap: 12px;
    }

    .ts-post-navigation a {
        padding: 13px 15px;
    }


    /* Footer */

    .ts-site-footer {
        margin-top: 50px;

        padding-top: 36px;
    }

    .ts-footer-main {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 30px 24px;

        padding-bottom: 40px;
    }

    .ts-footer-brand {
        grid-column: 1 / -1;
    }

    .ts-footer-logo .custom-logo {
        max-width: 165px;
        max-height: 45px;
    }

    .ts-footer-logo-text {
        font-size: 21px;
    }

    .ts-footer-description {
        max-width: 600px;

        margin-top: 15px;

        font-size: 14px;
    }

    .ts-footer-tagline {
        max-width: 600px;

        font-size: 13px;
    }

    .ts-footer-heading {
        margin-bottom: 14px;

        font-size: 15px;
    }

    .ts-footer-menu {
        width: 100%;

        gap: 8px;
    }

    .ts-footer-menu a {
        padding: 5px 0;

        font-size: 13px;
    }

    .ts-footer-bottom {
        min-height: 65px;

        align-items: flex-start;
        justify-content: center;

        flex-direction: column;

        gap: 5px;
    }
}


/* =========================================================
   23. RESPONSIVE - SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .ts-footer-main {
        grid-template-columns: 1fr;

        gap: 28px;
    }

    .ts-footer-brand {
        grid-column: auto;
    }

    .ts-header-cta {
        display: none;
    }

    .ts-header-inner {
        gap: 12px;
    }

    .ts-navigation {
        right: 8px;
        left: 8px;
    }

    .ts-post-navigation {
        flex-direction: column;
    }

    .ts-post-navigation a {
        max-width: 100%;
    }
}


/* =========================================================
   24. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* =========================================================
/* Post Footer / Tags */

.ts-post-footer {
    max-width: 820px;

    margin: 42px auto 0;
    padding-top: 24px;

    border-top: 1px solid var(--ts-border-light);
}

.ts-post-footer .ts-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin: 0;
}

.ts-post-footer .ts-post-meta strong {
    margin-inline-end: 4px;

    color: var(--ts-text-700);

    font-size: 14px;
}

.ts-post-footer .ts-post-meta a {
    display: inline-flex;
    align-items: center;

    padding: 5px 10px;

    color: var(--ts-text-600);
    background: var(--ts-surface-soft);

    border: 1px solid var(--ts-border-light);
    border-radius: 999px;

    font-size: 12px;
    line-height: 1.5;

    text-decoration: none;

    transition:
        color .2s ease,
        border-color .2s ease,
        background-color .2s ease;
}

.ts-post-footer .ts-post-meta a:hover,
.ts-post-footer .ts-post-meta a:focus-visible {
    color: var(--ts-primary);

    background: var(--ts-surface-blue);

    border-color: rgba(37, 99, 235, .18);
}

/* Author Box */

.ts-author-box {
    display: flex;
    align-items: flex-start;

    gap: 20px;

    max-width: 820px;

    margin: 42px auto 0;
    padding: 24px;

    background: var(--ts-surface);

    border: 1px solid var(--ts-border-light);
    border-radius: var(--ts-radius-lg);

    box-shadow: var(--ts-shadow-sm);
}

.ts-author-avatar {
    flex: 0 0 auto;
}

.ts-author-avatar img {
    display: block;

    width: 72px;
    height: 72px;

    border-radius: 50%;
}

.ts-author-content {
    min-width: 0;
}

.ts-author-content h3 {
    margin: 0 0 7px;

    color: var(--ts-text-950);

    font-size: 18px;
    font-weight: 800;
}

.ts-author-content p {
    margin: 0;

    color: var(--ts-text-600);

    font-size: 14px;
    line-height: 1.8;
}

/* Related Posts */

.ts-related-posts {
    max-width: 100%;

    margin: 55px auto 0;
}

.ts-related-title {
    margin: 0 0 22px;

    color: var(--ts-text-950);

    font-size: 25px;
    font-weight: 800;
}

.ts-related-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.ts-related-card {
    min-width: 0;

    overflow: hidden;

    background: var(--ts-surface);

    border: 1px solid var(--ts-border-light);
    border-radius: var(--ts-radius-lg);

    box-shadow: var(--ts-shadow-sm);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.ts-related-card:hover {
    transform: translateY(-3px);

    border-color: rgba(37, 99, 235, .18);

    box-shadow: var(--ts-shadow-md);
}

.ts-related-content {
    padding: 20px;
}

.ts-related-category {
    display: inline-flex;

    margin-bottom: 10px;

    color: var(--ts-primary);

    font-size: 12px;
    font-weight: 700;
}

.ts-related-card-title {
    margin: 0 0 12px;

    font-size: 17px;
    font-weight: 750;
    line-height: 1.55;
}

.ts-related-card-title a {
    color: var(--ts-text-950);

    text-decoration: none;
}

.ts-related-card-title a:hover {
    color: var(--ts-primary);
}

.ts-related-date {
    color: var(--ts-text-500);

    font-size: 12px;
}

/* Post Navigation */

.ts-post-navigation {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 16px;

    max-width: 820px;

    margin: 40px auto 0;
}

.ts-post-navigation>div {
    min-width: 0;
}

.ts-post-navigation a {
    display: block;

    min-height: 74px;

    padding: 16px 18px;

    color: var(--ts-text-800);
    background: var(--ts-surface);

    border: 1px solid var(--ts-border-light);
    border-radius: var(--ts-radius-md);

    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;

    text-decoration: none;

    transition:
        color .2s ease,
        border-color .2s ease,
        background-color .2s ease,
        transform .2s ease;
}

.ts-post-navigation a:hover,
.ts-post-navigation a:focus-visible {
    color: var(--ts-primary);

    background: var(--ts-surface-blue);

    border-color: rgba(37, 99, 235, .16);

    transform: translateY(-2px);
}

.ts-post-navigation-next {
    text-align: end;
}

/* Single Post Responsive */

@media (max-width: 900px) {

    .ts-post-header {
        margin-bottom: 28px;
    }

    .ts-post-title {
        font-size: clamp(30px, 6vw, 40px);
    }

    .ts-post-content {
        font-size: 16px;
    }

    .ts-post-content h2 {
        font-size: 25px;
    }

    .ts-post-content h3 {
        font-size: 21px;
    }

    .ts-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .ts-post-header {
        margin-bottom: 24px;
    }

    .ts-post-category {
        margin-bottom: 12px;
    }

    .ts-post-title {
        font-size: 29px;
        line-height: 1.35;
    }

    .ts-post-header .ts-post-meta {
        margin-top: 14px;

        font-size: 13px;
    }

    .ts-post-header .ts-post-meta>*+*::before {
        margin-inline: 7px;
    }

    .ts-post-thumbnail {
        margin-bottom: 30px;

        border-radius: var(--ts-radius-md);
    }

    .ts-post-content {
        font-size: 16px;
        line-height: 1.85;
    }

    .ts-post-content h2 {
        margin-top: 1.8em;

        font-size: 23px;
    }

    .ts-post-content h3 {
        font-size: 20px;
    }

    .ts-post-content blockquote {
        padding: 16px 18px;

        font-size: 16px;
    }

    .ts-post-cta {
        margin-top: 30px;
        padding: 22px;
    }

    .ts-post-cta h2 {
        font-size: 19px;
    }

    .ts-post-footer {
        margin-top: 32px;
        padding-top: 20px;
    }

    .ts-author-box {
        gap: 15px;

        margin-top: 32px;
        padding: 20px;
    }

    .ts-author-avatar img {
        width: 60px;
        height: 60px;
    }

    .ts-author-content h3 {
        font-size: 17px;
    }

    .ts-related-posts {
        margin-top: 42px;
    }

    .ts-related-title {
        font-size: 22px;
    }

    .ts-related-grid {
        grid-template-columns: 1fr;
    }

    .ts-post-navigation {
        grid-template-columns: 1fr;

        margin-top: 30px;
    }

    .ts-post-navigation-next {
        text-align: start;
    }

}

@media (max-width: 380px) {

    .ts-post-title {
        font-size: 26px;
    }

    .ts-post-header .ts-post-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .ts-post-header .ts-post-meta>*+*::before {
        display: none;
    }

    .ts-author-box {
        align-items: center;
        flex-direction: column;

        text-align: center;
    }

}

/* =========================================================
   Trade Sphare - Final Article Content
========================================================= */

.ts-post-content {
    direction: rtl;
    text-align: right;
    font-family: "Cairo", Tahoma, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.95;
    color: #333;

    max-width: 820px;
    margin: 0 auto;

    word-wrap: break-word;
    overflow-wrap: break-word;

    background: #fff;
    padding: 40px;

    border-radius: 16px;
    box-shadow: 0 5px 22px rgba(0, 0, 0, 0.07);
}

/* Paragraphs */

.ts-post-content p {
    margin: 0 0 22px;
    line-height: 1.95;
    color: #333;
}

/* H1 */

.ts-post-content h1 {
    color: #0d6efd;
    font-size: 36px;
    line-height: 1.5;
    font-weight: 800;

    margin: 0 0 30px;
    padding-bottom: 18px;

    border-bottom: 2px solid #e9ecef;
}

/* H2 */

.ts-post-content h2 {
    color: #222;
    font-size: 28px;
    line-height: 1.5;
    font-weight: 800;

    margin: 45px 0 22px;
    padding: 12px 18px 12px 0;

    border-right: 5px solid #0d6efd;
    background: linear-gradient(to left,
            rgba(13, 110, 253, 0.06),
            transparent);

    border-radius: 0 8px 8px 0;
}

/* H3 */

.ts-post-content h3 {
    color: #0d6efd;
    font-size: 22px;
    line-height: 1.6;
    font-weight: 700;

    margin: 32px 0 15px;
}

/* H4 */

.ts-post-content h4 {
    color: #222;
    font-size: 19px;
    font-weight: 700;

    margin: 28px 0 14px;
}

/* Strong */

.ts-post-content strong {
    color: #222;
    font-weight: 700;
}

/* Links */

.ts-post-content a {
    color: #0d6efd;

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.ts-post-content a:hover {
    color: #084298;
}

/* Lists */

.ts-post-content ul,
.ts-post-content ol {
    margin: 25px 0;
    padding-right: 30px;
    padding-left: 0;
}

.ts-post-content li {
    margin-bottom: 12px;
    padding-right: 5px;

    line-height: 1.9;
}

/* Images */

.ts-post-content figure {
    margin: 35px 0;
    text-align: center;
}

.ts-post-content img {
    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;

    margin: 0 auto;

    border-radius: 12px;
    object-fit: cover;
}

.ts-post-content figcaption {
    margin-top: 10px;

    color: #777;
    font-size: 14px;
    line-height: 1.7;

    text-align: center;
}

/* Blockquote */

.ts-post-content blockquote {
    margin: 30px 0;
    padding: 22px 25px;

    background: #f8f9fa;

    border-right: 5px solid #0d6efd;
    border-left: none;

    border-radius: 10px;

    color: #444;
    font-size: 18px;
    line-height: 1.9;
}

.ts-post-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */

.ts-post-content table {
    width: 100%;

    border-collapse: collapse;

    margin: 30px 0;

    background: #fff;

    font-size: 16px;
}

.ts-post-content table th,
.ts-post-content table td {
    border: 1px solid #ddd;

    padding: 13px 15px;

    text-align: right;
    line-height: 1.7;
}

.ts-post-content table th {
    background: #f1f5f9;
    color: #222;
    font-weight: 700;
}

/* =========================================================
   Article CTA
========================================================= */

.ts-post-cta {
    max-width: 820px;

    margin: 45px auto;

    padding: 30px;

    background: linear-gradient(135deg,
            #f4f8ff,
            #ffffff);

    border: 1px solid #dce8ff;
    border-right: 5px solid #0d6efd;

    border-radius: 14px;
}

.ts-post-cta h2 {
    margin-top: 0;

    padding: 0;

    border: none;

    background: none;

    color: #222;
}

.ts-post-cta p {
    color: #444;
}

.ts-post-cta .ts-button {
    display: inline-block;

    margin-top: 10px;

    padding: 13px 26px;

    background: #0d6efd;
    color: #fff;

    text-decoration: none;

    border-radius: 8px;

    font-weight: 700;
}

.ts-post-cta .ts-button:hover {
    background: #084298;
    color: #fff;
}

/* =========================================================
   Article Tags
========================================================= */

.ts-post-footer {
    max-width: 820px;
    margin: 40px auto 0;
}

.ts-post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ts-post-tags strong {
    color: #222;
}

.ts-post-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ts-post-tag-list a {
    display: inline-block;

    padding: 6px 12px;

    color: #0d6efd;
    background: #f4f8ff;

    border: 1px solid #dce8ff;

    border-radius: 999px;

    font-size: 13px;

    text-decoration: none;
}

.ts-post-tag-list a:hover {
    color: #fff;
    background: #0d6efd;
}

/* =========================================================
   Mobile
========================================================= */

@media (max-width: 768px) {

    .ts-post-content {
        font-size: 16px;
        line-height: 1.9;

        padding: 22px 18px;

        border-radius: 12px;
    }

    .ts-post-content h1 {
        font-size: 28px;
    }

    .ts-post-content h2 {
        font-size: 23px;

        margin-top: 38px;

        padding: 10px 14px 10px 0;
    }

    .ts-post-content h3 {
        font-size: 20px;
    }

    .ts-post-content ul,
    .ts-post-content ol {
        padding-right: 25px;
    }

    .ts-post-cta {
        padding: 22px 18px;
    }

    .ts-post-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {

    .ts-post-content {
        padding: 18px 14px;
    }

    .ts-post-content h1 {
        font-size: 25px;
    }

    .ts-post-content h2 {
        font-size: 21px;
    }

    .ts-post-content h3 {
        font-size: 18px;
    }
}

/* =========================================================
   25. FINAL MOBILE RESPONSIVE FIX
========================================================= */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.ts-site {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.ts-site-header,
.ts-site-main,
.ts-site-footer {
    width: 100%;
    max-width: 100%;
}


/* =========================================================
   MOBILE HEADER
========================================================= */

@media (max-width: 768px) {

    .ts-container {
        width: calc(100% - 24px);
        max-width: 100%;
        margin-inline: auto;
    }

    .ts-header-inner {
        width: 100%;
        min-width: 0;

        display: flex;
        align-items: center;

        gap: 12px;
    }

    .ts-site-branding {
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .ts-site-branding a {
        max-width: 100%;
    }

    .ts-site-branding img {
        width: auto;
        max-width: 145px;
        height: auto;
        max-height: 44px;
    }

    .ts-site-title {
        max-width: 145px;

        font-size: 20px;

        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


    /* Header CTA */

    .ts-header-cta {
        flex: 0 0 auto;
        min-width: 0;
    }

    .ts-header-cta a {
        min-height: 40px;

        padding: 8px 12px;

        font-size: 13px;
    }


    /* Mobile Toggle */

    .ts-menu-toggle {
        display: inline-flex;

        flex: 0 0 42px;

        width: 42px;
        height: 42px;
    }


    /* Navigation */

    .ts-navigation {
        display: none;

        position: absolute;

        top: calc(100% + 8px);
        right: 0;
        left: 0;

        width: 100%;
        max-width: 100%;

        margin: 0;

        padding: 10px;

        background: var(--ts-surface);

        border: 1px solid var(--ts-border-light);
        border-radius: var(--ts-radius-md);

        box-shadow: var(--ts-shadow-md);

        z-index: 1001;
    }

    .ts-navigation.is-open,
    .ts-navigation.active,
    .ts-navigation.open {
        display: block;
    }

    .ts-navigation .ts-menu {
        width: 100%;

        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;

        gap: 4px;
    }

    .ts-navigation .ts-menu > li {
        width: 100%;
    }

    .ts-navigation .ts-menu > li > a {
        width: 100%;

        min-height: 44px;

        padding: 10px 12px;

        justify-content: flex-start;
    }

    .ts-navigation .ts-menu > li.current-menu-item > a::after,
    .ts-navigation .ts-menu > li.current_page_item > a::after {
        right: 12px;
        left: auto;

        width: 30px;
    }


    /* Main */

    .ts-site-main {
        min-width: 0;
        overflow-x: hidden;
    }

    .ts-content-area {
        width: 100%;
        max-width: 100%;

        padding-block: 35px;
    }


    /* Layout */

    .ts-layout {
        width: 100%;
        max-width: 100%;

        grid-template-columns: minmax(0, 1fr);

        gap: 30px;
    }

    .ts-sidebar {
        width: 100%;
        min-width: 0;
    }


    /* Article */

    .ts-post-content {
        width: 100%;
        max-width: 100%;

        padding: 22px 18px;

        overflow-wrap: anywhere;
        word-break: normal;
    }

    .ts-post-content img,
    .ts-post-content iframe,
    .ts-post-content video,
    .ts-post-content table {
        max-width: 100%;
    }


    /* CTA */

    .ts-post-cta {
        width: 100%;
        max-width: 100%;

        padding: 22px 18px;
    }


    /* Related Posts */

    .ts-related-grid {
        grid-template-columns: 1fr;

        width: 100%;
    }

    .ts-related-card {
        width: 100%;
        min-width: 0;
    }


    /* Author */

    .ts-author-box {
        width: 100%;
        max-width: 100%;

        min-width: 0;
    }


    /* Post Navigation */

    .ts-post-navigation {
        width: 100%;
        max-width: 100%;

        grid-template-columns: 1fr;
    }

    .ts-post-navigation a {
        max-width: 100%;
        min-width: 0;

        overflow-wrap: anywhere;
    }


    /* Footer */

    .ts-site-footer {
        width: 100%;
        max-width: 100%;

        overflow: hidden;
    }

    .ts-footer-main {
        width: 100%;
        max-width: 100%;

        grid-template-columns: 1fr 1fr;

        min-width: 0;
    }

    .ts-footer-column,
    .ts-footer-brand {
        min-width: 0;
        max-width: 100%;
    }

    .ts-footer-description,
    .ts-footer-tagline {
        max-width: 100%;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .ts-container {
        width: calc(100% - 20px);
    }

    .ts-header-inner {
        gap: 8px;
    }

    .ts-site-branding img {
        max-width: 125px;
        max-height: 40px;
    }

    .ts-site-title {
        max-width: 125px;
        font-size: 18px;
    }

    .ts-header-cta a {
        padding-inline: 9px;

        font-size: 12px;
    }

    .ts-menu-toggle {
        flex-basis: 40px;

        width: 40px;
        height: 40px;
    }

    .ts-post-content {
        padding: 18px 14px;
    }

    .ts-footer-main {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .ts-header-cta {
        display: none;
    }

    .ts-site-branding img {
        max-width: 120px;
    }

    .ts-site-title {
        max-width: 120px;
    }

    .ts-container {
        width: calc(100% - 16px);
    }
}