/* ============================================================
   DESHGHUMO BLOG — Archive & Single Post Styles
   Add to: Hello Elementor Child Theme > style.css
   or enqueue as a separate file via functions.php
   ============================================================ */

/* ── CSS Variables ── */
:root {
    --dg-primary:       #e8521a;      /* orange CTA */
    --dg-primary-hover: #c93f08;
    --dg-green:         #2e5442;      /* read-more bg per spec */
    --dg-green-hover:   #1f3a2d;
    --dg-text:          #1a1a1a;
    --dg-text-muted:    #6b7280;
    --dg-border:        #e5e7eb;
    --dg-bg:            #f8f9fa;
    --dg-white:         #ffffff;
    --dg-card-radius:   12px;
    --dg-shadow:        0 2px 12px rgba(0,0,0,.08);
    --dg-shadow-hover:  0 8px 32px rgba(0,0,0,.13);
    --dg-max-width:     1280px;
    --dg-font:          'Poppins', sans-serif;
}

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ── Container ── */
.dg-container {
    max-width: var(--dg-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.dg-breadcrumb {
    padding: 18px 0 6px;
    font-family: var(--dg-font);
    font-size: 14px;
}

.dg-breadcrumb a {
    color: var(--dg-text-muted);
    text-decoration: none;
    transition: color .2s;
}

.dg-breadcrumb a:hover {
    color: var(--dg-primary);
}

.dg-breadcrumb-sep {
    color: var(--dg-text-muted);
    margin: 0 6px;
}

.dg-breadcrumb-current {
    color: var(--dg-primary);
    font-weight: 500;
}

/* ============================================================
   ARCHIVE — SEARCH
   ============================================================ */
.dg-blog-search-section {
    padding: 20px 0 32px;
    background: var(--dg-white);
}

.dg-search-form {
    display: flex;
    gap: 0;
    max-width: 540px;
    border: 1.5px solid var(--dg-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--dg-white);
}

.dg-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 13px 18px;
    font-family: var(--dg-font);
    font-size: 15px;
    color: var(--dg-text);
    background: transparent;
}

.dg-search-input::placeholder {
    color: #adb5bd;
}

.dg-search-btn {
    padding: 13px 28px;
    background: var(--dg-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: var(--dg-font);
    font-size: 15px;
    font-weight: 600;
    transition: background .2s;
    white-space: nowrap;
}

.dg-search-btn:hover {
    background: var(--dg-primary-hover);
}

/* ============================================================
   ARCHIVE — BLOG GRID
   ============================================================ */
.dg-blog-grid-section {
    padding: 0 0 60px;
    background: var(--dg-white);
}

.dg-blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1100px) {
    .dg-blog-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .dg-blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .dg-blog-grid { grid-template-columns: 1fr; }
}

/* ── Blog Card ── */
.dg-blog-card {
    background: var(--dg-white);
    border-radius: var(--dg-card-radius);
    border: 1px solid var(--dg-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--dg-shadow);
    transition: box-shadow .25s, transform .25s;
}

.dg-blog-card:hover {
    box-shadow: var(--dg-shadow-hover);
    transform: translateY(-3px);
}

/* Card Image */
.dg-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.dg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.dg-blog-card:hover .dg-card-image img {
    transform: scale(1.04);
}

/* Card Body */
.dg-card-body {
    padding: 18px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

/* Tags */
.dg-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dg-tag {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid var(--dg-border);
    border-radius: 999px;
    font-family: var(--dg-font);
    font-size: 12px;
    font-weight: 500;
    color: var(--dg-text);
    text-decoration: none;
    background: var(--dg-white);
    transition: border-color .2s, color .2s;
    white-space: nowrap;
}

.dg-tag:hover {
    border-color: var(--dg-primary);
    color: var(--dg-primary);
}

/* Card Title */
.dg-card-title {
    font-family: var(--dg-font);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.dg-card-title a {
    color: var(--dg-text);
    text-decoration: none;
    transition: color .2s;
}

.dg-card-title a:hover {
    color: var(--dg-primary);
}

/* Excerpt */
.dg-card-excerpt {
    font-family: var(--dg-font);
    font-size: 14px;
    color: var(--dg-text-muted);
    line-height: 1.6;
    flex: 1;
}

.dg-card-excerpt p {
    margin: 0;
}

/* Author Meta */
.dg-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.dg-card-author-avatar img,
.dg-card-author-avatar .avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover;
    background: #f0e9d8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--dg-font);
    font-weight: 700;
    font-size: 14px;
    color: var(--dg-primary);
    flex-shrink: 0;
}

.dg-card-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dg-author-name {
    font-family: var(--dg-font);
    font-size: 13px;
    font-weight: 600;
    color: var(--dg-text);
}

.dg-post-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--dg-font);
    font-size: 12px;
    color: var(--dg-text-muted);
}

/* Read More Button */
.dg-read-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 18px;
    background: var(--dg-green);
    color: #fff;
    border-radius: 7px;
    font-family: var(--dg-font);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, gap .2s;
    margin-top: 4px;
}

.dg-read-more-btn:hover {
    background: var(--dg-green-hover);
    gap: 10px;
    color: #fff;
}

/* Pagination */
.dg-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.dg-pagination .nav-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dg-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid var(--dg-border);
    font-family: var(--dg-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--dg-text);
    text-decoration: none;
    transition: all .2s;
}

.dg-pagination .page-numbers.current,
.dg-pagination .page-numbers:hover {
    background: var(--dg-green);
    border-color: var(--dg-green);
    color: #fff;
}

.dg-no-posts {
    text-align: center;
    padding: 60px 20px;
    font-family: var(--dg-font);
    color: var(--dg-text-muted);
    font-size: 16px;
}

/* ============================================================
   SINGLE POST — BANNER
   ============================================================ */
.dg-post-banner {
    position: relative;
    min-height: 380px;
    background-size: cover;
    background-position: center;
    background-color: #1a2a22;
    display: flex;
    align-items: flex-end;
}

.dg-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.78) 0%,
        rgba(0,0,0,.35) 50%,
        rgba(0,0,0,.15) 100%
    );
}

.dg-post-banner .dg-container {
    position: relative;
    z-index: 1;
    padding-bottom: 36px;
    padding-top: 60px;
    width: 100%;
}

.dg-banner-content {
    max-width: 760px;
}

.dg-post-banner-title {
    font-family: var(--dg-font);
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 10px;
}

.dg-post-banner-excerpt {
    font-family: var(--dg-font);
    font-size: 15px;
    color: #fff !important;
    margin: 0 0 16px;
    line-height: 1.6;
}

.dg-banner-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dg-banner-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,.8);
    font-family: var(--dg-font);
    font-size: 13px;
}

.dg-banner-tag {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 999px;
    background: var(--dg-primary);
    color: #fff;
    font-family: var(--dg-font);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}

.dg-banner-tag:hover {
    background: var(--dg-primary-hover);
    color: #fff;
}

.dg-tag-more {
    background: rgba(255,255,255,.2);
    backdrop-filter: blur(4px);
}

/* ============================================================
   SINGLE POST — BODY
   ============================================================ */
.dg-post-body-wrap {
    background: var(--dg-white);
    padding: 40px 0 20px;
}

.dg-post-layout {
    display: grid;
    grid-template-columns: 1fr;
    
}

/* Breadcrumb inside single */
.dg-post-content-area .dg-breadcrumb {
    padding: 0 0 20px;
}

.dg-post-title {
    font-family: var(--dg-font);
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: 700;
    color: var(--dg-text);
    margin: 0 0 24px;
    line-height: 1.25;
}

/* Featured Image in content */
.dg-post-featured-img {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 28px;
}

.dg-post-featured-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content Typography */
.dg-post-content {
    font-family: var(--dg-font);
    font-size: 15.5px;
    color: var(--dg-text);
    line-height: 1.8;
}

.dg-post-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 36px 0 10px;
    color: var(--dg-text);
}

.dg-post-content h3 {
    font-size: 19px;
    font-weight: 600;
    margin: 28px 0 8px;
    color: var(--dg-text);
}

.dg-post-content p {
    margin: 0 0 18px;
}

.dg-post-content ul,
.dg-post-content ol {
    padding-left: 24px;
    margin: 0 0 18px;
}

.dg-post-content li {
    margin-bottom: 6px;
}

.dg-post-content a {
    color: var(--dg-primary);
    text-decoration: underline;
}

.dg-post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

.dg-post-content blockquote {
    border-left: 4px solid var(--dg-green);
    padding: 12px 20px;
    margin: 20px 0;
    background: #f4f9f6;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--dg-text-muted);
}

/* Post Tags */
.dg-post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--dg-border);
}

.dg-tags-label {
    font-family: var(--dg-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--dg-text);
}

/* ============================================================
   SINGLE POST — RELATED POSTS
   ============================================================ */
.dg-related-posts-section {
    background: var(--dg-white);
    padding: 40px 0 64px;
    border-top: 1px solid var(--dg-border);
}

.dg-related-title {
    font-family: var(--dg-font);
    font-size: 22px;
    font-weight: 700;
    color: var(--dg-text);
    margin: 0 0 24px;
}

.dg-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .dg-related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .dg-related-grid { grid-template-columns: 1fr; }
}

.dg-related-card .dg-card-title {
    font-size: 15px;
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 768px) {
    .dg-post-banner {
        min-height: 280px;
    }
    .dg-post-body-wrap {
        padding: 28px 0 12px;
    }
    .dg-post-layout {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .dg-search-form {
        flex-direction: column;
        border-radius: 8px;
    }
    .dg-search-input {
        border-radius: 8px 8px 0 0;
        border-bottom: 1px solid var(--dg-border);
    }
    .dg-search-btn {
        border-radius: 0 0 8px 8px;
        text-align: center;
    }
}