/*
* REVAMPED Stylesheet for Blog Pages
* A modern, clean, and professional UI
*/

/* ==========================================================================
   TONED-DOWN ACTIVE FILTER BUTTON (primary-btn)
   ========================================================================== */

/* Base button (shared) */
.video-filters .btn {
    background: #1a1a1a;
    color: #ccc;
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

/* Active/Selected Filter – Toned Down */
.video-filters .btn.primary-btn {
    background: #4f4a4a;
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 12px rgb(186 188 193 / 30%);
    font-weight: 600;
}

/* Hover on active button – subtle lift */
/* .video-filters .btn.primary-btn:hover {
    background: #2a5d9e;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px); 
} */

/* Non-active button hover */
.video-filters .btn.secondary-btn:hover {
    background: #252525;
    color: #fff;
    border-color: #555;
}

/* Ripple light effect
.video-filters .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
} */

.video-filters .btn.loading::before {
    width: 280px;
    height: 280px;
    opacity: 1;
}

/* ==========================================================================
   HTMX LOADING SPINNER (centered under filters)
   ========================================================================== */

.htmx-indicator {
    display: none;
    text-align: center;
    margin: 2rem 0;
    color: #aaa;
    font-size: 1rem;
    font-weight: 500;
}

.htmx-request .htmx-indicator {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.htmx-indicator i {
    margin-right: 8px;
    font-size: 1.1rem;
    animation: spin 1s linear infinite;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner rotation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Optional: dim content while loading */
.htmx-request #blog-list-container,
.htmx-request #video-list-container {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* --- Common Page Layout --- */
.blog-list-section,
.blog-detail-section {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, #121212 0%, #000000 100%);
}

.page-title {
    font-family: 'Playfair Display', sans-serif;
    font-size: 4.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #f0f0f0;
}

.section-description {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 80px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* --- NEW: Filter Buttons (Shared with video.css) --- */
.video-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 80px;
}

/* --- Category & Recent Posts Sections --- */
.blog-categories-container,
.recent-posts {
    margin-bottom: 80px;
}

.blog-categories-container h2,
.recent-posts h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    color: #e9e9e9;
    font-weight: 600;
}

/* --- NEW: Modern Card Grid --- */
.blog-posts-grid,
.blog-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    justify-content: center;
}

/* --- NEW: Modern Card Style (Blog & Category) --- */
.blog-post-card,
.blog-category-box {
    background: linear-gradient(145deg, #1e1e1e, #141414);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.blog-post-card:hover,
.blog-category-box:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.post-image,
.category-image-container {
    overflow: hidden;
    position: relative;
}

.post-image img,
.category-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.post-content,
.category-content {
    padding: 25px;
}

.post-category {
    display: inline-block;
    background-color: #acafb1;
    color: #000;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.post-title,
.category-content h3 {
    margin-bottom: 10px;
    font-size: 1.35rem;
    color: #f0f0f0;
    line-height: 1.4;
    font-weight: 600;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover {
    color: var(--secondary-color);
}

.post-meta {
    display: flex;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.post-excerpt,
.category-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.read-more,
.category-content .btn {
    display: inline-block;
    margin-top: 15px;
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more:hover,
.category-content .btn:hover {
    color: #ffffff;
}

/* --- NEW: Blog Detail Page Layout --- */
.blog-post {
    margin: 0 auto;
    background: transparent;
    padding: 0;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
}

.post-header .post-title {
    font-size: 3rem;
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
}

.post-header .post-meta {
    justify-content: center;
    gap: 25px;
    font-size: 1rem;
    color: var(--text-secondary);
}

/* .post-featured-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.post-featured-image img {
    width: 100%;
} */

/* --- NEW: Enhanced Post Content Styling --- */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-content h2,
.post-content h3,
.post-content h4 {
    color: #f0f0f0;
    margin: 40px 0 20px;
    font-weight: 700;
}

.post-content p,
.post-content ul,
.post-content ol {
    margin-bottom: 25px;
}

.post-content a {
    color: #E9F6FE;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-content a:hover {
    /* background-color: var(--secondary-color); */
    color: #778b8f;
    /* border-bottom-color: transparent; */
}

.post-content blockquote {
    margin: 30px 0;
    padding-left: 25px;
    border-left: 4px solid var(--secondary-color);
    font-style: italic;
    color: #ffffff;
    font-size: 1.2rem;
}

.post-content figure {
    margin: 40px 0;
}

.post-content figure img {
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.post-content figure figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-top: 10px;
}

/* --- NEW: Restyled Tags --- */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-tag {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.post-tag:hover {
    background-color: var(--secondary-color);
    color: #000;
    border-color: var(--secondary-color);
    cursor: pointer;
}

/* --- Back Button --- */
.back-to-blog {
    text-align: center;
    margin-top: 60px;
}

.no-posts p {
    color: var(--text-secondary);
    text-align: center;
    font-size: 1.2rem;
    padding: 40px 0;
}

.pagination-nav {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 10px;
}

.page-item .page-link {
    color: var(--text-secondary);
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-item .page-link:hover {
    background-color: #696464;
    color: #000;
}

.page-item.active .page-link {
    background-color: #696464;
    color: #000;
    cursor: default;
}

.htmx-request #blog-content,
.htmx-request #video-content {
    opacity: 0.6;
    pointer-events: none;
}

.htmx-indicator {
    display: none;
    color: #666;
    font-size: 0.9em;
    margin-top: 1rem;
}

.htmx-request .htmx-indicator {
    display: block;
}


/* ==========================================================================
   Responsive Styles
   ========================================================================== */

/* --- Tablets and Smaller Desktops (<= 1024px) --- */
@media (max-width: 1024px) {
    .page-title {
        font-size: 3.5rem;
    }

    .blog-list-section,
    .blog-detail-section {
        padding: 120px 40px 60px;
        /* Add side padding */
    }
}

/* --- Mobile Devices and Tablets (<= 768px) --- */
@media (max-width: 768px) {

    .blog-list-section,
    .blog-detail-section {
        padding: 100px 20px 60px;
    }

    .page-title {
        font-size: 2.7rem;
        line-height: 1.2;
        margin-bottom: 2rem;
    }



    .section-description {

        margin: 0 auto 60px;
        font-size: 1rem;
    }

    .blog-categories-container h2,
    .recent-posts h2 {
        font-size: 2rem;
    }

    .blog-posts-grid,
    .blog-categories-grid {
        grid-template-columns: 1fr;
        /* Single column on mobile */
        gap: 2rem;
    }

    .post-header .post-title {
        font-size: 2rem;
    }

    .post-content {
        font-size: 1rem;
        line-height: 1.7;
    }



    .video-filters .btn {
        padding: 8px 10px;
        border-radius: 50px;
        font-size: 0.8rem;
        font-weight: 400;
        letter-spacing: 0.4px;
    }

    .video-filters {
        gap: .7rem;
        margin-bottom: 70px;
    }

    .post-content h2,
    .post-content h3,
    .post-content h4 {
        margin: 30px 0 20px;
        font-size: 1.4rem;
        line-height: 1.2;
    }

    .post-title a {
        font-size: 20px;
    }

    .post-excerpt,
    .category-content p {
        font-size: .9rem;
        line-height: 1.5;
    }

    .post-content p,
    .post-content ul,
    .post-content ol {
        line-height: 1.6;
        font-size: 1rem;
    }

    .post-content figure figcaption {
        font-size: 0.8rem;
    }

    .secondary-btn {
        font-size: 1rem;
    }

    .container {
        width: 95%;
        padding: 0 15px;
    }


}

/* --- Small Mobile Devices (<= 480px) --- */
@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
        margin-bottom: 1.3rem;
    }

    .post-header .post-title {
        font-size: 1rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0px !important;
    }

    .post-content blockquote {
        font-size: 1.1rem;
        padding-left: 20px;
    }

    .post-tag {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    .section-description {

        margin: 0 auto 40px;
        font-size: .9rem;
    }

    .video-filters {
        gap: .6rem;
        margin-bottom: 60px;
    }

    .video-filters .btn {
        padding: 6px 7.5px;
        font-size: 0.6rem;
    }

    .video-filters .btn.primary-btn {
        font-weight: 500;
    }

    .post-category {
        display: inline-block;
        padding: 3px 6px;
        font-size: 0.5rem;
        font-weight: 600;
        margin-bottom: 0px;
    }

    .post-title a {
        font-size: 15px;
    }

    .post-meta {
        font-size: 0.8rem;
    }

    .post-excerpt,
    .category-content p {
        font-size: .9rem;
        line-height: 18px;
    }

    .read-more,
    .category-content .btn {
        margin-top: 5px;
    }

    .read-more,
    .category-content .btn {
        margin-top: 5px;
    }

    .post-content a {
        font-size: .9rem;
        line-height: 1;
    }

    .post-content h2,
    .post-content h3,
    .post-content h4 {
        margin: 15px 0 15px;
        font-weight: 600;
        line-height: 1.1;
        font-size: 1rem;
    }

    .post-content,
    .category-content {
        padding: 14px;
    }

    .page-item .page-link {
        padding: 8px 12px;
        font-size: 15px;
    }

    .post-content p,
    .post-content ul,
    .post-content ol {
        line-height: 1.2;
        font-size: .8rem;
    }

    .post-content figure figcaption {
        line-height: 1.1;
        font-size: 0.7rem;
    }

    .secondary-btn {
        font-size: .8rem;
    }

    .container {
        width: 97%;
        padding: 0 10px;
    }

    .post-category-name {
        margin-bottom: 10px;
    }

    .post-header {
        margin-bottom: 15px;
    }
    .back-to-blog {
    margin-top: 15px;
}

}