/*
 * Newspaper Post Layout styles.
 * Everything is scoped under .npl- classes so this CSS never
 * affects your theme's header, footer, homepage, or other pages.
 */

.npl-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.npl-has-sidebar {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 40px;
    align-items: start;
}

.npl-has-sidebar .npl-article,
.npl-has-sidebar .npl-collection-page,
.npl-has-sidebar .npl-author-page {
    max-width: 100%;
    margin: 30px 0;
    padding: 0;
}

/* ---- Breadcrumb ---- */
.npl-breadcrumb {
    font-size: 0.8rem;
    color: #666;
    margin: 20px 0 10px;
    font-family: Georgia, serif;
}
.npl-breadcrumb a { color: #a30000; text-decoration: none; }
.npl-breadcrumb a:hover { text-decoration: underline; }
.npl-crumb-sep { margin: 0 4px; color: #999; }
.npl-crumb-current { color: #444; }

/* ---- Article ---- */
.npl-article {
    max-width: 780px;
    margin: 10px auto 30px;
    font-family: Georgia, 'Times New Roman', serif;
    color: #1a1a1a;
}

.npl-article .npl-category {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #a30000;
    font-weight: bold;
}

.npl-article .npl-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    line-height: 1.1;
    margin: 8px 0 12px;
}

.npl-article .npl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #555;
    border-top: 1px solid #1a1a1a;
    padding-top: 8px;
    margin-bottom: 12px;
}

/* ---- Social share ---- */
.npl-social-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #1a1a1a;
    padding-bottom: 14px;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
}
.npl-share-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #555;
    margin-right: 4px;
}
.npl-share-btn {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    border: none;
}
.npl-fb   { background: #1877f2; }
.npl-x    { background: #000; }
.npl-li   { background: #0a66c2; }
.npl-wa   { background: #25d366; }
.npl-copy { background: #444; }

/* ---- Featured image ---- */
.npl-article .npl-featured-image img {
    width: 100%;
    height: auto;
    filter: grayscale(10%);
}
.npl-article .npl-caption {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    border-bottom: 1px solid #ccc;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

/* ---- Body ---- */
.npl-article .npl-body {
    font-size: 1.15rem;
    line-height: 1.7;
    column-count: 2;
    column-gap: 40px;
}
.npl-article .npl-body p:first-of-type::first-letter {
    float: left;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 4.2rem;
    line-height: 0.8;
    padding: 4px 8px 0 0;
    font-weight: bold;
}
.npl-article .npl-body p {
    margin: 0 0 16px;
    break-inside: avoid-column;
}

/* ---- Read Next ---- */
.npl-read-next {
    display: block;
    max-width: 780px;
    margin: 30px auto 0;
    padding: 20px;
    background: #f0ede6;
    border-left: 4px solid #a30000;
    text-decoration: none;
    color: #1a1a1a;
}
.npl-read-next-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a30000;
    margin-bottom: 6px;
}
.npl-read-next-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    margin-bottom: 10px;
}
.npl-read-next-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    margin: 0;
}

/* ---- Related ---- */
.npl-related {
    max-width: 780px;
    margin: 30px auto;
    padding: 20px 0;
    border-top: 3px double #1a1a1a;
    font-family: Georgia, serif;
}
.npl-related h3 { text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }
.npl-related ul {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.npl-related li h4 { font-size: 1rem; line-height: 1.3; margin: 8px 0 0; color: #1a1a1a; }
.npl-related img { width: 100%; height: 110px; object-fit: cover; }

/* ---- Author page ---- */
.npl-author-page { font-family: Georgia, serif; padding: 10px 0 30px; }
.npl-author-card {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 25px;
}
.npl-author-card img { border-radius: 50%; }
.npl-author-info h1 { font-family: 'Playfair Display', Georgia, serif; margin: 0 0 6px; font-size: 2rem; }
.npl-author-bio { color: #444; margin: 0 0 6px; }
.npl-author-count { font-size: 0.8rem; text-transform: uppercase; color: #777; margin: 0; }

.npl-author-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    font-family: Arial, sans-serif;
}
.npl-social-link {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-radius: 3px;
    text-decoration: none;
    color: #fff;
}
.npl-social-web { background: #444; }
.npl-social-x   { background: #000; }
.npl-social-fb  { background: #1877f2; }
.npl-social-li  { background: #0a66c2; }
.npl-social-ig  { background: #d62976; }

/* ---- Collection / archive grid (also used on author page) ---- */
.npl-collection-page { font-family: Georgia, serif; padding: 10px 0 30px; }
.npl-collection-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.2rem;
    border-bottom: 3px double #1a1a1a;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.npl-collection-description { color: #555; margin-bottom: 20px; }

.npl-collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.npl-collection-card a { text-decoration: none; color: #1a1a1a; }
.npl-collection-image img { width: 100%; height: 170px; object-fit: cover; filter: grayscale(10%); }
.npl-collection-card h3 { font-size: 1.2rem; line-height: 1.25; margin: 10px 0 6px; }
.npl-collection-meta { font-size: 0.75rem; text-transform: uppercase; color: #777; margin-bottom: 6px; }
.npl-collection-excerpt { font-size: 0.9rem; color: #444; line-height: 1.5; }

/* ---- Sidebar ---- */
.npl-sidebar { font-family: Georgia, serif; padding: 30px 0; }
.npl-widget { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #ccc; }
.npl-widget-title { text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; border-bottom: 2px solid #1a1a1a; padding-bottom: 6px; }

/* ---- Pagination (archive, author, and shortcode) ---- */
.npl-shortcode-pagination,
.pagination,
.navigation.pagination {
    margin-top: 30px !important;
    text-align: center;
    font-family: Georgia, serif;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
}
.npl-shortcode-pagination .page-numbers,
.pagination .page-numbers {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    max-width: none !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    border: 1px solid #1a1a1a;
    color: #1a1a1a !important;
    text-decoration: none;
    font-size: 0.85rem;
    background: #fff;
    float: none !important;
}
.npl-shortcode-pagination .page-numbers.current,
.pagination .page-numbers.current {
    background: #1a1a1a !important;
    color: #fff !important;
}
.npl-shortcode-pagination .page-numbers:hover,
.pagination .page-numbers:hover {
    background: #a30000 !important;
    border-color: #a30000;
    color: #fff !important;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .npl-has-sidebar { grid-template-columns: 1fr; }
    .npl-collection-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .npl-article .npl-body { column-count: 1; }
    .npl-related ul { grid-template-columns: 1fr; }
    .npl-collection-grid { grid-template-columns: 1fr; }
    .npl-author-card { flex-direction: column; text-align: center; }
}
