/**
 * Blog Page Styles
 * 
 * @package 2UFi
 * @since 1.0.0
 */

/* Adjust main content top spacing for blog pages */
body.blog #main-content,
body.archive #main-content,
body.single-post #main-content {
    top: 75px;
}

/* ==========================================================================
   Blog Page Wrapper
   ========================================================================== */

.blog-page-wrapper {
    padding: 60px 0 80px;
    background-color: #f3f3f3;
    min-height: calc(100vh - 200px);
}

/* ==========================================================================
   Blog Header
   ========================================================================== */

.blog-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.blog-title {
    font-family: 'Merriweather', serif;
    font-size: 48px;
    font-weight: 700;
    color: #091c30;
    margin-bottom: 16px;
    line-height: 1.2;
}

.blog-description {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   Blog Grid (3 Columns)
   ========================================================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

/* Tablet - 2 columns */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Mobile - 1 column */
@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .blog-header {
        margin-bottom: 40px;
    }
    
    .blog-title {
        font-size: 32px;
    }
    
    .blog-description {
        font-size: 16px;
    }
}

/* ==========================================================================
   Blog Card
   ========================================================================== */

.blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

/* Featured Image */
.blog-card-image-link {
    display: block;
    text-decoration: none;
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #e5e7eb;
    position: relative;
}

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

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

/* Placeholder for posts without featured image */
.blog-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4a6bf0 0%, #3a5bd0 100%);
}

.placeholder-text {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Card Content */
.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* Category */
.blog-card-category {
    margin-bottom: 4px;
}

.blog-card-category a {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4a6bf0;
    text-decoration: none;
    padding: 4px 12px;
    background-color: rgba(74, 107, 240, 0.1);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.blog-card-category a:hover {
    background-color: rgba(74, 107, 240, 0.2);
    color: #3a5bd0;
}

/* Title */
.blog-card-title {
    margin: 0;
    font-family: 'Merriweather', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: #091c30;
    flex: 1;
}

.blog-card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

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

/* Meta Info (Date & Reading Time) */
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.blog-card-date,
.blog-card-reading-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.blog-card-date svg,
.blog-card-reading-time svg {
    flex-shrink: 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

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

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

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #091c30;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-pagination .page-numbers:hover {
    background-color: #f9fafb;
    border-color: #4a6bf0;
    color: #4a6bf0;
}

.blog-pagination .page-numbers.current {
    background-color: #4a6bf0;
    color: #ffffff;
    border-color: #4a6bf0;
}

.blog-pagination .page-numbers.dots {
    border: none;
    background: none;
    color: #6b7280;
}

.blog-pagination .prev,
.blog-pagination .next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
}

.blog-pagination .prev svg,
.blog-pagination .next svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .blog-pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 14px;
    }
    
    .blog-pagination .prev,
    .blog-pagination .next {
        padding: 0 16px;
    }
}

/* ==========================================================================
   No Posts Found
   ========================================================================== */

.blog-no-posts {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 12px;
    margin: 40px 0;
}

.blog-no-posts h2 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    font-weight: 700;
    color: #091c30;
    margin-bottom: 16px;
}

.blog-no-posts p {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 1280px) {
    .blog-card-title {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .blog-page-wrapper {
        padding: 40px 0 60px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-title {
        font-size: 18px;
    }
}

/* ==========================================================================
   Single Post Page Styles
   ========================================================================== */

.single-post-wrapper {
    padding: 0;
    background-color: #f3f3f3;
    min-height: calc(100vh - 200px);
}

.single-post {
    background-color: transparent;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 40px;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #4a6bf0;
    text-decoration: none !important;
    padding: 8px 16px;
    background-color: rgba(74, 107, 240, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.breadcrumb-link:hover {
    background-color: rgba(74, 107, 240, 0.2);
    color: #3a5bd0;
    text-decoration: none !important;
}

.breadcrumb-link svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Single Post Hero Section (Header + Featured Image) */
.single-post-hero {
    width: 100%;
    background-color: #e8e8e8;
    padding: 60px 0;
    margin-bottom: 0;
}

.single-post-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 60px;
}

/* Single Post Header */
.single-post-header {
    flex: 1;
    text-align: left;
}

.single-post-category {
    margin-bottom: 20px;
}

.single-post-category a {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4a6bf0;
    text-decoration: none;
    padding: 6px 16px;
    background-color: rgba(74, 107, 240, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.single-post-category a:hover {
    background-color: rgba(74, 107, 240, 0.2);
    color: #3a5bd0;
}

.single-post-title {
    font-family: 'Merriweather', serif;
    font-size: 48px;
    font-weight: 700;
    color: #091c30;
    margin: 0 0 24px;
    line-height: 1.3;
}

.single-post-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.single-post-date,
.single-post-reading-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #6b7280;
    font-weight: 400;
}

/* Featured Image */
.single-post-featured-image {
    flex: 0 0 45%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.single-post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 16 / 9;
}

/* Post Content Wrapper (Edge-to-Edge White Background) */
.single-post-content-wrapper {
    width: 100%;
    background: #ffffff;
    padding: 60px 0;
}

/* Post Content */
.single-post-content {
    max-width: 1200px;
    margin: 0 auto 60px;
}

.single-post-content p {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 24px;
}

.single-post-content h2 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    font-weight: 700;
    color: #091c30;
    margin: 48px 0 24px;
    line-height: 1.3;
}

.single-post-content h3 {
    font-family: 'Merriweather', serif;
    font-size: 24px;
    font-weight: 700;
    color: #091c30;
    margin: 40px 0 20px;
    line-height: 1.4;
}

.single-post-content h4 {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #091c30;
    margin: 32px 0 16px;
    line-height: 1.5;
}

.single-post-content ul,
.single-post-content ol {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 24px;
    padding-left: 40px;
}

.single-post-content ul {
    list-style-type: disc;
    list-style-position: outside;
}

.single-post-content ol {
    list-style-type: decimal;
    list-style-position: outside;
}

.single-post-content li {
    margin-bottom: 12px;
    padding-left: 8px;
}

.single-post-content ul ul,
.single-post-content ol ul {
    list-style-type: circle;
    margin-top: 12px;
}

.single-post-content ul ul ul,
.single-post-content ol ul ul {
    list-style-type: square;
}

.single-post-content ol ol,
.single-post-content ul ol {
    list-style-type: lower-alpha;
    margin-top: 12px;
}

.single-post-content a {
    color: #4a6bf0;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.single-post-content a:hover {
    color: #3a5bd0;
}

.single-post-content blockquote {
    font-family: 'Merriweather', serif;
    font-size: 20px;
    font-style: italic;
    color: #4b5563;
    border-left: 4px solid #4a6bf0;
    padding: 20px 32px;
    margin: 32px 0;
    background-color: #f9fafb;
    border-radius: 0 8px 8px 0;
}

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

.single-post-content pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 32px 0;
    font-size: 14px;
    line-height: 1.6;
}

.single-post-content code {
    background-color: #f3f4f6;
    color: #1f2937;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
}

.single-post-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.page-links {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: #6b7280;
}

.page-links a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background-color: #f3f4f6;
    color: #091c30;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-links a:hover {
    background-color: #4a6bf0;
    color: #ffffff;
}

/* Post Footer */
.single-post-footer {
    margin: 0 0 60px;
}

.single-post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tags-label {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.tag-link {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #6b7280;
    background-color: #f3f4f6;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-link:hover {
    background-color: #4a6bf0;
    color: #ffffff;
}

/* Post Navigation */
.single-post-navigation {
    max-width: 1200px;
    margin: 0 auto 60px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.nav-previous,
.nav-next {
    transition: all 0.3s ease;
}

.nav-previous {
    grid-column: 1;
}

.nav-next {
    grid-column: 2;
}

.nav-previous a,
.nav-next a {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

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

.nav-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.nav-title {
    font-family: 'Merriweather', serif;
    font-size: 18px;
    font-weight: 600;
    color: #091c30;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.nav-previous a:hover .nav-title,
.nav-next a:hover .nav-title {
    color: #4a6bf0;
}

.nav-previous svg,
.nav-next svg {
    flex-shrink: 0;
    color: #6b7280;
    transition: color 0.2s ease;
}

.nav-previous a:hover svg,
.nav-next a:hover svg {
    color: #4a6bf0;
}

/* Single Post Responsive */
@media (max-width: 1024px) {
    /* Remove old content padding override */
}

@media (max-width: 1024px) {
    .single-post-hero-inner {
        gap: 40px;
    }
    
    .single-post-featured-image {
        flex: 0 0 50%;
    }
    
}

@media (max-width: 768px) {
    .single-post-wrapper {
        padding: 0;
    }
    
    .breadcrumb-nav {
        margin-bottom: 32px;
    }
    
    .breadcrumb-link {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .single-post-content-wrapper {
        padding: 40px 0;
    }
    
    .breadcrumb-link svg {
        width: 16px;
        height: 16px;
    }
    
    .more-posts-section-wrapper {
        padding: 40px 0;
    }
    
    .single-post-hero {
        padding: 40px 0;
        margin-bottom: 0;
    }
    
    .single-post-hero-inner {
        flex-direction: column;
        gap: 32px;
    }
    
    .single-post-header {
        text-align: center;
        width: 100%;
    }
    
    .single-post-featured-image {
        flex: none;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .single-post-meta {
        justify-content: center;
    }
    
    .single-post-title {
        font-size: 32px;
    }
    
    .single-post-content h2 {
        font-size: 28px;
    }
    
    .single-post-content h3 {
        font-size: 22px;
    }
    
    .single-post-content p,
    .single-post-content ul,
    .single-post-content ol {
        font-size: 16px;
    }
    
    .single-post-navigation {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 40px;
    }
    
    .nav-previous,
    .nav-next {
        grid-column: 1;
    }
    
    .nav-previous a,
    .nav-next a {
        padding: 16px;
        background-color: #f9fafb;
        border-radius: 8px;
        gap: 12px;
    }
    
    .nav-next a {
        justify-content: space-between;
        flex-direction: row;
    }
    
    .nav-next .nav-content {
        text-align: left;
    }
    
    .nav-label {
        font-size: 11px;
    }
    
    .nav-title {
        font-size: 15px;
    }
    
    .nav-previous svg,
    .nav-next svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 640px) {
    .single-post-hero-inner {
        gap: 24px;
    }
    
    .single-post-title {
        font-size: 28px;
    }
    
    .single-post-meta {
        flex-direction: column;
        gap: 12px;
    }
}

/* ==========================================================================
   More Posts Section (Bottom of Single Post)
   ========================================================================== */

.more-posts-section-wrapper {
    width: 100%;
    background: rgba(74, 107, 240, 0.1);
    padding: 60px 0;
}

.more-posts-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.more-posts-title {
    font-family: 'Merriweather', serif;
    font-size: 36px;
    font-weight: 700;
    color: #091c30;
    text-align: center;
    margin-bottom: 48px;
}

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

/* Tablet - 2 columns */
@media (max-width: 1024px) {
    .more-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .more-posts-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
}

/* Mobile - 1 column */
@media (max-width: 640px) {
    .more-posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .more-posts-title {
        font-size: 28px;
        margin-bottom: 32px;
    }
    
    .more-posts-section-wrapper {
        padding: 32px 0;
    }
}

