/* BadgerBytes Theme - Main Styles */

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

html {
    scroll-behavior: smooth;
}

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

/* Ghost Custom Font Support */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--gh-font-heading, var(--font-family));
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

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

/* ================================
   Layout
   ================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-main {
    min-height: calc(100vh - 200px);
    padding: 0;
}

/* ================================
   Reading Progress Bar
   ================================ */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--bg-secondary);
    z-index: 99;
    pointer-events: none;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px var(--accent-color);
}

/* ================================
   Navigation
   ================================ */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
    padding: 20px 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

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

.site-logo:hover {
    color: var(--accent-color);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-nav ul,
.site-nav .nav {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.site-nav ul li,
.site-nav .nav li {
    display: block;
    margin: 0;
    padding: 0;
}

.site-nav ul li a,
.site-nav .nav li a {
    display: block;
    padding: 5px 10px;
}

.site-nav a {
    color: #ffffff;
    font-weight: 500;
    transition: color 0.2s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.site-nav a:hover,
.site-nav a.nav-current {
    color: var(--accent-color);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* Members Portal Buttons */
.gh-head-members {
    display: flex;
    gap: 10px;
    margin-left: 20px;
}

.btn-signin {
    color: #ffffff;
    padding: 8px 20px;
    background: transparent;
    border: 2px solid #ffffff;
    border-radius: 50px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    transition: all 0.3s ease;
}

.btn-signin:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
    text-shadow: none;
}

.btn-subscribe, .btn-account {
    color: var(--accent-color);
    padding: 8px 20px;
    background: transparent;
    border: 2px solid var(--accent-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-subscribe:hover, .btn-account:hover {
    background: var(--accent-color);
    color: #000;
}

/* ================================
   Footer
   ================================ */
.site-footer {
    background: var(--bg-color);
    padding: 40px 0;
    border-top: 1px solid var(--bg-card);
    text-align: center;
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-nav {
    margin-bottom: 20px;
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 20px;
}

.footer-nav a {
    color: var(--text-muted);
}

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

/* ================================
   Homepage Hero
   ================================ */
.hero {
    text-align: left;
    position: relative;
    background: var(--bg-secondary);
    margin-bottom: 60px;
    overflow: hidden;
}

/* Hero Size Variations - padding-top accounts for nav bar */
.hero.hero-small {
    padding: 80px 20px 40px;
}

.hero.hero-medium {
    padding: 100px 20px 80px;
}

.hero.hero-large {
    padding: 140px 20px 120px;
}

.hero.hero-full {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
}

/* Hero Background Image */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Hero Logo */
.hero-logo {
    max-height: 120px;
    width: auto;
    margin-bottom: 20px;
}

.hero.hero-small .hero-logo {
    max-height: 80px;
}

.hero.hero-large .hero-logo,
.hero.hero-full .hero-logo {
    max-height: 160px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero h1 span {
    color: var(--accent-color);
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 0 30px 0;
}

/* Hero Subscribe Button */
.hero-subscribe {
    margin-top: 20px;
}

/* ================================
   Section Titles
   ================================ */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

/* ================================
   Featured Post
   ================================ */
.featured-post {
    margin-bottom: 60px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

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

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-label {
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.featured-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.featured-content h2 a {
    color: var(--text-color);
}

.featured-content h2 a:hover {
    color: var(--accent-color);
}

.featured-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-content {
        padding: 20px;
    }
}

/* ================================
   Post Cards Grid
   ================================ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.post-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-card-content {
    padding: 20px;
}

.post-card-tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.post-card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

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

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

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

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

/* ================================
   Magazine Layout
   ================================ */
.post-grid-magazine {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.post-grid-magazine .post-card:first-child {
    grid-column: span 2;
}

.post-grid-magazine .post-card:first-child .post-card-image {
    height: 400px;
}

.post-grid-magazine .post-card:first-child .post-card-title {
    font-size: 1.75rem;
}

@media (max-width: 768px) {
    .post-grid-magazine {
        grid-template-columns: 1fr;
    }
    .post-grid-magazine .post-card:first-child {
        grid-column: span 1;
    }
    .post-grid-magazine .post-card:first-child .post-card-image {
        height: 200px;
    }
}

/* ================================
   Minimal Post List
   ================================ */
.post-list-minimal {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 60px;
}

.post-list-minimal .post-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 20px 0;
    border-bottom: 1px solid var(--bg-card);
}

.post-list-minimal .post-item-title {
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-list-minimal .post-item-title:hover {
    color: var(--accent-color);
}

.post-list-minimal .post-item-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
    margin-left: 20px;
}

/* ================================
   Portfolio Section
   ================================ */
.portfolio-section {
    margin-bottom: 60px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.portfolio-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--accent-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(var(--accent-color), 0.2);
}

/* ================================
   Single Post
   ================================ */
.post-full {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px 0;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-tag {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-meta span {
    margin: 0 10px;
}

/* Featured Image */
.post-feature-image {
    margin: 0 auto 40px;
    max-width: 1000px;
}

.post-feature-image img {
    width: 100%;
    border-radius: 8px;
}

/* ================================
   Post Content
   ================================ */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    overflow: visible;
}

.post-content h2 {
    font-size: 1.75rem;
    margin: 50px 0 20px;
    padding-top: 20px;
    border-top: 1px solid var(--bg-card);
}

.post-content h3 {
    font-size: 1.4rem;
    margin: 40px 0 15px;
}

.post-content h4 {
    font-size: 1.2rem;
    margin: 30px 0 15px;
}

.post-content p {
    margin-bottom: 25px;
}

.post-content ul,
.post-content ol {
    margin: 0 0 25px 25px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-muted);
}

/* ================================
   Image Sizing (Ghost Editor)
   ================================ */
.kg-card {
    margin: 30px 0;
}

/* Normal width - matches content */
.kg-width-normal {
    max-width: 100%;
}

/* Wide width - extends beyond content */
.kg-width-wide {
    max-width: 1000px;
    margin-left: calc(50% - 50vw + 100px);
    margin-right: calc(50% - 50vw + 100px);
    width: calc(100vw - 200px);
}

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

.kg-image {
    width: 100%;
    border-radius: 8px;
}

.kg-width-full .kg-image {
    border-radius: 0;
}

/* Image captions */
.kg-card figcaption {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Gallery cards */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kg-gallery-row {
    display: flex;
    gap: 10px;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Bookmark cards */
.kg-bookmark-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
}

.kg-bookmark-content {
    flex: 1;
    padding: 20px;
}

.kg-bookmark-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.kg-bookmark-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.kg-bookmark-thumbnail {
    width: 200px;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================
   Code Blocks
   ================================ */
.post-content code {
    background: var(--bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
    border: 1px solid var(--bg-secondary);
}

.post-content pre code {
    background: none;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ================================
   Table of Contents
   ================================ */
.toc-container {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px;
    border-left: 3px solid var(--accent-color);
}

.toc-title {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toc-list {
    list-style: none;
}

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

.toc-list a {
    color: var(--text-color);
    font-size: 0.95rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.toc-list a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.toc-list .toc-h3 {
    padding-left: 20px;
    font-size: 0.9rem;
}

.toc-list .active {
    color: var(--accent-color);
}

/* ================================
   Author Section
   ================================ */
.author-box {
    display: flex;
    gap: 20px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    margin-top: 60px;
}

/* Author box at top of article (horizontal layout) */
.author-box-top {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--bg-card);
    background: transparent;
    margin-top: 0;
}

.author-box-top .author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.author-box-top .author-info h4 {
    margin: 0;
    font-size: 1rem;
}

.author-box-top .author-info p {
    margin: 5px 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 5px;
}

.author-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ================================
   Comments Section
   ================================ */
.post-comments {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--bg-card);
}

/* ================================
   Tag & Author Pages
   ================================ */
.archive-header {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    margin-bottom: 40px;
}

.archive-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.archive-header p {
    color: var(--text-muted);
}

/* ================================
   Error Page
   ================================ */
.error-page {
    text-align: center;
    padding: 100px 20px;
}

.error-code {
    font-size: 8rem;
    color: var(--accent-color);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 20px;
}

.error-page h1 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn:hover {
    background: var(--accent-hover);
    color: var(--bg-color);
}

/* ================================
   Pagination
   ================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 60px;
}

.pagination a {
    background: var(--bg-card);
    padding: 10px 20px;
    border-radius: 6px;
    color: var(--text-color);
}

.pagination a:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
    .site-header .container {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: block;
        z-index: 1001;
    }

    .site-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-color);
        padding: 80px 40px 40px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
    }

    .site-nav.active {
        display: flex;
    }

    .site-nav ul,
    .site-nav .nav {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }

    .site-nav a {
        font-size: 1.5rem;
        text-shadow: none;
    }

    /* Mobile: member buttons become nav items */
    .gh-head-members {
        flex-direction: column;
        align-items: center;
        gap: 25px;
        margin-left: 0;
        margin-top: 30px;
        width: 100%;
        text-align: center;
    }

    .btn-signin,
    .btn-subscribe,
    .btn-account {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        font-size: 1.5rem;
        text-shadow: none;
        display: block;
        width: 100%;
        text-align: center;
    }

    .btn-signin {
        color: var(--text-color);
    }

    .btn-signin:hover,
    .btn-subscribe:hover,
    .btn-account:hover {
        background: transparent;
        color: var(--accent-color);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero.hero-medium,
    .hero.hero-large {
        padding: 60px 20px;
    }

    .hero.hero-full {
        min-height: 60vh;
    }

    .hero-logo {
        max-height: 80px !important;
    }

    .post-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 1.75rem;
    }

    /* Image sizing responsive */
    .kg-width-wide {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }

    .kg-width-full {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-avatar {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

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

    .error-code {
        font-size: 5rem;
    }
}

/* ================================
   Subscribe Modal
   ================================ */
.subscribe-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.subscribe-modal.active {
    display: flex;
}

.subscribe-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.subscribe-modal-content {
    position: relative;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.subscribe-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.subscribe-modal-close:hover {
    color: var(--text-color);
}

.subscribe-modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.subscribe-modal-content p {
    color: var(--text-muted);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.subscribe-modal-btn {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    background: var(--accent-color);
    color: #000;
    border: none;
    border-radius: 6px;
    padding: 12px 30px;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.subscribe-modal-btn:hover {
    opacity: 0.9;
    color: #000;
}

.subscribe-modal-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
}

.subscribe-modal-dismiss:hover {
    color: var(--text-color);
}

/* ========================================
   Ghost Bookmark Cards
   ======================================== */
.kg-bookmark-card,
.kg-bookmark-card * {
    box-sizing: border-box;
}

.kg-bookmark-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.kg-bookmark-container {
    display: flex;
    flex-wrap: wrap;
    text-decoration: none;
    color: inherit;
}

.kg-bookmark-container:hover {
    text-decoration: none;
}

.kg-bookmark-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-basis: 100%;
    padding: 20px;
    order: 1;
}

.kg-bookmark-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 8px;
}

.kg-bookmark-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-bottom: 12px;
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-muted);
    gap: 8px;
}

.kg-bookmark-icon {
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

.kg-bookmark-author {
    color: var(--text-muted);
}

.kg-bookmark-author::after {
    content: "•";
    margin-left: 8px;
}

.kg-bookmark-publisher {
    color: var(--text-muted);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kg-bookmark-thumbnail {
    position: relative;
    flex-grow: 1;
    min-width: 33%;
    max-height: 200px;
    order: 2;
}

.kg-bookmark-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 8px 8px 0;
}

@media (min-width: 600px) {
    .kg-bookmark-content {
        flex-basis: 0;
        padding: 24px;
        order: 0;
    }

    .kg-bookmark-thumbnail {
        order: 1;
    }
}

/* ========================================
   Ghost Gallery Cards
   ======================================== */
.kg-gallery-card {
    width: 100%;
}

.kg-gallery-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.kg-gallery-image {
    flex: 1 1 0%;
}

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

/* ========================================
   Ghost Button Cards
   ======================================== */
.kg-button-card {
    display: flex;
    justify-content: flex-start;
    margin: 1.5em 0;
}

.kg-button-card.kg-align-center {
    justify-content: center;
}

.kg-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.kg-btn-accent {
    background: var(--accent-color);
    color: #000;
}

.kg-btn-accent:hover {
    opacity: 0.9;
}

/* ========================================
   Ghost Callout Cards
   ======================================== */
.kg-callout-card {
    display: flex;
    padding: 20px;
    border-radius: 8px;
    margin: 1.5em 0;
}

.kg-callout-card-grey {
    background: var(--bg-secondary);
}

.kg-callout-card-white {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kg-callout-card-blue,
.kg-callout-card-green,
.kg-callout-card-yellow,
.kg-callout-card-red,
.kg-callout-card-pink,
.kg-callout-card-purple {
    border: none;
}

.kg-callout-card-blue {
    background: rgba(33, 150, 243, 0.15);
}

.kg-callout-card-green {
    background: rgba(76, 175, 80, 0.15);
}

.kg-callout-card-yellow {
    background: rgba(255, 193, 7, 0.15);
}

.kg-callout-card-red {
    background: rgba(244, 67, 54, 0.15);
}

.kg-callout-card-pink {
    background: rgba(233, 30, 99, 0.15);
}

.kg-callout-card-purple {
    background: rgba(156, 39, 176, 0.15);
}

.kg-callout-emoji {
    font-size: 1.25rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.kg-callout-text {
    color: var(--text-color);
    line-height: 1.6;
}

/* ========================================
   Ghost Toggle Cards
   ======================================== */
.kg-toggle-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 1.5em 0;
}

.kg-toggle-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
}

.kg-toggle-heading-text {
    font-weight: 600;
    color: var(--text-color);
}

.kg-toggle-card-icon {
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.kg-toggle-card[data-kg-toggle-state="open"] .kg-toggle-card-icon {
    transform: rotate(180deg);
}

.kg-toggle-content {
    padding: 0 20px 16px;
    color: var(--text-color);
}

/* ========================================
   Ghost File Cards
   ======================================== */
.kg-file-card {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin: 1.5em 0;
}

.kg-file-card-container {
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.kg-file-card-contents {
    flex-grow: 1;
}

.kg-file-card-title {
    font-weight: 600;
    color: var(--text-color);
}

.kg-file-card-caption {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.kg-file-card-metadata {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kg-file-card-icon {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
    margin-left: 16px;
}

/* ========================================
   Ghost Audio Cards
   ======================================== */
.kg-audio-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin: 1.5em 0;
}

.kg-audio-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

/* ========================================
   Ghost Video Cards
   ======================================== */
.kg-video-card {
    width: 100%;
    margin: 1.5em 0;
}

.kg-video-container {
    position: relative;
    width: 100%;
}

.kg-video-player {
    width: 100%;
    border-radius: 8px;
}

/* ========================================
   Ghost Product Cards
   ======================================== */
.kg-product-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 24px;
    margin: 1.5em 0;
}

.kg-product-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.kg-product-card-description {
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ========================================
   Ghost Header Cards
   ======================================== */
.kg-header-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    min-height: 400px;
    margin: 1.5em 0;
}

.kg-header-card h2 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 16px;
}

.kg-header-card h3 {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 400;
}
