/**
 * Blog-specific styles for c0ntent.com
 */

/* ===== Blog Hero ===== */
.blog-hero {
    text-align: center;
    padding: 30px 15px 20px;
}
.blog-hero h1 {
    font-size: 36px;
    color: #ffffff;
    margin: 0 0 8px;
}
.hero-tagline {
    color: #999;
    font-size: 16px;
    margin: 0;
}

/* ===== Categories Bar ===== */
.categories-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 15px 0 25px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 25px;
}
.cat-pill {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #333;
    border-radius: 20px;
    color: #aaa;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}
.cat-pill:hover, .cat-pill.active {
    border-color: #ffe454;
    color: #ffe454;
}

/* ===== Posts Grid ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 0 0 30px;
}
.posts-grid-small {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .posts-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .posts-grid, .posts-grid-small {
        grid-template-columns: 1fr;
    }
}

/* ===== Post Card ===== */
.post-card {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}
.post-card:hover {
    transform: translateY(-3px);
    border-color: #444;
}
.post-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.post-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #1a1a1a;
}
.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.post-card:hover .post-card-image img {
    transform: scale(1.03);
}
.post-card-image-placeholder {
    background: linear-gradient(145deg, #1a1a1a, #222);
}
.post-card-content {
    padding: 15px;
}
.post-card-title {
    font-size: 17px;
    color: #f0f0f0;
    margin: 0 0 8px;
    line-height: 1.3;
    font-family: "Georgia", serif;
}
.post-card-excerpt {
    font-size: 14px;
    color: #888;
    margin: 0 0 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

/* ===== Single Post ===== */
.post-article {
    text-align: left;
}
.post-hero-image {
    position: relative;
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 25px;
}
.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-model-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #aaa;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}
.post-header {
    border-bottom: 1px solid #2a2a2a;
    padding-bottom: 20px;
}
.post-categories {
    margin-bottom: 12px;
}
.post-category-tag {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(255, 228, 84, 0.1);
    border: 1px solid rgba(255, 228, 84, 0.3);
    border-radius: 15px;
    color: #ffe454;
    font-size: 12px;
    text-decoration: none;
    margin-right: 6px;
}
.post-category-tag:hover {
    background: rgba(255, 228, 84, 0.2);
    color: #ffe454;
}
.post-header h1 {
    font-size: 36px;
    line-height: 1.2;
    color: #ffffff;
    margin: 0 0 15px;
}
.post-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #888;
}
.post-meta span::before {
    content: none;
}

/* ===== TTS Audio Player ===== */
.tts-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #2a2a2a;
}
.tts-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid #333;
    border-radius: 20px;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    font-family: inherit;
}
.tts-play-btn:hover:not(:disabled) {
    border-color: #ffe454;
    color: #ffe454;
    background: rgba(255, 228, 84, 0.06);
}
.tts-play-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
.tts-progress-wrap {
    flex: 1;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
    min-width: 100px;
}
.tts-progress-bar {
    height: 100%;
    width: 0%;
    background: #ffe454;
    border-radius: 3px;
    transition: width 0.1s linear;
}
.tts-status {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .tts-player {
        flex-wrap: wrap;
    }
    .tts-progress-wrap {
        order: 3;
        flex-basis: 100%;
    }
}

/* ===== Post Content Typography ===== */
.post-content {
    font-size: 17px;
    line-height: 1.8;
    color: #c0c0c0;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}
.post-content h2 {
    font-size: 26px;
    color: #f0f0f0;
    margin: 35px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a2a2a;
}
.post-content h3 {
    font-size: 21px;
    color: #e0e0e0;
    margin: 28px 0 12px;
}
.post-content p {
    margin: 0 0 18px;
}
.post-content p.crypto-data-source {
    margin: 15px 0 0;
}
.post-content a {
    color: #ffe454;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.post-content a:hover {
    color: #fff;
}
.post-content blockquote {
    margin: 25px 0;
    padding: 15px 25px;
    border-left: 4px solid #ffe454;
    background: rgba(255, 228, 84, 0.05);
    font-style: italic;
    color: #bbb;
}
.post-content ul, .post-content ol {
    margin: 15px 0;
    padding-left: 30px;
}
.post-content li {
    margin-bottom: 8px;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 20px 0;
}
.post-content code {
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 15px;
    color: #e0c080;
}
.post-content pre {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}
.post-content pre code {
    background: none;
    padding: 0;
}

/* ===== Post Tables ===== */
.post-table-wrap {
    margin: 30px 0;
    overflow: hidden;
    width: 100%;
}
.post-table-caption {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #ffe454;
    margin: 0 0 10px;
}
.post-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.post-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    line-height: 1.5;
}
.post-table thead th {
    text-align: left;
    padding: 10px 12px;
    color: #f0f0f0;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #ffe454;
}
.post-table tbody td {
    padding: 9px 12px;
    color: #c0c0c0;
    border-bottom: 1px solid #1e1e1e;
}
.post-table tbody tr:last-child td {
    border-bottom: none;
}
.post-table tbody tr:hover td {
    background: rgba(255, 228, 84, 0.03);
}
.post-table .cell-highlight {
    color: #ffe454;
    font-weight: 600;
}
.post-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 22px;
    transition: color 0.15s;
}
.post-table thead th.sortable:hover {
    color: #ffe454;
}
.post-table thead th.sortable::after {
    content: '\2195';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #444;
    transition: color 0.15s;
}
.post-table thead th.sortable:hover::after {
    color: #888;
}
.post-table thead th.sort-asc::after {
    content: '\2191';
    color: #ffe454;
}
.post-table thead th.sort-desc::after {
    content: '\2193';
    color: #ffe454;
}

@media (max-width: 600px) {
    .post-table {
        font-size: 14px;
    }
    .post-table thead th,
    .post-table tbody td {
        padding: 9px 12px;
    }
}

/* ===== Crypto Inline Ticker ===== */
.crypto-ticker-wrap {
    position: relative;
    display: inline;
}
.crypto-ticker {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    vertical-align: baseline;
    white-space: nowrap;
}
.crypto-ticker:hover,
.crypto-ticker:focus {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}
.crypto-ticker.crypto-up {
    border-color: rgba(81, 207, 102, 0.25);
}
.crypto-ticker.crypto-up:hover,
.crypto-ticker.crypto-up:focus {
    border-color: rgba(81, 207, 102, 0.5);
    background: rgba(81, 207, 102, 0.06);
}
.crypto-ticker.crypto-down {
    border-color: rgba(255, 107, 107, 0.25);
}
.crypto-ticker.crypto-down:hover,
.crypto-ticker.crypto-down:focus {
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.06);
}
.crypto-ticker-symbol {
    font-size: 12px;
    font-weight: 700;
    color: #ccc;
    letter-spacing: 0.3px;
}
.crypto-ticker-price {
    font-size: 14px;
    font-weight: 600;
    color: #f0f0f0;
}

/* ===== Crypto Popup Card ===== */
.crypto-card-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    background: #0d1117;
    border: 1px solid #2a3a4a;
    border-radius: 8px;
    padding: 14px 16px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    flex-direction: column;
    gap: 6px;
}
.crypto-card-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2a3a4a;
}
.crypto-ticker-wrap.show-card > .crypto-card-popup {
    display: flex;
}
/* Desktop: show on hover */
@media (hover: hover) {
    .crypto-ticker-wrap:hover > .crypto-card-popup {
        display: flex;
    }
}
.crypto-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
}
.crypto-card-header {
    margin-bottom: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e2a3a;
}
.crypto-card-symbol {
    font-size: 13px;
    font-weight: 700;
    color: #f0f0f0;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}
.crypto-card-price {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.crypto-card-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 28px;
}
.crypto-card-val {
    font-size: 13px;
    font-weight: 600;
    color: #999;
}
.crypto-card-val.crypto-up {
    color: #51cf66;
}
.crypto-card-val.crypto-down {
    color: #ff6b6b;
}
.crypto-card-meta {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #1e2a3a;
    font-size: 12px;
    color: #666;
}
.crypto-card-source {
    font-size: 10px;
    color: #444;
    margin-top: 2px;
}
.crypto-card-source a {
    color: #555;
    text-decoration: none;
}
.crypto-card-source a:hover {
    color: #888;
}
.crypto-price-error {
    color: #888;
    font-size: 14px;
    font-style: italic;
}
.crypto-chart-error {
    color: #888;
    font-size: 14px;
    font-style: italic;
}

/* ===== Crypto Charts ===== */
.crypto-chart-wrap {
    margin: 30px 0;
    padding: 20px;
    background: #0d1117;
    border: 1px solid #1e2a3a;
    border-radius: 8px;
}
.crypto-chart-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 15px;
}
.crypto-chart-title {
    font-size: 14px;
    font-weight: 600;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.crypto-chart-price {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    font-family: "Georgia", serif;
}
.crypto-chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}
.crypto-chart-container canvas {
    max-width: 100%;
}

@media (max-width: 600px) {
    .crypto-chart-container {
        height: 220px;
    }
    .crypto-price-header {
        flex-direction: column;
        gap: 6px;
    }
    .crypto-chart-header {
        flex-direction: column;
        gap: 6px;
    }
}

/* ===== Post Tags ===== */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 25px 0;
    border-top: 1px solid #2a2a2a;
    margin-top: 30px;
}
.post-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 15px;
    color: #4a9eff;
    font-size: 13px;
    text-decoration: none;
}
.post-tag:hover {
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
}

/* ===== Admin Post Actions ===== */
.admin-post-actions {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #2a2a2a;
}

/* ===== Related Posts ===== */
.related-posts {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #2a2a2a;
}
.related-posts h3 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

/* ===== Archive ===== */
.archive-header {
    text-align: center;
    padding: 20px 0 25px;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 25px;
}
.archive-header h1 {
    color: #ffffff;
    margin: 0 0 8px;
}
.archive-description {
    color: #999;
    font-size: 15px;
    margin: 0 0 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.archive-count {
    font-size: 13px;
    color: #666;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 20px 0;
}
.page-link {
    color: #ffe454;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid #333;
    border-radius: 4px;
}
.page-link:hover {
    border-color: #ffe454;
    color: #fff;
}
.page-link.disabled {
    color: #444;
    border-color: #222;
    pointer-events: none;
}
.page-info {
    font-size: 13px;
    color: #666;
}

/* ===== No Posts ===== */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}
.no-posts p {
    margin: 10px 0;
}

/* ===== Landing Page (c0ntent.com) ===== */
.landing-header {
    text-align: center;
    padding: 40px 20px 30px;
}
.landing-header h1 {
    font-size: 42px;
    color: #ffe454;
}
.landing-tagline {
    color: #999;
    font-size: 17px;
}
.landing-niches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0 40px;
}
.niche-card {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 30px 25px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: all 0.2s;
}
.niche-card:hover {
    border-color: #ffe454;
    transform: translateY(-3px);
}
.niche-card h2 {
    color: #ffe454;
    margin: 0 0 10px;
    font-size: 22px;
}
.niche-card p {
    color: #999;
    font-size: 14px;
    margin: 0 0 15px;
}
.niche-count {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Static Pages ===== */
.static-page {
    text-align: left;
    max-width: 700px;
}
.static-page h1 {
    text-align: center;
    margin-bottom: 25px;
}
.page-content {
    line-height: 1.8;
    color: #c0c0c0;
    font-size: 16px;
}
.page-content h2 {
    color: #f0f0f0;
    margin-top: 30px;
}
.page-content a {
    color: #ffe454;
}

/* ===== Site Header ===== */
#site-header {
    background: #0b1521;
    padding: 12px 20px;
    margin: 0 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
#logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
#logo {
    font-size: 24px;
    color: #ffe454;
    text-decoration: none;
    font-family: "Georgia", serif;
    font-weight: bold;
}
.site-tagline {
    color: #666;
    font-size: 13px;
}

/* ===== Navigation ===== */
.site-nav {
    display: flex;
}
.nav-inner {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.nav-link {
    padding: 6px 14px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.nav-admin {
    color: #4a9eff;
}
.nav-logout {
    color: #888;
}
.login-trigger {
    cursor: pointer;
}

/* ===== Footer ===== */
#site-footer {
    margin-top: auto;
    border-top: 1px solid #1a1a1a;
    padding: 30px 20px;
    text-align: center;
}
.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}
.footer-brand {
    margin-bottom: 15px;
}
.footer-name {
    font-size: 18px;
    color: #ffe454;
    font-family: "Georgia", serif;
    font-weight: bold;
}
.footer-desc {
    color: #666;
    font-size: 13px;
    margin: 5px 0 0;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}
.footer-links a {
    color: #888;
    text-decoration: none;
    font-size: 13px;
}
.footer-links a:hover {
    color: #ccc;
}
.footer-copy {
    color: #444;
    font-size: 12px;
}

/* ===== Cookie Banner ===== */
#cookie-banner {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    max-width: calc(100% - 30px);
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1000;
    font-size: 13px;
    color: #999;
}
#cookie-banner p {
    margin: 0;
    flex: 1;
}
#cookie-banner a {
    color: #ffe454;
}
#cookie-accept-btn {
    padding: 8px 20px;
    background: #ffe454;
    color: #000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

/* ===== Author Section ===== */
.author-section {
    margin: 40px 0 30px;
    border-top: 1px solid #333;
    padding-top: 20px;
}
.author-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin: 0 0 18px;
}
.author-boxes {
    display: flex;
    width: 100%;
}
.author-boxes-multi .author-box {
    flex: 1;
}
.author-boxes-multi .author-box:first-child {
    padding-right: 25px;
    border-right: 1px solid #333;
}
.author-boxes-multi .author-box:last-child {
    padding-left: 25px;
}
.author-box-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}
.author-box-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 8px;
}
.author-box-bio {
    font-size: 14px;
    color: #bbb;
    line-height: 1.5;
    margin: 0 0 12px;
}
.author-box-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.author-box-links a {
    font-size: 13px;
    color: #4a9eff;
    text-decoration: none;
}
.author-box-links a:hover {
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    #site-header {
        flex-direction: column;
        text-align: center;
    }
    .nav-inner {
        justify-content: center;
    }
    .post-header h1 {
        font-size: 28px;
    }
    .post-content {
        font-size: 16px;
    }
    .blog-hero h1 {
        font-size: 28px;
    }
    .post-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    .author-boxes {
        flex-direction: column;
    }
    .author-boxes-multi .author-box:first-child {
        padding-right: 0;
        border-right: none;
        padding-bottom: 20px;
        border-bottom: 1px solid #333;
        margin-bottom: 20px;
    }
    .author-boxes-multi .author-box:last-child {
        padding-left: 0;
    }
}
