/*
Theme Name:        NajibulPress Child
Template:          najibulpress
Theme URI:         https://najibul.com
Description:       NajibulPress Child — brand tokens, per-language design overrides and platform-specific customizations for the Najibul platform. Inherits everything from NajibulPress; keep this file tiny.
Author:            Najibul
Author URI:        https://najibul.com
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.8
Requires PHP:      8.0
License:           GNU General Public License v2 or later
License URI:       http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       najibulpress-child
Tags:              child-theme, multilingual, rtl-language-support, dark-mode, performance
*/

/* ============================================================
   Brand tokens & per-language overrides (see lang/en.css, bn.css, hi.css)
   ============================================================ */

:root {
  --njp-brand-accent: #2563eb;
  --njp-brand-accent-2: #7c3aed;
  --njp-brand-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* ============================================================
   NAJIBUL THEME — MODERN HIGH-PERFORMANCE CSS (v4.0 × 100% Dark-Mode Ready)
   Ported from legacy GeneratePress child (v4.0 Final), refactored to NajibulPress
   design tokens so the same premium look holds in BOTH light and dark modes.
   ============================================================ */

:root {
  /* surface aliases (keeps original naming instincts valid) */
  --njp-surface: var(--njp-card, #ffffff);
  --njp-surface-subtle: var(--njp-card-subtle, #f8fafc);
  --njp-brand-emerald: #10b981;
  --njp-brand-red: #ef4444;
  --njp-brand-amber: #f59e0b;
  --njp-brand-violet: #8b5cf6;
  --njp-brand-blue: #3b82f6;
}

/* --- 1. POST META & EXCERPT --- */
.post-meta {
    font-size: 0.9rem;
    color: var(--njp-text-muted, #64748b);
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.post-meta .author {
    font-weight: 600;
    color: var(--njp-text, #0f172a);
}
.post-meta .time {
    color: var(--njp-text-muted, #94a3b8);
}

.post-excerpt {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--njp-text-muted, #475569);
    display: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.post-excerpt.show {
    display: block;
}

/* --- 2. BUTTONS & LINKS --- */
.single article a {
    color: var(--njp-brand-violet, #8b5cf6);
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}
.single article a:hover {
    border-bottom-color: var(--njp-brand-violet, #8b5cf6);
}

a.read-more.button {
    background: linear-gradient(135deg, var(--njp-surface, #ffffff), var(--njp-surface-subtle, #f8fafc));
    font-size: 16px;
    padding: 10px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--njp-brand-red, #ef4444);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.12);
    border-radius: 50px;
    border: 2px solid var(--njp-brand-red, #ef4444);
    font-weight: 700;
    display: inline-block;
    text-decoration: none;
}
a.read-more.button:hover {
    background: linear-gradient(135deg, var(--njp-brand-red, #ef4444), #dc2626);
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
}

/* --- 3. RELATED POSTS & LANGUAGE SWITCHER --- */
.related-title-item a {
    display: block;
    background: var(--njp-surface, #ffffff);
    padding: 14px 18px;
    border-left: 4px solid var(--njp-brand-emerald, #10b981);
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    color: var(--njp-text, #0f172a);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    line-height: 1.5;
    border-top: 1px solid var(--njp-border, #e2e8f0);
    border-right: 1px solid var(--njp-border, #e2e8f0);
    border-bottom: 1px solid var(--njp-border, #e2e8f0);
}
.related-title-item a:hover {
    background: linear-gradient(135deg, var(--njp-brand-emerald, #10b981), #059669);
    color: #ffffff;
    border-left-color: #047857;
    transform: translateX(4px);
    border-color: #059669;
}

.menu-item-language a {
    background: linear-gradient(135deg, var(--njp-brand-red, #ef4444), var(--njp-brand-amber, #f59e0b));
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 50px;
    margin-right: 6px;
    text-transform: capitalize;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
.menu-item-language a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

/* --- 4. AUTHOR BOX & MODERN CONTAINER --- */
.author-box {
    display: flex;
    align-items: flex-start;
    background: var(--njp-surface, #ffffff);
    border: 1px solid var(--njp-border, #e2e8f0);
    border-radius: 20px;
    padding: 28px;
    margin-top: 35px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    transition: all 0.3s ease;
}
.author-box:hover {
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    border-color: var(--njp-border, #cbd5e1);
}
.author-avatar {
    margin-right: 24px;
}
.author-avatar-img {
    border-radius: 50%;
    border: 3px solid var(--njp-brand-emerald, #10b981);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
    width: 96px;
    height: 96px;
    object-fit: cover;
}
.author-details {
    flex: 1;
}
.author-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--njp-text, #0f172a);
}
.author-name a {
    text-decoration: none;
    color: inherit;
}
.author-bio {
    font-size: 15px;
    color: var(--njp-text-muted, #475569);
    margin: 0 0 16px;
    line-height: 1.7;
}
.author-link {
    font-size: 15px;
    text-decoration: none;
    color: var(--njp-brand-emerald, #10b981);
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}
.author-link:hover {
    border-color: var(--njp-brand-emerald, #10b981);
    color: #059669;
}

.author-modern-container {
    max-width: 1300px;
    margin: auto;
    padding: 35px 20px;
    color: var(--njp-text, #0f172a);
    background: var(--njp-surface-subtle, #f8fafc);
    border-radius: 24px;
    border: 1px solid var(--njp-border, #e2e8f0);
}
.author-header {
    text-align: center;
    margin-bottom: 45px;
}
.author-header h1 {
    font-size: 2.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--njp-brand-emerald, #10b981), #059669);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.author-header p {
    font-size: 1.15rem;
    color: var(--njp-text-muted, #64748b);
    max-width: 700px;
    margin: 12px auto 0;
}
.modern-tab-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 35px;
}
.tab-item {
    padding: 12px 28px;
    background: var(--njp-surface-subtle, #e2e8f0);
    border: 1px solid var(--njp-border, #e2e8f0);
    border-radius: 50px;
    text-decoration: none;
    color: var(--njp-text, #334155);
    font-weight: 600;
    transition: all 0.3s ease;
}
.tab-item.active,
.tab-item:hover {
    background: linear-gradient(135deg, var(--njp-brand-red, #ef4444), var(--njp-brand-amber, #f59e0b));
    color: #fff;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
    transform: translateY(-2px);
    border-color: transparent;
}
.modern-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.modern-post-card {
    background: var(--njp-surface, #fff);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--njp-border, #f1f5f9);
}
.modern-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.1);
    border-color: var(--njp-border, #e2e8f0);
}
.modern-thumb img {
    width: 100%;
    height: auto;
    display: block;
}
.modern-content {
    padding: 20px 24px;
}
.modern-content h2 {
    font-size: 1.35rem;
    margin: 0 0 10px;
    color: var(--njp-text, #0f172a);
    line-height: 1.4;
}
.modern-content h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}
.modern-content h2 a:hover {
    color: var(--njp-brand-red, #ef4444);
}
.modern-date {
    font-size: 0.875rem;
    color: var(--njp-text-muted, #94a3b8);
}
.modern-no-post {
    text-align: center;
    font-size: 1.15rem;
    color: var(--njp-text-muted, #94a3b8);
    padding: 60px 0;
}

/* --- 5. SEARCH & ARCHIVE GRIDS --- */
.search-filter-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 45px;
}
.sf-input-select {
    border: 2px solid var(--njp-brand-blue, #3b82f6);
    border-radius: 50px;
    padding: 14px 24px;
    background: var(--njp-card-subtle, #eff6ff);
    font-weight: 600;
    color: var(--njp-text, #1e3a8a);
    transition: all 0.3s ease;
    cursor: pointer;
}
.sf-input-select:hover {
    background: var(--njp-card, #dbeafe);
    border-color: var(--njp-primary, #2563eb);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
}

body.archive .generate-columns-container .inside-article,
body.blog .generate-columns-container .inside-article,
body.search .generate-columns-container .inside-article,
.njp-card.article-card,
.njp-archive .article-card,
.njp-card-grid .article-card {
    border: 2px solid var(--njp-border, #e2e8f0);
    border-radius: 16px;
    padding: 20px;
    background: var(--njp-surface, #ffffff);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}
body.archive .generate-columns-container .inside-article:hover,
body.blog .generate-columns-container .inside-article:hover,
body.search .generate-columns-container .inside-article:hover,
.njp-card.article-card:hover,
.njp-archive .article-card:hover,
.njp-card-grid .article-card:hover {
    border-color: var(--njp-brand-violet, #8b5cf6);
    box-shadow: 0 12px 35px rgba(139, 92, 246, 0.15);
    transform: translateY(-4px);
}

/* --- 6. REACTION BAR polish (single page icons) --- */
.najibul-interaction-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0 4px;
}
.najibul-interaction-wrapper > * {
    display: inline-flex;
    align-items: center;
}

/* ============================================================
   CARDS — premium title color & Read More pill motion (v4.1)
   ============================================================ */
.article-title,
.njp-card-title {
    font-weight: 800 !important;
    line-height: 1.32;
    letter-spacing: -0.01em;
    color: var(--njp-text, #0f172a);
    transition: color .28s cubic-bezier(.4, 0, .2, 1);
    margin: 0 0 .6rem;
}
.article-card:hover .article-title,
.article-link:hover .article-title,
.article-card:focus-within .article-title { color: #2563eb; }

.article-cta {
    display: flex;
    align-items: center;
    margin: .75rem 0 .35rem;
}
a.read-more.button .read-more-arrow {
    display: inline-block;
    margin-left: .4rem;
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
a.read-more.button:hover .read-more-arrow,
a.read-more.button:focus-visible .read-more-arrow { transform: translateX(5px); }

/* ============================================================
   CONTENT TYPOGRAPHY — H2/H3/H4, blockquote, lists, tables
   (applies to .entry-content / .njp-single-content = all posts & CPTs)
   ============================================================ */
.entry-content h2,
.njp-single-content h2 {
    font-weight: 800;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    line-height: 1.28;
    letter-spacing: -0.012em;
    color: var(--njp-text, #0f172a);
    margin: 2.25rem 0 1rem;
    padding: .3rem 0 .3rem 1.1rem;
    border-left: 4px solid var(--njp-primary, #2563eb);
    scroll-margin-top: 110px;
}
.entry-content h3,
.njp-single-content h3 {
    font-weight: 700;
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    line-height: 1.32;
    letter-spacing: -0.008em;
    color: var(--njp-text, #1e293b);
    margin: 1.75rem 0 .75rem;
    scroll-margin-top: 110px;
}
.entry-content h4,
.njp-single-content h4 {
    font-weight: 700;
    font-size: clamp(1.02rem, 1.6vw, 1.15rem);
    line-height: 1.38;
    color: var(--njp-text, #334155);
    margin: 1.5rem 0 .6rem;
    scroll-margin-top: 110px;
}
.entry-content p,
.njp-single-content p {
    line-height: 1.8;
    color: var(--njp-text, #334155);
    margin: 0 0 1.15rem;
}
.entry-content ul,
.entry-content ol,
.njp-single-content ul,
.njp-single-content ol {
    line-height: 1.8;
    padding-left: 1.35rem;
    margin: 0 0 1.15rem;
    color: var(--njp-text, #334155);
}
.entry-content li,
.njp-single-content li { margin-top: .35rem; }
.entry-content blockquote,
.njp-single-content blockquote {
    font-size: 1.03em;
    line-height: 1.75;
    margin: 1.6rem 0;
    padding: .75rem 1.1rem .75rem 1.25rem;
    color: var(--njp-text-muted, #475569);
    background: var(--njp-surface-subtle, #f8fafc);
    border-left: 4px solid var(--njp-primary, #2563eb);
    border-radius: 0 14px 14px 0;
}
.entry-content blockquote p:last-child,
.njp-single-content blockquote p:last-child { margin-bottom: 0; }
.entry-content table,
.njp-single-content table {
    display: block;
    max-width: 100%;
    width: max-content;
    overflow-x: auto;
    border-collapse: collapse;
    line-height: 1.6;
    margin: 1.5rem 0;
    border: 1px solid var(--njp-border, #e2e8f0);
    border-radius: 14px;
    font-size: .95rem;
}
.entry-content th,
.entry-content td,
.njp-single-content th,
.njp-single-content td {
    padding: .55rem .85rem;
    border: 1px solid var(--njp-border, #e2e8f0);
    text-align: left;
}
.entry-content thead th,
.njp-single-content thead th {
    background: var(--njp-surface-subtle, #f1f5f9);
    font-weight: 700;
    color: var(--njp-text, #0f172a);
    white-space: nowrap;
}
.entry-content pre,
.njp-single-content pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: .875rem;
    line-height: 1.6;
    margin: 1.5rem 0;
}
.entry-content code,
.njp-single-content code {
    max-width: 100%;
    overflow-x: auto;
    font-size: .92em;
    border-radius: 6px;
}
.entry-content :where(h2, h3, h4) code,
.njp-single-content :where(h2, h3, h4) code { overflow-wrap: anywhere; }
.entry-content img,
.njp-single-content img { max-width: 100%; height: auto; }

/* ============================================================
   CONTENT TYPOGRAPHY — dark-mode counterpart
   ============================================================ */
html[data-njp-theme="dark"] .article-title,
html[data-njp-theme="dark"] .njp-card-title,
html.njp-theme-dark .article-title,
html.njp-theme-dark .njp-card-title { color: #f8fafc; }
html[data-njp-theme="dark"] .article-card:hover .article-title,
html[data-njp-theme="dark"] .article-link:hover .article-title,
html[data-njp-theme="dark"] .article-card:focus-within .article-title,
html.njp-theme-dark .article-card:hover .article-title,
html.njp-theme-dark .article-link:hover .article-title,
html.njp-theme-dark .article-card:focus-within .article-title { color: #60a5fa; }
html[data-njp-theme="dark"] .entry-content h2,
html[data-njp-theme="dark"] .njp-single-content h2,
html.njp-theme-dark .entry-content h2,
html.njp-theme-dark .njp-single-content h2 { border-left-color: #3b82f6; }
html[data-njp-theme="dark"] .entry-content h3,
html[data-njp-theme="dark"] .njp-single-content h3,
html.njp-theme-dark .entry-content h3,
html.njp-theme-dark .njp-single-content h3 { color: #8b5cf6; }
html[data-njp-theme="dark"] .entry-content h4,
html[data-njp-theme="dark"] .njp-single-content h4,
html.njp-theme-dark .entry-content h4,
html.njp-theme-dark .njp-single-content h4 { color: #cbd5e1; }
html[data-njp-theme="dark"] .entry-content blockquote,
html[data-njp-theme="dark"] .njp-single-content blockquote,
html.njp-theme-dark .entry-content blockquote,
html.njp-theme-dark .njp-single-content blockquote { background: var(--njp-card-subtle, #1e293b); }
html[data-njp-theme="dark"] .entry-content thead th,
html[data-njp-theme="dark"] .njp-single-content thead th,
html.njp-theme-dark .entry-content thead th,
html.njp-theme-dark .njp-single-content thead th { background: var(--njp-card-subtle, #1e293b); color: var(--njp-text, #e2e8f0); }
