/*
 Theme Name: GeneratePress Child - Newsroom
 Theme URI: https://paikia.com
 Description: Newspaper Pro-style homepage for paikia研究室
 Author: paikia
 Template: generatepress
 Version: 2.0
 Text Domain: generatepress-child
*/

/* ========================================
   NEWSPAPER PRO STYLE — DARK THEME
   Matches paikia.com dark background
   ======================================== */

/* --- Homepage Container --- */
.newsroom-homepage {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* ========================================
   HERO: Big Grid (1 large + 2 small)
   ======================================== */
.nr-big-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 210px 210px;
    gap: 4px;
    margin-bottom: 36px;
    border-radius: 6px;
    overflow: hidden;
}

.nr-big-grid .nr-grid-item {
    position: relative;
    overflow: hidden;
}

.nr-big-grid .nr-grid-item:first-child {
    grid-row: 1 / 3;
}

.nr-big-grid .nr-grid-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #fff;
}

.nr-big-grid .nr-grid-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.nr-big-grid .nr-grid-item:hover .nr-grid-img {
    transform: scale(1.05);
}

.nr-big-grid .nr-grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 18px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
}

.nr-big-grid .nr-grid-item:first-child .nr-grid-overlay {
    padding: 28px 24px;
}

.nr-grid-cat {
    display: inline-block;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    margin-bottom: 8px;
    line-height: 1;
}

.nr-grid-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.nr-big-grid .nr-grid-item:first-child .nr-grid-title {
    font-size: 22px;
    line-height: 1.3;
}

.nr-grid-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 6px;
}

/* ========================================
   SECTION HEADER (Newspaper style)
   Colored left border accent
   ======================================== */
.nr-section-header {
    display: flex;
    align-items: center;
    margin: 40px 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 12px;
}

.nr-section-header h2 {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    color: #fff;
    position: relative;
    padding-left: 14px;
}

.nr-section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--nr-accent, #e74c3c);
    border-radius: 2px;
}

.nr-section-header .nr-view-all {
    margin-left: auto;
    font-size: 12px;
    color: #888;
    text-decoration: none;
}

.nr-section-header .nr-view-all:hover {
    color: #fff;
}

/* ========================================
   CARDS: Grid Module (Newspaper Block Style)
   Image top, category on image, title + excerpt
   ======================================== */
.nr-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.nr-card {
    background: transparent;
    transition: all 0.2s;
}

.nr-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.nr-card .nr-card-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 12px;
}

.nr-card .nr-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.nr-card:hover .nr-card-img {
    transform: scale(1.05);
}

.nr-card .nr-card-cat {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    line-height: 1;
    z-index: 2;
}

.nr-card .nr-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
    color: #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nr-card:hover .nr-card-title {
    color: #fff;
}

.nr-card .nr-card-excerpt {
    font-size: 13px;
    line-height: 1.5;
    color: #888;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nr-card .nr-card-meta {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nr-card .nr-card-author {
    color: #aaa;
    font-weight: 600;
}

/* ========================================
   TWO-COLUMN LAYOUT: Cards left + List right
   (Classic Newspaper Pro layout)
   ======================================== */
.nr-two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 36px;
}

.nr-two-col .nr-col-main .nr-card-grid {
    grid-template-columns: 1fr 1fr;
}

/* ========================================
   LIST MODULE (Compact sidebar/section)
   ======================================== */
.nr-list {
    display: flex;
    flex-direction: column;
}

.nr-list-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nr-list-item:first-child {
    padding-top: 0;
}

.nr-list-item:last-child {
    border-bottom: none;
}

.nr-list-item a {
    display: flex;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.nr-list-item .nr-list-thumb {
    width: 90px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.nr-list-item:hover .nr-list-thumb {
    opacity: 0.85;
}

.nr-list-item .nr-list-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nr-list-item .nr-list-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.nr-list-item .nr-list-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 4px;
    color: #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nr-list-item:hover .nr-list-title {
    color: #fff;
}

.nr-list-item .nr-list-meta {
    font-size: 11px;
    color: #666;
}

/* ========================================
   CATEGORY BADGE COLORS
   ======================================== */
.cat-c-ai          { background: #4a5abb; color: #fff; }
.cat-c-stock       { background: #e67e22; color: #fff; }
.cat-c-tech        { background: #27ae60; color: #fff; }
.cat-c-news        { background: #e74c3c; color: #fff; }
.cat-c-singapore   { background: #2980b9; color: #fff; }
.cat-c-crypto      { background: #8e44ad; color: #fff; }
.cat-c-car         { background: #16a085; color: #fff; }
.cat-c-travel      { background: #f39c12; color: #fff; }
.cat-c-lifestyle   { background: #d35400; color: #fff; }
.cat-c-default     { background: #555; color: #fff; }

/* Accent colors for section headers */
.nr-accent-stock     { --nr-accent: #e67e22; }
.nr-accent-ai        { --nr-accent: #4a5abb; }
.nr-accent-tech      { --nr-accent: #27ae60; }
.nr-accent-news      { --nr-accent: #e74c3c; }
.nr-accent-singapore { --nr-accent: #2980b9; }
.nr-accent-crypto    { --nr-accent: #8e44ad; }
.nr-accent-car       { --nr-accent: #16a085; }

/* ========================================
   TRENDING / TICKER BAR
   ======================================== */
.nr-trending-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    margin-bottom: 24px;
    overflow: hidden;
}

.nr-trending-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    background: #e74c3c;
    padding: 4px 12px;
    border-radius: 2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nr-trending-list {
    display: flex;
    gap: 24px;
    overflow: hidden;
    flex: 1;
}

.nr-trending-list a {
    font-size: 13px;
    color: #aaa;
    text-decoration: none;
    white-space: nowrap;
}

.nr-trending-list a:hover {
    color: #fff;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .nr-card-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .nr-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .nr-big-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 260px 160px 160px;
    }
    
    .nr-big-grid .nr-grid-item:first-child {
        grid-row: auto;
    }

    .nr-card-grid {
        grid-template-columns: 1fr;
    }

    .nr-big-grid .nr-grid-item:first-child .nr-grid-title {
        font-size: 18px;
    }
    
    .nr-card .nr-card-img {
        height: 200px;
    }
}

/* ========================================
   HIDE SIDEBAR ON HOMEPAGE, FULL WIDTH
   ======================================== */
body.page-template-template-newsroom .site-content {
    display: block;
}

body.page-template-template-newsroom #right-sidebar,
body.page-template-template-newsroom .sidebar {
    display: none;
}

body.page-template-template-newsroom .content-area {
    width: 100%;
}

body.page-template-template-newsroom .inside-article {
    padding: 0;
}

body.page-template-template-newsroom .entry-header,
body.page-template-template-newsroom .entry-meta {
    display: none;
}

/* ========================================
   REGION SECTION: Tabs + 2 big cards + 2-col list
   ======================================== */

/* Tabs in section header */
.nr-region-tabs {
    margin-left: auto;
    display: flex;
    gap: 4px;
    align-items: center;
}

.nr-region-tabs a {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    padding: 4px 14px;
    border-radius: 3px;
    transition: all 0.2s;
}

.nr-region-tabs a:hover {
    color: #fff;
}

.nr-region-tabs a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* AJAX loading fade */
#nr-region-content {
    transition: opacity 0.25s ease;
    min-height: 200px;
}

/* 2 big cards side by side */
.nr-region-big {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.nr-region-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.nr-region-card-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 14px;
}

.nr-region-card-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.nr-region-card:hover .nr-region-card-thumb img {
    transform: scale(1.05);
}

.nr-region-card-cat {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    line-height: 1;
    z-index: 2;
}

.nr-region-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
    color: #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nr-region-card:hover .nr-region-card-title {
    color: #fff;
}

.nr-region-card-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.nr-region-card-excerpt {
    font-size: 13px;
    line-height: 1.55;
    color: #888;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 2-column compact list below */
.nr-region-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}

.nr-region-list-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nr-region-list-item a {
    display: flex;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.nr-region-list-thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.nr-region-list-item:hover .nr-region-list-thumb {
    opacity: 0.85;
}

.nr-region-list-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nr-region-list-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 4px;
    color: #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nr-region-list-item:hover .nr-region-list-title {
    color: #fff;
}

.nr-region-list-meta {
    font-size: 11px;
    color: #666;
}

/* Category badge colors for malaysia/asia */
.cat-c-malaysia  { background: #2980b9; color: #fff; }
.cat-c-asia      { background: #2471a3; color: #fff; }

/* Section accent for region */
.nr-accent-malaysia  { --nr-accent: #2980b9; }
.nr-accent-asia      { --nr-accent: #2471a3; }

/* Responsive */
@media (max-width: 768px) {
    .nr-region-big {
        grid-template-columns: 1fr;
    }
    
    .nr-region-list {
        grid-template-columns: 1fr;
    }

    .nr-region-tabs {
        flex-wrap: wrap;
        gap: 2px;
    }

    .nr-region-tabs a {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* ========================================
   LATEST POSTS: 3-column grid + pagination
   ======================================== */
.nr-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.nr-latest-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.nr-latest-card-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 12px;
}

.nr-latest-card-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.nr-latest-card:hover .nr-latest-card-thumb img {
    transform: scale(1.05);
}

.nr-latest-card-cat {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 3px 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 2px;
    line-height: 1;
    z-index: 2;
}

.nr-latest-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
    color: #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nr-latest-card:hover .nr-latest-card-title {
    color: #fff;
}

.nr-latest-card-meta {
    font-size: 12px;
    color: #666;
}

/* --- Pagination --- */
.nr-pagination {
    text-align: center;
    margin: 10px 0 40px;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nr-pagination a,
.nr-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.nr-pagination a {
    color: #aaa;
    background: rgba(255,255,255,0.06);
}

.nr-pagination a:hover {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.nr-pagination span.current {
    color: #fff;
    background: #e74c3c;
}

.nr-pagination span.dots {
    color: #666;
    background: none;
}

/* Responsive */
@media (max-width: 900px) {
    .nr-latest-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .nr-latest-grid {
        grid-template-columns: 1fr;
    }

    .nr-latest-card-thumb img {
        height: 200px;
    }
}
