/**
 * Rosewood Industrial Platform — Blog
 *
 * @package Rosewood
 * @version 2.1.0
 */

/* ═══════ BLOG HERO ═══════ */

.rw-blog-hero {
    background: #1C1C1E;
    padding: 56px 0 48px;
    position: relative;
    overflow: hidden;
}
.rw-blog-hero-accent {
    position: absolute; top: 0; right: 0;
    width: 350px; height: 100%;
    background: linear-gradient(135deg, transparent 50%, rgba(230,51,41,0.08) 100%);
    pointer-events: none;
}
.rw-blog-hero .container { position: relative; z-index: 2; }

.rw-blog-hero-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    flex-wrap: wrap;
}

.rw-blog-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.1;
}

.rw-blog-hero-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: rgba(255,255,255,0.4);
    max-width: 480px;
    line-height: 1.7;
    margin: 0;
}

.rw-blog-hero-count { text-align: center; flex-shrink: 0; }
.rw-blog-count-num {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 36px; font-weight: 800; color: #E63329; line-height: 1;
}
.rw-blog-count-label {
    font-family: 'Outfit', sans-serif;
    font-size: 10px; color: rgba(255,255,255,0.4);
    text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; display: block;
}

/* ═══════ BLOG GRID ═══════ */

.rw-blog-content { padding: 48px 0 64px; background: #faf9f8; }

.rw-blog-grid {
    display: grid;
    grid-template-columns: repeat(var(--rw-blog-cols, 3), 1fr);
    gap: 28px;
}

.rw-blog-card {
    background: #fff;
    border: 1px solid #e8e6e3;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.rw-blog-card:hover {
    border-color: #E63329;
    box-shadow: 0 8px 28px rgba(0,0,0,0.05);
}

.rw-blog-card-link { display: block; text-decoration: none; color: inherit; }

.rw-blog-card-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #eee;
}
.rw-blog-card-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}
.rw-blog-card:hover .rw-blog-card-img img { transform: scale(1.03); }

.rw-blog-card-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; background: linear-gradient(135deg, #f8f7f5, #eeedeb);
    font-size: 32px; opacity: 0.5;
}
.rw-blog-card-placeholder-sm {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: #f4f3f1; font-size: 16px;
}

.rw-blog-card-cat-badge {
    position: absolute; top: 12px; left: 12px;
    padding: 3px 10px;
    background: #E63329; color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    z-index: 2;
}

.rw-blog-card-info { padding: 22px 24px 26px; }

.rw-blog-card-meta {
    font-family: 'Outfit', sans-serif;
    font-size: 11px; color: #999; margin-bottom: 8px;
}
.rw-blog-card-meta-sep { margin: 0 6px; }

.rw-blog-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px; font-weight: 600; color: #1C1C1E;
    margin: 0 0 8px; line-height: 1.35;
}

.rw-blog-card-excerpt {
    font-family: 'Outfit', sans-serif;
    font-size: 13px; color: #888; line-height: 1.6; margin: 0 0 14px;
}

.rw-blog-card-read {
    font-family: 'Outfit', sans-serif;
    font-size: 11px; font-weight: 600; color: #E63329;
    letter-spacing: 0.04em;
}

/* ═══════ BLOG PAGINATION ═══════ */

.rw-blog-pagination { margin-top: 40px; text-align: center; }
.rw-blog-pagination .nav-links { display: flex; justify-content: center; gap: 6px; }
.rw-blog-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 600;
    color: #555; border: 1px solid #e8e6e3;
    text-decoration: none; transition: all 0.2s ease;
}
.rw-blog-pagination .page-numbers.current,
.rw-blog-pagination .page-numbers:hover { background: #1C1C1E; color: #fff; border-color: #1C1C1E; }
.rw-blog-pagination .prev,
.rw-blog-pagination .next { width: auto; padding: 0 16px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }

.rw-blog-empty { text-align: center; padding: 80px 0; }
.rw-blog-empty h2 { font-family: 'Outfit', sans-serif; font-size: 24px; color: #1C1C1E; margin: 0 0 8px; }
.rw-blog-empty p { font-family: 'Outfit', sans-serif; font-size: 14px; color: #888; margin: 0 0 24px; }

/* ═══════ SINGLE POST HEADER ═══════ */

.rw-post-header {
    padding: 40px 0 32px;
    background: #fff;
    border-bottom: 1px solid #e8e6e3;
}

.rw-post-header-inner { max-width: 720px; }

.rw-post-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #E63329; color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    text-decoration: none; margin-bottom: 16px;
    transition: background 0.2s ease;
}
.rw-post-category-badge:hover { background: #cc2920; color: #fff; }

.rw-post-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700; color: #1C1C1E;
    margin: 0 0 16px; line-height: 1.2;
}

.rw-post-meta {
    display: flex; align-items: center; gap: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 13px; color: #999; flex-wrap: wrap;
}
.rw-post-meta-sep { margin: 0 10px; color: #ddd; }

.rw-post-author-chip {
    display: flex; align-items: center; gap: 8px;
}
.rw-post-avatar { border-radius: 50%; }
.rw-post-author-name { font-weight: 600; color: #1C1C1E; }

/* ═══════ FEATURED IMAGE ═══════ */

.rw-post-featured-image { padding: 32px 0 0; background: #fff; }

.rw-post-featured-wrap {
    max-width: 720px; overflow: hidden; border: 1px solid #e8e6e3;
    max-height: 400px;
}
.rw-post-featured-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ═══════ POST CONTENT LAYOUT ═══════ */

.rw-post-article { padding: 48px 0 64px; background: #fff; }

.rw-post-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 56px;
    align-items: start;
}

/* Content column */
.rw-post-content {
    max-width: 720px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px; color: #333; line-height: 1.85;
}
.rw-post-content h2 { font-size: 26px; font-weight: 700; color: #1C1C1E; margin: 40px 0 16px; }
.rw-post-content h3 { font-size: 22px; font-weight: 700; color: #1C1C1E; margin: 32px 0 12px; }
.rw-post-content h4 { font-size: 18px; font-weight: 600; color: #1C1C1E; margin: 28px 0 10px; }
.rw-post-content p { margin: 0 0 20px; }
.rw-post-content img { max-width: 100%; height: auto; border: 1px solid #e8e6e3; }
.rw-post-content blockquote {
    border-left: 3px solid #E63329; padding: 20px 28px; margin: 28px 0;
    background: #faf9f8; font-style: italic; color: #555;
}
.rw-post-content blockquote p { margin: 0; }
.rw-post-content ul, .rw-post-content ol { padding-left: 24px; margin: 0 0 20px; }
.rw-post-content li { margin-bottom: 6px; }
.rw-post-content a { color: #E63329; text-decoration: underline; }
.rw-post-content a:hover { color: #cc2920; }

/* Tags */
.rw-post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0; padding-top: 24px; border-top: 1px solid #e8e6e3; }
.rw-post-tag {
    display: inline-block; padding: 5px 14px;
    font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 500;
    color: #555; background: #f4f3f1; text-decoration: none;
    transition: all 0.2s ease;
}
.rw-post-tag:hover { background: #1C1C1E; color: #fff; }

/* Share */
.rw-post-share {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 0; border-top: 1px solid #e8e6e3;
}
.rw-post-share-label {
    font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 700;
    color: #999; text-transform: uppercase; letter-spacing: 0.1em;
}
.rw-share-link {
    font-family: 'Outfit', sans-serif; font-size: 12px; font-weight: 600;
    color: #555; text-decoration: none; transition: color 0.2s ease;
}
.rw-share-link:hover { color: #E63329; }

/* ═══════ POST SIDEBAR ═══════ */

.rw-post-sidebar-inner {
    position: sticky; top: 88px;
    display: flex; flex-direction: column; gap: 20px;
}

/* Author card */
.rw-author-card {
    background: #f4f3f1; border: 1px solid #e8e6e3;
    padding: 24px; text-align: center;
}
.rw-author-avatar { border-radius: 50%; margin-bottom: 12px; }
.rw-author-name {
    font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700;
    color: #1C1C1E; margin: 0 0 6px;
}
.rw-author-bio {
    font-family: 'Outfit', sans-serif; font-size: 12px;
    color: #888; line-height: 1.6; margin: 0;
}

/* Recent posts sidebar */
.rw-sidebar-title {
    font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 700;
    color: #1C1C1E; margin: 0 0 14px;
    text-transform: uppercase; letter-spacing: 0.06em;
}

/* Sidebar CTA card */
.rw-sidebar-cta {
    background: #1C1C1E;
    padding: 28px 24px;
    text-align: center;
}
.rw-sidebar-cta h5 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px; font-weight: 700;
    color: #fff; margin: 0 0 8px;
}
.rw-sidebar-cta p {
    font-family: 'Outfit', sans-serif;
    font-size: 13px; color: rgba(255,255,255,0.5);
    line-height: 1.6; margin: 0 0 20px;
}
.rw-sidebar-cta .rw-btn-primary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #E63329;
    color: #fff;
    text-decoration: none;
    border: none;
    margin-bottom: 14px;
    transition: background 0.2s ease;
    box-sizing: border-box;
}
.rw-sidebar-cta .rw-btn-primary:hover { background: #cc2920; color: #fff; }
.rw-sidebar-phone {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 14px; font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.rw-sidebar-phone:hover { color: #fff; }

/* Recent posts sidebar */
.rw-sidebar-recent { background: #fff; border: 1px solid #e8e6e3; padding: 20px; }

.rw-sidebar-recent-item {
    display: flex; gap: 12px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid #f0efed;
    text-decoration: none; color: inherit;
    transition: color 0.2s ease;
}
.rw-sidebar-recent-item:last-child { border-bottom: none; }
.rw-sidebar-recent-item:hover { color: #E63329; }

.rw-sidebar-recent-img {
    width: 56px; height: 56px; flex-shrink: 0;
    overflow: hidden; background: #eee; border: 1px solid #e8e6e3;
}
.rw-sidebar-recent-img img { width: 100%; height: 100%; object-fit: cover; }

.rw-sidebar-recent-item h5 {
    font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 600;
    color: inherit; margin: 0 0 3px; line-height: 1.3;
}
.rw-sidebar-recent-item time {
    font-family: 'Outfit', sans-serif; font-size: 11px; color: #aaa;
}

/* Sidebar search */
.rw-sidebar-search {
    background: #fff; border: 1px solid #e8e6e3; padding: 20px;
}
.rw-sidebar-search-form {
    display: flex; gap: 0;
}
.rw-sidebar-search-input {
    flex: 1; border: 1px solid #e8e6e3; border-right: none;
    padding: 10px 14px; font-family: 'Outfit', sans-serif;
    font-size: 13px; outline: none;
    transition: border-color 0.2s;
}
.rw-sidebar-search-input:focus { border-color: #E63329; }
.rw-sidebar-search-btn {
    background: #E63329; border: none; color: #fff;
    padding: 10px 16px; cursor: pointer;
    transition: background 0.2s;
}
.rw-sidebar-search-btn:hover { background: #cc2920; }

/* Sidebar categories */
.rw-sidebar-categories {
    background: #fff; border: 1px solid #e8e6e3; padding: 20px;
}
.rw-sidebar-cat-list {
    list-style: none; margin: 0; padding: 0;
}
.rw-sidebar-cat-list li {
    border-bottom: 1px solid #f0efed;
}
.rw-sidebar-cat-list li:last-child { border-bottom: none; }
.rw-sidebar-cat-list a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 9px 0; font-family: 'Outfit', sans-serif;
    font-size: 13px; font-weight: 500; color: #444;
    text-decoration: none; transition: color 0.2s;
}
.rw-sidebar-cat-list a:hover { color: #E63329; }
.rw-sidebar-cat-count {
    background: #f4f3f1; border: 1px solid #e8e6e3;
    font-size: 10px; font-weight: 600; color: #999;
    padding: 2px 8px; border-radius: 10px;
}

/* ═══════ COMMENTS ═══════ */

.rw-post-comments-section {
    padding: 48px 0; background: #faf9f8;
    border-top: 1px solid #e8e6e3;
}
.rw-post-comments-wrap { max-width: 720px; }

/* ═══════ PAGE HEADER OVERRIDE ═══════ */

.blog .page-header,
.single-post .page-header,
.archive .page-header,
.search .page-header,
.category .page-header,
.tag .page-header,
.blog #page-header,
.single-post #page-header,
.archive:not(.post-type-archive-product):not(.post-type-archive-ot_portfolio) #page-header {
    display: none !important;
}

/* ═══════ RESPONSIVE ═══════ */

@media (max-width: 1024px) {
    .rw-post-layout { grid-template-columns: 1fr; }
    .rw-post-sidebar-inner { position: static; }
}

@media (max-width: 768px) {
    .rw-blog-grid { grid-template-columns: 1fr; }
    .rw-blog-hero-inner { flex-direction: column; align-items: flex-start; }
    .rw-post-header-inner { max-width: 100%; }
    .rw-post-featured-wrap { max-width: 100%; }
}
