/* =====================================================
   style.css — alawlaqi.com theme
   Fonts: Roboto (body), Roboto Slab (headings) via Google Fonts
   Colors: #046bd2 primary | #1e293b text | #F0F5FA bg
   ===================================================== */

/* ----- Google Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&family=Roboto+Slab:wght@400;600;700&display=swap');

/* ----- CSS Variables ----- */
:root {
    --color-primary:       #046bd2;
    --color-primary-dark:  #045cb4;
    --color-text:          #1e293b;
    --color-text-muted:    #64748b;
    --color-heading:       #1e293b;
    --color-link:          #046bd2;
    --color-link-hover:    #045cb4;
    --color-bg:            #F0F5FA;
    --color-white:         #ffffff;
    --color-card-bg:       #ffffff;
    --color-border:        #D1D5DB;
    --color-badge-bg:      #046bd2;
    --color-overlay:       rgba(0, 0, 0, 0.55);

    --font-body:    'Roboto', sans-serif;
    --font-heading: 'Roboto Slab', serif;

    --container-width: 1200px;
    --container-narrow: 750px;
    --radius-sm: 2px;
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.12);
    --nav-height: 70px;
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    line-height: 1.3;
    margin: 0 0 0.6em;
}

h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1em; }

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--color-link-hover); text-decoration: underline; }
a:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

/* ----- Layout Helpers ----- */
.ast-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.ast-container--narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 20px;
}

/* ----- Page Wrapper ----- */
#page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    padding: 40px 0;
}

/* =====================================================
   NAVIGATION
   ===================================================== */
#masthead {
    background: var(--color-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo */
.site-branding a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.site-branding .logo-img {
    height: 44px;
    width: auto;
}

.site-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-heading);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Desktop Nav */
.primary-site-navigation-desktop { display: block; }

.main-header-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-header-menu li { position: relative; }

.main-header-menu a.menu-link {
    display: block;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background-color 0.2s;
}

.main-header-menu a.menu-link:hover,
.main-header-menu li.current-menu-item a.menu-link {
    color: var(--color-primary);
    background-color: rgba(4, 107, 210, 0.06);
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav menu */
.ast-mobile-header-wrap {
    display: none;
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
}

.ast-mobile-header-wrap.open { display: block; }

.ast-mobile-nav-menu {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 12px 20px;
}

.ast-mobile-nav-menu li { border-bottom: 1px solid var(--color-bg); }

.ast-mobile-nav-menu a.menu-link {
    display: block;
    padding: 10px 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
}

.ast-mobile-nav-menu a.menu-link:hover { color: var(--color-primary); }

/* =====================================================
   BREADCRUMB
   ===================================================== */
.breadcrumb-wrap {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 10px 0;
    margin-bottom: 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.breadcrumb-list a {
    color: var(--color-text-muted);
    text-decoration: none;
}
.breadcrumb-list a:hover { color: var(--color-primary); }

.breadcrumb-sep {
    color: var(--color-border);
}

.breadcrumb-current {
    color: var(--color-text);
    font-weight: 500;
}

/* =====================================================
   HERO (Homepage)
   ===================================================== */
.hero-section {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #1a2a3a;
}

.hero-section .hero-bg {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    opacity: 0.55;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(4,107,210,0.7) 0%, rgba(0,0,0,0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    color: var(--color-white);
}

.hero-content h1 {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.4em;
}

.hero-content .hero-desc {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto 1.5em;
}

.hero-content .btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.2s;
}
.hero-content .btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; }

/* =====================================================
   SECTIONS (Homepage)
   ===================================================== */
.section-block {
    padding: 48px 0;
}

.section-block + .section-block {
    padding-top: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-primary);
    margin-top: 6px;
}

.view-more-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
}
.view-more-link:hover { color: var(--color-primary-dark); text-decoration: underline; }

/* ----- Post Grid ----- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.posts-grid--two { grid-template-columns: repeat(2, 1fr); }
.posts-grid--four { grid-template-columns: repeat(4, 1fr); }

/* =====================================================
   POST CARD (Standard — white card, image top)
   ===================================================== */
.post-card {
    background: var(--color-card-bg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.post-card-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--color-border);
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-badge-bg);
    color: var(--color-white);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 2;
}

.post-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-heading);
    margin: 0 0 8px;
    line-height: 1.4;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
}
.post-card-title a:hover { color: var(--color-primary); text-decoration: none; }

.post-card-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.post-card-meta a { color: var(--color-text-muted); }
.post-card-meta a:hover { color: var(--color-primary); }

.post-card-excerpt {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card cover link (full card clickable) */
.post-card-cover-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.post-card { position: relative; }
.post-card-title a, .post-card-meta a { position: relative; z-index: 2; }

/* =====================================================
   DARK OVERLAY CARD (Category page style)
   ===================================================== */
.post-card--dark {
    background: #1a2a3a;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    cursor: pointer;
}

.post-card--dark .post-card-thumb {
    position: absolute;
    inset: 0;
    aspect-ratio: unset;
    z-index: 0;
}

.post-card--dark .post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card--dark .post-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.35) 60%, transparent 100%);
    z-index: 1;
}

.post-card--dark .post-card-badge {
    z-index: 3;
    position: absolute;
    top: 12px;
    left: 12px;
}

.post-card--dark .post-card-body {
    position: relative;
    z-index: 2;
    padding: 20px 16px 16px;
    background: none;
}

.post-card--dark .post-card-title {
    color: var(--color-white);
    font-size: 1rem;
    margin-bottom: 6px;
}

.post-card--dark .post-card-title a { color: var(--color-white); }
.post-card--dark .post-card-title a:hover { color: rgba(255,255,255,0.85); text-decoration: underline; }

.post-card--dark .post-card-meta {
    color: rgba(255,255,255,0.7);
    font-size: 0.78rem;
}

.post-card--dark .post-card-meta a { color: rgba(255,255,255,0.7); }

.post-card--dark .post-card-excerpt {
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    margin-bottom: 0;
    -webkit-line-clamp: 3;
}

/* =====================================================
   EXPLORE TOPICS (Category boxes)
   ===================================================== */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.topic-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    padding: 28px 24px;
    text-align: left;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.topic-card-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-heading);
}

.topic-card-desc {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    flex: 1;
}

.btn-outline {
    display: inline-block;
    padding: 7px 18px;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    align-self: flex-start;
}
.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
}
.btn-outline:active { background: var(--color-primary-dark); }

/* =====================================================
   TESTIMONIALS
   ===================================================== */
.testimonials-section {
    background: var(--color-white);
    padding: 48px 0;
}

.testimonial-item {
    background: var(--color-bg);
    border-left: 4px solid var(--color-primary);
    padding: 24px;
    margin-bottom: 20px;
    font-style: italic;
    color: var(--color-text-muted);
}

.testimonial-author {
    display: block;
    margin-top: 12px;
    font-style: normal;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--color-text);
}

/* =====================================================
   CATEGORY PAGE
   ===================================================== */
.category-header {
    background: var(--color-white);
    padding: 40px 0 30px;
    margin-bottom: 0;
}

.category-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-heading);
    margin: 0;
}

.category-posts {
    padding: 40px 0;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 40px 0 20px;
}

.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    background: var(--color-card-bg);
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.page-item:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    text-decoration: none;
}

.page-item.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    cursor: default;
    pointer-events: none;
}

.page-item.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* =====================================================
   ARTICLE / BLOG DETAIL
   ===================================================== */
.single-article-wrap {
    padding: 40px 0;
}

.entry-header {
    margin-bottom: 24px;
}

.entry-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.entry-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 16px;
}

.entry-meta span { display: flex; align-items: center; gap: 4px; }

.entry-meta a {
    color: var(--color-primary);
    text-decoration: none;
}
.entry-meta a:hover { text-decoration: underline; }

/* Table of Contents */
.toc-box {
    float: left;
    margin: 0 28px 24px 0;
    min-width: 220px;
    max-width: 280px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 16px 20px;
    font-size: 0.88rem;
}

.toc-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--color-heading);
}

.toc-list { padding-left: 16px; list-style: decimal; }
.toc-list li { margin-bottom: 4px; }
.toc-list a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}
.toc-list a:hover { color: var(--color-primary); }

/* Article content */
.entry-content {
    overflow: hidden;
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 1.4rem;
    margin: 1.5em 0 0.5em;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--color-border);
}

.entry-content h3 {
    font-size: 1.1rem;
    margin: 1.2em 0 0.4em;
}

.entry-content p { margin-bottom: 1em; }
.entry-content ul, .entry-content ol { margin: 0.5em 0 1em 1.5em; }
.entry-content li { margin-bottom: 0.3em; }
.entry-content blockquote {
    margin: 1.5em 0;
    padding: 12px 20px;
    border-left: 4px solid var(--color-primary);
    background: var(--color-bg);
    font-style: italic;
    color: var(--color-text-muted);
}
.entry-content img { margin: 1em 0; border-radius: var(--radius-sm); }
.entry-content a { color: var(--color-primary); }
.entry-content a:hover { text-decoration: underline; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95rem;
    overflow-x: auto;
    display: block;
}
.entry-content table th,
.entry-content table td {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}
.entry-content table th {
    background: var(--color-bg);
    font-weight: 600;
    white-space: nowrap;
}
.entry-content table tr:nth-child(even) td {
    background: var(--color-bg);
}

/* FAQ */
.faq-section {
    margin-top: 40px;
    clear: both;
}

.faq-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 8px;
}

.faq-item {
    border: 1px solid var(--color-border);
    margin-bottom: 8px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-heading);
    cursor: pointer;
    background: var(--color-card-bg);
    user-select: none;
    margin: 0;
}

.faq-question:hover { background: var(--color-bg); }

.faq-icon {
    font-style: normal;
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--color-primary);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
    display: none;
    padding: 0 18px 14px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-card-bg);
}

.faq-item.open .faq-answer { display: block; }

/* Post navigation (prev/next) */
.post-navigation {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 24px 0;
    margin: 32px 0;
    clear: both;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous, .nav-next {
    flex: 1;
    font-size: 0.88rem;
}

.nav-previous a, .nav-next a {
    display: block;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.nav-previous a:hover, .nav-next a:hover { color: var(--color-primary); }

.nav-previous .nav-title, .nav-next .nav-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-heading);
}

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

/* Related posts */
.related-posts {
    padding: 32px 0 0;
    clear: both;
}

.related-posts .post-card--dark {
    aspect-ratio: 1/1;
}

.related-posts-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-heading);
}

/* =====================================================
   STATIC PAGES (about, contact, privacy, terms)
   ===================================================== */
.page-content-wrap {
    background: var(--color-card-bg);
    padding: 40px;
    max-width: 860px;
    margin: 0 auto;
    box-shadow: var(--shadow-card);
}

.page-content-wrap h1 { margin-bottom: 20px; }

.page-content h2 {
    font-size: 1.3rem;
    margin: 1.5em 0 0.5em;
    color: var(--color-heading);
}

.page-content p { margin-bottom: 1em; }
.page-content ul { margin: 0.5em 0 1em 1.5em; list-style: disc; }
.page-content a { color: var(--color-primary); }
.page-content a:hover { text-decoration: underline; }

/* =====================================================
   404 PAGE
   ===================================================== */
.error-404-wrap {
    text-align: center;
    padding: 80px 20px;
}

.error-404-wrap h1 {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.error-404-desc {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 480px;
    margin: 0 auto 24px;
}

.error-404-wrap .btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: 40px;
}
.error-404-wrap .btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; }
.error-404-wrap .btn-primary:active { background: var(--color-primary-dark); }

.error-categories-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.error-categories-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.error-categories-list a {
    padding: 6px 16px;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 0.88rem;
    text-decoration: none;
}
.error-categories-list a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background: var(--color-white);
    border-top: 1px solid var(--color-border);
}

.site-above-footer {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-bg);
}

.footer-nav-wrap {
    display: flex;
    justify-content: center;
}

.footer-nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

.footer-nav-list li:not(:last-child)::after {
    content: '|';
    margin: 0 10px;
    color: var(--color-border);
}

.footer-nav-list a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
}
.footer-nav-list a:hover { color: var(--color-primary); }

.site-primary-footer {
    padding: 24px 0 16px;
}

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.footer-logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.footer-logo-area .site-title {
    font-size: 1rem;
    margin-top: 8px;
    color: var(--color-text-muted);
}

.footer-logo-img {
    height: 40px;
    width: auto;
}

.footer-address {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.footer-address strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.footer-copyright {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    text-align: left;
    align-self: flex-end;
}

/* =====================================================
   LOADING / AJAX
   ===================================================== */
#posts-loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid--four { grid-template-columns: repeat(2, 1fr); }
    .topics-grid { grid-template-columns: repeat(2, 1fr); }
    .page-content-wrap { padding: 28px 24px; }
}

@media (max-width: 768px) {
    :root { --nav-height: 60px; }

    .primary-site-navigation-desktop { display: none; }
    .nav-toggle { display: flex; }

    .posts-grid,
    .posts-grid--two,
    .posts-grid--four { grid-template-columns: 1fr; }

    .topics-grid { grid-template-columns: 1fr; }

    .hero-content h1 { font-size: 1.8rem; }
    .hero-content .hero-desc { font-size: 1rem; }

    .category-header h1 { font-size: 1.6rem; }

    .toc-box {
        float: none;
        max-width: 100%;
        width: 100%;
        margin: 0 0 24px;
    }

    .nav-links { flex-direction: column; }
    .nav-next { text-align: left; }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-address { text-align: center; }
    .footer-copyright { text-align: center; align-self: auto; }

    .error-404-wrap h1 { font-size: 2rem; }

    .page-content-wrap { padding: 20px 16px; }
    .section-block { padding: 32px 0; }
}

@media (max-width: 480px) {
    .main-header-bar { padding: 0 16px; }
    .ast-container { padding: 0 16px; }
    .hero-content { padding: 40px 16px; }
}
