/* ============================================================
   NYT-Inspired Main Styles
   Base layout, article cards, and blog listing
   ============================================================ */

/* ---- Container ---- */
.nyt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* ---- Custom primary color (legacy compat) ---- */
:root {
    --color-primary: var(--nyt-accent, #567b95);
    --color-text-dark: #121212;
    --color-text-light: #e8e8e8;
    --color-bg-dark: #121212;
    --color-bg-light: #fff;
}

/* Complete reset of parent theme logo styles */
h1.site-title a:before,
h1.site-title a:after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    background: none !important;
    border: none !important;
}

h1.site-title,
.site-title {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

h1.site-title a,
.site-title a {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    position: static !important;
    border-radius: 0 !important;
}

/* ---- Body padding for fixed header ---- */
body {
    padding-top: 0;
    font-family: 'nyt-franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* ---- NYT-Style List Blog Layout ---- */
.list-blog-item {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--nyt-border, #e2e2e2);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    transition: none;
}

.list-blog-item:hover {
    transform: none;
    box-shadow: none;
}

[data-theme="dark"] .list-blog-item {
    background: transparent !important;
    box-shadow: none !important;
}

/* Dark mode overrides for parent theme containers */
[data-theme="dark"] .xpost-item,
[data-theme="dark"] .xpost-text,
[data-theme="dark"] article,
[data-theme="dark"] .row,
[data-theme="dark"] .mt-5,
[data-theme="dark"] .container {
    background-color: transparent !important;
}

[data-theme="dark"] .entry-content,
[data-theme="dark"] .entry-content p,
[data-theme="dark"] .list-blog-excerpt,
[data-theme="dark"] .list-blog-excerpt p {
    color: var(--nyt-text-secondary, #999) !important;
}

[data-theme="dark"] .list-blog-title a {
    color: var(--nyt-text-primary, #e8e8e8) !important;
}

[data-theme="dark"] .list-blog-title a:hover {
    color: var(--nyt-accent, #7eb8da) !important;
}

.list-blog-thumbnail {
    flex: 0 0 200px;
    order: 2;
    padding-right: 0;
}

.list-blog-thumbnail img {
    width: 100%;
    height: 134px;
    object-fit: cover;
    border-radius: 0;
}

.list-blog-content {
    flex: 1;
    order: 1;
    min-width: 0;
}

.list-blog-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-family: 'Playfair Display', 'nyt-cheltenham', Georgia, 'Times New Roman', serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
}

.list-blog-title a {
    text-decoration: none;
    color: var(--nyt-text-primary, #121212);
}

[data-theme="dark"] .list-blog-title a {
    color: var(--nyt-text-primary, #e8e8e8);
}

.list-blog-title a:hover {
    color: var(--nyt-accent, #567b95);
}

.list-blog-meta {
    margin-bottom: 8px;
    font-family: 'nyt-franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    color: var(--nyt-text-muted, #999);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.list-blog-meta span {
    margin-right: 12px;
}

.list-blog-meta a {
    color: var(--nyt-text-muted, #999);
    text-decoration: none;
}

.list-blog-meta a:hover {
    color: var(--nyt-text-primary, #121212);
}

.list-blog-excerpt {
    margin-bottom: 0;
    font-family: 'nyt-imperial', Georgia, 'Times New Roman', serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--nyt-text-secondary, #5a5a5a);
}

.list-blog-excerpt p {
    margin: 0;
}

.list-blog-readmore {
    display: none; /* NYT doesn't use "Read More" buttons */
}

/* ---- NYT Footer Styles ---- */
.nyt-footer {
    border-top: 2px solid var(--nyt-text-primary, #121212);
    margin-top: 48px;
    background-color: var(--nyt-bg, #ffffff);
}

.nyt-footer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--nyt-border, #e2e2e2);
}

.nyt-footer__logo {
    font-family: 'Playfair Display', 'nyt-cheltenham', Georgia, 'Times New Roman', serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--nyt-text-primary, #121212);
    text-decoration: none;
}

.nyt-footer__logo:hover {
    color: var(--nyt-text-primary, #121212);
}

.nyt-footer__home-link {
    font-family: 'nyt-franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 0.7rem;
    color: var(--nyt-accent, #567b95);
    text-decoration: none;
}

.nyt-footer__home-link:hover {
    text-decoration: underline;
}

.nyt-footer__columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--nyt-border, #e2e2e2);
}

.nyt-footer__column {
    padding-right: 20px;
    border-right: 1px solid var(--nyt-border, #e2e2e2);
}

.nyt-footer__column:last-child {
    border-right: none;
    padding-right: 0;
    padding-left: 20px;
}

.nyt-footer__column:nth-child(2),
.nyt-footer__column:nth-child(3) {
    padding-left: 20px;
}

.nyt-footer__column-title {
    font-family: 'nyt-franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--nyt-text-primary, #121212);
    margin: 0 0 12px 0;
}

.nyt-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nyt-footer__links li {
    margin-bottom: 8px;
}

.nyt-footer__links a {
    font-family: 'nyt-franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
    color: var(--nyt-text-primary, #121212);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nyt-footer__links a:hover {
    color: var(--nyt-accent, #567b95);
    text-decoration: underline;
}

.nyt-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.nyt-footer__copyright {
    font-family: 'nyt-franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 0.7rem;
    color: var(--nyt-text-muted, #999);
    margin: 0;
}

.nyt-footer__legal {
    display: flex;
    gap: 20px;
}

.nyt-footer__legal a {
    font-family: 'nyt-franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 0.7rem;
    color: var(--nyt-text-muted, #999);
    text-decoration: none;
}

.nyt-footer__legal a:hover {
    text-decoration: underline;
}

/* ---- Entry header spacing ---- */
.entry-header.pb-4 {
    padding-bottom: 1rem !important;
}

/* Post meta NYT style */
.news-axis-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-family: 'nyt-franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 0.85rem;
}

.news-axis-author-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.news-axis-author {
    margin-right: 1rem;
    font-size: 0.85rem;
    color: var(--nyt-text-primary, #121212);
    font-weight: 600;
}

.news-axis-date {
    margin-right: 1rem;
    font-size: 0.8rem;
    color: var(--nyt-text-muted, #999);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .list-blog-item {
        flex-direction: column;
        gap: 16px;
    }

    .list-blog-thumbnail {
        flex: 0 0 auto;
        order: 1;
    }

    .list-blog-content {
        order: 2;
    }

    .list-blog-thumbnail,
    .list-blog-content {
        width: 100%;
    }

    .list-blog-thumbnail img {
        height: 200px;
    }

    .nyt-footer__columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .nyt-footer__column {
        border-right: none;
        padding-right: 0;
        padding-left: 0 !important;
    }

    .nyt-footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .nyt-footer__legal {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nyt-footer__columns {
        grid-template-columns: 1fr;
    }
}