/* QaafQalam homepage layout overrides */
:root {
    --qq-bg: #f4f6f8;
    --qq-page: #ffffff;
    --qq-text: #111827;
    --qq-muted: #52606d;
    --qq-border: #edf0f3;
    --qq-accent: #d083cf;
    --qq-dark: #151515;
}

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

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

.qq-page {
    max-width: 1180px;
    margin: 0 auto;
    background: var(--qq-page);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

.qq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--qq-border);
}

.qq-logo img {
    max-height: 86px;
    width: auto;
}

.qq-ad-slot {
    flex: 1;
    min-height: 90px;
    border-radius: 12px;
    background: #f7f8fa;
    color: #8a94a6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

#navArea {
    float: none;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: var(--qq-dark);
}

#navArea .navbar {
    margin: 0;
    min-height: 50px;
    border: 0;
    border-radius: 0;
}

#navbar {
    padding-right: 24px;
    padding-left: 24px;
}

.qq-hero {
    clear: both;
    padding: 34px 24px 24px;
    background: linear-gradient(135deg, #111827, #3b0a45);
    color: #ffffff;
}

.qq-hero__intro {
    max-width: 850px;
    margin-bottom: 24px;
}

.qq-hero h1 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.25;
    font-weight: 800;
}

.qq-hero p {
    margin: 0;
    color: #e5e7eb;
    font-size: 16px;
    line-height: 1.7;
}

.qq-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 18px;
}

.qq-hero-card {
    position: relative;
    min-height: 260px;
    border-radius: 14px;
    overflow: hidden;
    background: #111827;
}

.qq-hero-grid > .qq-hero-card {
    min-height: 410px;
}

.qq-hero-side {
    display: grid;
    gap: 18px;
}

.qq-hero-side .qq-hero-card {
    min-height: 196px;
}

.qq-hero-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .78;
}

.qq-hero-card img[src=""],
.qq-feature-card__image img[src=""],
.qq-small-post__image img[src=""] {
    display: none;
}

.qq-hero-card__title {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 22px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .88));
}

.qq-hero-card__title a {
    color: #ffffff;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 800;
}

.qq-main {
    padding: 24px;
}

.qq-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 340px;
    gap: 24px;
    align-items: start;
}

.qq-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.qq-section,
.qq-sidebar-box {
    overflow: hidden;
    border: 1px solid var(--qq-border);
    border-radius: 14px;
    background: #ffffff;
}

.qq-section--wide {
    grid-column: 1 / -1;
}

.qq-section__header,
.qq-sidebar-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: #fafafa;
    border-bottom: 1px solid var(--qq-border);
}

.qq-section__header h2,
.qq-sidebar-box__header h2 {
    margin: 0;
    color: var(--qq-text);
    font-size: 18px;
    font-weight: 800;
}

.qq-section__header a {
    color: #8b008b;
    font-size: 13px;
    font-weight: 700;
}

.qq-section__content {
    padding: 16px;
}

.qq-feature-card__image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #f3f4f6;
}

.qq-feature-card__image img,
.qq-small-post__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.qq-feature-card__image:hover img,
.qq-small-post__image:hover img {
    transform: scale(1.04);
}

.qq-feature-card h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 800;
}

.qq-feature-card h3 a,
.qq-small-post__title {
    color: var(--qq-text);
}

.qq-feature-card p {
    margin: 0;
    color: var(--qq-muted);
    line-height: 1.65;
}

.qq-small-list {
    display: grid;
    gap: 12px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.qq-small-post {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
}

.qq-small-post__image {
    display: block;
    width: 86px;
    height: 62px;
    overflow: hidden;
    border-radius: 10px;
    background: #f3f4f6;
}

.qq-small-post__title {
    font-size: 14px;
    line-height: 1.45;
    font-weight: 700;
}

.qq-sidebar {
    display: grid;
    gap: 20px;
}

.qq-sidebar .qq-small-list {
    margin: 0;
    padding: 16px;
}

.qq-category-list {
    margin: 0;
    padding: 14px 16px;
    list-style: none;
}

.qq-category-list li + li {
    border-top: 1px solid var(--qq-border);
}

.qq-category-list a {
    display: block;
    padding: 10px 0;
    color: var(--qq-text);
    font-weight: 700;
}

.qq-footer {
    margin-top: 10px;
    padding: 24px;
    background: #111827;
    color: #d1d5db;
    text-align: center;
    line-height: 1.8;
}

.qq-footer a {
    color: #76e4f7;
}

@media (max-width: 991px) {
    .qq-layout,
    .qq-hero-grid {
        grid-template-columns: 1fr;
    }

    .qq-content-grid {
        grid-template-columns: 1fr;
    }

    .qq-hero-grid > .qq-hero-card,
    .qq-hero-side .qq-hero-card {
        min-height: 260px;
    }
}

@media (max-width: 640px) {
    .qq-header {
        flex-direction: column;
        text-align: center;
    }

    #navbar,
    .qq-hero,
    .qq-main {
        padding-right: 14px;
        padding-left: 14px;
    }

    .qq-ad-slot {
        width: 100%;
    }

    .qq-hero h1 {
        font-size: 25px;
    }

    .qq-hero-card__title a {
        font-size: 19px;
    }
}
