/* ═══════════════════════════════════════════════════════════
   BLOG — Brand-aligned styles for Kapoor Advertisement
   Add/append these rules to style.css (they replace the old
   "Blog List", "Blog Detail" and "Blog Rich Text" blocks)
═══════════════════════════════════════════════════════════ */


/* ── Blog Hero Banner ──────────────────────────────────── */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    padding: 120px 0 60px;           /* 120px top clears the fixed header */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.blog-hero-content {
    position: relative;
    z-index: 1;
}

.blog-hero-tag {
    display: inline-block;
    background: rgba(217, 119, 6, 0.2);
    color: var(--secondary-color);
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-radius: 30px;
    padding: 6px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.blog-hero h1 {
    color: var(--white);
    font-size: 2.8rem;
    margin-bottom: 14px;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.blog-hero p {
    color: #94a3b8;
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .blog-hero            { padding: 100px 0 50px; }
    .blog-hero h1         { font-size: 1.9rem; }
}


/* ── Blog List Section ─────────────────────────────────── */
.blog-section {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

.blog-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 12px;
}

.blog-page-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin: 0;
    position: relative;
    padding-bottom: 10px;
}

.blog-page-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 48px; height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.blog-count {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}


/* ── Blog Grid ─────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.07);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.blog-card:hover {
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
    transform: translateY(-5px);
}

.blog-card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 220px;
    background: var(--bg-offset);
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.05);
}

.blog-card-no-img {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
    color: rgba(255,255,255,.15);
    font-size: 4rem;
}

.blog-card-body {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.blog-date {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-date i { color: var(--secondary-color); font-size: 0.72rem; }

.blog-read-time {
    font-size: 0.78rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-read-time i { color: var(--secondary-color); font-size: 0.72rem; }

.blog-card-title {
    font-size: 1.12rem;
    line-height: 1.45;
    margin: 0 0 10px;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 700;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: var(--secondary-color);
}

.blog-card-excerpt {
    color: var(--text-light);
    font-size: 0.88rem;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.blog-read-more:hover {
    gap: 10px;
    color: #b45309;
}

.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.blog-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--bg-offset);
    display: block;
}


/* ── Blog Detail Page ──────────────────────────────────── */
.blog-post {
    padding: 100px 0 80px;
    background: var(--white);
}

.blog-post-inner {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}

/* Main article column */
.blog-article { min-width: 0; }

.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    margin-bottom: 28px;
    transition: gap 0.2s ease;
}

.blog-back-link:hover { gap: 12px; color: #b45309; }

.blog-featured-img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(15,23,42,.12);
    display: block;
}

.blog-post-title {
    font-size: 2.1rem;
    color: var(--primary-color);
    margin-bottom: 16px;
    line-height: 1.3;
    font-family: var(--font-heading);
    font-weight: 800;
}

.blog-post-meta-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.blog-post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.blog-post-meta-item i {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.blog-post-meta-item strong { color: var(--text-dark); font-weight: 600; }


/* ── Rich-text content ─────────────────────────────────── */
.blog-content {
    line-height: 1.85;
    color: #374151;
    font-size: 1.02rem;
}

.blog-content h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 2.2rem 0 0.8rem;
    color: var(--primary-color);
    border-left: 4px solid var(--secondary-color);
    padding-left: 14px;
    font-family: var(--font-heading);
}

.blog-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.8rem 0 0.6rem;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.blog-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.4rem 0 0.5rem;
    color: var(--text-dark);
}

.blog-content p {
    margin-bottom: 1.1rem;
    color: #374151;
}

.blog-content a {
    color: var(--secondary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-content a:hover { color: #b45309; }

.blog-content strong { font-weight: 700; color: var(--text-dark); }
.blog-content em     { font-style: italic; }

.blog-content mark,
.blog-content .marker-yellow { background: #fef08a; padding: 1px 4px; border-radius: 3px; }
.blog-content .marker-green  { background: #bbf7d0; padding: 1px 4px; border-radius: 3px; }

.blog-content blockquote {
    border-left: 4px solid var(--secondary-color);
    margin: 2rem 0;
    padding: 16px 22px;
    background: #fffbeb;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #6b7280;
    font-size: 1.05rem;
}

.blog-content ul,
.blog-content ol {
    padding-left: 1.6rem;
    margin-bottom: 1.1rem;
}

.blog-content ul li  { list-style: disc; }
.blog-content ol li  { list-style: decimal; }
.blog-content li     { margin-bottom: 0.4rem; }

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.blog-content table th,
.blog-content table td {
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    text-align: left;
}

.blog-content table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.blog-content table tr:nth-child(even) td { background: var(--bg-light); }

.blog-content hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 2rem 0;
}


/* ── Share Bar ─────────────────────────────────────────── */
.blog-share {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.blog-share-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.blog-share-btn:hover { opacity: 0.88; transform: translateY(-2px); }

.share-wa  { background: #25D366; color: #fff; }
.share-tw  { background: #1d9bf0; color: #fff; }
.share-li  { background: #0a66c2; color: #fff; }
.share-copy { background: var(--bg-offset); color: var(--primary-color); cursor: pointer; border: none; font-family: var(--font-body); }


/* ── Sidebar ───────────────────────────────────────────── */
.blog-sidebar { position: sticky; top: 100px; }

.sidebar-widget {
    background: var(--bg-light);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
}

.sidebar-widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary-color);
    font-family: var(--font-heading);
    display: inline-block;
    width: 100%;
}

/* Author card */
.sidebar-author {
    text-align: center;
}

.sidebar-author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #1e3a5f);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
    margin: 0 auto 12px;
}

.sidebar-author-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 4px;
}

.sidebar-author-role {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CTA widget */
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    color: var(--white);
    text-align: center;
    border-color: transparent;
}

.sidebar-cta .sidebar-widget-title {
    color: var(--white);
    border-color: var(--secondary-color);
}

.sidebar-cta p {
    color: #94a3b8;
    font-size: 0.88rem;
    margin-bottom: 18px;
}

.sidebar-cta .btn-primary {
    width: 100%;
    text-align: center;
}


/* ── Back link at bottom ───────────────────────────────── */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 36px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.back-to-blog:hover { gap: 12px; color: #b45309; }


/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
    .blog-post-inner {
        grid-template-columns: 1fr;
    }

    .blog-sidebar { position: static; }
}

@media (max-width: 768px) {
    .blog-section      { padding: 40px 0 60px; }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-card-img-wrap,
    .blog-card-no-img  { height: 200px; }

    .blog-post         { padding: 90px 0 50px; }
    .blog-post-title   { font-size: 1.55rem; }
    .blog-featured-img { max-height: 260px; border-radius: 8px; }

    .blog-content h2   { font-size: 1.35rem; }
    .blog-content h3   { font-size: 1.1rem; }

    .blog-share { gap: 10px; }
}