/*
Theme Name: Times Theme
Theme URI: https://zzazz.com
Author: ZZAZZ Demo
Author URI: https://zzazz.com
Description: An HT-inspired modern Indian news theme with asymmetric 3-column grid, category-first hierarchy, and ZZAZZ Signal integration.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: times-theme
Tags: news, blog, three-columns, custom-menu, featured-images
*/

/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --t-red: #EA1B25;
    --t-red-dk: #C4161E;
    --t-black: #1A1A1A;
    --t-dark: #2B2B2B;
    --t-body: #333333;
    --t-gray: #6B6B6B;
    --t-meta: #8E8E8E;
    --t-light: #F7F7F7;
    --t-border: #EBEBEB;
    --t-white: #FFFFFF;
    --t-sans: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    --t-serif: 'Lora', Georgia, serif;
    --t-max: 1240px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--t-sans); color: var(--t-body); background: var(--t-white); line-height: 1.55; }
a { color: var(--t-black); text-decoration: none; transition: color 0.12s; }
a:hover { color: var(--t-red); }
img { max-width: 100%; height: auto; display: block; }

.wrap {
    max-width: var(--t-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--t-white);
    border-bottom: 1px solid var(--t-border);
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}
.site-logo {
    font-family: var(--t-sans);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--t-black);
    letter-spacing: -0.3px;
}
.site-logo a { color: var(--t-black); }
.site-logo a:hover { color: var(--t-black); }
.header-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.78rem;
    color: var(--t-meta);
}
.header-search input {
    border: 1px solid var(--t-border);
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 0.82rem;
    font-family: var(--t-sans);
    width: 190px;
    background: var(--t-light);
}
.header-search input:focus { outline: none; border-color: var(--t-red); background: var(--t-white); }

/* ===== NAVIGATION ===== */
.main-nav {
    background: var(--t-white);
    border-bottom: 2px solid var(--t-red);
    position: sticky;
    top: 0;
    z-index: 100;
}
.main-nav ul {
    list-style: none;
    display: flex;
    max-width: var(--t-max);
    margin: 0 auto;
    padding: 0 20px;
}
.main-nav li a {
    display: block;
    padding: 10px 16px;
    font-family: var(--t-sans);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--t-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.12s, background 0.12s;
}
.main-nav li a:hover,
.main-nav li.current-menu-item a {
    color: var(--t-white);
    background: var(--t-red);
}

/* ===== SITE MAIN ===== */
.site-main {
    max-width: var(--t-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== SHARED BUILDING BLOCKS ===== */
.cat-label {
    font-family: var(--t-sans);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--t-red);
    display: block;
    margin-bottom: 6px;
    line-height: 1;
}
.cat-label:hover { color: var(--t-red-dk); }

.zzazz-signal-placeholder { min-height: 20px; margin: 3px 0; }

.meta {
    font-family: var(--t-sans);
    font-size: 0.75rem;
    color: var(--t-meta);
    margin-top: 6px;
    line-height: 1.3;
}

.excerpt {
    font-family: var(--t-sans);
    font-size: 0.88rem;
    color: var(--t-gray);
    line-height: 1.55;
    margin-top: 6px;
}

/* ============================================
   HERO GRID — exact HT layout
   3 columns, NO vertical dividers, just gap
   Left: text-only lead + text-only secondary
   Center: large image hero (no text) + stacked text stories
   Right: image card + stacked text stories
   ============================================ */
.hp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    padding: 24px 0 28px;
    border-bottom: 1px solid var(--t-border);
}

/* -- Left column -- */
.hp-left .lead-story h2 {
    font-family: var(--t-sans);
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--t-black);
    margin-bottom: 2px;
}
.hp-left .lead-story h2 a { color: var(--t-black); }
.hp-left .lead-story h2 a:hover { color: var(--t-red); }
.hp-left .lead-story .excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 8px;
}

.hp-left .sub-story {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--t-border);
}
.hp-left .sub-story h3 {
    font-family: var(--t-sans);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.22;
    color: var(--t-black);
    margin-bottom: 2px;
}
.hp-left .sub-story h3 a { color: var(--t-black); }
.hp-left .sub-story h3 a:hover { color: var(--t-red); }
.hp-left .sub-story .excerpt {
    font-size: 0.88rem;
    line-height: 1.6;
    margin-top: 6px;
}

/* -- Center column -- */
.hp-center .center-hero .thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}
.hp-center .center-story {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--t-border);
}
.hp-center .center-story h3 {
    font-family: var(--t-sans);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.28;
    color: var(--t-black);
    margin-bottom: 2px;
}
.hp-center .center-story h3 a { color: var(--t-black); }
.hp-center .center-story h3 a:hover { color: var(--t-red); }
.hp-center .center-story .excerpt { font-size: 0.85rem; }

/* -- Right column -- */
.hp-right .right-featured .thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    margin-bottom: 10px;
}
.hp-right .right-featured h3 {
    font-family: var(--t-sans);
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.22;
    color: var(--t-black);
    margin-bottom: 2px;
}
.hp-right .right-featured h3 a { color: var(--t-black); }
.hp-right .right-featured h3 a:hover { color: var(--t-red); }
.hp-right .right-featured .excerpt {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-top: 6px;
}

.hp-right .right-story {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--t-border);
}
.hp-right .right-story h4 {
    font-family: var(--t-sans);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.28;
    color: var(--t-black);
    margin-bottom: 2px;
}
.hp-right .right-story h4 a { color: var(--t-black); }
.hp-right .right-story h4 a:hover { color: var(--t-red); }
.hp-right .right-story .excerpt { font-size: 0.82rem; }

/* ============================================
   BOTTOM ROW — thumb+text cards, 2-column
   Matches HT's bottom section with small
   thumbnail on left, text on right
   ============================================ */
.hp-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 40px;
    padding: 28px 0;
    border-bottom: 1px solid var(--t-border);
}
.hp-bottom .bcard {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 14px;
    align-items: start;
}
.hp-bottom .bcard .thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 2px;
}
.hp-bottom .bcard h3 {
    font-family: var(--t-sans);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--t-black);
    margin-bottom: 1px;
}
.hp-bottom .bcard h3 a { color: var(--t-black); }
.hp-bottom .bcard h3 a:hover { color: var(--t-red); }

/* ============================================
   CATEGORY SECTION — 4-col grid of cards
   ============================================ */
.cat-section {
    padding: 28px 0;
    border-bottom: 1px solid var(--t-border);
}
.cat-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--t-red);
}
.cat-section-title {
    font-family: var(--t-sans);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--t-red);
}
.cat-section-more {
    font-family: var(--t-sans);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--t-meta);
}
.cat-section-more:hover { color: var(--t-red); }
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.cat-card .thumb {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 8px;
}
.cat-card h3 {
    font-family: var(--t-sans);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2px;
}

/* ===== SINGLE ARTICLE ===== */
.article-top {
    padding: 28px 0 14px;
    max-width: 740px;
}
.article-top h1 {
    font-family: var(--t-sans);
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.18;
    margin-bottom: 8px;
    color: var(--t-black);
}
.article-deck {
    font-family: var(--t-serif);
    font-size: 1.08rem;
    color: var(--t-gray);
    line-height: 1.5;
    margin-bottom: 12px;
}
.article-signal-bar {
    background: var(--t-light);
    border: 1px solid var(--t-border);
    border-radius: 4px;
    padding: 10px 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}
.article-signal-bar .zzazz-signal-placeholder { flex: 1; min-height: 28px; }
.article-byline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--t-sans);
    font-size: 0.82rem;
    color: var(--t-gray);
    padding: 14px 0;
    border-top: 1px solid var(--t-border);
    border-bottom: 1px solid var(--t-border);
    margin-bottom: 24px;
}
.article-byline .author-name { font-weight: 700; color: var(--t-black); }

.article-body-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding-bottom: 40px;
}
.article-content {
    font-family: var(--t-serif);
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--t-dark);
}
.article-content p { margin-bottom: 1.4em; }
.article-content h2, .article-content h3 { font-family: var(--t-sans); margin: 1.6em 0 0.6em; }
.article-content blockquote {
    border-left: 4px solid var(--t-red);
    padding-left: 18px;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--t-gray);
}
.article-featured-image { margin-bottom: 24px; }
.article-featured-image img { width: 100%; }
.article-featured-image figcaption {
    font-family: var(--t-sans);
    font-size: 0.78rem;
    color: var(--t-meta);
    padding: 8px 0;
    border-bottom: 1px solid var(--t-border);
}
.article-tags { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--t-border); }
.article-tags a {
    display: inline-block;
    background: var(--t-light);
    border: 1px solid var(--t-border);
    padding: 4px 12px;
    font-family: var(--t-sans);
    font-size: 0.75rem;
    border-radius: 3px;
    margin: 0 6px 6px 0;
    color: var(--t-dark);
}
.article-tags a:hover { border-color: var(--t-red); color: var(--t-red); }

/* Sidebar */
.art-sidebar .sb-section { margin-bottom: 28px; }
.art-sidebar .sb-heading {
    font-family: var(--t-sans);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--t-red);
    border-bottom: 2px solid var(--t-red);
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.art-sidebar .sb-story { padding: 10px 0; border-bottom: 1px solid var(--t-border); }
.art-sidebar .sb-story:last-child { border-bottom: none; }
.art-sidebar .sb-story h4 {
    font-family: var(--t-sans);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 3px;
}

/* ===== ARCHIVE ===== */
.archive-header {
    padding: 20px 0;
    border-bottom: 2px solid var(--t-red);
    margin-bottom: 24px;
}
.archive-header h1 {
    font-family: var(--t-sans);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--t-red);
}
.archive-header p { font-size: 0.88rem; color: var(--t-gray); margin-top: 3px; }
.archive-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 36px;
    padding-bottom: 40px;
}
.archive-stories .arc-story {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--t-border);
    align-items: start;
}
.arc-story .thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 2px; }
.arc-story h3 { font-family: var(--t-sans); font-size: 1rem; font-weight: 700; line-height: 1.3; margin: 2px 0; }
.arc-story .excerpt { font-size: 0.85rem; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; padding: 28px 0; }
.pagination a, .pagination span {
    display: inline-block; padding: 6px 12px;
    border: 1px solid var(--t-border);
    font-family: var(--t-sans);
    font-size: 0.82rem; font-weight: 600; border-radius: 3px;
}
.pagination .current { background: var(--t-red); color: var(--t-white); border-color: var(--t-red); }

/* ===== FOOTER ===== */
.site-footer {
    background: var(--t-black);
    color: rgba(255,255,255,0.5);
    padding: 36px 0 0;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h3 {
    font-family: var(--t-sans);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--t-white);
    margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { color: rgba(255,255,255,0.45); font-size: 0.82rem; }
.footer-col a:hover { color: var(--t-white); }
.footer-bottom {
    padding: 16px 0;
    font-size: 0.72rem;
    text-align: center;
    color: rgba(255,255,255,0.25);
}

/* ===== PAGE CONTENT ===== */
.page-content {
    font-family: var(--t-serif);
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--t-dark);
    max-width: 740px;
}
.page-content p { margin-bottom: 1.4em; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hp-hero { grid-template-columns: 1fr 1fr; }
    .hp-right { display: none; }
    .hp-bottom { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .article-body-wrap { grid-template-columns: 1fr; }
    .archive-layout { grid-template-columns: 1fr; }
    .wrap, .site-main { padding: 0 16px; }
    .header-search { display: none; }
}
@media (max-width: 640px) {
    .hp-hero { grid-template-columns: 1fr; gap: 0; }
    .hp-left, .hp-center { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--t-border); }
    .hp-bottom .bcard { grid-template-columns: 120px 1fr; }
    .cat-grid { grid-template-columns: 1fr; }
    .archive-stories .arc-story { grid-template-columns: 1fr; }
    .article-top h1 { font-size: 1.6rem; }
    .hp-left .lead-story h2 { font-size: 1.3rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .main-nav ul { flex-wrap: wrap; padding: 0 16px; }
}
