/* ==========================================================================
   Taxheaven News v2 — Stylesheet
   File: /public/assets/front/news/news2.css
   ========================================================================== */

/* ============ VARIABLES ============ */
:root {
    --n2-brand: #1a5276;
    --n2-brand-dark: #0c2d48;
    --n2-brand-light: #d6eaf8;
    --n2-brand-lighter: #eaf4fc;
    --n2-accent: #c8a951;
    --n2-accent-light: #f5efd6;
    --n2-text: #606060;
    --n2-text-2: #4a5568;
    --n2-text-3: #8896a7;
    --n2-white: #ffffff;
    --n2-off: #f8f9fb;
    --n2-border: #e5e8ed;
    --n2-border-2: #d0d5dd;
    --n2-red: #c0392b;
    --n2-green: #1e8449;
    --n2-r-sm: 8px;
    --n2-r-md: 12px;
    --n2-r-lg: 16px;
    --n2-sh-1: 0 1px 4px rgba(0,0,0,.04);
    --n2-sh-2: 0 4px 16px rgba(0,0,0,.07);
}

/* ============ LAYOUT ============ */
.n2-main { background: var(--n2-white); }
.n2-container { max-width: 1260px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* 3-col grid: Tools(52px) | Content | Sidebar(300px) */
.n2-grid-3col {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 300px;
    gap: 0;
    padding-top: 24px;
    padding-bottom: 60px;
}

/* 2-col grid: Content | Sidebar(300px) */
.n2-grid-2col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    padding-bottom: 60px;
}

/* ============ BREADCRUMB ============ */
.n2-bcrumb {
    border-bottom: 1px solid var(--n2-border);
    background: var(--n2-white);
}
.n2-bcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 11px 0;
    margin: 0;
    font-size: 13px;
}
.n2-bcrumb-list li { display: flex; align-items: center; }
.n2-bcrumb-list li::after {
    content: '›';
    margin: 0 8px;
    color: var(--n2-text-3);
    font-size: 11px;
}
.n2-bcrumb-list li:last-child::after { display: none; }
.n2-bcrumb-list li a { color: var(--n2-brand); }
.n2-bcrumb-list li a:hover { text-decoration: underline; }
.n2-bcrumb-list li.active {
    color: var(--n2-text-2);
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============ PAGE HEADER (Index) ============ */
.n2-page-hdr {
    padding: 28px 0 0;
}
.n2-page-hdr h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--n2-text);
    margin-bottom: 4px;
}
.n2-page-sub {
    font-size: 14.5px;
    color: var(--n2-text-2);
    margin-bottom: 0;
}

/* ============ CATEGORY SELECTOR ============ */
.n2-cat-selector { padding-bottom: 24px; padding-top: 18px; }
.n2-cat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid var(--n2-border);
    border-radius: var(--n2-r-sm);
    background: var(--n2-white);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--n2-brand);
    transition: .2s;
    font-family: inherit;
}
.n2-cat-toggle:hover {
    border-color: var(--n2-brand);
    background: var(--n2-brand-lighter);
}
.n2-cat-toggle.open .n2-cat-arrow { transform: rotate(180deg); }
.n2-cat-arrow { transition: .3s; }

.n2-cat-dropdown {
    margin-top: 10px;
    background: var(--n2-white);
    border: 1px solid var(--n2-border);
    border-radius: var(--n2-r-md);
    box-shadow: var(--n2-sh-2);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .35s ease, opacity .25s ease;
}
.n2-cat-dropdown.open { max-height: 1200px; opacity: 1; }

.n2-cat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 4px 0;
}
.n2-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 18px;
    font-size: 13.5px;
    color: var(--n2-text);
    transition: .12s;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid var(--n2-border);
}
.n2-cat-item:nth-child(3n+2) {
    border-left: 1px solid var(--n2-border);
    border-right: 1px solid var(--n2-border);
}
.n2-cat-item:hover {
    background: var(--n2-brand-lighter);
    color: var(--n2-brand);
    text-decoration: none;
}
.n2-cat-item.active {
    background: var(--n2-brand-lighter);
    color: var(--n2-brand);
    font-weight: 600;
}
.n2-cat-cnt {
    font-size: 12px;
    color: var(--n2-text-3);
    font-weight: 500;
    background: var(--n2-off);
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 28px;
    text-align: center;
}
.n2-cat-item.active .n2-cat-cnt {
    background: var(--n2-brand-light);
    color: var(--n2-brand);
}

/* ============ LEFT TOOLS SIDEBAR ============ */
.n2-tools {
    position: sticky;
    top: 128px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: 10px;
    z-index: 10;
}
.n2-tb {
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--n2-r-sm);
    border: 1px solid var(--n2-border);
    background: var(--n2-white);
    color: var(--n2-text-2);
    cursor: pointer;
    transition: .2s;
    position: relative;
    font-size: 15px;
    text-decoration: none;
}
.n2-tb:hover {
    background: var(--n2-brand-lighter);
    border-color: var(--n2-brand);
    color: var(--n2-brand);
    transform: scale(1.06);
    box-shadow: var(--n2-sh-1);
    text-decoration: none;
}
.n2-tb-fb { background: #1877f2; color: #fff !important; border-color: #1877f2; }
.n2-tb-fb:hover { background: #0b69de; color: #fff !important; }
.n2-tb-tw { background: #000; color: #fff !important; border-color: #000; }
.n2-tb-tw:hover { background: #333; color: #fff !important; }
.n2-tb-admin { color: var(--n2-green); border-color: var(--n2-green); }
.n2-tb-admin:hover { background: #e8f8ef; }
.n2-tb-active { background: var(--n2-brand-lighter); border-color: var(--n2-brand); color: var(--n2-brand); }
.n2-tb-pdf:hover { background: #fdeceb; border-color: #d93025; color: #d93025; }

.n2-tip {
    position: absolute;
    left: 50px; top: 50%;
    transform: translateY(-50%);
    background: var(--n2-brand-dark);
    color: #fff;
    font-size: 11.5px;
    padding: 5px 11px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: .12s;
    box-shadow: var(--n2-sh-2);
}
.n2-tip::before {
    content: '';
    position: absolute;
    left: -4px; top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px; height: 8px;
    background: var(--n2-brand-dark);
}
.n2-tb:hover .n2-tip { opacity: 1; }

.n2-tdiv { height: 1px; background: var(--n2-border); margin: 4px 0; width: 42px; }

.n2-tools-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px; height: 48px;
    background: var(--n2-brand);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 100;
    cursor: pointer;
    box-shadow: var(--n2-sh-2);
}

/* ============ ARTICLE CARD (Single article page) ============ */
.n2-article-wrap {
    padding: 0 24px;
    min-width: 0;
}
.n2-article-card {
    background: var(--n2-white);
    border-radius: var(--n2-r-lg);
    border: 1px solid var(--n2-border);
    overflow: hidden;
    box-shadow: var(--n2-sh-1);
}

/* Hero */
.n2-hero {
    position: relative;
    overflow: hidden;
    max-height: 440px;
}
.n2-hero img {
    width: 100%;
    display: block;
    object-fit: cover;
    max-height: 440px;
}
.n2-hero-badge {
    position: absolute;
    top: 16px; left: 16px;
    background: var(--n2-red);
    color: #fff;
    font-size: 11px; font-weight: 600;
    padding: 5px 14px;
    border-radius: 5px;
    letter-spacing: .5px;
    text-transform: uppercase;
    z-index: 2;
}
.n2-hero-copyright {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 2;
    background: linear-gradient(transparent, rgba(0,0,0,.55));
    padding: 40px 20px 10px;
    font-size: 11px;
    color: rgba(255,255,255,.65);
    font-style: italic;
}
.n2-hero-copyright a { color: rgba(255,255,255,.8); }

/* Article body */
.n2-art-body { padding: 32px 12px 36px; }
.n2-art-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--n2-text-3);
    flex-wrap: wrap;
}
.n2-mi { display: flex; align-items: center; gap: 4px; }
.n2-dot { color: var(--n2-text-3); }
.n2-dot-s { width: 3px; height: 3px; border-radius: 50%; background: var(--n2-text-3); display: inline-block; }

.n2-art-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--n2-text);
    margin-bottom: 20px;
    letter-spacing: -.2px;
}

/* Author */
.n2-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--n2-border);
}
.n2-author-av {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--n2-brand-light), var(--n2-brand-lighter));
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700;
    color: var(--n2-brand);
    border: 2px solid var(--n2-brand-light);
}
.n2-author-name { font-size: 14.5px; font-weight: 600; color: var(--n2-text); }
.n2-author-role { font-size: 12.5px; color: var(--n2-text-3); }

/* Summary */
.n2-summary {
    background: linear-gradient(135deg, var(--n2-brand-lighter), var(--n2-white));
    border-left: 4px solid var(--n2-brand);
    border-radius: 0 var(--n2-r-md) var(--n2-r-md) 0;
    padding: 18px 22px;
    margin-bottom: 24px;
}
.n2-summary p { font-size: 15px; color: var(--n2-brand-dark); line-height: 1.7; margin: 0; }

/* Members badge */
.n2-members-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--n2-accent-light);
    border: 1px solid var(--n2-accent);
    color: #7d6608;
    font-size: 12.5px; font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--n2-r-sm);
    margin-bottom: 22px;
}

/* Article content area */
.n2-content {
    font-size: 16.5px;
    line-height: 1.9;
    color: var(--n2-text);
}
.n2-content {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.n2-content p { margin-bottom: 18px; }
.n2-content img { max-width: 100%; height: auto; border-radius: var(--n2-r-sm); }
.n2-content h2, .n2-content h3 {
    font-family: 'Playfair Display', Georgia, serif;
    margin-top: 32px;
    margin-bottom: 14px;
    color: var(--n2-brand-dark);
}
.n2-content h2 { font-size: 21px; padding-left: 14px; }
.n2-content h3 { font-size: 18px; }
.n2-content blockquote {
    background: var(--n2-off);
    border-left: 3px solid var(--n2-accent);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--n2-r-sm) var(--n2-r-sm) 0;
    font-style: italic;
    color: var(--n2-text-2);
}
.n2-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
.n2-content table th, .n2-content table td {
    border: 1px solid var(--n2-border);
    padding: 8px 12px;
    text-align: left;
}
.n2-content table th { background: var(--n2-off); font-weight: 600; }

/* Google News CTA */
.n2-gn-cta {
    background: var(--n2-off);
    border: 1px solid var(--n2-border);
    border-radius: var(--n2-r-md);
    padding: 16px 20px;
    margin: 28px 0;
    display: flex;
    align-items: center;
    gap: 14px;
}
.n2-gn-cta img { flex-shrink: 0; }
.n2-gn-cta p { font-size: 13.5px; color: var(--n2-text-2); margin: 0; }

/* Share bottom */
.n2-share-bottom {
    border-top: 1px solid var(--n2-border);
    padding-top: 20px;
    margin-top: 24px;
    display: flex;
    gap: 8px;
}
.n2-sbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--n2-r-sm);
    font-size: 13px; font-weight: 600;
    color: #fff;
    transition: .15s;
    text-decoration: none;
}
.n2-sbtn:hover { text-decoration: none; color: #fff; }
.n2-sbtn-fb { background: #1877f2; }
.n2-sbtn-fb:hover { background: #0b69de; }
.n2-sbtn-tw { background: #000; }
.n2-sbtn-tw:hover { background: #333; }

/* Disqus */
.n2-disqus {
    margin-top: 36px;
    background: var(--n2-white);
    border: 1px solid var(--n2-border);
    border-radius: var(--n2-r-lg);
    padding: 24px;
}

/* ============ OVERRIDE: Redis-cached template styles ============ */
/* These override the HTML output from redisXxxTpl() methods.
   Using !important where needed to beat existing site CSS. */

/* --- Related news (from redisRelatedNewsByTagsTpl / redisRelatedByCategoryTpl) --- */
.n2-article-wrap .related_news {
    margin-top: 36px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    float: none !important;
    width: 100% !important;
    clear: both !important;
    overflow: visible !important;
}
.n2-article-wrap .related_news h3 {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--n2-text) !important;
    margin: 0 0 18px 0 !important;
    padding: 0 0 12px 0 !important;
    border-bottom: 2px solid var(--n2-border) !important;
    border-left: none !important;
    background: none !important;
    text-align: left !important;
    float: none !important;
}
.n2-article-wrap .related_news > ul,
.n2-article-wrap .related_news ul,
.n2-main .n2-article-wrap .related_news ul,
section.n2-article-wrap .related_news ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    float: none !important;
    width: 100% !important;
    overflow: visible !important;
}
.n2-article-wrap .related_news ul li,
.n2-article-wrap .related_news > ul > li,
.n2-main .n2-article-wrap .related_news ul li,
section.n2-article-wrap .related_news ul li {
    background: var(--n2-white) !important;
    border: 1px solid var(--n2-border) !important;
    border-radius: var(--n2-r-md) !important;
    overflow: hidden !important;
    transition: all .25s ease !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: block !important;
}
.n2-article-wrap .related_news ul li:hover {
    box-shadow: var(--n2-sh-2) !important;
    transform: translateY(-3px) !important;
    border-color: var(--n2-brand) !important;
}
.n2-article-wrap .related_news ul li a {
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
    float: none !important;
}
.n2-article-wrap .related_news ul li a:hover {
    text-decoration: none !important;
}
.n2-article-wrap .related_news ul li figure,
.n2-article-wrap .related_news li figure {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    height: 140px !important;
    width: 100% !important;
    display: block !important;
    float: none !important;
    border: none !important;
    background: var(--n2-off) !important;
}
.n2-article-wrap .related_news ul li figure img,
.n2-article-wrap .related_news li figure img,
.n2-article-wrap .related_news li img {
    width: 100% !important;
    height: 140px !important;
    object-fit: cover !important;
    display: block !important;
    float: none !important;
    max-width: 100% !important;
    border: none !important;
    border-radius: 0 !important;
}
.n2-article-wrap .related_news ul li p,
.n2-article-wrap .related_news li > a > p {
    padding: 14px 16px 6px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: var(--n2-text) !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    float: none !important;
}
.n2-article-wrap .related_news ul li .date,
.n2-article-wrap .related_news li span.date {
    padding: 0 16px 14px !important;
    margin: 0 !important;
    font-size: 12px !important;
    color: var(--n2-text-3) !important;
    display: block !important;
    float: none !important;
}
.n2-article-wrap .related_news .clear,
.n2-article-wrap .related_news div.clear {
    display: none !important;
}

/* --- Tags (from redisTagsTpl) --- */
.n2-art-body .article_tags,
.n2-article-card .article_tags {
    border-top: 1px solid var(--n2-border) !important;
    padding-top: 20px !important;
    margin-top: 24px !important;
    margin-bottom: 0 !important;
    background: none !important;
    float: none !important;
    clear: both !important;
}
.n2-art-body .article_tags ul,
.n2-article-card .article_tags ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    gap: 7px !important;
    flex-wrap: wrap !important;
    float: none !important;
}
.n2-art-body .article_tags li,
.n2-article-card .article_tags li {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    list-style: none !important;
}
.n2-art-body .article_tags li a,
.n2-article-card .article_tags li a {
    display: inline-block !important;
    background: var(--n2-white) !important;
    border: 1px solid var(--n2-border) !important;
    font-size: 12.5px !important;
    padding: 5px 14px !important;
    border-radius: 20px !important;
    color: var(--n2-text-2) !important;
    transition: .2s !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    float: none !important;
}
.n2-art-body .article_tags li a:hover,
.n2-article-card .article_tags li a:hover {
    background: var(--n2-brand-lighter) !important;
    border-color: var(--n2-brand) !important;
    color: var(--n2-brand) !important;
    text-decoration: none !important;
}
.n2-art-body .article_tags .clear {
    display: none !important;
}

/* --- Attachments (from redisAttachmentsTpl) --- */
.n2-art-body .attached_files,
.paywall .attached_files,
.n2-article-card .attached_files {
    border-top: 1px solid var(--n2-border) !important;
    padding-top: 20px !important;
    margin-top: 28px !important;
    float: none !important;
    clear: both !important;
}
.n2-art-body .attached_files h3,
.paywall .attached_files h3,
.n2-article-card .attached_files h3 {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--n2-text-3) !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    margin-bottom: 10px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}
.n2-art-body .attached_files ul,
.paywall .attached_files ul,
.n2-article-card .attached_files ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.n2-art-body .attached_files li,
.paywall .attached_files li,
.n2-article-card .attached_files li {
    margin-bottom: 6px !important;
    float: none !important;
}
.n2-art-body .attached_files li a,
.paywall .attached_files li a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px;
    background: var(--n2-off);
    border-radius: var(--n2-r-sm);
    border: 1px solid var(--n2-border);
    transition: .2s;
    text-decoration: none;
    color: var(--n2-brand);
    font-weight: 500;
    font-size: 13.5px;
}
.n2-art-body .attached_files li a:hover,
.paywall .attached_files li a:hover {
    border-color: var(--n2-brand);
    background: var(--n2-brand-lighter);
}

/* ============ ARTICLE LIST (Index page) ============ */
.n2-article-col { min-width: 0; }
.n2-article-list { display: flex; flex-direction: column; gap: 18px; }

/* Featured card */
.n2-acard-feat {
    background: var(--n2-white);
    border: 1px solid var(--n2-border);
    border-radius: var(--n2-r-lg);
    overflow: hidden;
    box-shadow: var(--n2-sh-1);
    transition: .25s;
}
.n2-acard-feat:hover { box-shadow: var(--n2-sh-2); transform: translateY(-2px); border-color: var(--n2-brand); }
.n2-acard-feat-link { text-decoration: none; color: inherit; display: block; }
.n2-acard-feat-img { height: 300px; position: relative; overflow: hidden; }
.n2-acard-feat-img img { width: 100%; height: 100%; object-fit: cover; }
.n2-badge-cat {
    position: absolute; top: 14px; left: 14px;
    background: var(--n2-red); color: #fff;
    font-size: 10px; font-weight: 700;
    padding: 4px 12px; border-radius: 4px;
    letter-spacing: .5px; text-transform: uppercase; z-index: 2;
}
.n2-feat-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    padding: 80px 24px 20px;
}
.n2-feat-overlay h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px; font-weight: 700; color: #fff;
    line-height: 1.3; margin-bottom: 8px;
}
.n2-feat-meta { font-size: 13px; color: rgba(255,255,255,.7); display: flex; align-items: center; gap: 8px; }
.n2-acard-feat-body { padding: 18px 24px 22px; }

/* Regular article card */
.n2-acard {
    background: var(--n2-white);
    border: 1px solid var(--n2-border);
    border-radius: var(--n2-r-lg);
    overflow: hidden;
    box-shadow: var(--n2-sh-1);
    transition: .25s;
}
.n2-acard:hover { box-shadow: var(--n2-sh-2); transform: translateY(-2px); border-color: var(--n2-brand); }
.n2-acard-link {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    min-height: 170px;
    text-decoration: none; color: inherit;
}
.n2-acard-img { position: relative; overflow: hidden; }
.n2-acard-img img { width: 100%; height: 100%; object-fit: cover; }
.n2-img-placeholder {
    width: 100%; height: 100%;
    background: var(--n2-off);
    display: flex; align-items: center; justify-content: center;
    color: var(--n2-text-3); font-size: 36px;
}
.n2-badge-member {
    position: absolute; top: 8px; right: 8px;
    background: var(--n2-accent); color: var(--n2-brand-dark);
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
}
.n2-acard-body { padding: 18px 22px; display: flex; flex-direction: column; justify-content: center; }
.n2-acard-meta {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px; font-size: 12px; color: var(--n2-text-3);
}
.n2-acard-cat { color: var(--n2-brand); font-weight: 500; }
.n2-acard-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 17px; font-weight: 700;
    line-height: 1.35; color: var(--n2-text); margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.n2-acard:hover h3 { color: var(--n2-brand); }
.n2-acard-summ {
    font-size: 13.5px; color: var(--n2-text-2);
    line-height: 1.55; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.n2-acard-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.n2-acard-author { color: var(--n2-brand); font-weight: 600; }
.n2-acard-views { color: var(--n2-text-3); display: flex; align-items: center; gap: 4px; }

/* Load more */
.n2-loadmore-wrap { text-align: center; padding: 24px 0; }
.n2-loadmore-btn {
    background: var(--n2-brand-dark); color: #fff; border: none;
    padding: 13px 40px; border-radius: var(--n2-r-md);
    font-size: 14.5px; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: .2s;
}
.n2-loadmore-btn:hover { background: var(--n2-brand); transform: translateY(-1px); box-shadow: var(--n2-sh-2); }

/* ============ SIDEBAR ============ */
.n2-sidebar { padding-left: 12px; }
.n2-sidebar-sticky { position: sticky; top: 128px; display: flex; flex-direction: column; gap: 18px; }

.n2-scard {
    background: var(--n2-white);
    border: 1px solid var(--n2-border);
    border-radius: var(--n2-r-lg);
    overflow: hidden;
}
.n2-scard-h {
    font-size: 11px; font-weight: 700;
    color: var(--n2-text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 18px 0;
}
.n2-scard-b { padding: 10px 18px 18px; }
.n2-scard-desc { font-size: 13px; color: var(--n2-text-2); margin-bottom: 10px; }

/* Override webinar cached template
   Template structure: .popular_tabs > p (single) with spans, a, br inside */
.n2-sidebar .upcoming_sem_tabs .popular_tabs {
    background: linear-gradient(135deg, #b5342a, #7b1f1a);
    border-radius: var(--n2-r-lg);
    padding: 22px 20px 20px;
    color: rgba(255,255,255,.8);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(146, 43, 33, .25);
}
/* CSS-generated label */
.n2-sidebar .upcoming_sem_tabs .popular_tabs::before {
    content: 'ΣΕΜΙΝΑΡΙΟ';
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
/* The single paragraph */
.n2-sidebar .upcoming_sem_tabs .popular_tabs p {
    font-size: 13px !important;
    color: rgba(255,255,255,.8) !important;
    text-align: left !important;
    line-height: 1.6 !important;
    margin: 0 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.15);
}
/* Override ALL inline span colors (template uses style="Color:#f00" etc.) */
.n2-sidebar .upcoming_sem_tabs .popular_tabs span {
    color: rgba(255,255,255,.65) !important;
    font-size: 12px !important;
}
/* Title link — white, bold, larger */
.n2-sidebar .upcoming_sem_tabs .popular_tabs a {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    display: inline !important;
    transition: opacity .15s;
}
.n2-sidebar .upcoming_sem_tabs .popular_tabs a:hover {
    opacity: .85;
    text-decoration: underline !important;
}

/* Banner slots */
.n2-banner-slot {
    border-radius: var(--n2-r-md);
    overflow: hidden;
}
.n2-banner-slot img.n2-banner-img {
    width: 100%; height: auto; display: block;
}

/* Sidebar ad/banner (from redisBannersTpl / redisNewsSidebarBannersTpl) */
.n2-sidebar .ad {
    border-radius: var(--n2-r-md);
    overflow: hidden;
    margin-bottom: 0;
}
.n2-sidebar .ad img { width: 100%; height: auto; display: block; }

/* Sidebar tabs */
.n2-scard-tabs-wrap { padding: 0 18px; padding-top: 14px; }
.n2-stabs {
    display: flex;
    border-bottom: 2px solid var(--n2-border);
    margin-bottom: 12px;
}
.n2-stab {
    flex: 1; padding: 9px 0; text-align: center;
    font-size: 12.5px; font-weight: 700;
    color: var(--n2-text-3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: .15s;
}
.n2-stab.active { color: var(--n2-brand); border-bottom-color: var(--n2-brand); }
.n2-stab:hover { color: var(--n2-brand); }

/* Popular/Latest list override */
.n2-sidebar .pp_news ul { list-style: none; padding: 0; margin: 0; }
.n2-sidebar .pp_news li {
    padding: 8px 0;
    border-bottom: 1px solid var(--n2-border);
}
.n2-sidebar .pp_news li:last-child { border-bottom: none; }
.n2-sidebar .pp_news li a {
    font-size: 13px; line-height: 1.4;
    color: var(--n2-text); text-decoration: none;
    display: block;
}
.n2-sidebar .pp_news li a:hover { color: var(--n2-brand); }
.n2-sidebar .pp_news li a .time {
    display: block; font-size: 11px;
    color: var(--n2-text-3); margin-top: 2px;
}

/* ============ ANIMATIONS ============ */
@keyframes n2FadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.n2-article-card { animation: n2FadeUp .5s ease; }
.n2-acard-feat { animation: n2FadeUp .45s ease; }
.n2-acard { animation: n2FadeUp .45s ease backwards; }
.n2-acard:nth-child(2) { animation-delay: .06s; }
.n2-acard:nth-child(3) { animation-delay: .12s; }
.n2-acard:nth-child(4) { animation-delay: .16s; }

/* ============ SLIDE PANEL — Variables ============ */
:root {
    --cr-blue:        #0077a8;
    --cr-blue-dark:   #005f88;
    --cr-blue-light:  #e8f4f9;
    --cr-text:        #1a1a1a;
    --cr-text-muted:  #4a5a64;
    --cr-border:      #dce3e8;
    --cr-radius:      6px;
    --cr-panel-w:     35%;
    --cr-panel-w-lg:  85%;
    --cr-yellow:      #f9a825;
}

/* ============ SLIDE PANEL — Backdrop ============ */
.cr-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.22);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.cr-panel-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* ============ SLIDE PANEL — Panel ============ */
.cr-slide-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: var(--cr-panel-w);
    max-width: 95vw;
    background: #fff;
    z-index: 10001;
    box-shadow: -6px 0 32px rgba(0,0,0,.18);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1), width .3s ease;
    display: flex;
    flex-direction: column;
}
.cr-slide-panel.open { transform: translateX(0); }
.cr-slide-panel.cr-panel-wide { width: 420px; }
.cr-slide-panel.cr-panel-large { width: var(--cr-panel-w-lg); }

/* ============ SLIDE PANEL — Header ============ */
.cr-sp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--cr-blue-dark);
    color: #fff;
    flex-shrink: 0;
}
.cr-sp-header-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
.cr-sp-header-text { flex: 1; min-width: 0; }
.cr-sp-header-title {
    font-size: 15px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cr-sp-header-subtitle { font-size: 12px; opacity: .7; margin-top: 1px; }
.cr-sp-header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.cr-sp-size-btn, .cr-sp-close-btn {
    width: 32px; height: 32px;
    border-radius: 6px;
    background: rgba(255,255,255,.12);
    border: none; color: #fff; font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.cr-sp-size-btn:hover, .cr-sp-close-btn:hover { background: rgba(255,255,255,.25); }

/* ============ SLIDE PANEL — Body ============ */
.cr-sp-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cr-text);
}

/* No-permission / error state */
.cr-sp-no-permission {
    text-align: center;
    padding: 40px 20px;
    color: var(--cr-text-muted);
    font-size: 14px;
}

/* Loading spinner */
.cr-sp-ajax-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--cr-text-muted);
}
.cr-sp-ajax-loading .fa { font-size: 28px; color: var(--cr-blue); display: block; margin-bottom: 12px; }
.cr-sp-ajax-loading p { font-size: 14px; margin: 0; }

/* ============ SLIDE PANEL — Footer ============ */
.cr-sp-footer {
    display: none;
    border-top: 1px solid var(--cr-border);
    padding: 12px 18px;
    background: #fafbfc;
    flex-shrink: 0;
}
.cr-sp-footer.visible { display: block; }
.cr-sp-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cr-sp-footer-spacer { flex: 1; }
.cr-sp-footer-btn {
    padding: 9px 20px;
    border-radius: var(--cr-radius);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--cr-border);
    background: #fff;
    color: var(--cr-text);
    transition: .15s;
    font-family: inherit;
}
.cr-sp-footer-btn:hover { border-color: var(--cr-blue); color: var(--cr-blue); }
.cr-sp-footer-btn.primary {
    background: var(--cr-blue);
    color: #fff;
    border-color: var(--cr-blue);
}
.cr-sp-footer-btn.primary:hover { background: var(--cr-blue-dark); }
.cr-sp-footer-btn.primary.cr-sp-lib-save-dirty {
    background: #1e8449;
    border-color: #1e8449;
    animation: crPulse 1.5s ease infinite;
}
@keyframes crPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(30,132,73,.3); }
    50% { box-shadow: 0 0 0 6px rgba(30,132,73,0); }
}

/* ============ SLIDE PANEL — Law content ============ */
.cr-sp-law-content-wrap { padding: 4px 0; }
.cr-sp-law-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cr-sp-law-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--cr-blue-light); color: var(--cr-blue);
    padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600;
}
.cr-sp-law-title {
    font-size: 16px; font-weight: 700; color: var(--cr-text);
    line-height: 1.4; margin: 0 0 16px; padding-bottom: 14px;
    border-bottom: 1px solid var(--cr-border);
}
.cr-sp-law-body { font-size: 15px; line-height: 26px; color: #505050; }
.cr-sp-law-body p { margin-bottom: 10px; }
/* Hyperlinks inside the sidebar law preview — visible without hovering.
   Nested article/paragraph links (data-auto-links) reload the same panel;
   whole-law links open in a new tab. */
.cr-sp-law-body a {
    color: var(--cr-blue);
    text-decoration: none;
    border-bottom: 1px dotted var(--cr-blue);
    transition: color .15s ease, border-bottom-color .15s ease, background-color .15s ease;
}
.cr-sp-law-body a:hover {
    color: var(--cr-blue-dark);
    border-bottom: 1px solid var(--cr-blue-dark);
    background-color: var(--cr-blue-light);
}
.cr-sp-law-body a[data-auto-links],
.cr-sp-law-body a[rel*="facebox"] {
    font-weight: 600;
}

/* ============ LIBRARY — Toolbar ============ */
.cr-sp-lib-toolbar {
    position: sticky; top: 0;
    background: #fff;
    z-index: 2;
    padding: 12px 14px 8px;
    border-bottom: 1px solid var(--cr-border);
    display: flex; flex-direction: column; gap: 8px;
}
.cr-sp-lib-toolbar-row {
    display: flex; align-items: center; gap: 4px;
}
.cr-sp-lib-toolbar-spacer { flex: 1; }

.cr-sp-lib-sort-btn {
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--cr-border);
    background: #fff;
    color: var(--cr-text-muted);
    cursor: pointer;
    transition: .15s;
    font-family: inherit;
}
.cr-sp-lib-sort-btn:hover { border-color: var(--cr-blue); color: var(--cr-blue); }
.cr-sp-lib-sort-btn.active {
    background: var(--cr-blue);
    color: #fff;
    border-color: var(--cr-blue);
}

.cr-sp-lib-selectall-btn {
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--cr-border);
    background: #fff;
    color: var(--cr-text-muted);
    cursor: pointer;
    transition: .15s;
    font-family: inherit;
}
.cr-sp-lib-selectall-btn:hover { border-color: var(--cr-blue); color: var(--cr-blue); }

/* Library search */
.cr-sp-lib-search-wrap {
    position: relative;
}
.cr-sp-lib-search-icon {
    position: absolute;
    left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--cr-text-muted); font-size: 13px;
    pointer-events: none;
}
.cr-sp-lib-search {
    width: 100%;
    padding: 7px 10px 7px 30px;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
}
.cr-sp-lib-search:focus { border-color: var(--cr-blue); }

/* ============ LIBRARY — Tree ============ */
.cr-sp-lib-tree { padding: 8px 12px; }

.cr-sp-lib-node { }
.cr-sp-lib-node[data-level="1"] > .cr-sp-lib-node-row { padding-left: 24px; }
.cr-sp-lib-node[data-level="2"] > .cr-sp-lib-node-row { padding-left: 42px; }
.cr-sp-lib-node[data-level="3"] > .cr-sp-lib-node-row { padding-left: 60px; }
.cr-sp-lib-node[data-level="4"] > .cr-sp-lib-node-row { padding-left: 78px; }

.cr-sp-lib-node-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: var(--cr-radius);
    cursor: pointer;
    transition: background .1s;
}
.cr-sp-lib-node-row:hover { background: var(--cr-blue-light); }
.cr-sp-lib-node-row:focus-visible {
    outline: 2px solid var(--cr-blue);
    outline-offset: -2px;
}

/* Expand/collapse arrow */
.cr-sp-lib-expand {
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    color: var(--cr-text-muted);
    transition: transform .2s;
    flex-shrink: 0;
}
.cr-sp-lib-expand.collapsed { transform: rotate(-90deg); }
.cr-sp-lib-expand.leaf { visibility: hidden; }

/* Checkbox */
.cr-sp-lib-check {
    width: 16px; height: 16px;
    border: 2px solid var(--cr-border);
    border-radius: 3px;
    flex-shrink: 0;
    position: relative;
    transition: .15s;
}
.cr-sp-lib-check.checked {
    background: var(--cr-blue);
    border-color: var(--cr-blue);
}
.cr-sp-lib-check.checked::after {
    content: '✓';
    position: absolute;
    top: -1px; left: 1px;
    font-size: 11px;
    color: #fff;
    font-weight: 700;
}

/* Folder icon */
.cr-sp-lib-folder-icon {
    color: var(--cr-yellow);
    font-size: 14px;
    flex-shrink: 0;
}

/* Node label */
.cr-sp-lib-node-label {
    flex: 1;
    font-size: 13.5px;
    color: var(--cr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Children container (collapsible) */
.cr-sp-lib-children {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height .3s ease;
}
.cr-sp-lib-children.collapsed { max-height: 0; }

/* Empty state */
.cr-sp-lib-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--cr-text-muted);
}
.cr-sp-lib-empty .fa {
    font-size: 40px;
    display: block;
    margin-bottom: 14px;
    color: var(--cr-border);
}
.cr-sp-lib-empty p { margin: 0 0 6px; font-size: 14px; }
.cr-sp-lib-empty-hint { font-size: 12.5px; color: var(--cr-text-muted); }

/* Flash message */
.cr-sp-lib-flash {
    padding: 10px 14px;
    margin: 8px 12px;
    border-radius: var(--cr-radius);
    font-size: 13px;
    font-weight: 600;
    transition: opacity .4s;
}
.cr-sp-lib-flash.success { background: #e8f5e9; color: #2e7d32; }
.cr-sp-lib-flash.error { background: #fce4ec; color: #c62828; }
.cr-sp-lib-flash.fade-out { opacity: 0; }

/* ============ LIBRARY — New category form ============ */
.cr-sp-lib-new-cat {
    display: none;
    border-top: 1px solid var(--cr-border);
    padding: 12px 18px;
    background: #fafbfc;
    flex-shrink: 0;
}
.cr-sp-lib-new-cat.visible { display: block; }
.cr-sp-lib-new-cat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--cr-text-muted);
    margin-bottom: 8px;
}
.cr-sp-lib-new-cat-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.cr-sp-lib-new-cat-input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
.cr-sp-lib-new-cat-input:focus { border-color: var(--cr-blue); }
.cr-sp-lib-new-cat-parent {
    width: 180px;
    padding: 7px 8px;
    border: 1px solid var(--cr-border);
    border-radius: var(--cr-radius);
    font-size: 12px;
    font-family: inherit;
    background: #fff;
}
.cr-sp-lib-new-cat-add {
    padding: 7px 14px;
    background: var(--cr-blue);
    color: #fff;
    border: none;
    border-radius: var(--cr-radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .15s;
}
.cr-sp-lib-new-cat-add:hover { background: var(--cr-blue-dark); }

/* ============ WIDGETPAGES — Panel list ============ */
.cr-sp-wp-list { padding: 8px 0; }
.cr-sp-wp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--cr-border);
    transition: background .1s;
}
.cr-sp-wp-item:hover { background: var(--cr-blue-light); }
.cr-sp-wp-item:last-child { border-bottom: none; }
.cr-sp-wp-item.wp-selected {
    background: #e8f5e9;
    border-left: 3px solid #2e7d32;
}
.cr-sp-wp-item.wp-selected .cr-sp-wp-title { font-weight: 700; color: #2e7d32; }
.cr-sp-wp-check {
    width: 16px; height: 16px;
    border: 2px solid var(--cr-border);
    border-radius: 3px;
    flex-shrink: 0;
    position: relative;
    transition: .15s;
}
.cr-sp-wp-check.checked {
    background: var(--cr-blue);
    border-color: var(--cr-blue);
}
.cr-sp-wp-check.checked::after {
    content: '✓';
    position: absolute;
    top: -1px; left: 1px;
    font-size: 11px;
    color: #fff;
    font-weight: 700;
}
.cr-sp-wp-title {
    font-size: 13.5px;
    color: var(--cr-text);
    flex: 1;
}

/* ============ HYPERLINK COLOR-CODING ============ */
/* Base: all links in article body */
.n2-content a {
    color: var(--cr-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(0,119,168,.35);
    font-weight: 600;
    transition: color .15s, text-decoration-color .15s, background .15s;
}
.n2-content a:hover {
    text-decoration-color: var(--cr-blue);
    background: var(--cr-blue-light);
    border-radius: 2px;
}

/* Laws (νόμοι) — green → opens new tab */
.n2-content a[rel*="laws"] {
    color: #2E7D32;
    text-decoration-color: rgba(46,125,50,.35);
}
.n2-content a[rel*="laws"]:hover {
    text-decoration-color: #2E7D32;
    background: #E8F5E9;
}

/* Articles / Paragraphs — purple → opens in slide panel */
.n2-content a[rel*="facebox"],
.n2-content a[data-auto-links] {
    color: #6A1B9A;
    text-decoration-color: rgba(106,27,154,.3);
    cursor: pointer;
}
.n2-content a[rel*="facebox"]:hover,
.n2-content a[data-auto-links]:hover {
    text-decoration-color: #6A1B9A;
    background: #F3E5F5;
}

/* Circulars / Decisions — orange → opens new tab */
.n2-content a[rel*="circulars"] {
    color: #E65100;
    text-decoration-color: rgba(230,81,0,.3);
}
.n2-content a[rel*="circulars"]:hover {
    text-decoration-color: #E65100;
    background: #FFF3E0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
    .n2-grid-3col { grid-template-columns: minmax(0, 1fr) 280px; }
    .n2-tools { display: none; }
    .n2-tools-toggle { display: flex; }
    .n2-article-wrap { padding: 0; }
    .n2-cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .n2-container { padding-left: 16px; padding-right: 16px; }
    .n2-grid-3col, .n2-grid-2col { grid-template-columns: 1fr; gap: 20px; }
    .n2-sidebar { padding-left: 0; }
    .n2-art-body { padding: 20px 18px 24px; }
    .n2-art-title { font-size: 24px; }
    .n2-acard-link { grid-template-columns: 140px minmax(0, 1fr); min-height: 140px; }
    .n2-acard-feat-img { height: 200px; }
    .n2-article-wrap .related_news ul { grid-template-columns: 1fr !important; }
    .n2-cat-grid { grid-template-columns: 1fr; }

    /* Panel responsive */
    .cr-slide-panel { width: 100% !important; max-width: 100vw; }
    .cr-sp-lib-new-cat-row { flex-wrap: wrap; }
    .cr-sp-lib-new-cat-parent { width: 100%; }
}
