/**
 * Filmarium Town Blog Styles
 * Professional, SEO-optimized blog layout
 */

/* ========================================
   Blog Header Section
======================================== */
.filmarium-blog-header {
    background: linear-gradient(135deg, #2491EB 0%, #1a73c2 100%);
    padding: 80px 0 60px;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.filmarium-blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.blog-header-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.blog-main-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.blog-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
}

/* ========================================
   Blog Content Section
======================================== */
.filmarium-blog-content {
    padding: 60px 0;
    background: #f8f9fa;
}

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

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* ========================================
   Blog Post Card
======================================== */
.blog-post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.blog-post-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 60%;
}

.blog-post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-post-card:hover .blog-post-thumbnail img {
    transform: scale(1.1);
}

.blog-post-category {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.blog-post-category a {
    background: rgba(36, 145, 235, 0.95);
    color: #ffffff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

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

.blog-post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #6c757d;
}

.blog-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-post-meta i {
    color: #2491EB;
}

/* Hide duplicate modified date on blog listing */
.blog-post-meta .updated:not(.published) {
    display: none !important;
}

.blog-post-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 15px;
    line-height: 1.4;
}

.blog-post-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-title a:hover {
    color: #2491EB;
}

.blog-post-excerpt {
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2491EB;
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    transition: gap 0.3s ease;
}

.blog-read-more:hover {
    gap: 12px;
}

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

/* ========================================
   Pagination
======================================== */
.blog-pagination {
    grid-column: 1 / -1;
    margin-top: 30px;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.blog-pagination .page-numbers li {
    display: inline-block;
}

.blog-pagination .page-numbers a,
.blog-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.blog-pagination .page-numbers a:hover,
.blog-pagination .page-numbers .current {
    background: #2491EB;
    border-color: #2491EB;
    color: #ffffff;
}

/* ========================================
   Sidebar
======================================== */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #2491EB;
    color: #212529;
}

/* Search Widget */
.search-form {
    position: relative;
}

.search-field {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-field:focus {
    outline: none;
    border-color: #2491EB;
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #2491EB;
    border: none;
    color: #ffffff;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: #5568d3;
}

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

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

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

.categories-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: #495057;
    text-decoration: none;
    transition: color 0.3s ease;
}

.categories-list a:hover {
    color: #2491EB;
}

.categories-list .count {
    background: #f8f9fa;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

.popular-post-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

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

.popular-post-details h4 {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.popular-post-details a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-post-details a:hover {
    color: #2491EB;
}

.popular-post-date {
    font-size: 12px;
    color: #6c757d;
}

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

.cta-widget .widget-title {
    color: #ffffff;
    border-color: rgba(255,255,255,0.3);
}

.cta-widget p {
    margin: 0 0 20px;
    opacity: 0.95;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #2491EB;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
}

.cta-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.cta-contact a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

/* ========================================
   No Posts Found
======================================== */
.no-posts-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
}

.no-posts-found h3 {
    font-size: 28px;
    margin: 0 0 15px;
    color: #212529;
}

.no-posts-found p {
    font-size: 16px;
    color: #6c757d;
}


/* ========================================
   Single Post Styles
======================================== */
.single-post .site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    background: #ffffff;
}

.single-post article {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

/* Single Post Header */
.single-post .entry-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.single-post .entry-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    color: #212529;
    margin: 0 0 20px;
}

.single-post .entry-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 14px;
    color: #6c757d;
    flex-wrap: wrap;
}

.single-post .entry-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-post .entry-meta i {
    color: #2491EB;
    font-size: 16px;
}

.single-post .entry-meta a {
    color: #2491EB;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.single-post .entry-meta a:hover {
    color: #1a73c2;
}

/* Hide duplicate modified date (keep only published date) */
.single-post .entry-meta .updated:not(.published) {
    display: none !important;
}

/* Additional fix for any time elements showing modified date */
.single-post .entry-meta time.updated {
    display: none !important;
}

.single-post .entry-meta time.published {
    display: inline-flex !important;
}

/* Featured Image */
.single-post .post-thumbnail {
    display: none;
}

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

/* Post Content */
.single-post .entry-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    color: #333333;
}

.single-post .entry-content > * {
    margin-bottom: 25px;
}

.single-post .entry-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: #212529;
    margin-top: 50px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.single-post .entry-content h3 {
    font-size: 26px;
    font-weight: 600;
    color: #212529;
    margin-top: 40px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.single-post .entry-content h4 {
    font-size: 22px;
    font-weight: 600;
    color: #212529;
    margin-top: 30px;
    margin-bottom: 15px;
}

.single-post .entry-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    margin: 25px 0 25px 30px;
    line-height: 1.8;
}

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

.single-post .entry-content ul li {
    list-style-type: disc;
}

.single-post .entry-content ol li {
    list-style-type: decimal;
}

.single-post .entry-content a {
    color: #2491EB;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.single-post .entry-content a:hover {
    color: #1a73c2;
}

.single-post .entry-content strong,
.single-post .entry-content b {
    font-weight: 700;
    color: #212529;
}

.single-post .entry-content em,
.single-post .entry-content i {
    font-style: italic;
}

.single-post .entry-content blockquote {
    border-left: 4px solid #2491EB;
    padding: 20px 30px;
    margin: 30px 0;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #495057;
}

.single-post .entry-content img {
    max-width: 100%; /* Match parent container width */
    width: auto;
    height: auto;
    border-radius: 12px;
    margin: 30px 0; /* Align with text, no auto centering */
    display: block;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.single-post .entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.single-post .entry-content table th,
.single-post .entry-content table td {
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    text-align: left;
}

.single-post .entry-content table th {
    background: #f8f9fa;
    font-weight: 700;
    color: #212529;
}

.single-post .entry-content code {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: #d63384;
}

.single-post .entry-content pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
}

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

/* Post Footer */
.single-post .entry-footer {
    max-width: 800px;
    margin: 40px auto 0;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.single-post .cat-links,
.single-post .tags-links {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.single-post .cat-links a,
.single-post .tags-links a {
    background: #f8f9fa;
    color: #495057;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.single-post .cat-links a:hover,
.single-post .tags-links a:hover {
    background: #2491EB;
    color: #ffffff;
}

/* Post Navigation */
.single-post .post-navigation {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 30px 0;
    border-top: 2px solid #e9ecef;
}

.single-post .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.single-post .nav-previous,
.single-post .nav-next {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.single-post .nav-previous:hover,
.single-post .nav-next:hover {
    background: #2491EB;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(36, 145, 235, 0.3);
}

.single-post .nav-previous a,
.single-post .nav-next a {
    text-decoration: none;
    color: #212529;
    display: block;
}

.single-post .nav-previous:hover a,
.single-post .nav-next:hover a {
    color: #ffffff;
}

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

/* Comments Section */
.single-post #comments {
    max-width: 800px;
    margin: 60px auto 0;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
}

.single-post .comments-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #212529;
}

.single-post .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.single-post .comment {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.single-post .comment-author {
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
}

.single-post .comment-content {
    line-height: 1.6;
    color: #495057;
}

.single-post .reply {
    margin-top: 10px;
}

.single-post .comment-reply-link {
    color: #2491EB;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.single-post .comment-reply-link:hover {
    color: #1a73c2;
}

/* Comment Form */
.single-post .comment-form {
    margin-top: 40px;
}

.single-post .comment-form input[type="text"],
.single-post .comment-form input[type="email"],
.single-post .comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.single-post .comment-form input[type="text"]:focus,
.single-post .comment-form input[type="email"]:focus,
.single-post .comment-form textarea:focus {
    outline: none;
    border-color: #2491EB;
}

.single-post .comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.single-post .comment-form input[type="submit"] {
    background: #2491EB;
    color: #ffffff;
    padding: 12px 40px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.single-post .comment-form input[type="submit"]:hover {
    background: #1a73c2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(36, 145, 235, 0.3);
}

/* Author Box */
.single-post .author-info {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    gap: 25px;
    align-items: start;
}

.single-post .author-avatar {
    flex-shrink: 0;
}

.single-post .author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.single-post .author-details h4 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #212529;
}

.single-post .author-details p {
    margin: 0;
    line-height: 1.6;
    color: #495057;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1024px) {
    .blog-grid-wrapper {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .blog-main-title {
        font-size: 36px;
    }

    .blog-subtitle {
        font-size: 16px;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
    }

    .filmarium-blog-header {
        padding: 50px 0 40px;
    }

    .filmarium-blog-content {
        padding: 40px 0;
    }

    /* Single Post Tablet */
    .single-post .site-main {
        padding: 40px 20px;
    }

    .single-post .entry-title {
        font-size: 36px;
    }

    .single-post .entry-content {
        font-size: 17px;
    }

    .single-post .entry-content h2 {
        font-size: 28px;
        margin-top: 40px;
    }

    .single-post .entry-content h3 {
        font-size: 24px;
    }

    .single-post .entry-meta {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .blog-main-title {
        font-size: 28px;
    }

    .blog-post-title {
        font-size: 18px;
    }

    .sidebar-widget {
        padding: 20px;
    }

    /* Single Post Mobile */
    .single-post .entry-title {
        font-size: 28px;
    }

    .single-post .entry-content {
        font-size: 16px;
    }

    .single-post .entry-content h2 {
        font-size: 24px;
    }

    .single-post .entry-content h3 {
        font-size: 20px;
    }

    .single-post .entry-content h4 {
        font-size: 18px;
    }

    .single-post .nav-links {
        grid-template-columns: 1fr;
    }

    .single-post .nav-next {
        text-align: left;
    }

    .single-post .author-info {
        flex-direction: column;
        text-align: center;
    }

    .single-post #comments {
        padding: 20px;
    }

    /* Make images full width on mobile */
    .single-post .entry-content img {
        max-width: 100%;
        width: 100%;
	margin: 20px 0;
    }
}
