/* ============================================
   Blog Listing Redesign - Advanced Card Layout
   Moved here from main stylesheet to keep styles scoped to the blog
   ============================================ */
.blog-main .featured-post {
    display: flex;
    gap: 0; /* remove gap so edges meet cleanly */
    align-items: stretch;
    background: #fff; /* unified card background */
    border-radius: 18px;
    overflow: hidden; /* clip inner corners */
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.blog-main .featured-post > a { display:flex; gap:0; align-items:stretch; width:100%; text-decoration:none; color:inherit; }
.blog-main .featured-post .featured-image {
    flex: 0 0 52%;
    overflow: hidden;
    position: relative;
}
.blog-main .featured-post .featured-image img { width:100%; height:100%; object-fit:cover; display:block; }
.blog-main .featured-post .featured-content {
    flex: 1;
    background: transparent; /* parent provides background */
    padding: 2.5rem;
    display:flex;
    flex-direction:column;
    justify-content:center;
}
.blog-main .featured-content .blog-meta { display:flex; gap:1.5rem; color:#8a8a8a; font-size:0.85rem; text-transform:uppercase; letter-spacing:0.06em; margin-bottom:1rem; }
.blog-main .featured-content h2 { font-size:2.25rem; color:#2b2b2b; margin:0 0 0.75rem; font-weight:700; line-height:1.05; }
.blog-main .featured-content p { color:#6b5b6a; font-size:1.05rem; margin-bottom:1.25rem; }
.blog-main .featured-content .read-more { display:inline-block; padding:0.6rem 1rem; border-radius:8px; background:transparent; color:var(--primary-color); border:1px solid rgba(58,37,55,0.06); font-weight:700; text-transform:uppercase; letter-spacing:0.06em; }

/* Blog list card layout */
.blog-list-item { background: transparent; border-radius: 14px; overflow: visible; }
.blog-list-item a { display:flex; gap:1.25rem; align-items:stretch; text-decoration:none; color:inherit; }
.blog-list-image { flex:0 0 40%; max-width: 420px; border-radius: 12px; overflow:hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.04); }
.blog-list-image img { width:100%; height:100%; object-fit:cover; display:block; border-radius:12px; }
.blog-list-content { flex:1; background:#fff; border-radius:12px; padding:1.5rem; display:flex; flex-direction:column; justify-content:center; box-shadow: 0 6px 18px rgba(0,0,0,0.04); }
.blog-list-content .blog-meta { font-size:0.9rem; color:#8a8a8a; margin-bottom:0.5rem; display:flex; gap:1rem; align-items:center; }
.list-title { font-size:1.35rem; color:#2b2b2b; margin: 0 0 .5rem; font-weight:700; }
.list-excerpt { margin:0 0 1rem; color:#6b5b6a; }
.list-actions .btn.btn-outline { background:transparent; border:1px solid rgba(58,37,55,0.06); color:var(--primary-color); font-weight:700; padding:0.5rem 0.85rem; border-radius:8px; }

/* Smaller screens: stack featured and list items */
@media (max-width: 992px) {
    .blog-main .featured-post { flex-direction: column; }
    .blog-main .featured-post .featured-image { flex: 0 0 100%; }
    .blog-main .featured-post .featured-content { border-radius: 12px; padding: 1.25rem; }
    .blog-list-item a { flex-direction: column; }
    .blog-list-image { flex: 0 0 100%; max-width: 100%; }
    .blog-list-image img { height: 320px; }
    .blog-list-content { padding: 1rem; margin-top: 1rem; }
}

/* Enhanced card polish */
.blog-main .featured-post,
.blog-list-item {
    transition: transform 280ms ease, box-shadow 280ms ease;
}

.blog-main .featured-post:hover,
.blog-list-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.10);
}

.blog-list-item a:focus-visible,
.blog-main .featured-post > a:focus-visible {
    outline: 3px solid rgba(58,37,55,0.08);
    outline-offset: 6px;
}

/* Slight parallax image zoom on hover */
.blog-list-image img,
.blog-main .featured-post .featured-image img {
    transition: transform 420ms cubic-bezier(0.2,0.9,0.2,1);
    will-change: transform;
}
.blog-list-item:hover .blog-list-image img,
.blog-main .featured-post:hover .featured-image img {
    transform: scale(1.04) translateZ(0);
}

/* Subtle decorative stripe on content cards */
.blog-list-content::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(58,37,55,0.08), rgba(58,37,55,0.02));
    transform-origin: left center;
}

/* Positioning context for pseudo-element */
.blog-list-content,
.blog-main .featured-content { position: relative; }

/* Meta badges and chips */
.blog-meta span { display: inline-flex; align-items: center; gap: 0.5rem; }
.blog-meta .meta-tag {
    background: rgba(58,37,55,0.06);
    color: #3a2537;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.78rem;
}

/* Ensure featured badge sits above image and card */
.featured-badge { z-index: 5; position: absolute; }

/* Read action more prominent */
.blog-list-content .btn.btn-outline { align-self: flex-start; box-shadow: 0 6px 18px rgba(58,37,55,0.04); }
.blog-main .featured-content .read-more { box-shadow: 0 6px 18px rgba(58,37,55,0.04); }

/* Small screens: reduce visual noise */
@media (max-width: 640px) {
    .blog-main .featured-content h2 { font-size: 1.6rem; }
    .blog-main .featured-content p { font-size: 0.98rem; }
    .list-title { font-size: 1.15rem; }
}

/* Read action hover polish */
.blog-main .featured-content .read-more,
.blog-list-content .btn.btn-outline {
    transition: all 220ms cubic-bezier(0.2,0.9,0.2,1);
}
.blog-main .featured-content .read-more:hover,
.blog-list-content .btn.btn-outline:hover {
    background: linear-gradient(90deg, rgba(58,37,55,0.95), rgba(88,60,70,0.95));
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(58,37,55,0.16);
    border-color: transparent;
}

/* Badge tweaks */
.featured-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 0.45rem 0.8rem;
    background: var(--primary-dark);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Decorative stripe adjustments: color & width */
.blog-list-content::before {
    width: 6px;
    background: linear-gradient(180deg, rgba(58,37,55,0.12), rgba(58,37,55,0.03));
}

/* Popular posts & related cards unified treatment */
.popular-posts li a,
.related-scroll .design-card,
.popular-posts li {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 0.6rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
    transition: transform 220ms ease, box-shadow 220ms ease;
    text-decoration: none;
    color: inherit;
}
.popular-posts li a:hover,
.related-scroll .design-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}
.popular-posts img { width:72px; height:56px; object-fit:cover; border-radius:8px; }
.related-scroll .design-card { background: #fff; border-radius: 12px; overflow: hidden; }
.related-scroll .design-card .design-image img { height: 180px; object-fit: cover; }

/* ============================================
   Blog Post Content Styles (Tables, Lists, etc.)
   ============================================ */

/* Table styles in blog post content */
.post-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    border: 1px solid #dee2e6;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-radius: 8px;
    overflow: hidden;
}

.post-content table td,
.post-content table th {
    border: 1px solid #dee2e6;
    padding: 12px 16px;
    text-align: left;
}

.post-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2b2b2b;
}

.post-content table tr:nth-child(even) {
    background-color: #fafbfc;
}

.post-content table tr:hover {
    background-color: #f0f2f5;
}

/* List styles in blog post content */
.post-content ul,
.post-content ol {
    margin: 15px 0;
    padding-left: 40px;
    line-height: 1.8;
}

.post-content ul li,
.post-content ol li {
    margin: 8px 0;
    line-height: 1.8;
}

/* Note: Inline styles on list items (e.g., style="color:red") will automatically 
   override any CSS rules because inline styles have the highest specificity */

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content ul ul {
    list-style-type: circle;
    margin: 5px 0;
}

.post-content ol ol {
    list-style-type: lower-alpha;
    margin: 5px 0;
}

/* Paragraph and text spacing */
.post-content p {
    margin: 15px 0;
    line-height: 1.8;
    color: #4a4a4a;
}

/* Headings in post content */
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin: 25px 0 15px 0;
    font-weight: 600;
    line-height: 1.3;
    color: #2b2b2b;
}

.post-content h1 { font-size: 2.2rem; }
.post-content h2 { font-size: 1.9rem; }
.post-content h3 { font-size: 1.6rem; }
.post-content h4 { font-size: 1.4rem; }
.post-content h5 { font-size: 1.2rem; }
.post-content h6 { font-size: 1.1rem; }

/* Blockquote styling */
.post-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    border-left: 4px solid #85a380;
    background: #f8f9fa;
    font-style: italic;
    color: #555;
}

/* Code blocks */
.post-content pre {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

.post-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Images in content */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Links in content */
.post-content a {
    color: #85a380;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.post-content a:hover {
    color: #3a2537;
}

/* Horizontal rule */
.post-content hr {
    margin: 30px 0;
    border: none;
    border-top: 2px solid #e0e0e0;
}

