/* =============================================
   YTC Blog Cards - Archive & Single Post
   ============================================= */

/* Archive header */
.ytc-archive-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}

.ytc-archive-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--heading-color, #111827);
}

.ytc-archive-desc {
    color: var(--text-muted, #6b7280);
    margin: 0;
}

/* 2-column card grid */
.ytc-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-bottom: 40px;
}

@media (max-width: 640px) {
    .ytc-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.ytc-card {
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ytc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Card image */
.ytc-card-image-link {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.ytc-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ytc-card:hover .ytc-card-image {
    transform: scale(1.04);
}

/* No image fallback */
.ytc-card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytc-no-image-icon {
    font-size: 3rem;
    opacity: 0.7;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

.ytc-gradient-0 { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.ytc-gradient-1 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.ytc-gradient-2 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.ytc-gradient-3 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.ytc-gradient-4 { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }

.ytc-single-no-image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.ytc-single-no-image .ytc-no-image-icon {
    font-size: 5rem;
}

/* Card body */
.ytc-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ytc-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
}

.ytc-card-title a {
    color: var(--heading-color, #111827);
    text-decoration: none;
}

.ytc-card-title a:hover {
    color: var(--link-color, #2563eb);
}

/* Meta */
.ytc-card-meta,
.ytc-single-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted, #6b7280);
    margin-bottom: 12px;
}

.ytc-meta-sep {
    opacity: 0.5;
}

.ytc-author-avatar {
    width: 24px !important;
    height: 24px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ytc-author-avatar-lg {
    width: 32px !important;
    height: 32px !important;
}

.ytc-single-meta a {
    color: var(--link-color, #2563eb);
    text-decoration: none;
}

/* Excerpt */
.ytc-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-color, #374151);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

/* Read more */
.ytc-card-read-more {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--link-color, #2563eb);
    text-decoration: none;
    margin-top: auto;
}

.ytc-card-read-more:hover {
    text-decoration: underline;
}

/* Pagination */
.ytc-pagination {
    margin-top: 16px;
}

.ytc-pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ytc-pagination .page-numbers {
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #e5e7eb);
    color: var(--text-color, #374151);
    text-decoration: none;
    font-size: 0.9rem;
}

.ytc-pagination .page-numbers.current,
.ytc-pagination .page-numbers:hover {
    background: var(--link-color, #2563eb);
    color: #fff;
    border-color: var(--link-color, #2563eb);
}

/* No posts */
.ytc-no-posts {
    color: var(--text-muted, #6b7280);
    font-size: 1rem;
}

/* =============================================
   Single Post
   ============================================= */

.ytc-single-post {
    max-width: 780px;
    margin: 0 auto;
}

.ytc-single-hero {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
    aspect-ratio: 16 / 7;
}

.ytc-single-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ytc-single-body {
    padding: 0 4px;
}

.ytc-single-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 16px;
    color: var(--heading-color, #111827);
}

.ytc-single-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color, #374151);
    margin-top: 28px;
}

.ytc-single-content p {
    margin-bottom: 1.4em;
}

.ytc-single-content img {
    max-width: 100%;
    border-radius: 8px;
}

.ytc-single-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.ytc-back-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--link-color, #2563eb);
    text-decoration: none;
}

.ytc-back-link:hover {
    text-decoration: underline;
}

/* Dark mode overrides */
.dark-mode .ytc-card {
    background: var(--card-bg, #1f2937);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.dark-mode .ytc-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Hide "Logged in as..." text on comment form */
#commentform .logged-in-as,
.comment-form .logged-in-as {
    display: none !important;
}

/* Category tag in meta */
.ytc-meta-cat {
    color: var(--link-color, #2563eb);
    text-decoration: none;
    font-weight: 500;
}

.ytc-meta-cat:hover {
    text-decoration: underline;
}

/* Reactions + Views inline row */
.ytc-reactions-views-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.ytc-rv-reactions,
.ytc-rv-views {
    display: flex;
    align-items: center;
}

.ytc-rv-views .ytc-page-views,
.ytc-rv-views .page-views-counter {
    margin: 0 !important;
    background: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
}
