/* Shared QaafQalam editorial theme */
:root {
    --qq-bg: #f4f6f8;
    --qq-page: #ffffff;
    --qq-text: #111827;
    --qq-muted: #52606d;
    --qq-border: #edf0f3;
    --qq-accent: #a61b1b;
    --qq-accent-dark: #7f1d1d;
    --qq-dark: #111111;
    --qq-soft-accent: #fef2f2;
}

body {
    background: var(--qq-bg);
    color: var(--qq-text);
}

.container {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

a,
a:hover,
a:focus {
    text-decoration: none;
}

#navArea {
    background: var(--qq-dark);
}

#navArea .main_nav > li > a {
    color: #f8fafc;
    text-shadow: none;
}

#navArea .main_nav > li.active > a,
#navArea .main_nav > li.active > a:hover,
#navArea .main_nav > li > a:hover {
    background: var(--qq-accent);
    color: #ffffff;
}

.qq-section__header a {
    color: var(--qq-accent);
}

.qq-section__header a:hover,
.qq-feature-card h3 a:hover,
.qq-small-post__title:hover,
.qq-category-list a:hover,
.post-outer h2 a:hover,
.popular-post-body h3 a:hover {
    color: var(--qq-accent-dark) !important;
}

.qq-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 6px;
    padding: 0;
}

.qq-pagination a,
.qq-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 13px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid var(--qq-border);
    color: var(--qq-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1;
    font-weight: 800;
    text-decoration: none !important;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
}

.qq-pagination a:hover,
.qq-pagination a:focus {
    background: var(--qq-soft-accent);
    border-color: rgba(166, 27, 27, .25);
    color: var(--qq-accent-dark);
}

.qq-pagination .current {
    background: var(--qq-accent);
    border-color: var(--qq-accent);
    color: #ffffff;
}

.popular-post-list {
    margin: 0;
    padding: 6px 14px 8px;
    list-style: none;
}

.popular-post-item {
    display: grid;
    grid-template-columns: 34px 82px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--qq-border);
}

.popular-post-item:last-child {
    border-bottom: 0;
}

.popular-post-rank {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 34px;
    height: auto;
    border-radius: 0;
    background: transparent !important;
    color: var(--qq-accent) !important;
    border: 0 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 22px;
    line-height: 1;
    font-weight: 900;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    -webkit-text-stroke: 0 transparent !important;
}

.popular-post-rank:before,
.popular-post-rank:after {
    display: none !important;
    content: none !important;
}

.popular-post-rank:hover {
    color: var(--qq-accent-dark) !important;
}

.popular-post-thumb {
    display: block;
    width: 82px;
    height: 62px;
    overflow: hidden;
    border-radius: 6px;
    background: #eef2f7;
    border: 0 !important;
    box-shadow: none !important;
}

.popular-post-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-body {
    min-width: 0;
    overflow: visible;
}

.popular-post-body h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 800;
    max-width: 100%;
    overflow: visible;
}

.popular-post-body h3 a,
.popular-post-body h3 a:visited {
    color: var(--qq-text) !important;
    border: 0 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    -webkit-text-stroke: 0 transparent !important;
    white-space: normal !important;
    display: block;
    overflow: visible;
    overflow-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}

.popular-post-body h3 a:before,
.popular-post-body h3 a:after {
    display: none !important;
    content: none !important;
}

.popular-post-body span {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--qq-soft-accent);
    color: #991b1b !important;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    text-shadow: none !important;
    box-shadow: none !important;
}

.single_sidebar .popular-post-list a {
    text-shadow: none !important;
}

.qq-footer {
    margin-top: 34px;
    border-top: 4px solid var(--qq-accent);
    background: var(--qq-dark);
    color: #d1d5db;
    text-align: left;
}

.qq-footer a {
    color: #ffffff;
    text-decoration: none;
}

.qq-footer a:hover {
    color: #fca5a5;
}

.qq-footer__inner {
    display: grid;
    grid-template-columns: 1.5fr .9fr .9fr 1fr;
    gap: 26px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 22px 28px;
}

.qq-footer__brand h2,
.qq-footer__col h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 800;
}

.qq-footer__brand h2 {
    font-size: 24px;
}

.qq-footer__brand p,
.qq-footer__col p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.7;
}

.qq-footer__tagline {
    margin-top: 14px;
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(166, 27, 27, .16);
    color: #fecaca;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.qq-footer__links {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qq-footer__links a {
    color: #d1d5db;
    font-size: 14px;
}

.qq-footer__contact {
    display: grid;
    gap: 7px;
}

.qq-footer__contact span {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.qq-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(255,255,255,.1);
    max-width: 1180px;
    margin: 0 auto;
    padding: 15px 22px 18px;
    color: #9ca3af;
    font-size: 13px;
}

.qq-footer__legal {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .popular-post-item {
        grid-template-columns: 30px 70px minmax(0, 1fr);
        gap: 9px;
    }

    .popular-post-rank {
        width: 30px;
        font-size: 19px;
    }

    .popular-post-thumb {
        width: 70px;
        height: 54px;
    }

    .popular-post-body h3 {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .popular-post-list {
        padding-left: 8px;
        padding-right: 8px;
    }

    .popular-post-item {
        grid-template-columns: 32px 76px minmax(0, 1fr);
        gap: 10px;
    }

    .popular-post-rank {
        width: 32px;
        font-size: 20px;
    }

    .popular-post-thumb {
        width: 76px;
        height: 58px;
    }

    .qq-footer__inner {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 28px 18px 22px;
    }

    .qq-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}
