/*
Theme Name: Hissab Child
Theme URI: https://hissabconsultant.com
Description: Custom Astra child theme for Hissab Consultant — Midnight Vault brand system.
Author: Hissab Consultant
Author URI: https://hissabconsultant.com
Template: astra
Version: 1.1.0
Text Domain: hissab-child
*/

/* =====================================================
   HISSAB CONSULTANT — CHILD THEME STYLES v1.1
   Brand: Midnight Vault palette + Fraunces/Inter typography
   ===================================================== */

/* === DESIGN TOKENS === */
:root {
    --hc-bg-primary: #0A1628;
    --hc-bg-surface: #1A2540;
    --hc-bg-elevated: #243450;
    --hc-text-primary: #F8F6F1;
    --hc-text-muted: #9BA8BD;
    --hc-accent: #96671A;
    --hc-accent-hover: #B07F2F;
    --hc-divider: rgba(243, 244, 245, 0.06);
    --hc-content-max: 760px;
    --hc-sidebar-width: 300px;
    --hc-layout-gap: 64px;
    --hc-layout-max: 1140px;
}

/* =====================================================
   GLOBAL SINGLE POST OVERRIDES
   ===================================================== */

body.single-post,
body.single-post #page,
body.single-post .site-content,
body.single-post .ast-container,
body.single-post .content-area {
    background-color: var(--hc-bg-primary) !important;
}

body.single-post #primary,
body.single-post .ast-article-single,
body.single-post article.post {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

/* =====================================================
   HISSAB SINGLE POST LAYOUT WRAPPER
   ===================================================== */

.hissab-single-wrap {
    background-color: var(--hc-bg-primary);
    padding: 120px 24px 120px;
    min-height: 100vh;
}

/* Two-column layout: main + sidebar */
.hissab-container.hissab-single-layout {
    display: flex;
    gap: var(--hc-layout-gap);
    max-width: var(--hc-layout-max);
    margin: 0 auto;
    align-items: flex-start;
}

.hissab-single-main {
    flex: 1;
    max-width: var(--hc-content-max);
    min-width: 0;
}

.hissab-sidebar {
    width: var(--hc-sidebar-width);
    flex-shrink: 0;
}

/* --- Article Header --- */

.hissab-article-header {
    margin-bottom: 48px;
}

.hissab-category {
    margin-bottom: 16px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.hissab-category a {
    color: var(--hc-accent);
    text-decoration: none;
    margin-right: 12px;
    transition: color 0.2s ease;
}

.hissab-category a:hover {
    color: var(--hc-accent-hover);
}

.hissab-article-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 500;
    color: var(--hc-text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
}

.hissab-article-meta {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--hc-text-muted);
    line-height: 1.6;
}

.hissab-article-meta a {
    color: var(--hc-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hissab-article-meta a:hover {
    color: var(--hc-accent);
}

.hissab-meta-separator {
    margin: 0 8px;
    color: var(--hc-text-muted);
    opacity: 0.5;
}

/* --- Featured Image --- */

.hissab-featured-image {
    margin: 0 0 56px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--hc-divider);
}

.hissab-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Article Content --- */

.hissab-article-content {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: var(--hc-text-primary);
    line-height: 1.75;
}

.hissab-article-content p {
    margin: 0 0 24px;
    color: var(--hc-text-primary);
}

.hissab-article-content > p:first-of-type {
    font-size: 22px;
    line-height: 1.55;
    color: var(--hc-text-primary);
    margin-bottom: 32px;
}

.hissab-article-content h2 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 32px;
    font-weight: 500;
    color: var(--hc-text-primary);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 56px 0 20px;
}

.hissab-article-content h3 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 24px;
    font-weight: 500;
    color: var(--hc-text-primary);
    line-height: 1.3;
    margin: 40px 0 16px;
}

.hissab-article-content h4 {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--hc-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 32px 0 12px;
}

.hissab-article-content h5,
.hissab-article-content h6 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--hc-text-primary);
    margin: 24px 0 12px;
}

.hissab-article-content strong,
.hissab-article-content b {
    color: var(--hc-text-primary);
    font-weight: 600;
}

.hissab-article-content em,
.hissab-article-content i {
    color: var(--hc-text-primary);
    font-style: italic;
}

.hissab-article-content a {
    color: var(--hc-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s ease;
}

.hissab-article-content a:hover {
    color: var(--hc-text-primary);
}

.hissab-article-content ul,
.hissab-article-content ol {
    margin: 0 0 24px;
    padding-left: 28px;
    color: var(--hc-text-primary);
}

.hissab-article-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.hissab-article-content ul li::marker {
    color: var(--hc-accent);
}

.hissab-article-content ol li::marker {
    color: var(--hc-accent);
    font-weight: 600;
}

.hissab-article-content blockquote {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 26px;
    font-style: italic;
    color: var(--hc-text-primary);
    line-height: 1.4;
    margin: 48px 0;
    padding: 0 0 0 32px;
    border-left: 3px solid var(--hc-accent);
}

.hissab-article-content blockquote p {
    font-size: 26px;
    color: var(--hc-text-primary);
    margin: 0;
}

.hissab-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 32px 0;
    border: 1px solid var(--hc-divider);
}

.hissab-article-content figcaption,
.hissab-article-content .wp-caption-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--hc-text-muted);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

.hissab-article-content code {
    background-color: var(--hc-bg-surface);
    color: var(--hc-accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Menlo', 'Consolas', monospace;
    font-size: 15px;
}

.hissab-article-content pre {
    background-color: var(--hc-bg-surface);
    border: 1px solid var(--hc-divider);
    border-radius: 8px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 32px 0;
}

.hissab-article-content pre code {
    background-color: transparent;
    color: var(--hc-text-primary);
    padding: 0;
    font-size: 14px;
}

.hissab-article-content hr {
    border: none;
    height: 1px;
    background-color: var(--hc-bg-elevated);
    margin: 56px 0;
}

.hissab-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    font-size: 15px;
}

.hissab-article-content th {
    background-color: var(--hc-bg-surface);
    color: var(--hc-text-primary);
    text-align: left;
    padding: 14px 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--hc-accent);
}

.hissab-article-content td {
    color: var(--hc-text-primary);
    padding: 14px 16px;
    border-bottom: 1px solid var(--hc-divider);
}

/* --- Article Tags --- */

.hissab-article-tags {
    margin: 56px 0;
    padding-top: 32px;
    border-top: 1px solid var(--hc-divider);
}

.hissab-article-tags a {
    display: inline-block;
    padding: 6px 14px;
    background-color: var(--hc-bg-surface);
    color: var(--hc-text-muted);
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hissab-article-tags a:hover {
    background-color: var(--hc-accent);
    color: #FFFFFF;
}

/* --- Author Box --- */

.hissab-author-box {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background-color: var(--hc-bg-surface);
    border: 1px solid var(--hc-divider);
    border-radius: 8px;
    padding: 32px;
    margin: 56px 0;
}

.hissab-author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1px solid var(--hc-accent);
    object-fit: cover;
}

.hissab-author-info {
    flex: 1;
}

.hissab-author-label {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--hc-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.hissab-author-name {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--hc-text-primary);
    margin-bottom: 8px;
}

.hissab-author-bio {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--hc-text-muted);
    line-height: 1.6;
}

/* --- Related Posts --- */

.hissab-related {
    margin: 80px 0 0;
    padding-top: 56px;
    border-top: 1px solid var(--hc-divider);
}

.hissab-related-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 28px;
    font-weight: 500;
    color: var(--hc-text-primary);
    margin: 0 0 32px;
    letter-spacing: -0.01em;
}

.hissab-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .hissab-related-grid {
        grid-template-columns: 1fr;
    }
}

.hissab-related-card {
    background-color: var(--hc-bg-surface);
    border: 1px solid var(--hc-divider);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: block;
}

.hissab-related-card:hover {
    transform: translateY(-4px);
    border-color: var(--hc-accent);
}

.hissab-related-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--hc-bg-elevated);
}

.hissab-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.hissab-related-cat {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--hc-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
}

.hissab-related-card-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--hc-text-primary);
    line-height: 1.3;
    margin: 0;
    letter-spacing: -0.01em;
}

/* --- Post Navigation --- */

.hissab-post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 56px 0;
    padding: 32px 0;
    border-top: 1px solid var(--hc-divider);
    border-bottom: 1px solid var(--hc-divider);
    gap: 24px;
}

.hissab-post-nav a {
    color: var(--hc-text-muted);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: color 0.2s ease;
}

.hissab-post-nav a:hover {
    color: var(--hc-accent);
}

.hissab-post-nav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--hc-accent);
    margin-bottom: 6px;
    font-weight: 600;
    display: block;
}

.hissab-post-nav-title {
    color: var(--hc-text-primary);
    font-family: 'Fraunces', Georgia, serif;
    font-size: 17px;
    line-height: 1.3;
}

.hissab-post-nav-next {
    text-align: right;
}

/* =====================================================
   STICKY SIDEBAR CTA CARD
   ===================================================== */

.hissab-cta-card {
    position: sticky;
    top: 100px;
    background-color: var(--hc-bg-surface);
    border: 1px solid var(--hc-divider);
    border-radius: 10px;
    padding: 36px 28px 32px;
    text-align: center;
}

.hissab-cta-card::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--hc-accent);
    margin: 0 auto 24px;
}

.hissab-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background-color: rgba(150, 103, 26, 0.12);
    border: 1px solid var(--hc-accent);
    border-radius: 50%;
    color: var(--hc-accent);
}

.hissab-cta-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--hc-accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0 0 12px;
}

.hissab-cta-heading {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    color: var(--hc-text-primary);
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
}

.hissab-cta-body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--hc-text-muted);
    line-height: 1.6;
    margin: 0 0 24px;
}

.hissab-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background-color: var(--hc-accent);
    color: #FFFFFF !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.hissab-cta-button:hover {
    background-color: var(--hc-accent-hover);
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

.hissab-cta-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.hissab-cta-number {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--hc-text-muted);
    margin: 16px 0 0;
    letter-spacing: 0.02em;
}

.hissab-cta-number a {
    color: var(--hc-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hissab-cta-number a:hover {
    color: var(--hc-accent);
}

.hissab-cta-divider {
    height: 1px;
    background-color: var(--hc-divider);
    margin: 20px 0 16px;
}

.hissab-cta-secondary {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--hc-text-muted);
    margin: 0;
}

.hissab-cta-secondary a {
    color: var(--hc-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.hissab-cta-secondary a:hover {
    color: var(--hc-accent-hover);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Sidebar moves below content on tablet and smaller */
@media (max-width: 1024px) {
    .hissab-container.hissab-single-layout {
        flex-direction: column;
    }
    
    .hissab-sidebar {
        width: 100%;
        max-width: var(--hc-content-max);
        margin: 32px auto 0;
    }
    
    .hissab-cta-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .hissab-single-wrap {
        padding: 80px 20px 80px;
    }
    
    .hissab-article-content {
        font-size: 17px;
    }
    
    .hissab-article-content > p:first-of-type {
        font-size: 19px;
    }
    
    .hissab-article-content h2 {
        font-size: 26px;
        margin: 40px 0 16px;
    }
    
    .hissab-article-content h3 {
        font-size: 20px;
    }
    
    .hissab-article-content blockquote,
    .hissab-article-content blockquote p {
        font-size: 22px;
    }
    
    .hissab-author-box {
        flex-direction: column;
        gap: 16px;
    }
    
    .hissab-post-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hissab-post-nav-next {
        text-align: left;
    }
    
    .hissab-cta-card {
        padding: 28px 24px;
    }
}
