/**
 * Responsive Blog Grid Styles
 * Mobile-first approach with optimized breakpoints
 */

/* Page Header - Responsive Typography */
.page-header {
    text-align: center;
    padding: clamp(2rem, 5vw, 4rem) 0;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.page-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog Grid - Mobile First, Fully Responsive */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 3vw, 2rem);
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
    width: 100%;
    box-sizing: border-box;
    clear: none;
}

/* Make all grid rows the same height so cards align neatly */
.posts-grid {
    grid-auto-rows: 1fr;
}

/* Post Card - Optimized for All Devices */
.post-card {
    background: var(--card-bg, #101828) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color, #2D3748) !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Ensure each card fills the grid row for consistent alignment */
.posts-grid .post-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-blue, #2B6EF2);
}

/* Post Thumbnail - Responsive with Aspect Ratio */
.post-thumbnail {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    height: 220px !important;
    overflow: hidden !important;
    position: relative !important;
    background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 100%) !important;
}

.post-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

/* Placeholder Image - Responsive */
.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(43, 110, 242, 0.2), rgba(230, 57, 70, 0.2));
}

.placeholder-icon {
    font-size: clamp(3rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
}

.placeholder-text {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 600;
    opacity: 0.8;
}

/* Post Content - Flexible and Responsive */
.post-content {
    padding: clamp(0.875rem, 2.5vw, 1.25rem);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Post Meta - Responsive Typography */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center; /* keep meta items vertically aligned */
    justify-content: flex-start; /* avoid items jumping outside container */
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    color: var(--text-light, #A0AEC0);
    margin-bottom: 1rem;
}

/* Prevent long meta items (or badly positioned reading-time) from overflowing the card */
.post-meta {
    overflow: hidden; /* clip any accidental overflow */
}

/* Ensure each meta child keeps its intrinsic size and doesn't stretch the row */
.post-meta > * {
    flex: 0 0 auto;
    min-width: 0; /* allow truncation when needed */
}

/* Ensure reading-time doesn't get positioned outside its parent */
.reading-time {
    position: static !important;
    margin-left: 0 !important;
}

/* Keep the reading-time compact and unbreakable */
.reading-time {
    white-space: nowrap !important;
    display: inline-block !important;
}

.post-meta span {
    white-space: nowrap;
}

.post-date,
.post-category,
.reading-time {
    display: inline-block;
}

/* Post Title - Responsive with Line Clamping */
.post-title {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    font-weight: 700;
    margin-bottom: 0.875rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    
    /* Prevent overflow on mobile */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.post-title a {
    color: var(--text-white, #FFFFFF);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--accent-blue, #2B6EF2);
}

/* Post Excerpt - Responsive with Optimal Line Height */
.post-excerpt {
    color: var(--text-light, #A0AEC0);
    font-size: clamp(0.875rem, 1.6vw, 0.95rem);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex: 1;
    
    /* Prevent overflow and maintain readability */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Read More Button - Touch-Friendly on Mobile */
.read-more-btn {
    display: inline-block;
    padding: clamp(0.75rem, 2vw, 0.875rem) clamp(1.5rem, 3vw, 2rem);
    background: linear-gradient(45deg, var(--accent-blue, #2B6EF2), #2563EB);
    color: var(--text-white, #FFFFFF);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    transition: all 0.3s ease;
    align-self: flex-start;
    
    /* Ensure touch-friendly size on mobile */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(43, 110, 242, 0.3);
    background: linear-gradient(45deg, #1e40af, var(--accent-blue, #2B6EF2));
}

/* No Posts State - Responsive */
.no-posts {
    text-align: center;
    padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 3vw, 2rem);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--border-color, #2D3748);
}

.no-posts-icon {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-posts h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
}

.no-posts p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-light, #A0AEC0);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* CRITICAL: Container wrapper for articles grid - isolate pagination */
.articles-grid,
.posts-grid-wrapper {
    width: 100%;
    clear: both;
    overflow: visible;
}

/* Ensure pagination is a full-width block element outside the grid */
.articles-grid ~ .pagination,
.posts-grid ~ .pagination {
    display: block !important;
    clear: both !important;
}

/* Pagination - CRITICAL FIX: Force pagination to bottom, outside grid */
.pagination {
    /* Force pagination out of grid and float contexts */
    display: block !important;
    clear: both !important;
    width: 100% !important;
    
    /* Proper spacing */
    margin-top: 4rem !important;
    margin-bottom: 2rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 2rem 0 !important;
    
    /* Center alignment */
    text-align: center !important;
    
    /* Flexbox for items centering */
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.75rem !important;
    position: relative !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
}

.pagination a,
.pagination span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 10px 16px !important;
    background: var(--card-bg, #101828) !important;
    border: 1px solid var(--border-color, #2D3748) !important;
    border-radius: 6px !important;
    color: var(--text-white, #FFFFFF) !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.pagination a:hover {
    background: var(--accent-blue, #2B6EF2) !important;
    border-color: var(--accent-blue, #2B6EF2) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(43, 110, 242, 0.3) !important;
}

.pagination .current {
    background: var(--accent-blue, #2B6EF2) !important;
    border-color: var(--accent-blue, #2B6EF2) !important;
    font-weight: 700 !important;
}

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

/* Mobile Small (320px - 480px) - Single Column */
@media (max-width: 480px) {
    .posts-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 1rem !important;
    }
    
    .post-card {
        max-width: 100% !important;
    }

    .post-thumbnail {
        height: 180px !important;
    }

    .post-content {
        padding: 1rem !important;
    }
    
    .post-title {
        font-size: 1.1rem !important;
    }
    
    .post-excerpt {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* Slightly reduce title/excerpt when viewport is extremely narrow to avoid vertical overflow */
    .post-content .post-title {
        font-size: 1.15rem !important;
        -webkit-line-clamp: 2 !important;
    }

    .post-content .post-excerpt {
        -webkit-line-clamp: 2 !important;
    }
}

/* Strong mobile enforcement: cap card width and ensure meta stays inside */
@media (max-width: 520px) {
    .posts-grid {
        grid-template-columns: 1fr !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        gap: 1rem !important;
    }

    .posts-grid .post-card {
        max-width: 520px !important; /* match homepage card width feel */
        width: calc(100% - 24px) !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    /* Ensure post-meta does not allow children to escape the card */
    .posts-grid .post-card .post-meta {
        position: relative !important;
        overflow: visible !important;
        width: 100% !important;
    }

    /* Keep reading-time inside the meta row and push it to the right */
    .posts-grid .post-card .post-meta .reading-time {
        margin-left: auto !important;
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        text-align: right !important;
        position: relative !important;
        right: auto !important;
    }

    /* If reading-time is long, truncate it instead of overflowing */
    .posts-grid .post-card .post-meta .reading-time {
        max-width: 30% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* Mobile Large / Phablets (481px - 768px) - Single Column */
@media (min-width: 481px) and (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        padding: 1.5rem;
    }
    
    /* Slightly larger cards on bigger phones */
    .post-card {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* Tablets Portrait (769px - 1024px) - Two Columns */
@media (min-width: 769px) and (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Tablets Landscape / Small Desktops (1025px - 1280px) - Three Columns */
@media (min-width: 1025px) and (max-width: 1280px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Large Desktops (1281px+) - Three Columns with More Space */
@media (min-width: 1281px) {
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
        padding: 2rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .post-card:hover {
        transform: none;
    }
    
    /* Increase touch target sizes */
    .read-more-btn {
        min-height: 48px;
        padding: 1rem 2rem;
    }
    
    .pagination a,
    .pagination span {
        min-width: 48px;
        min-height: 48px;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .post-thumbnail img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .posts-grid {
        display: block;
    }
    
    .post-card {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .post-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* --------------------------------------------------
   Small, focused tweaks requested by user:
   - slightly reduce thumbnail visual height so title/excerpt remain more visible
   - make blog list cards narrower on small phones so they fit like homepage cards
   - add extra horizontal breathing room for single-post content on small screens
   These are intentionally minimal overrides and do not change layout structure.
   -------------------------------------------------- */

/* Slightly shorter thumbnails on narrower viewports so text area remains visible */
@media (max-width: 1200px) {
    .post-thumbnail {
        /* reduce visual height a bit (will be ignored on larger desktop where layout already defines size) */
        aspect-ratio: 16 / 9;
        height: 220px;
    }
}

/* Make cards a bit narrower and centered on phones so they don't appear oversized */
@media (max-width: 480px) {
    .posts-grid {
        padding: 0.75rem; /* small breathing room around grid */
    }

    .post-card {
        /* Prevent cards from exceeding the viewport on small phones */
        max-width: 100% !important;
        margin: 0 auto;   /* center the card */
        padding: 12px;    /* slightly reduced internal padding for compact phones */
    }

    .post-thumbnail {
        height: 140px;    /* keep thumbnails compact on small phones */
        aspect-ratio: 16 / 9;
    }

    /* Increase horizontal breathing room when reading single posts on small screens */
    .single-post {
        /* ensure comfortable left/right padding without changing overall layout */
        padding-left: max(18px, env(safe-area-inset-left, 18px));
        padding-right: max(18px, env(safe-area-inset-right, 18px));
        padding-top: 20px;
        padding-bottom: 20px;
    }

    /* also ensure the article text container has a little extra side padding */
    .single-post .post-content,
    .entry-content {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* --------------------------------------------------
   Single-post spacing polish (center + vertical rhythm)
   - center and constrain single post text so it reads like the editor
   - increase spacing between headings, paragraphs, lists and featured image
   This is intentionally non-structural (CSS only) and scoped to post content.
   -------------------------------------------------- */

.single-post .post-content,
.single .post-content,
.entry-content {
    max-width: 820px;           /* limit measure for readable line-length */
    margin-left: auto;
    margin-right: auto;         /* center content area */
    padding-left: 28px;        /* comfortable side padding on wide screens */
    padding-right: 28px;
}

.single-post .post-content p,
.entry-content p {
    margin-bottom: 1.25rem;    /* extra breathing room between paragraphs */
    line-height: 1.8;          /* slightly more airy lines like editor */
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.post-featured-image {
    margin-bottom: 36px; /* give featured image a bit more separation from content */
}

/* Keep spacing slightly tighter on narrow phones but still comfortable */
@media (max-width: 480px) {
    .single-post .post-content,
    .entry-content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .single-post .post-content p,
    .entry-content p {
        margin-bottom: 1rem;
        line-height: 1.7;
    }

    .entry-content h1,
    .entry-content h2,
    .entry-content h3 {
        margin-top: 1.25rem;
        margin-bottom: 0.5rem;
    }
}

/* --------------------------------------------------
   Fix 1: Prevent post cards from artificially stretching
   - disable flex growth on post content/excerpt so cards size to their content
   Fix 2: Prevent share buttons from overflowing their widget
   - allow buttons to wrap, respect container box-sizing, and limit their max-width
   -------------------------------------------------- */

.posts-grid .post-card {
    height: auto !important; /* allow natural height */
}

.posts-grid .post-card .post-content,
.posts-grid .post-card .post-excerpt {
    flex: 0 0 auto !important; /* stop growing to fill the card */
}

/* Ensure excerpt doesn't force large height by capping its max-height (keeps cards tidy) */
.posts-grid .post-card .post-excerpt {
    max-height: 4.6em; /* roughly 3 lines at normal line-height */
    overflow: hidden;
}

/* Share buttons: wrap and fit inside widgets to avoid breaking the widget border */
.social-share-buttons,
.share-buttons,
.social-share-buttons .share-btn {
    box-sizing: border-box;
}

.social-share-buttons,
.share-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    max-width: 100% !important;
    align-items: center !important;
}

/* Keep individual share buttons from expanding past container */
.social-share-buttons .share-btn,
.share-buttons .share-btn {
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}

/* Stronger enforcement to fix remaining layout issues seen in screenshots */
/* Ensure cards never overflow their container and thumbnails stay centered */
/* REMOVED: padding-left/right 12px constraint - now using responsive padding overrides below */
.posts-grid {
    /* padding-left: 12px !important; */
    /* padding-right: 12px !important; */
}

.posts-grid .post-card {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

.posts-grid .post-card .post-thumbnail img {
    display: block !important;
    object-fit: cover !important;
    object-position: center center !important;
    width: 100% !important;
    height: auto !important; /* let height be controlled by container rules */
    max-width: 100% !important;
}

/* Enforce paragraph/heading spacing and wrapping — use !important to override other theme rules */
.single-post .entry-content p,
.single-post .post-content p,
.entry-content p {
    display: block !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.8 !important;
    white-space: normal !important;
}

.single-post .entry-content h1,
.single-post .entry-content h2,
.single-post .entry-content h3,
.entry-content h1,
.entry-content h2,
.entry-content h3 {
    margin-top: 1.6rem !important;
    margin-bottom: 0.8rem !important;
}

/* Ensure lists break normally */
.entry-content ul,
.entry-content ol {
    white-space: normal !important;
    margin-bottom: 1rem !important;
}

/* Very specific Gutenberg/block-editor overrides to restore editor spacing */
body.single-post .entry-content .wp-block-paragraph,
body.single-post .entry-content p,
body.single .entry-content .wp-block-paragraph,
.single-post .entry-content .wp-block-paragraph,
.entry-content .wp-block-paragraph {
    display: block !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.8 !important;
    white-space: normal !important;
}

body.single-post .entry-content .wp-block-heading,
body.single-post .entry-content h1,
.single-post .entry-content h1,
.entry-content h1,
.entry-content h2,
.entry-content h3 {
    margin-top: 1.6rem !important;
    margin-bottom: 0.8rem !important;
}

/* Mobile: make share buttons wrap into two columns so all options are visible */
@media (max-width: 480px) {
    .social-share-buttons,
    .share-buttons,
    .share-options {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
        margin: 1rem 0 !important;
        padding: 0 !important;
    }

    .social-share-buttons .share-btn,
    .share-buttons .share-btn,
    .share-options .share-btn {
        width: 100% !important;
        min-width: 0 !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 12px 8px !important;
        margin: 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        box-sizing: border-box !important;
    }

    /* reduce card padding a touch so buttons have room */
    .post-card {
        padding: 12px !important;
    }
}





/* Stronger, scoped overrides to further reduce listing thumbnail size
   without changing overall layout. These are intentionally specific so
   they win over more general rules. */
.posts-grid .post-card .post-thumbnail {
    /* desktop/tablet listing thumbnails — make them noticeably smaller */
    height: 200px !important;
    aspect-ratio: 16 / 9 !important;
}

@media (max-width: 768px) {
    .posts-grid .post-card .post-thumbnail {
        /* tablets and large phones */
        height: 160px !important;
    }
}

@media (max-width: 480px) {
    .posts-grid .post-card .post-thumbnail {
        /* small phones — keep thumbnail compact so text area is visible */
        height: 140px !important;
    }
}

/* Ensure the IMG itself is constrained where other rules may be more specific */
.posts-grid .post-card .post-thumbnail img {
    width: 100% !important;
    height: 200px !important;
    max-height: 200px !important;
    object-fit: cover !important;
}

@media (max-width: 768px) {
    .posts-grid .post-card .post-thumbnail img {
        height: 160px !important;
        max-height: 160px !important;
    }
}

@media (max-width: 480px) {
    .posts-grid .post-card .post-thumbnail img {
        height: 140px !important;
        max-height: 140px !important;
    }
}

/* Single post: constrain the featured image height so it doesn't dominate the screen */
.single-post .post-featured-image img,
.post-featured-image img {
    width: 100% !important;
    height: 320px !important;       /* visible reduction from full-bleed */
    max-height: 320px !important;
    object-fit: cover !important;   /* crop instead of scaling to keep composition */
}

@media (max-width: 768px) {
    .single-post .post-featured-image img,
    .post-featured-image img {
        height: 220px !important;
        max-height: 220px !important;
    }
}

@media (max-width: 480px) {
    .single-post .post-featured-image img,
    .post-featured-image img {
        height: 160px !important;
        max-height: 160px !important;
    }
}



/* ================================================
   FIX: Make blog post boxes bigger and share buttons fit properly
   ================================================ */

/* Increase post card content padding for more spacious boxes */
.post-card .post-content {
    padding: 1.8rem !important;
    min-height: auto;
}

/* Make post cards have more breathing room */
.posts-grid {
    gap: 2.5rem !important;
    padding: 2rem 1.5rem !important;
}

.post-card {
    padding: 0 !important;
    margin-bottom: 1rem !important;
}

/* Increase font sizes for better readability */
.post-content .post-title {
    font-size: 1.5rem !important;
    margin-bottom: 1.2rem !important;
}

.post-content .post-excerpt {
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    margin-bottom: 1.5rem !important;
}

.post-content .post-meta {
    font-size: 0.95rem !important;
    margin-bottom: 1.2rem !important;
}

/* FIX: Share buttons container - make it wider to prevent overflow */
.share-this-article {
    margin: 2rem 0 1.5rem 0 !important;
    padding: 1.5rem !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.share-this-article h4 {
    margin-bottom: 1.2rem !important;
    font-size: 1.1rem !important;
}

.share-options {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
}

.share-btn {
    flex: 0 1 auto !important;
    padding: 0.85rem 1.2rem !important;
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
}

/* Mobile: ensure share buttons stack properly */
@media (max-width: 768px) {
    .share-options {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    
    .share-btn {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .post-card .post-content {
        padding: 1.5rem !important;
    }
}

/* Ensure adequate spacing on mobile */
@media (max-width: 480px) {
    .post-card .post-content {
        padding: 1.2rem !important;
    }
    
    .share-this-article {
        padding: 1.2rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .posts-grid {
        gap: 2rem !important;
        padding: 1.5rem 1rem !important;
    }
}


/* ================================================
   CRITICAL FIX: Override all previous padding constraints
   Make blog post grid wider for larger, more spacious cards
   ================================================ */

/* Desktop and tablet - give cards plenty of horizontal space */
@media (min-width: 769px) {
    .posts-grid {
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Large screens - even more space */
@media (min-width: 1025px) {
    .posts-grid {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

/* Extra large screens */
@media (min-width: 1280px) {
    .posts-grid {
        padding-left: 3.5rem !important;
        padding-right: 3.5rem !important;
    }
}

