/*
 * Tsatiris Theme – Blog & Single Post Styles (blog.css)
 */

/* ── Blog Listing Header ──────────────────────────────────────────────────── */

.blog-header {
    background: var(--navy);
    padding-top: calc(var(--nav-h) + 56px);
    padding-bottom: 64px;
    position: relative;
    overflow: hidden;
}

.blog-header-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(74,144,217,0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 10% 80%, rgba(74,144,217,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.blog-header-inner {
    position: relative;
    z-index: 1;
}

.blog-header-inner .section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.blog-header-inner h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    margin: 0 0 16px;
}

.blog-header-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.65);
    max-width: 560px;
    line-height: 1.7;
    margin: 0;
}

/* ── Post Grid ────────────────────────────────────────────────────────────── */

.blog-listing {
    background: var(--light-grey);
    padding: 72px 0 96px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

/* ── Post Card ────────────────────────────────────────────────────────────── */

.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(13, 27, 42, 0.10);
}

.post-card-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

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

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

.post-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 28px 28px 24px;
    gap: 12px;
}

.post-card-meta {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-dark);
    margin: 0;
}

.post-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.post-card-title a:hover {
    color: var(--accent);
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-body);
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-top: 4px;
    transition: gap 0.2s, color 0.2s;
}

.post-card-link:hover {
    gap: 10px;
    color: var(--accent-dark);
}

/* ── Pagination ───────────────────────────────────────────────────────────── */

.blog-pagination {
    margin-top: 56px;
    display: flex;
    justify-content: center;
}

.blog-pagination ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-pagination ul li a,
.blog-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-light);
    color: var(--text-body);
    background: var(--white);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.blog-pagination ul li a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.blog-pagination ul li span.current {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

/* ── Empty State ──────────────────────────────────────────────────────────── */

.blog-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-muted-dk);
    font-size: 1rem;
}

/* ── Single Post Header ───────────────────────────────────────────────────── */

.single-post-header {
    background: var(--navy);
    padding-top: calc(var(--nav-h) + 56px);
    padding-bottom: 64px;
    position: relative;
    overflow: hidden;
}

.single-post-header-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 50%, rgba(74,144,217,0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 60% at 10% 80%, rgba(74,144,217,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.single-post-header-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.single-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

.meta-sep {
    color: rgba(255,255,255,0.3);
}

.post-author {
    color: rgba(255,255,255,0.55);
}

.single-post-title {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin: 0;
}

/* ── Single Post Body ─────────────────────────────────────────────────────── */

.single-post-body {
    background: var(--white);
    padding: 72px 0 96px;
}

.single-post-body .container {
    max-width: 760px;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-body);
}

.post-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2.5em 0 0.75em;
    line-height: 1.3;
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2em 0 0.6em;
    line-height: 1.35;
}

.post-content p {
    margin: 0 0 1.5em;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(74,144,217,0.4);
    text-underline-offset: 3px;
    transition: color 0.2s, text-decoration-color 0.2s;
}

.post-content a:hover {
    color: var(--accent-dark);
    text-decoration-color: var(--accent-dark);
}

.post-content ul,
.post-content ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}

.post-content li {
    margin-bottom: 0.5em;
}

.post-content blockquote {
    margin: 2em 0;
    padding: 20px 28px;
    border-left: 4px solid var(--accent);
    background: var(--light-grey);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-dark);
}

.post-content blockquote p {
    margin: 0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
}

.post-content pre,
.post-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--navy);
    color: var(--off-white);
    padding: 20px 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.post-content :not(pre) > code {
    background: var(--light-grey);
    color: var(--navy);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ── Post Tags ────────────────────────────────────────────────────────────── */

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 48px 0 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.post-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent);
    background: rgba(74,144,217,0.08);
    border: 1px solid rgba(74,144,217,0.2);
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.post-tag:hover {
    background: rgba(74,144,217,0.15);
    border-color: rgba(74,144,217,0.4);
}

/* ── Back Link ────────────────────────────────────────────────────────────── */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    margin-bottom: 32px;
    transition: color 0.2s, gap 0.2s;
}

.back-link:hover {
    color: var(--white);
    gap: 12px;
}

.single-post-body .back-link {
    color: var(--accent);
}

.single-post-body .back-link:hover {
    color: var(--accent-dark);
}

.post-nav {
    margin-top: 8px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .blog-header,
    .single-post-header {
        padding-top: calc(var(--nav-h) + 36px);
        padding-bottom: 48px;
    }

    .blog-listing,
    .single-post-body {
        padding: 48px 0 64px;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .post-card-body {
        padding: 22px 22px 20px;
    }

    .single-post-body .container {
        max-width: 100%;
    }

    .post-content {
        font-size: 1rem;
    }
}
