/**
 * Royal Pizza Blog Enhancer Styles
 * Modern, tidy blog layout with full-width design
 */

/* Remove sidebar but keep theme container width */
body.rpbe-blog-page .content-area,
body.no-sidebar .content-area {
    width: 100%;
    float: none;
}

body.rpbe-blog-page .site-content,
body.no-sidebar .site-content {
    display: block;
}

/* Hide sidebar completely */
body.rpbe-blog-page .widget-area,
body.no-sidebar .widget-area {
    display: none !important;
}

/* Ensure header and footer containers match home page exactly */
/* Storefront uses .col-full for containers - ensure they're properly constrained */
body.rpbe-blog-page .site-header .col-full,
body.rpbe-blog-page .site-footer .col-full,
body.rpbe-blog-page .storefront-primary-navigation .col-full,
body.no-sidebar .site-header .col-full,
body.no-sidebar .site-footer .col-full,
body.no-sidebar .storefront-primary-navigation .col-full {
    /* Match Storefront's default .col-full styling */
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2.617924em;
    padding-right: 2.617924em;
    width: 100%;
    box-sizing: border-box;
}

/* Blog Archive Styles */
.rpbe-blog-wrapper {
    width: 100%;
    padding: 10px 0;
}

.rpbe-blog-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.rpbe-page-header {
    margin-bottom: 10px;
    text-align: center;
}

.rpbe-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.2;
}

/* Posts List - Vertical Stacked Layout */
.rpbe-posts-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 60px;
}

/* Post Card - Landscape Layout */
.rpbe-post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.rpbe-post-card.rpbe-post-landscape {
    flex-direction: row;
    align-items: stretch;
}

.rpbe-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.rpbe-post-thumbnail {
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.rpbe-post-landscape .rpbe-post-thumbnail {
    width: 40%;
    height: auto;
    min-height: 280px;
    flex-shrink: 0;
}

.rpbe-post-landscape .rpbe-featured-image {
    height: 100%;
    min-height: 280px;
}

.rpbe-post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.rpbe-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.rpbe-post-card:hover .rpbe-featured-image {
    transform: scale(1.05);
}

.rpbe-post-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.rpbe-post-landscape .rpbe-post-content {
    width: 60%;
}

.rpbe-post-header {
    margin-bottom: 15px;
}

.rpbe-post-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.rpbe-post-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rpbe-post-title a:hover {
    color: #8B5CF6;
}

.rpbe-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 15px;
}

.rpbe-post-date,
.rpbe-post-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rpbe-post-date svg,
.rpbe-post-author svg {
    flex-shrink: 0;
}

.rpbe-post-author a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rpbe-post-author a:hover {
    color: #8B5CF6;
}

.rpbe-post-excerpt {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

.rpbe-post-excerpt p {
    margin: 0;
}

.rpbe-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.rpbe-post-categories {
    font-size: 0.875rem;
    color: #6b7280;
}

.rpbe-meta-label {
    font-weight: 500;
}

.rpbe-post-categories a {
    color: #8B5CF6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rpbe-post-categories a:hover {
    color: #7C3AED;
    text-decoration: underline;
}

.rpbe-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #8B5CF6;
    font-weight: 500;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.rpbe-read-more:hover {
    color: #7C3AED;
    gap: 10px;
}

.rpbe-read-more svg {
    flex-shrink: 0;
}

/* Pagination */
.rpbe-pagination {
    margin-top: 60px;
    text-align: center;
}

.rpbe-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rpbe-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.rpbe-pagination .page-numbers:hover,
.rpbe-pagination .page-numbers.current {
    background: #8B5CF6;
    color: #ffffff;
    border-color: #8B5CF6;
}

/* No Posts */
.rpbe-no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

/* Single Post Styles */
.rpbe-single-wrapper {
    width: 100%;
    padding: 10px 0;
}

.rpbe-single-container {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.rpbe-single-post {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 50px;
}

@media (max-width: 768px) {
    .rpbe-single-post {
        padding: 30px 20px;
    }
}

.rpbe-single-header {
    margin-bottom: 40px;
}

.rpbe-single-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.rpbe-category-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f3f4f6;
    color: #8B5CF6;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.rpbe-category-tag:hover {
    background: #8B5CF6;
    color: #ffffff;
}

.rpbe-single-title {
    font-size: 2.75rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 25px 0;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .rpbe-single-title {
        font-size: 2rem;
    }
}

.rpbe-single-meta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rpbe-single-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rpbe-author-avatar {
    flex-shrink: 0;
}

.rpbe-author-avatar a {
    display: block;
    transition: transform 0.2s ease;
}

.rpbe-author-avatar a:hover {
    transform: scale(1.05);
}

.rpbe-author-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.rpbe-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rpbe-author-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rpbe-author-name:hover {
    color: #8B5CF6;
}

.rpbe-author-date {
    font-size: 0.875rem;
    color: #6b7280;
}

.rpbe-single-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #6b7280;
}

.rpbe-single-thumbnail {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.rpbe-single-featured-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.rpbe-single-header {
    margin-bottom: 40px;
    padding-top: 0;
}

.rpbe-single-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 40px;
}

.rpbe-single-content p {
    margin-bottom: 1.5em;
}

.rpbe-single-content h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 2em 0 1em 0;
}

.rpbe-single-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 1.5em 0 1em 0;
}

.rpbe-single-content ul,
.rpbe-single-content ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.rpbe-single-content li {
    margin-bottom: 0.5em;
}

.rpbe-single-content a {
    color: #8B5CF6;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.rpbe-single-content a:hover {
    color: #7C3AED;
}

.rpbe-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2em 0;
}

.rpbe-page-links {
    margin-top: 2em;
    padding-top: 2em;
    border-top: 1px solid #e5e7eb;
}

.rpbe-single-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.rpbe-single-tags {
    font-size: 0.9375rem;
    color: #6b7280;
}

.rpbe-tags-label {
    font-weight: 500;
    margin-right: 8px;
}

.rpbe-single-tags a {
    color: #8B5CF6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rpbe-single-tags a:hover {
    color: #7C3AED;
    text-decoration: underline;
}

/* Author Bio Section (EEAT) */
.rpbe-author-bio {
    display: flex;
    gap: 24px;
    padding: 30px;
    margin-top: 50px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .rpbe-author-bio {
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }
}

.rpbe-author-bio-avatar {
    flex-shrink: 0;
}

.rpbe-author-bio-avatar a {
    display: block;
    transition: transform 0.2s ease;
}

.rpbe-author-bio-avatar a:hover {
    transform: scale(1.05);
}

.rpbe-author-bio-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rpbe-author-bio-content {
    flex: 1;
}

.rpbe-author-bio-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px 0;
}

.rpbe-author-bio-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rpbe-author-bio-title a:hover {
    color: #8B5CF6;
}

.rpbe-author-bio-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 16px;
}

.rpbe-author-bio-text p {
    margin: 0 0 12px 0;
}

.rpbe-author-bio-text p:last-child {
    margin-bottom: 0;
}

.rpbe-author-bio-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #8B5CF6;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.rpbe-author-bio-link:hover {
    color: #7C3AED;
    gap: 10px;
}

.rpbe-author-bio-link svg {
    flex-shrink: 0;
}

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

@media (max-width: 768px) {
    .rpbe-post-navigation {
        grid-template-columns: 1fr;
    }
}

.rpbe-nav-previous,
.rpbe-nav-next {
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.rpbe-nav-previous a,
.rpbe-nav-next a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.rpbe-nav-previous a:hover,
.rpbe-nav-next a:hover {
    color: #8B5CF6;
}

.rpbe-nav-next a {
    justify-content: flex-end;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .rpbe-blog-container,
    .rpbe-single-container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .rpbe-page-title {
        font-size: 2rem;
    }
    
    .rpbe-post-card.rpbe-post-landscape {
        flex-direction: column;
    }
    
    .rpbe-post-landscape .rpbe-post-thumbnail {
        width: 100%;
        min-height: 240px;
    }
    
    .rpbe-post-landscape .rpbe-post-content {
        width: 100%;
    }
    
    .rpbe-post-content {
        padding: 20px;
    }
    
    .rpbe-post-title {
        font-size: 1.25rem;
    }
    
    .rpbe-single-content {
        font-size: 1rem;
    }
}

