/**
 * Red Rocket Digital - Blog Styles
 * Styles for blog archive, single posts, categories, and search
 * Version: 2.5.0
 */

/* ============================================
   BLOG HERO SECTION
   ============================================ */

.blog-hero {
    background: var(--rr-gradient, linear-gradient(135deg, #1e1666 0%, #1e3497 100%));
    padding: 80px 20px;
    text-align: center;
    color: #fff;
}

.blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero h1 {
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 20px;
    line-height: 1.2;
}

.blog-hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.6;
}

.archive-hero .archive-label {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.archive-hero .archive-label i {
    margin-right: 8px;
}

.archive-hero .archive-count {
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.8;
}

/* ============================================
   BLOG LAYOUT
   ============================================ */

.blog-wrapper {
    background: #f8f9fa;
    padding: 60px 20px;
}

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

.blog-main {
    min-width: 0;
}

/* ============================================
   BLOG CARDS GRID
   ============================================ */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(30, 22, 102, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(30, 22, 102, 0.15);
}

.blog-card-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1666 0%, #1e3497 100%);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.blog-card-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-placeholder {
    color: rgba(255,255,255,0.5);
    font-size: 48px;
}

.blog-card-content {
    padding: 25px;
}

.blog-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.blog-category-tag {
    display: inline-block;
    background: rgba(255, 108, 38, 0.1);
    color: #ff6c26;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-category-tag:hover {
    background: #ff6c26;
    color: #fff;
}

.post-type-tag {
    background: rgba(30, 22, 102, 0.1);
    color: #1e1666;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 12px;
}

.blog-card-title a {
    color: #1e1666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: #ff6c26;
}

.blog-card-excerpt {
    color: #6a7c92;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #a0aec0;
    font-size: 13px;
    margin-bottom: 15px;
}

.blog-card-meta i {
    margin-right: 5px;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    color: #ff6c26;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-card-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.blog-card-link:hover {
    color: #1e1666;
}

.blog-card-link:hover i {
    transform: translateX(4px);
}

/* ============================================
   BLOG SIDEBAR
   ============================================ */

.blog-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(30, 22, 102, 0.08);
}

.sidebar-widget h3 {
    font-size: 18px;
    color: #1e1666;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

/* Search Widget */
.search-form {
    display: flex;
    gap: 0;
}

.search-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-field:focus {
    border-color: #ff6c26;
}

.search-submit {
    padding: 12px 18px;
    background: linear-gradient(135deg, #ff6c26 0%, #ff8c4a 100%);
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: linear-gradient(135deg, #e55a1a 0%, #ff6c26 100%);
}

/* Categories Widget */
.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.categories-list li {
    border-bottom: 1px solid #f0f0f0;
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: #6a7c92;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.categories-list li a:hover {
    color: #ff6c26;
    padding-left: 8px;
}

.categories-list li.current-cat a {
    color: #ff6c26;
    font-weight: 600;
}

.category-count {
    background: #f0f0f0;
    color: #6a7c92;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.categories-list li a:hover .category-count {
    background: #ff6c26;
    color: #fff;
}

/* Recent Posts Widget */
.recent-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.recent-posts-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.recent-posts-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-posts-list li a {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.recent-post-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.recent-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-title {
    display: block;
    color: #1e1666;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.recent-posts-list li a:hover .recent-post-title {
    color: #ff6c26;
}

.recent-post-date {
    display: block;
    color: #a0aec0;
    font-size: 12px;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, #1e1666 0%, #1e3497 100%);
    color: #fff;
    text-align: center;
}

.cta-widget h3 {
    color: #fff;
    border-color: rgba(255,255,255,0.2);
}

.cta-widget p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.cta-widget .btn-primary {
    width: 100%;
    padding: 12px 20px;
}

/* Back Widget */
.back-widget {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.back-to-blog {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6a7c92;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-to-blog:hover {
    color: #ff6c26;
    border-color: #ff6c26;
}

/* ============================================
   BLOG PAGINATION
   ============================================ */

.blog-pagination {
    margin-top: 50px;
    text-align: center;
}

.blog-pagination ul {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
}

.blog-pagination li {
    margin: 0;
}

.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: #fff;
    color: #6a7c92;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.blog-pagination a:hover {
    background: #ff6c26;
    color: #fff;
}

.blog-pagination span.current {
    background: #1e1666;
    color: #fff;
}

.blog-pagination .prev,
.blog-pagination .next {
    padding: 0 20px;
}

.blog-pagination i {
    font-size: 12px;
}

.blog-pagination .prev i {
    margin-right: 8px;
}

.blog-pagination .next i {
    margin-left: 8px;
}

/* ============================================
   NO POSTS STATE
   ============================================ */

.blog-no-posts {
    background: #fff;
    border-radius: 12px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(30, 22, 102, 0.08);
}

.no-posts-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #1e1666 0%, #1e3497 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.no-posts-icon i {
    font-size: 40px;
    color: #fff;
}

.blog-no-posts h2 {
    color: #1e1666;
    margin: 0 0 15px;
}

.blog-no-posts p {
    color: #6a7c92;
    font-size: 16px;
    max-width: 400px;
    margin: 0 auto 25px;
}

.search-again-form {
    max-width: 400px;
    margin: 0 auto 25px;
}

.search-again-form .search-field {
    border-radius: 8px;
    border-right: 2px solid #e0e0e0;
    margin-bottom: 15px;
}

.search-again-form .btn {
    width: 100%;
}

.no-results-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   SINGLE POST STYLES
   ============================================ */

.single-post-hero {
    background: var(--rr-gradient, linear-gradient(135deg, #1e1666 0%, #1e3497 100%));
    padding: 80px 20px;
    text-align: center;
    color: #fff;
}

.single-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.single-post-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.single-post-categories .blog-category-tag {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.single-post-categories .blog-category-tag:hover {
    background: #fff;
    color: #ff6c26;
}

.single-post-hero h1 {
    color: #fff;
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 25px;
    line-height: 1.25;
}

.single-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 15px;
    opacity: 0.9;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-separator {
    opacity: 0.5;
}

/* Single Post Content */
.single-post-wrapper {
    background: #f8f9fa;
    padding: 60px 20px;
}

.single-post-container {
    max-width: 800px;
    margin: 0 auto;
}

.single-post-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(30, 22, 102, 0.08);
    overflow: hidden;
}

.single-post-featured-image {
    margin: -12px -12px 0;
}

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

.single-post-body {
    padding: 40px;
    font-size: 17px;
    line-height: 1.8;
    color: #4a5568;
}

.single-post-body h2 {
    font-size: 28px;
    margin: 40px 0 20px;
    color: #1e1666;
}

.single-post-body h3 {
    font-size: 22px;
    margin: 35px 0 15px;
    color: #1e1666;
}

.single-post-body h4 {
    font-size: 18px;
    margin: 30px 0 15px;
    color: #1e1666;
}

.single-post-body p {
    margin: 0 0 20px;
}

.single-post-body ul,
.single-post-body ol {
    margin: 0 0 20px;
    padding-left: 25px;
}

.single-post-body li {
    margin-bottom: 10px;
}

.single-post-body blockquote {
    margin: 30px 0;
    padding: 25px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-left: 4px solid #ff6c26;
    font-style: italic;
    font-size: 18px;
    color: #1e1666;
}

.single-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
}

.single-post-body a {
    color: #ff6c26;
    text-decoration: underline;
}

.single-post-body a:hover {
    color: #1e1666;
}

/* Tags */
.single-post-tags {
    padding: 0 40px 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tags-label {
    color: #1e1666;
    font-weight: 600;
}

.tags-label i {
    margin-right: 5px;
}

.tag-links a {
    display: inline-block;
    background: #f0f0f0;
    color: #6a7c92;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.tag-links a:hover {
    background: #ff6c26;
    color: #fff;
}

/* Share Buttons */
.single-post-share {
    padding: 25px 40px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-label {
    color: #1e1666;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.share-facebook {
    background: #1877f2;
}

.share-twitter {
    background: #1da1f2;
}

.share-linkedin {
    background: #0077b5;
}

.share-email {
    background: #6a7c92;
}

/* Post Navigation */
.single-post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.post-nav-link {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(30, 22, 102, 0.08);
    transition: all 0.3s ease;
}

.post-nav-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(30, 22, 102, 0.15);
}

.post-nav-prev {
    text-align: left;
}

.post-nav-next {
    text-align: right;
}

.post-nav-empty {
    visibility: hidden;
}

.nav-label {
    display: block;
    color: #ff6c26;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.nav-title {
    display: block;
    color: #1e1666;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.post-nav-link:hover .nav-title {
    color: #ff6c26;
}

/* Related Posts */
.related-posts-section {
    margin-top: 60px;
}

.related-posts-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

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

.related-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(30, 22, 102, 0.08);
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(30, 22, 102, 0.15);
}

.related-post-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 20px;
}

.related-post-content h3 {
    font-size: 16px;
    margin: 0 0 8px;
    line-height: 1.4;
}

.related-post-content h3 a {
    color: #1e1666;
    text-decoration: none;
}

.related-post-content h3 a:hover {
    color: #ff6c26;
}

.related-post-date {
    color: #a0aec0;
    font-size: 13px;
}

/* Single Post CTA */
.single-post-cta {
    margin-top: 60px;
    background: linear-gradient(135deg, #1e1666 0%, #1e3497 100%);
    border-radius: 12px;
    padding: 50px 40px;
    text-align: center;
    color: #fff;
}

.single-post-cta h2 {
    color: #fff;
    margin: 0 0 15px;
    font-size: 28px;
}

.single-post-cta p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0 0 25px;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media (max-width: 1024px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .blog-sidebar .sidebar-widget:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 60px 20px;
    }
    
    .blog-hero h1 {
        font-size: 32px;
    }
    
    .blog-wrapper {
        padding: 40px 15px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar .sidebar-widget:last-child {
        grid-column: span 1;
    }
    
    .single-post-hero h1 {
        font-size: 28px;
    }
    
    .single-post-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .meta-separator {
        display: none;
    }
    
    .single-post-body {
        padding: 25px;
        font-size: 16px;
    }
    
    .single-post-body h2 {
        font-size: 24px;
    }
    
    .single-post-tags,
    .single-post-share {
        padding: 20px 25px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .single-post-navigation {
        grid-template-columns: 1fr;
    }
    
    .post-nav-next {
        text-align: left;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .single-post-cta {
        padding: 40px 25px;
    }
    
    .single-post-cta h2 {
        font-size: 24px;
    }
    
    .blog-pagination ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .blog-pagination .prev,
    .blog-pagination .next {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 26px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-title {
        font-size: 18px;
    }
    
    .single-post-hero h1 {
        font-size: 24px;
    }
    
    .single-post-body {
        padding: 20px;
    }
    
    .single-post-body blockquote {
        padding: 20px;
    }
}
