/* ═══════════════════════════════════════════════
   NIRALA GRAND — BLOG STYLES
   Used by: index.html (cards) + posts/index.html (article)
   ═══════════════════════════════════════════════ */

/* ---------- White navbar (blog pages) ---------- */
.blog-page header {
    background: #fff !important;
    box-shadow: 0 0 10px rgba(0,0,0,.1);
}
.blog-page .navbar-light .navbar-nav .nav-link { color: #000 !important; }
.blog-page .navbar-light .navbar-nav .nav-link:hover { color: #242A00 !important; }
.blog-page .navbar.navbar-expand-lg.navbar-light img { width: 200px; filter: none !important; }
.blog-page .navbar-toggler { border-color: rgba(0,0,0,.1); }
.blog-page .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0,0,0,0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ═══════════ HOMEPAGE CAROUSEL ═══════════ */
.blog-carousel-wrapper {
    position: relative;
    padding: 0 50px;
    overflow: hidden;
    width: 100%;
    margin-top: 30px;
}
.blog-carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 20px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.blog-carousel-container::-webkit-scrollbar { display: none; }

.blog-card {
    flex: 0 0 auto;
    width: 32%;
    max-width: 380px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    text-decoration: none;
}
.blog-card-img { height: 200px; overflow: hidden; }
.blog-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.07); }

.blog-card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.blog-card-date { font-size: 12px; color: #758516; font-weight: 600; letter-spacing: .5px; margin-bottom: 8px; }
.blog-card-title {
    font-size: 18px; font-weight: 700; color: #242A00; line-height: 1.35; margin-bottom: 10px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-excerpt {
    font-size: 14px; color: #555; line-height: 1.55; margin-bottom: 14px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-link { margin-top: auto; font-size: 14px; font-weight: 700; color: #242A00; }
.blog-card-link:after { content: " →"; }

.blog-carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0,0,0,.5); border: none; color: #fff;
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; transition: background .3s ease;
}
.blog-carousel-btn:hover { background: rgba(0,0,0,.8); }
.blog-carousel-prev { left: 10px; }
.blog-carousel-next { right: 10px; }

/* ═══════════ ARTICLE PAGE ═══════════ */
.blog-detail-wrap { padding: 130px 0 60px; }

.breadcrumb-nav { font-size: 13px; color: #777; margin-bottom: 18px; }
.breadcrumb-nav a { color: #758516; text-decoration: none; font-weight: 600; }
.breadcrumb-nav a:hover { color: #242A00; }

.blog-hero {
    width: 100%; max-height: 460px; object-fit: cover;
    border-radius: 10px; margin-bottom: 26px;
}

.blog-article h1 {
    color: #242A00; font-weight: 700; font-size: 36px;
    line-height: 1.3; margin-bottom: 16px;
}
.blog-byline {
    display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
    font-size: 14px; color: #758516; font-weight: 600;
    padding-bottom: 22px; margin-bottom: 30px; border-bottom: 1px solid #e3e3e3;
}
.blog-byline .sep { color: #ccc; font-weight: 400; }

.blog-content p { color: #444; line-height: 1.85; margin-bottom: 18px; font-size: 16px; }
.blog-content h2 {
    color: #242A00; font-weight: 700; font-size: 27px;
    margin: 38px 0 16px; padding-left: 14px; border-left: 5px solid #758516;
}
.blog-content h3 { color: #3f4a0d; font-weight: 700; font-size: 21px; margin: 28px 0 12px; }
.blog-content ul { padding-left: 22px; margin-bottom: 20px; }
.blog-content ul li { color: #444; line-height: 1.85; margin-bottom: 9px; list-style: disc; }
.blog-content a { color: #758516; font-weight: 600; text-decoration: underline; }
.blog-content a:hover { color: #242A00; }
.blog-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; }

/* Tables */
.blog-table-wrap {
    overflow-x: auto; margin: 26px 0 8px;
    -webkit-overflow-scrolling: touch;
}
.blog-content table {
    width: 100%; min-width: 520px; border-collapse: collapse;
    border-radius: 8px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.07);
}
.blog-content table thead th {
    background: linear-gradient(90deg, rgba(36,42,0,1) 0%, rgba(101,133,16,1) 100%);
    color: #fff; font-weight: 700; font-size: 15px; padding: 14px 16px; text-align: left;
}
.blog-content table td {
    padding: 13px 16px; border-bottom: 1px solid #e8e8e8;
    color: #444; font-size: 15px; line-height: 1.6; vertical-align: top;
}
.blog-content table tbody tr:nth-child(even) { background: #f7f9f0; }
.blog-content table tbody tr:hover { background: #eef3dd; }
.blog-content table tbody tr:last-child td { border-bottom: none; }

.table-note { font-size: 13px; color: #888; font-style: italic; margin-top: 10px; }

/* Analyst callout */
.analyst-note {
    background: #f4f7e8; border-left: 5px solid #758516;
    border-radius: 6px; padding: 20px 24px; margin: 26px 0;
}
.analyst-note h3 { margin-top: 0 !important; margin-bottom: 8px !important; font-size: 18px; }
.analyst-note p:last-child { margin-bottom: 0; }

/* Author box */
.author-box {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: #f7f9f0; border-radius: 10px;
    padding: 20px 24px; margin: 44px 0 10px;
}
.author-box .a-name { font-weight: 700; color: #242A00; font-size: 17px; margin: 0; }
.author-box .a-date { font-size: 13px; color: #758516; font-weight: 600; margin: 2px 0 0; }

.back-link {
    color: #242A00; font-weight: 700; text-decoration: none;
    display: inline-block; margin-top: 26px;
}
.back-link:hover { color: #758516; text-decoration: none; }

/* Related posts */
.related-wrap { margin-top: 56px; padding-top: 36px; border-top: 1px solid #e3e3e3; }
.related-wrap h3 { color: #242A00; font-weight: 700; font-size: 22px; margin-bottom: 20px; }
.related-card {
    display: block; background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.1); text-decoration: none; height: 100%;
    transition: transform .3s ease, box-shadow .3s ease;
}
.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
    text-decoration: none;
}
.related-card img { width: 100%; height: 150px; object-fit: cover; }
.related-card .rc-body { padding: 14px 16px 18px; }
.related-card .rc-date { font-size: 11px; color: #758516; font-weight: 700; margin-bottom: 6px; }
.related-card .rc-title {
    font-size: 15px; font-weight: 700; color: #242A00; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 404 state */
.blog-404 { text-align: center; padding: 40px 0 20px; }
.blog-404 h1 { font-size: 30px; color: #242A00; font-weight: 700; margin-bottom: 12px; }
.blog-404 p { color: #666; margin-bottom: 24px; }

/* Loading state */
.blog-loading { text-align: center; padding: 60px 0; color: #999; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 991px) {
    .blog-card { width: 60%; }
}
@media (max-width: 768px) {
    .blog-carousel-wrapper { padding: 0 45px; }
    .blog-card { width: 78%; }
    .blog-card-img { height: 170px; }
    .blog-carousel-btn { width: 38px; height: 38px; }
    .blog-carousel-prev { left: 4px; }
    .blog-carousel-next { right: 4px; }

    .blog-detail-wrap { padding: 110px 0 40px; }
    .blog-article h1 { font-size: 26px; }
    .blog-content h2 { font-size: 22px; }
    .blog-content h3 { font-size: 18px; }
    .blog-content p, .blog-content ul li { font-size: 15px; }
    .blog-hero { max-height: 260px; }
}
@media (max-width: 500px) {
    .blog-card { width: 85%; }
    .blog-carousel-btn { width: 34px; height: 34px; }
}