/* ==========================================================================
   Movy Theme - Blog Stylesheet
   ========================================================================== */

/* 1. Cinematic Hero Section */
.blog-hero {
    position: relative;
    background-color: var(--primary-dark);
    color: var(--text-light);
    overflow: hidden;
    padding: 140px 0 100px 0; /* Add top padding to clear fixed header */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-hero__inner {
    position: relative;
    z-index: 10;
}

.blog-hero__eyebrow {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--primary-highlight);
    text-transform: uppercase;
    margin-bottom: 15px;
    display: inline-block;
}

.blog-hero__title {
    font-family: 'Gemunu Libre', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.blog-hero__subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* 2. Blog Main Container & Layout */
.blog-main {
    position: relative;
    padding: 80px 0;
    background-color: var(--bg-body);
}

/* 3. Featured Post Card (Horizontal Premium Layout) */
.featured-post-container {
    margin-bottom: 80px;
}

.featured-post {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 45px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(18, 11, 40, 0.06);
    border-radius: 32px;
    padding: 35px;
    box-shadow: 0 15px 40px rgba(18, 11, 40, 0.02);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.4s ease,
                border-color 0.4s ease;
    align-items: center;
}

.featured-post:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(99, 57, 216, 0.15);
    box-shadow: 0 25px 55px rgba(96, 44, 185, 0.08);
}

.featured-post__thumbnail {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    box-shadow: 0 10px 30px rgba(18, 11, 40, 0.05);
}

.featured-post__thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-post:hover .featured-post__thumbnail img {
    opacity: 0.98;
    transform: scale(1.03);
}

/* Viewfinder corner lines for featured post */
.featured-post__frame {
    position: absolute;
    inset: 22px;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                inset 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-post:hover .featured-post__frame {
    opacity: 1;
    inset: 15px;
}

.featured-post__frame .frame-corner {
    border-color: rgba(255, 255, 255, 0.3);
}

.featured-post:hover .featured-post__frame .frame-corner {
    border-color: var(--primary-highlight);
}

/* Lens glare sweep animation on featured image */
.featured-post__thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.25) 30%,
            rgba(255, 255, 255, 0.45) 50%,
            rgba(255, 255, 255, 0.25) 70%,
            transparent);
    transform: skewX(-25deg);
    z-index: 4;
    pointer-events: none;
}

.featured-post:hover .featured-post__thumbnail::after {
    left: 150%;
    transition: left 1.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Content side of the featured post */
.featured-post__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.featured-post__meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.featured-post__badge {
    background: var(--primary-highlight);
    color: var(--text-light);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.featured-post__title {
    font-family: 'Gemunu Libre', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    margin: 0 0 18px 0;
    line-height: 1.2;
}

.featured-post__title a {
    color: var(--primary-dark);
    transition: color 0.3s ease;
}

.featured-post:hover .featured-post__title a {
    color: var(--primary);
}

.featured-post__summary {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 25px;
}

.featured-post__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.3s ease;
    cursor: pointer;
}

.featured-post:hover .featured-post__cta {
    color: var(--primary-highlight);
}

.featured-post__cta .cta-arrow {
    transition: transform 0.3s ease;
}

.featured-post:hover .featured-post__cta .cta-arrow {
    transform: translateX(4px);
}

/* 4. Grid of Standard Posts */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Standard loop card */
.loop-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(18, 11, 40, 0.06);
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(18, 11, 40, 0.02);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.4s ease,
                border-color 0.4s ease;
}

.loop-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(99, 57, 216, 0.15);
    box-shadow: 0 20px 45px rgba(99, 57, 216, 0.08);
}

/* Thumbnail */
.loop-card__thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #000;
    border: 1px solid rgba(18, 11, 40, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
}

.loop-card__thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.88;
    transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.loop-card:hover .loop-card__thumbnail img {
    opacity: 0.98;
    transform: scale(1.03);
}

/* Viewfinder Frame corners inside standard card thumbnail */
.loop-card__frame {
    position: absolute;
    inset: 18px;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                inset 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.loop-card:hover .loop-card__frame {
    opacity: 1;
    inset: 12px;
}

.loop-card__frame .frame-corner {
    border-color: rgba(255, 255, 255, 0.3);
}

.loop-card:hover .loop-card__frame .frame-corner {
    border-color: var(--primary-highlight);
}

/* Lens Glare sweep effect on standard cards */
.loop-card__thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2) 30%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0.2) 70%,
            transparent);
    transform: skewX(-25deg);
    z-index: 4;
    pointer-events: none;
}

.loop-card:hover .loop-card__thumbnail::after {
    left: 150%;
    transition: left 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Card Content styling */
.loop-card__content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0 4px;
}

.loop-card__meta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.loop-card__title {
    font-family: 'Gemunu Libre', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 12px 0;
}

.loop-card__title a {
    color: var(--primary-dark);
    transition: color 0.3s ease;
}

.loop-card:hover .loop-card__title a {
    color: var(--primary);
}

.loop-card__summary {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 20px;
    flex-grow: 1;
}

.loop-card__summary p {
    margin: 0;
}

.loop-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.88rem;
    transition: color 0.3s ease;
    margin-top: auto;
}

.loop-card:hover .loop-card__cta {
    color: var(--primary-highlight);
}

.loop-card__cta .cta-arrow {
    transition: transform 0.3s ease;
}

.loop-card:hover .loop-card__cta .cta-arrow {
    transform: translateX(3px);
}

/* 5. Custom Pagination Styling */
.pagination {
    margin-top: 80px;
    display: flex;
    justify-content: center;
}

.pagination .nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(18, 11, 40, 0.06);
    color: var(--primary-dark);
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pagination .page-numbers.current {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(96, 44, 185, 0.25);
}

.pagination .page-numbers:hover:not(.current) {
    background: var(--primary-highlight);
    color: var(--text-light);
    border-color: var(--primary-highlight);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 57, 216, 0.3);
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    border-radius: 50px;
    padding: 0 20px;
}

/* 6. DNA Floating Blobs */
.shape-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(130px);
    z-index: 0;
    opacity: 0.25;
    pointer-events: none;
    will-change: transform, border-radius;
}

.shape-blob--circle {
    background: var(--primary-highlight);
    width: 500px;
    height: 500px;
    top: -150px;
    right: -150px;
    animation: floatOrganicBlog 24s ease-in-out infinite;
}

.shape-blob--circle-2 {
    background: var(--primary);
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    animation: floatOrganicBlog 18s ease-in-out infinite -4s;
    opacity: 0.18;
}

.shape-blob--triangle-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    top: 25%;
    right: 5%;
    opacity: 0.12;
    z-index: 0;
    animation: rotateTriangleBlog 40s linear infinite;
}

.shape-blob--triangle-glow svg {
    width: 100%;
    height: 100%;
}

@keyframes floatOrganicBlog {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    }
    33% {
        transform: translate(40px, -50px) scale(1.1) rotate(15deg);
        border-radius: 40% 60% 50% 50% / 40% 40% 60% 60%;
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9) rotate(-10deg);
        border-radius: 50% 40% 60% 40% / 50% 50% 40% 60%;
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    }
}

@keyframes rotateTriangleBlog {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.08);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* ==========================================================================
   7. Responsive Design Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
    .blog-hero__title {
        font-size: 3.2rem;
    }

    .featured-post {
        gap: 30px;
        padding: 25px;
    }

    .featured-post__title {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

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

@media (max-width: 768px) {
    .blog-hero {
        padding: 120px 0 80px 0;
    }

    .blog-hero__title {
        font-size: 2.6rem;
    }

    .blog-main {
        padding: 50px 0;
    }

    .featured-post {
        grid-template-columns: 1fr;
        gap: 25px;
        border-radius: 24px;
        padding: 20px;
        margin-bottom: 50px;
    }

    .featured-post__thumbnail {
        border-radius: 16px;
    }

    .featured-post__frame {
        inset: 18px;
    }

    .featured-post:hover .featured-post__frame {
        inset: 12px;
    }

    .featured-post__title {
        font-size: 1.8rem;
    }

    .featured-post__summary {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    /* Disable performance intensive shape blobs on mobile */
    .shape-blob {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .blog-hero__title {
        font-size: 2.2rem;
    }

    .blog-hero__subtitle {
        font-size: 1.05rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .loop-card {
        border-radius: 20px;
        padding: 16px;
    }

    .loop-card__thumbnail {
        border-radius: 12px;
    }

    .loop-card__frame {
        inset: 14px;
    }

    .loop-card:hover .loop-card__frame {
        inset: 10px;
    }

    .loop-card__title {
        font-size: 1.45rem;
    }

    .loop-card__summary {
        font-size: 0.88rem;
        line-height: 1.45;
        margin-bottom: 15px;
    }

    .pagination {
        margin-top: 50px;
    }

    .pagination .page-numbers {
        min-width: 40px;
        height: 40px;
        font-size: 0.88rem;
    }
    
    .pagination .page-numbers.prev,
    .pagination .page-numbers.next {
        padding: 0 15px;
    }
}
