/* Section Spacing Fix */
.blog-section {
    padding: 120px 5% 100px; /* Top padding barha di taake heading nazar aaye */
    position: relative;
    z-index: 5;
}

.blog-header {
    text-align: center;
    margin-bottom: 60px;
}

/* Heading Color Shift (Cyan & White) */
.main-heading {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #ffffff;
    cursor: pointer;
    transition: 0.5s ease;
}

.main-heading span {
    color: #38bdf8;
    transition: 0.5s ease;
}

.main-heading:hover { color: #38bdf8; }
.main-heading:hover span { color: #ffffff; }

/* Grid Setup */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

/* View More Button Styling */
.btn-control {
    text-align: center;
    margin: 50px 0;
}

.btn-main {
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    color: #0f172a;
    border: none;
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

.btn-main:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(56, 189, 248, 0.5);
    letter-spacing: 1px;
}

/* Pagination: Small Size & Footer Gap */
.pagination-container {
    padding-bottom: 50px; /* Footer se gap */
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 8px;
}

.page-num {
    width: 35px; /* Reduced size */
    height: 35px; /* Reduced size */
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
    background: rgba(30, 41, 59, 0.5);
}

.page-num.active, .page-num:hover {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Mobile Fix */
@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-section { padding-top: 100px; }
}

/* Blog Card Main Container */
.blog-card {
    background: rgba(30, 41, 59, 0.4); /* Glass effect */
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    position: relative;
    height: 100%;
}

/* Card Hover Animation */
.blog-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: #38bdf8;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.6), 
                0 0 20px rgba(56, 189, 248, 0.2);
}

/* Image Section Animation */
.blog-img-container {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.blog-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.blog-card:hover .blog-img-container img {
    transform: scale(1.15) rotate(2deg); /* Smooth zoom + slight tilt */
}

/* Floating Category Tag */
.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    color: #0f172a;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

/* Content Styling */
.blog-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-date {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 12px;
    display: block;
}

.blog-title {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
    transition: 0.3s;
}

.blog-title span {
    color: #38bdf8;
    transition: 0.3s;
}

/* Title Color Shift on Hover */
.blog-card:hover .blog-title {
    color: #38bdf8;
}
.blog-card:hover .blog-title span {
    color: #ffffff;
}

.blog-description {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
    opacity: 0.8;
}

/* Footer & Arrow Animation */
.blog-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.read-more-text {
    color: #38bdf8;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-arrow {
    color: #38bdf8;
    transition: 0.4s ease;
}

.blog-card:hover .blog-arrow {
    transform: translateX(10px); /* Arrow moves right on hover */
    color: #818cf8; /* Color shifts to Indigo */
}



/* Pehle 10 cards ke baad sab ko hide rakho */
#blogGrid .blog-card:nth-child(n+11) {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: 0.5s ease;
}

/* Jab 'show-all' class grid par aaye to cards nazar ayen */
#blogGrid.show-all .blog-card:nth-child(n+11) {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Pagination arrows pointer cursor */
.page-num {
    cursor: pointer;
}

/* Pagination Fix: Footer sy oopar aur chota size */
.pagination-container {
    padding: 40px 0 80px; /* Bottom padding footer sy gap k liye */
    display: flex;
    justify-content: center;
}

.page-num {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
    border-radius: 50%;
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    background: rgba(30, 41, 59, 0.5);
}

.page-num.active {
    background: #38bdf8 !important;
    color: #0f172a !important;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

/* 3fr Grid Fix */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 992px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .blog-grid { grid-template-columns: 1fr; } }

