/* ============================================
   HAAS THEME - Exact Clone from Screenshot
   ============================================ */

:root {
    --color-white: #ffffff;
    --color-black: #111111;
    --color-bg: #ffffff;
    --color-text: #111111;
    --color-text-secondary: #555555;
    --color-text-muted: #888888;
    --color-border: #e5e5e5;
    --color-bg-light: #f7f7f7;
    --color-footer: #111111;
    --color-green: #1a8917;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container-width: 1200px;
    --content-width: 720px;
    --radius: 12px;
    --radius-full: 9999px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); font-size: 16px; line-height: 1.6; color: var(--color-text); background: var(--color-bg); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }

.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

/* =====================
   HEADER - Exact Haas
   ===================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 60px;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.header-logo .logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo .logo-img {
    height: 28px;
    width: auto;
}

.header-logo .logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.logo-dark { display: none; }

/* Navigation */
.header-nav {
    display: none;
    margin-left: 32px;
}

@media (min-width: 900px) {
    .header-nav { display: flex; align-items: center; }
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 400;
    color: var(--color-text);
    transition: opacity 0.15s;
}

.nav-link:hover { opacity: 0.6; }

/* Dropdown - "..." style */
.has-dropdown { position: relative; }

.dropdown-toggle {
    padding: 8px 14px;
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--color-text);
}

.dropdown-toggle .icon-chevron { display: none; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 160px;
    padding: 8px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: all 0.2s;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--color-text);
    border-radius: 8px;
}

.dropdown-link:hover { background: var(--color-bg-light); }

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-text);
}

.search-btn svg {
    width: 20px;
    height: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all 0.15s;
}

.btn-text {
    padding: 8px 12px;
    color: var(--color-text);
}

.btn-text:hover { opacity: 0.6; }

.btn-primary {
    padding: 10px 18px;
    color: var(--color-white);
    background: var(--color-green);
}

.btn-primary:hover { background: #157013; }

/* Mobile Toggle */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: auto;
}

@media (min-width: 900px) { .mobile-menu-toggle { display: none; } }

.hamburger { display: flex; flex-direction: column; gap: 5px; width: 20px; }
.hamburger-line { width: 100%; height: 2px; background: var(--color-text); }

/* =====================
   HERO - Exact Haas
   ===================== */
.hero-section {
    padding: 48px 40px 32px;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: var(--container-width);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero-inner {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 48px;
    }
}

.hero-content {
    flex: 1;
    max-width: 560px;
}

.hero-title {
    font-size: 44px;
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-text);
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

@media (min-width: 768px) {
    .hero-title { font-size: 54px; }
}

@media (min-width: 1024px) {
    .hero-title { font-size: 64px; }
}

.hero-description {
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

/* Hero Image - Rectangular */
.hero-image {
    flex-shrink: 0;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius);
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-image {
        width: 320px;
    }
}

@media (min-width: 1024px) {
    .hero-image {
        width: 360px;
    }
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =====================
   TAG CLOUD - #Tag Style
   ===================== */
.tag-cloud-section {
    padding: 16px 40px 40px;
}

.tag-cloud-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.tag-pill {
    font-size: 15px;
    font-weight: 400;
    color: var(--color-text);
}

.tag-pill::before {
    content: "#";
}

.tag-pill:hover {
    opacity: 0.6;
}

/* =====================
   POST FEED - 3 Columns
   ===================== */
.post-feed-section {
    padding: 24px 40px 80px;
}

.post-feed-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px 40px;
    max-width: var(--container-width);
    margin: 0 auto;
}

@media (min-width: 640px) {
    .post-feed-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
    .post-feed-inner { grid-template-columns: repeat(3, 1fr); }
}

/* =====================
   POST CARD - Exact Haas
   ===================== */
.post-card {
    display: flex;
    flex-direction: column;
}

.post-card-image-link {
    display: block;
    margin-bottom: 20px;
}

.post-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-bg-light);
}

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

.post-card:hover .post-card-image img {
    transform: scale(1.03);
}

.post-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

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

.post-card-title a:hover {
    opacity: 0.7;
}

.post-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tag Badge at Bottom - with icon */
.post-card-meta {
    margin-top: auto;
    display: flex;
    align-items: center;
}

.post-card-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all 0.15s;
}

.post-card-tag::before {
    content: "";
    display: block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5z'/%3E%3Cpath d='M2 17l10 5 10-5'/%3E%3Cpath d='M2 12l10 5 10-5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.post-card-tag:hover {
    background: var(--color-bg-light);
}

/* =====================
   PAGINATION
   ===================== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 48px;
    grid-column: 1 / -1;
}

.load-more {
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s;
}

.load-more:hover {
    background: var(--color-bg-light);
}

/* =====================
   FOOTER - Dark
   ===================== */
.site-footer {
    background: var(--color-footer);
    color: #888;
}

.footer-newsletter {
    padding: 64px 40px;
    text-align: center;
    border-bottom: 1px solid #222;
}

.newsletter-inner {
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 12px;
}

.newsletter-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 10px;
}

.newsletter-description {
    font-size: 15px;
    color: #888;
    margin-bottom: 28px;
}

.newsletter-form .form-group {
    display: flex;
    gap: 10px;
}

.form-input {
    flex: 1;
    padding: 14px 18px;
    font-size: 14px;
    color: var(--color-white);
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: var(--radius-full);
    outline: none;
}

.form-input::placeholder { color: #666; }
.form-input:focus { border-color: #444; }

.newsletter-form .btn-primary {
    padding: 14px 22px;
}

.footer-main {
    padding: 48px 40px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: var(--container-width);
    margin: 0 auto;
}

@media (min-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr 2fr;
        gap: 60px;
    }
}

.footer-brand .footer-logo img {
    height: 24px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-brand .footer-logo span {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-white);
}

.footer-nav-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

@media (min-width: 640px) {
    .footer-nav-columns { grid-template-columns: repeat(3, 1fr); }
}

.footer-nav-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 16px;
}

.footer-nav-list li { margin-bottom: 10px; }

.footer-nav-list a {
    font-size: 14px;
    color: #888;
    transition: color 0.15s;
}

.footer-nav-list a:hover { color: var(--color-white); }

.footer-bottom {
    padding: 24px 40px;
    border-top: 1px solid #222;
}

.footer-bottom-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    text-align: center;
}

.footer-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-share-label {
    font-size: 13px;
    font-weight: 500;
    color: #888;
}

.footer-share-buttons {
    display: flex;
    gap: 8px;
}

.footer-share-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    background: #222;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
}

.footer-share-btn:hover {
    color: var(--color-white);
    background: #333;
}

.copyright {
    font-size: 13px;
    color: #666;
}

.copyright a { color: #888; }
.copyright a:hover { color: var(--color-white); }

/* =====================
   MOBILE NAV
   ===================== */
.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--color-white);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    overflow-y: auto;
}

.mobile-nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 24px;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.mobile-nav-logo img { height: 24px; }
.mobile-nav-close { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; }

.mobile-nav-list { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-link {
    display: block;
    padding: 14px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text);
}

.mobile-nav-actions {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-nav-actions .btn { width: 100%; justify-content: center; padding: 16px; }

/* =====================
   POST PAGE
   ===================== */
.post-full { padding-bottom: 80px; }

.post-header {
    padding: 48px 40px 32px;
    text-align: center;
}

.post-header-inner {
    max-width: 720px;
    margin: 0 auto;
}

.post-meta-top { margin-bottom: 16px; }

.post-tag {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.post-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) { .post-title { font-size: 44px; } }

.post-excerpt {
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.post-authors { display: flex; align-items: center; gap: 10px; }
.author-item { display: flex; align-items: center; gap: 10px; }
.author-item .author-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.author-avatar-placeholder {
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
    color: var(--color-white);
    background: var(--color-text);
    border-radius: 50%;
}
.author-name { font-size: 15px; font-weight: 500; color: var(--color-text); }
.post-meta-details { font-size: 14px; color: var(--color-text-muted); }
.separator { margin: 0 4px; }

.post-feature-image {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 40px;
}

.post-feature-image img {
    width: 100%;
    border-radius: var(--radius);
}

.post-feature-image figcaption {
    margin-top: 12px;
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
}

.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
}

.gh-content { font-size: 18px; line-height: 1.8; color: #444; }
.gh-content > * + * { margin-top: 1.5em; }
.gh-content h2 { font-size: 28px; font-weight: 700; color: var(--color-text); margin-top: 2em; }
.gh-content h3 { font-size: 22px; font-weight: 600; color: var(--color-text); margin-top: 1.5em; }
.gh-content a { color: var(--color-text); text-decoration: underline; }
.gh-content strong { color: var(--color-text); font-weight: 600; }
.gh-content ul, .gh-content ol { padding-left: 24px; }
.gh-content ul { list-style: disc; }
.gh-content ol { list-style: decimal; }
.gh-content li + li { margin-top: 8px; }
.gh-content blockquote { padding-left: 20px; border-left: 3px solid var(--color-border); font-style: italic; }
.gh-content pre { padding: 20px; background: var(--color-bg-light); border-radius: var(--radius); overflow-x: auto; }
.gh-content code { font-family: 'SF Mono', monospace; font-size: 0.9em; }
.gh-content :not(pre) > code { padding: 2px 6px; background: var(--color-bg-light); border-radius: 4px; }
.gh-content hr { border: none; border-top: 1px solid var(--color-border); margin: 2.5em 0; }
.gh-content figure { margin: 2em 0; }
.gh-content figure img { border-radius: var(--radius); }
.gh-content figcaption { margin-top: 10px; font-size: 13px; color: var(--color-text-muted); text-align: center; }

.post-footer,
.page-footer {
    max-width: var(--content-width);
    margin: 40px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid var(--color-border);
}

.post-tags,
.page-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.tags-label { font-size: 13px; font-weight: 500; color: var(--color-text-muted); }
.tags-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-link {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--color-text-secondary);
    background: var(--color-bg-light);
    border-radius: var(--radius-full);
}
.tag-link:hover { background: var(--color-border); }

.post-share,
.page-share { display: flex; align-items: center; gap: 10px; }
.share-label { font-size: 13px; font-weight: 500; color: var(--color-text-muted); }
.share-buttons { display: flex; gap: 6px; }
.share-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-text-secondary);
    background: var(--color-bg-light);
    border-radius: 50%;
}
.share-btn:hover { background: var(--color-border); }

.author-card {
    max-width: var(--content-width);
    margin: 40px auto 0;
    padding: 0 24px;
}

.author-card-inner {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--color-bg-light);
    border-radius: var(--radius);
}

.author-card-image img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.author-card-content { flex: 1; }
.author-card-name { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.author-card-name a { color: var(--color-text); }
.author-card-bio { font-size: 15px; color: var(--color-text-secondary); line-height: 1.5; }
.author-card-link { font-size: 13px; color: var(--color-text-secondary); margin-top: 6px; display: inline-block; }

.post-cta {
    max-width: var(--content-width);
    margin: 40px auto 0;
    padding: 0 24px;
}

.post-cta-inner {
    padding: 40px;
    background: var(--color-bg-light);
    border-radius: var(--radius);
    text-align: center;
}

.post-cta h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.post-cta p { color: var(--color-text-secondary); margin-bottom: 20px; }

.related-posts {
    padding: 64px 40px;
    background: var(--color-bg-light);
    margin-top: 64px;
}

.related-posts-inner { max-width: var(--container-width); margin: 0 auto; }
.section-title { font-size: 13px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 28px; }
.related-posts-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 640px) { .related-posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .related-posts-grid { grid-template-columns: repeat(3, 1fr); } }

/* =====================
   PAGE
   ===================== */
.page-full { padding-bottom: 64px; }
.page-header { padding: 64px 40px 32px; text-align: center; }
.page-header-inner { max-width: 720px; margin: 0 auto; }
.page-title { font-size: 40px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.02em; }
@media (min-width: 768px) { .page-title { font-size: 48px; } }
.page-excerpt { font-size: 18px; color: var(--color-text-secondary); }
.page-feature-image { max-width: 900px; margin: 0 auto 40px; padding: 0 40px; }
.page-feature-image img { width: 100%; border-radius: var(--radius); }
.page-content { max-width: var(--content-width); margin: 0 auto; padding: 0 24px 64px; }
.page-footer { max-width: var(--content-width); margin: 40px auto 0; padding: 20px 24px 0; border-top: 1px solid var(--color-border); }
.page-updated { font-size: 13px; color: var(--color-text-muted); }

/* =====================
   ARCHIVE
   ===================== */
.archive-header { padding: 64px 40px 48px; text-align: center; }
.archive-header-inner { max-width: 720px; margin: 0 auto; }
.archive-header-image { display: none; }
.archive-label { display: inline-block; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.archive-title { font-size: 40px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.02em; }
@media (min-width: 768px) { .archive-title { font-size: 48px; } }
.archive-description { font-size: 18px; color: var(--color-text-secondary); margin-bottom: 12px; max-width: 540px; margin-left: auto; margin-right: auto; }
.archive-count { font-size: 13px; color: var(--color-text-muted); }
.archive-feed { padding-top: 0; }

.author-profile-image { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 20px; }
.author-profile-placeholder { width: 80px; height: 80px; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 600; color: var(--color-white); background: var(--color-text); border-radius: 50%; }
.author-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 12px; }
.author-location, .author-website { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--color-text-secondary); }
.author-social { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.author-social a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--color-text-secondary); background: var(--color-bg-light); border-radius: 50%; }
.author-social a:hover { background: var(--color-border); }

/* =====================
   ERROR
   ===================== */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 50vh; padding: 64px 40px; text-align: center; }
.error-inner { max-width: 400px; }
.error-illustration { display: none; }
.error-code { font-size: 100px; font-weight: 700; color: var(--color-border); line-height: 1; margin-bottom: 12px; }
.error-message { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.error-description { font-size: 15px; color: var(--color-text-secondary); margin-bottom: 24px; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* =====================
   KOENIG
   ===================== */
.kg-card { margin: 2em 0; }
.kg-image-card img, .kg-gallery-image img { border-radius: var(--radius); }

/* Gallery Cards */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    max-width: 900px;
    width: 100%;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.kg-gallery-row:not(:first-of-type) {
    margin: 6px 0 0 0;
}

.kg-gallery-image:not(:first-of-type) {
    margin: 0 0 0 6px;
}

.kg-gallery-image img {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-width-wide {
    max-width: 900px;
    margin-left: calc(50% - 450px);
    margin-right: calc(50% - 450px);
    width: calc(100vw - 80px);
}
@media (max-width: 980px) {
    .kg-width-wide { margin-left: -40px; margin-right: -40px; width: calc(100% + 80px); }
}

.kg-width-full {
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}

.kg-width-wide img, .kg-width-full img { width: 100%; }

.kg-bookmark-card { margin: 2em 0; }
.kg-bookmark-container { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; text-decoration: none; }
@media (min-width: 640px) { .kg-bookmark-container { flex-direction: row; } }
.kg-bookmark-content { flex: 1; padding: 20px; }
.kg-bookmark-title { font-size: 16px; font-weight: 600; color: var(--color-text); margin-bottom: 6px; }
.kg-bookmark-description { font-size: 14px; color: var(--color-text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; }
.kg-bookmark-metadata { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--color-text-muted); }
.kg-bookmark-icon { width: 18px; height: 18px; }
.kg-bookmark-author { font-weight: 500; color: var(--color-text-secondary); }
.kg-bookmark-author::after { content: "•"; margin: 0 6px; color: var(--color-text-muted); }
.kg-bookmark-publisher { color: var(--color-text-muted); }
.kg-bookmark-thumbnail { flex-shrink: 0; width: 100%; max-height: 180px; }
@media (min-width: 640px) { .kg-bookmark-thumbnail { width: 180px; max-height: none; } }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.kg-callout-card { padding: 20px; background: var(--color-bg-light); border-radius: var(--radius); }
.kg-callout-emoji { font-size: 22px; margin-bottom: 6px; }
.kg-callout-text { color: var(--color-text-secondary); }

.kg-button-card { display: flex; justify-content: center; }
.kg-button-card a { padding: 12px 24px; font-weight: 500; color: var(--color-white); background: var(--color-text); border-radius: var(--radius-full); text-decoration: none; }

/* =====================
   UTILITIES
   ===================== */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.form-message { margin-top: 10px; font-size: 13px; color: #dc2626; }
.form-success { margin-top: 10px; font-size: 13px; color: #16a34a; }
.btn-loader { display: none; }

/* Mobile padding adjustments */
@media (max-width: 768px) {
    .header-inner,
    .hero-section,
    .tag-cloud-section,
    .post-feed-section,
    .footer-newsletter,
    .footer-main,
    .footer-bottom,
    .post-header,
    .post-feature-image,
    .page-header,
    .page-feature-image,
    .archive-header,
    .related-posts,
    .error-page {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* =====================
   MANUAL TABLE OF CONTENTS
   ===================== */
/* 
   Usage: Add an HTML Card in Ghost editor with this template:
   
   <div class="manual-toc">
     <h4 class="toc-title">On this page</h4>
     <ul class="toc-list">
       <li><a href="#section-1">Section 1 Title</a></li>
       <li><a href="#section-2">Section 2 Title</a></li>
       <li><a href="#section-3">Section 3 Title</a></li>
     </ul>
   </div>
*/

.manual-toc {
    margin: 24px 0 32px;
    padding: 20px 24px;
    background: var(--color-bg-light);
    border-radius: var(--radius);
    border-left: 3px solid var(--ghost-accent-color, var(--color-green));
}

.manual-toc .toc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.manual-toc .toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.manual-toc .toc-list li {
    margin-bottom: 8px;
}

.manual-toc .toc-list li:last-child {
    margin-bottom: 0;
}

.manual-toc .toc-list a {
    display: block;
    font-size: 15px;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.manual-toc .toc-list a:hover {
    color: var(--color-text);
}

/* Nested TOC items */
.manual-toc .toc-list ul {
    list-style: none;
    margin: 8px 0 0 0;
    padding-left: 16px;
}

.manual-toc .toc-list ul li {
    margin-bottom: 6px;
}

.manual-toc .toc-list ul a {
    font-size: 14px;
}

/* =====================
   SERIES TOC ENHANCEMENTS
   ===================== */

/* Hide series tags from public tag display */
.post-tags .tag-link[href*="/tag/series-"],
.page-tags .tag-link[href*="/tag/series-"],
.tags-list .tag-link[href*="/tag/series-"] {
    display: none;
}

/* Series TOC wrapper */
.series-toc-wrapper {
    margin: 0 auto;
    max-width: var(--content-width, 720px);
    padding: 0 24px;
}

/* Series TOC specific styles */
.series-toc {
    margin: 32px 0;
    border-left-color: var(--ghost-accent-color, var(--color-green));
}

/* Current item highlighting */
.series-toc .toc-list li.is-current {
    position: relative;
}

.series-toc .toc-list li.is-current a {
    color: var(--color-text);
    font-weight: 600;
}

.series-toc .toc-list li.is-current::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: var(--ghost-accent-color, var(--color-green));
    border-radius: 2px;
}

/* Current indicator text */
.series-toc .current-indicator {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-left: 8px;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .series-toc-wrapper {
        padding: 0 16px;
    }
    
    .series-toc {
        margin: 24px 0;
        padding: 16px 20px;
    }
    
    .series-toc .toc-list li.is-current::before {
        left: -20px;
    }
}

/* =====================
   SERIES NAVIGATION (PREV/NEXT)
   ===================== */

.series-nav-wrapper {
    margin: 0 auto;
    max-width: var(--content-width, 720px);
    padding: 32px 24px;
}

.series-nav-wrapper .kg-button-card {
    display: flex;
    justify-content: center;
}

.series-nav-wrapper .button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    width: 100%;
}

.series-nav-wrapper .kg-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-full, 50px);
    transition: all 0.2s ease;
    max-width: 300px;
    text-align: center;
    line-height: 1.4;
}

.series-nav-wrapper .kg-btn-accent {
    color: var(--color-white, #fff);
    background: var(--ghost-accent-color, var(--color-green, #15803d));
}

.series-nav-wrapper .kg-btn-accent:hover {
    opacity: 0.9;
    transform: translateX(2px);
}

.series-nav-wrapper .kg-btn-secondary {
    color: var(--color-text);
    background: var(--color-bg-light, #f5f5f5);
    border: 1px solid var(--color-border, #e5e5e5);
}

.series-nav-wrapper .kg-btn-secondary:hover {
    background: var(--color-bg-hover, #ebebeb);
    transform: translateX(-2px);
}

/* Responsive adjustments for navigation */
@media (max-width: 768px) {
    .series-nav-wrapper {
        padding: 24px 16px;
    }
    
    .series-nav-wrapper .button-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .series-nav-wrapper .kg-btn {
        max-width: 100%;
        justify-content: center;
    }
}

/* =====================
   SERIES FOOTER NOTE
   ===================== */

.series-footer-note-wrapper {
    margin: 0 auto;
    max-width: var(--content-width, 720px);
    padding: 0 24px;
}

.series-footer-note {
    margin: 32px 0 0;
    padding: 20px 0;
    border-top: 1px solid var(--color-border, #e5e5e5);
}

.series-footer-note-text {
    font-size: 15px;
    font-style: italic;
    color: var(--color-text-secondary, #555555);
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

/* Responsive adjustments for footer note */
@media (max-width: 768px) {
    .series-footer-note-wrapper {
        padding: 0 16px;
    }
    
    .series-footer-note {
        margin: 24px 0 0;
        padding: 16px 0;
    }
    
    .series-footer-note-text {
        font-size: 14px;
    }
}
