/* ContextIQ Single Post Template Styles */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

.ciq-single-post *,
.ciq-single-post *::before,
.ciq-single-post *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ciq-single-post {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.ciq-sp-topbar {
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ciq-sp-topbar-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.ciq-sp-topbar-back:hover {
    color: #fff;
    text-decoration: none;
}

.ciq-sp-topbar-back svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.ciq-sp-topbar-contact {
    color: #fff;
    padding: 9px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
    display: inline-block;
}

.ciq-sp-topbar-contact:hover {
    opacity: 0.88;
    text-decoration: none;
    color: #fff;
}

/* ─── Hero ─── */
.ciq-sp-hero {
    padding: 56px 40px 64px;
    position: relative;
    overflow: hidden;
}

.ciq-sp-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.ciq-sp-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.ciq-sp-hero-inner {
    max-width: 820px;
    margin: 0 auto;
}

.ciq-sp-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 2px;
    margin-bottom: 24px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.ciq-sp-category-pill:hover {
    background: rgba(255, 255, 255, 0.16);
    text-decoration: none;
}

.ciq-sp-hero h1 {
    font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-style: italic;
    color: #fff;
    line-height: 1.18;
    margin-bottom: 22px;
    max-width: 720px;
}

.ciq-sp-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.4px;
}

.ciq-sp-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ciq-sp-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}

/* ─── Content Layout ─── */
.ciq-sp-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 32px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* ─── Article ─── */
.ciq-sp-article {
    background: #fff;
    border: 1px solid #e4e1d9;
    border-radius: 8px;
    padding: 44px 48px;
    min-width: 0;
}

.ciq-sp-article p {
    font-size: 16px;
    line-height: 1.82;
    color: #3a3a4a;
    margin-bottom: 22px;
}

.ciq-sp-article p:last-of-type {
    margin-bottom: 0;
}

.ciq-sp-article h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
    margin: 38px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e4e1d9;
}

.ciq-sp-article h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 28px 0 10px;
}

.ciq-sp-article ul,
.ciq-sp-article ol {
    padding-left: 22px;
    margin-bottom: 22px;
}

.ciq-sp-article li {
    font-size: 16px;
    line-height: 1.75;
    color: #3a3a4a;
    margin-bottom: 7px;
}

.ciq-sp-article a {
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

.ciq-sp-article a:hover {
    opacity: 0.78;
}

.ciq-sp-article strong {
    font-weight: 600;
    color: #1a1a2e;
}

.ciq-sp-article blockquote {
    margin: 28px 0;
    padding: 18px 24px;
    border-left: 3px solid;
    border-radius: 0 6px 6px 0;
    font-size: 15px;
    line-height: 1.65;
    font-style: italic;
}

/* ─── Tags ─── */
.ciq-sp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #e4e1d9;
}

.ciq-sp-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 2px;
    border: 1px solid;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    display: inline-block;
}

/* ─── Sidebar ─── */
.ciq-sp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 72px;
}

/* FAQ back card */
.ciq-sp-faq-card {
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
}

.ciq-sp-faq-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 18px;
}

.ciq-sp-faq-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.ciq-sp-faq-card p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 16px;
    line-height: 1.55;
}

.ciq-sp-faq-btn {
    display: block;
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ciq-sp-faq-btn:hover {
    opacity: 0.88;
    text-decoration: none;
    color: #fff;
}

/* Related posts card */
.ciq-sp-related-card {
    background: #fff;
    border: 1px solid #e4e1d9;
    border-radius: 8px;
    overflow: hidden;
}

.ciq-sp-related-header {
    padding: 12px 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.ciq-sp-related-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid #e4e1d9;
    text-decoration: none;
    transition: background 0.15s;
}

.ciq-sp-related-item:hover {
    background: #f9f8f5;
    text-decoration: none;
}

.ciq-sp-related-num {
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    padding-top: 2px;
    flex-shrink: 0;
}

.ciq-sp-related-title {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    line-height: 1.45;
}

/* Contact card */
.ciq-sp-contact-card {
    background: linear-gradient(135deg, #f0f4fa 0%, #e8eef8 100%);
    border: 1px solid rgba(15, 42, 94, 0.12);
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
}

.ciq-sp-contact-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.ciq-sp-contact-card p {
    font-size: 12px;
    color: #888;
    margin-bottom: 16px;
    line-height: 1.55;
}

.ciq-sp-contact-btn {
    display: block;
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ciq-sp-contact-btn:hover {
    opacity: 0.88;
    text-decoration: none;
    color: #fff;
}

/* ─── Prev/Next Navigation ─── */
.ciq-sp-post-nav {
    max-width: 1100px;
    margin: 0 auto 56px;
    padding: 0 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ciq-sp-nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e4e1d9;
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ciq-sp-nav-link:hover {
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ciq-sp-nav-link.is-next {
    justify-content: flex-end;
    text-align: right;
}

.ciq-sp-nav-arrow {
    width: 36px;
    height: 36px;
    background: rgba(15, 42, 94, 0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    transition: background 0.2s, color 0.2s;
    color: #1a1a2e;
}

.ciq-sp-nav-link:hover .ciq-sp-nav-arrow {
    color: #fff;
}

.ciq-sp-nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 4px;
}

.ciq-sp-nav-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.4;
}

.ciq-sp-nav-link.is-prev .ciq-sp-nav-text {
    order: 1;
}

.ciq-sp-nav-link.is-prev .ciq-sp-nav-arrow {
    order: 0;
}

.ciq-template-active .page-header {
    display: none !important;
}

/* ─── Animations ─── */
@keyframes ciq-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ciq-sp-category-pill {
    animation: ciq-fade-up 0.38s ease both;
}

.ciq-sp-hero h1 {
    animation: ciq-fade-up 0.45s 0.05s ease both;
}

.ciq-sp-post-meta {
    animation: ciq-fade-up 0.45s 0.12s ease both;
}

.ciq-sp-article {
    animation: ciq-fade-up 0.45s 0.18s ease both;
}

.ciq-sp-sidebar {
    animation: ciq-fade-up 0.45s 0.22s ease both;
}

/* ─── Mobile ─── */
@media (max-width: 860px) {
    .ciq-sp-layout {
        grid-template-columns: 1fr;
        padding: 24px 16px;
        gap: 24px;
    }

    .ciq-sp-sidebar {
        position: static;
        order: -1;
    }

    .ciq-sp-article {
        padding: 28px 20px;
    }

    .ciq-sp-hero {
        padding: 36px 20px 48px;
    }

    .ciq-sp-topbar {
        padding: 12px 20px;
    }

    .ciq-sp-hero h1 {
        font-size: clamp(24px, 6vw, 36px) !important;
    }

    .ciq-sp-post-nav {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .ciq-sp-nav-link.is-next {
        justify-content: flex-start;
        text-align: left;
    }

    .ciq-sp-nav-link.is-next .ciq-sp-nav-arrow {
        order: 0;
    }

    .ciq-sp-nav-link.is-next .ciq-sp-nav-text {
        order: 1;
    }
}

@media (max-width: 480px) {
    .ciq-sp-topbar-back span.ciq-sp-back-label {
        display: none;
    }
}