/* =====================================================
   Bhartiya Grid Homepage v2.0 — News Design
   Colors: Black #0a0a0a | Blue #1565c0 | Red #c62828
   ===================================================== */

/* ---- CSS Variables ---- */
:root {
    --bhg-black:   #0a0a0a;
    --bhg-blue:    #1565c0;
    --bhg-blue2:   #1976d2;
    --bhg-red:     #c62828;
    --bhg-red2:    #e53935;
    --bhg-white:   #ffffff;
    --bhg-gray:    #f4f4f4;
    --bhg-border:  #e0e0e0;
    --bhg-text:    #222222;
    --bhg-muted:   #757575;
    --bhg-radius:  5px;
    --bhg-shadow:  0 2px 8px rgba(0,0,0,0.10);
}

/* =====================================================
   NEWS TICKER
   ===================================================== */

.bhg-ticker-wrap {
    display: flex;
    align-items: center;
    background: var(--bhg-black);
    color: var(--bhg-white);
    overflow: hidden;
    height: 38px;
    margin-bottom: 20px;
    border-radius: var(--bhg-radius);
    contain: content;
}

.bhg-ticker-label {
    flex-shrink: 0;
    background: var(--bhg-red);
    color: var(--bhg-white);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 14px;
    height: 100%;
    display: flex;
    align-items: center;
    white-space: nowrap;
    z-index: 2;
}

.bhg-ticker-track {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.bhg-ticker-inner {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: bhgTicker 40s linear infinite;
}

@keyframes bhgTicker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.bhg-ticker-inner:hover { animation-play-state: paused; }

.bhg-ticker-item {
    color: #e0e0e0;
    font-size: 13px;
    text-decoration: none;
    padding: 0 18px;
    white-space: nowrap;
    transition: color 0.2s;
}

.bhg-ticker-item:hover { color: var(--bhg-red2); }

.bhg-ticker-sep {
    color: var(--bhg-blue2);
    font-size: 8px;
    flex-shrink: 0;
}

/* =====================================================
   SECTION HEADERS
   ===================================================== */

.bhg-section {
    margin-bottom: 36px;
}

.bhg-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--bhg-red);
    padding: 6px 12px;
    background: var(--bhg-black);
    margin-bottom: 14px;
    border-radius: 0 var(--bhg-radius) var(--bhg-radius) 0;
}

.bhg-section-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--bhg-white);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bhg-section-label a {
    color: var(--bhg-white);
    text-decoration: none;
}

.bhg-section-label a:hover { color: var(--bhg-red2); }

.bhg-see-all {
    font-size: 12px;
    color: #bdbdbd;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.bhg-see-all:hover { color: var(--bhg-red2); }

/* =====================================================
   GRID LAYOUT
   ===================================================== */

.bhg-grid {
    display: grid;
    gap: 16px;
}

.bhg-cols-1 { grid-template-columns: 1fr; }
.bhg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.bhg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.bhg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* =====================================================
   POST CARD
   ===================================================== */

.bhg-card {
    background: var(--bhg-white);
    border: 1px solid var(--bhg-border);
    border-radius: var(--bhg-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: var(--bhg-shadow);
}

.bhg-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
    transform: translateY(-3px);
}

/* Category badge */
.bhg-card-cat {
    padding: 8px 10px 0;
}

.bhg-card-cat a {
    display: inline-block;
    background: var(--bhg-blue);
    color: var(--bhg-white);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 2px 8px;
    border-radius: 2px;
    text-decoration: none;
    transition: background 0.2s;
}

.bhg-card-cat a:hover { background: var(--bhg-red); }

/* Featured image */
.bhg-card-img-link {
    display: block;
    overflow: hidden;
    margin-top: 8px;
}

.bhg-card-img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.bhg-card:hover .bhg-card-img { transform: scale(1.03); }

.bhg-card-img-placeholder {
    width: 100%;
    height: 130px;
    background: linear-gradient(135deg, #1565c0 0%, #0a0a0a 100%);
    margin-top: 8px;
}

/* Card body */
.bhg-card-body {
    padding: 10px 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bhg-card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 6px;
    padding: 0;
}

.bhg-card-title a {
    color: var(--bhg-black);
    text-decoration: none;
}

.bhg-card-title a:hover { color: var(--bhg-blue); }

.bhg-card-date {
    font-size: 11px;
    color: var(--bhg-muted);
    margin-bottom: 8px;
}

.bhg-card-excerpt {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 10px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bhg-card-more {
    display: inline-block;
    background: var(--bhg-red);
    color: var(--bhg-white);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 3px;
    text-decoration: none;
    align-self: flex-start;
    transition: background 0.2s;
}

.bhg-card-more:hover {
    background: var(--bhg-blue);
    color: var(--bhg-white);
}

/* =====================================================
   SIDEBAR — CATEGORY CLOUD
   ===================================================== */

.bhg-cat-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 4px 0;
}

.bhg-cat-tag {
    display: inline-block;
    background: var(--bhg-gray);
    color: var(--bhg-black);
    border: 1px solid var(--bhg-border);
    padding: 4px 10px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1.4;
}

.bhg-cat-tag:hover {
    background: var(--bhg-blue);
    color: var(--bhg-white);
    border-color: var(--bhg-blue);
}

.bhg-cat-tag sup {
    font-size: 9px;
    font-weight: 400;
    color: var(--bhg-muted);
}

.bhg-cat-tag:hover sup { color: rgba(255,255,255,0.75); }

/* =====================================================
   SIDEBAR — RECENT POSTS
   ===================================================== */

.bhg-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bhg-recent-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 9px 0;
    border-bottom: 1px solid var(--bhg-border);
}

.bhg-recent-item:last-child { border-bottom: none; }

.bhg-recent-thumb-link { flex-shrink: 0; }

.bhg-recent-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.bhg-recent-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bhg-recent-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--bhg-black);
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bhg-recent-title:hover { color: var(--bhg-blue); }

.bhg-recent-date {
    font-size: 11px;
    color: var(--bhg-muted);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 960px) {
    .bhg-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .bhg-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .bhg-cols-4,
    .bhg-cols-3,
    .bhg-cols-2 {
        grid-template-columns: 1fr;
    }

    .bhg-ticker-wrap { height: 34px; }
    .bhg-ticker-label { font-size: 11px; padding: 0 10px; }
    .bhg-ticker-item { font-size: 12px; padding: 0 12px; }
    .bhg-card-img { height: 190px; }

    .bhg-section-head { flex-wrap: wrap; gap: 4px; }
}

/* =====================================================
   PERFORMANCE: reduce motion preference
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
    .bhg-ticker-inner { animation: none; }
    .bhg-card { transition: none; }
    .bhg-card-img { transition: none; }
}
