/* Featured Blogs Styles */
.pm-featured-section {
    padding: 80px 0 100px;
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(96, 165, 250, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(96, 165, 250, 0.05) 0px, transparent 50%);
    font-family: 'Outfit', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Dot Pattern Overlay */
.pm-featured-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.4;
    z-index: 1;
}

/* Animated Floating Blobs */
.pm-bg-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, rgba(96, 165, 250, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: 2;
    animation: floatBlob 25s infinite linear;
}

.pm-blob-1 {
    top: -150px;
    left: -150px;
    animation: morphBlob 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.pm-blob-2 {
    bottom: -150px;
    right: -150px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.15) 0%, rgba(37, 99, 235, 0.05) 50%, transparent 70%);
    animation: morphBlob 25s infinite alternate-reverse cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@keyframes morphBlob {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        border-radius: 50%;
    }

    33% {
        transform: translate(100px, 50px) rotate(90deg) scale(1.2);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    66% {
        transform: translate(-50px, 150px) rotate(180deg) scale(0.8);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    100% {
        transform: translate(0, 0) rotate(360deg) scale(1);
        border-radius: 50%;
    }
}

/* Floating Particles Animation */
.pm-bg-particles {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.pm-particle {
    position: absolute;
    background: rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    filter: blur(2px);
    animation: floatParticle 15s infinite linear;
}

.pm-particle-1 {
    width: 6px;
    height: 6px;
    top: 20%;
    left: 10%;
    animation-duration: 18s;
}

.pm-particle-2 {
    width: 10px;
    height: 10px;
    top: 60%;
    left: 80%;
    animation-duration: 22s;
    animation-delay: -5s;
}

.pm-particle-3 {
    width: 4px;
    height: 4px;
    top: 40%;
    left: 50%;
    animation-duration: 15s;
    animation-delay: -2s;
}

.pm-particle-4 {
    width: 8px;
    height: 8px;
    top: 80%;
    left: 20%;
    animation-duration: 25s;
    animation-delay: -10s;
}

.pm-particle-5 {
    width: 12px;
    height: 12px;
    top: 10%;
    left: 70%;
    animation-duration: 20s;
    animation-delay: -7s;
}

@keyframes floatParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }

    20% {
        opacity: 0.5;
    }

    50% {
        transform: translate(100px, -100px) scale(1.5);
        opacity: 0.8;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translate(200px, -200px) scale(1);
        opacity: 0;
    }
}

/* Moving Light Beams Animation */
.pm-bg-beams {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.pm-beam {
    position: absolute;
    width: 200%;
    height: 100px;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.03), transparent);
    transform: rotate(-45deg);
    animation: beamSweep 12s infinite linear;
}

.pm-beam-1 {
    top: -20%;
    left: -50%;
    animation-delay: 0s;
}

.pm-beam-2 {
    top: 40%;
    left: -50%;
    animation-delay: -6s;
}

@keyframes beamSweep {
    0% {
        transform: rotate(-45deg) translateY(-500px);
    }

    100% {
        transform: rotate(-45deg) translateY(1000px);
    }
}

.pm-featured-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.pm-featured-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding-bottom: 10px;
}

.pm-featured-title {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, #0f172a 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    margin: 0;
    text-transform: capitalize;
    display: inline-block;
    position: relative;
}

.pm-featured-title-line {
    width: 30%;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    border-radius: 2px;
    margin-top: 10px;
}

.pm-featured-view-all {
    color: #2563eb;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.pm-featured-view-all:hover {
    color: #1d4ed8;
    gap: 10px;
}

.pm-featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.pm-blog-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
    opacity: 0;
    transform: translateY(30px);
    animation: cardReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Staggered Animation Delays */
.pm-blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.pm-blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.pm-blog-card:nth-child(3) {
    animation-delay: 0.3s;
}

.pm-blog-card:nth-child(4) {
    animation-delay: 0.4s;
}

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

/* Shimmer Light Effect on Hover */
.pm-blog-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: none;
    z-index: 5;
}

.pm-blog-card:hover::after {
    left: 150%;
    transition: all 0.7s ease;
}

.pm-blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    border-color: #2563eb;
}

.pm-blog-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.pm-blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.pm-blog-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pm-blog-category {
    background-color: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
    width: fit-content;
}

.pm-blog-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.pm-blog-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.pm-blog-title a:hover {
    color: #2563eb;
}

.pm-blog-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 20px;
    flex: 1;
}

.pm-blog-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 15px;
    border-top: 1px solid #f8fafc;
}

.pm-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

.pm-meta-item svg {
    color: #cbd5e1;
}

/* Responsive */
@media (max-width: 1200px) {
    .pm-featured-grid {
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .pm-featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Horizontal Slider for Tablet and Mobile */
@media (max-width: 768px) {
    .pm-featured-container {
        padding: 0 15px;
    }

    .pm-featured-grid {
        display: flex !important;
        align-items: stretch;
        /* Force all cards to be the same height */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        padding: 10px 20px 30px;
        margin: 0 -20px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .pm-featured-grid::-webkit-scrollbar {
        display: none;
    }

    .pm-blog-card {
        min-width: 250px;
        width: calc(50% - 30px);
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        height: auto;
        /* Allow flex stretch to take over */
        scroll-snap-align: center;
        margin-bottom: 10px;
        opacity: 1;
        transform: none;
        animation: cardSlideReveal 0.6s ease forwards;
    }

    @keyframes cardSlideReveal {
        from {
            opacity: 0;
            transform: translateX(30px);
        }

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

    .pm-featured-header {
        margin-bottom: 25px;
    }

    .pm-featured-section {
        padding: 70px 0 50px;
    }
}

@media (max-width: 576px) {
    .pm-featured-section {
        padding: 40px 0;
    }

    .pm-featured-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .pm-featured-title {
        font-size: 26px;
    }

    .pm-blog-card {
        width: 85%;
        min-width: 260px;
    }
}