/* --- PREMIUM BLOGS PAGE CSS --- */
:root {
    --brand-blue: #004b99;
    --brand-orange: #f28b00;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --card-radius: 24px;
    --img-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.05);
}

/* Base Wrapper & Tech Background */
.blogs-page-wrapper {
    background-color: var(--bg-color);
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    font-family: 'Poppins', sans-serif;
    padding-bottom: 100px;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Hero Section --- */
.blogs-hero {
    padding: 160px 20px 40px; 
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.relative-z {
    position: relative;
    z-index: 2;
}

.title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 150px;
    background: radial-gradient(circle, rgba(242, 139, 0, 0.15) 0%, rgba(0, 75, 153, 0.15) 50%, transparent 100%);
    filter: blur(40px);
    z-index: -1;
    pointer-events: none;
}

.blogs-title-img {
    width: 750px; 
    max-width: 100%;
    height: auto;
    margin: 0 auto 15px auto;
    display: block;
    filter: drop-shadow(0px 10px 20px rgba(0,0,0,0.08));
    transition: transform 0.5s ease;
}

.blogs-title-img:hover {
    transform: scale(1.03) rotate(-1deg);
}

.blogs-subtitle {
    color: var(--text-gray);
    font-size: 1.15rem;
    font-weight: 500;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Premium App-Style Filters --- */
.blog-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0 60px;
}

.filter-btn {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: var(--transition);
}

.filter-btn i {
    font-size: 1.1rem;
    color: var(--brand-orange);
    transition: var(--transition);
}

.filter-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 75, 153, 0.08);
    border-color: #cbd5e1;
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--brand-orange), #ffb04c);
    color: white;
    border: none;
    box-shadow: 0 8px 20px rgba(242, 139, 0, 0.3);
    transform: translateY(-2px);
}

.filter-btn.active i {
    color: white;
}

/* --- Modern Enclosed Cards --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px 30px;
}

.blog-card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    padding: 14px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.8);
    opacity: 0; 
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.2) forwards;
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 75, 153, 0.1);
}

.blog-card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-img-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: var(--img-radius);
    overflow: hidden;
}

.blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.blog-card:hover .blog-img {
    transform: scale(1.1) rotate(1deg);
}

.blog-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    z-index: 2;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stem-badge { background: rgba(233, 30, 99, 0.85); }
.robotics-badge { background: rgba(0, 75, 153, 0.85); }
.coding-badge { background: rgba(242, 139, 0, 0.85); }
.experiments-badge { background: rgba(16, 185, 129, 0.85); }

.blog-content-body {
    padding: 20px 10px 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-blue);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-read {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-read i {
    font-size: 4px; 
}

.blog-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.blog-card:hover .blog-title {
    color: var(--brand-orange);
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-footer {
    border-top: 1px dashed #e2e8f0;
    padding-top: 15px;
    margin-top: auto;
}

.read-more {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: var(--brand-blue);
    font-size: 0.95rem;
    transition: var(--transition);
}

.read-more i {
    background: #f1f5f9;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.blog-card:hover .read-more i {
    background: var(--brand-orange);
    color: white;
    transform: translateX(5px) rotate(-45deg); 
}

/* =========================================
   --- NEW PAGINATION STYLES --- 
========================================= */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 70px;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn {
    background: var(--card-bg);
    border: 1px solid #cbd5e1;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: var(--transition);
}

/* Pills for Prev/Next */
.page-btn.prev-btn, 
.page-btn.next-btn {
    padding: 10px 22px;
    border-radius: 40px;
    font-size: 0.95rem;
}

/* Circles for Numbers */
.page-btn.num-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 0.95rem;
}

/* Hover Effects */
.page-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    box-shadow: 0 10px 20px rgba(0, 75, 153, 0.1);
}

/* Active Page State */
.page-btn.active {
    background: linear-gradient(135deg, var(--brand-blue), #2196F3);
    color: white;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 75, 153, 0.25);
}

/* Disabled State (For "Prev" on page 1) */
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
    box-shadow: none;
}

.page-dots {
    color: var(--text-gray);
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0 5px;
}

/* --- Animations --- */
@keyframes popIn {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .blogs-hero { padding: 130px 15px 30px; }
    .blogs-title-img { width: 100%; max-width: 1500px; }
    .title-glow { width: 300px; height: 100px; }
    .blog-filters { gap: 8px; }
    .filter-btn { padding: 10px 18px; font-size: 0.85rem; }
    
    /* Responsive Pagination */
    .pagination-wrapper { gap: 10px; margin-top: 50px; }
    .page-btn.prev-btn, .page-btn.next-btn { padding: 8px 16px; font-size: 0.85rem; }
    .page-btn.num-btn { width: 38px; height: 38px; font-size: 0.85rem; }
    .mobile-hide { display: none; } /* Hides extra numbers on tiny screens */
}












/* =========================================
   --- SINGLE BLOG POST UI/UX STYLES --- 
========================================= */

/* Main Wrapper with Subtle Background */
.single-blog-wrapper {
    background-color: var(--bg-color, #f8fafc);
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 24px 24px;
    font-family: 'Poppins', sans-serif;
    padding-top: 150px; /* Clears the fixed header */
    padding-bottom: 100px;
    min-height: 100vh;
}

/* --- Header Section --- */
.blog-post-header {
    max-width: 900px; /* Narrower width for optimal reading */
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
    animation: fadeInDown 0.8s ease;
}

.post-meta-top {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-gray, #64748b);
    flex-wrap: wrap;
}

.blog-category-badge {
    background: linear-gradient(135deg, var(--brand-blue, #004b99), #2196F3);
    color: white;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0, 75, 153, 0.2);
}

.post-meta-top i {
    color: var(--brand-orange, #f28b00);
    margin-right: 5px;
}

.post-main-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark, #1e293b);
    line-height: 1.2;
    margin-bottom: 25px;
    letter-spacing: -1px;
}

.post-caption {
    font-size: 1.25rem;
    color: var(--text-gray, #64748b);
    line-height: 1.7;
    font-weight: 400;
    font-style: italic;
    border-left: 4px solid var(--brand-orange, #f28b00);
    padding-left: 20px;
    margin-bottom: 40px;
    text-align: left;
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-radius: 0 16px 16px 0;
}

/* --- Author & Share Section --- */
.post-author-share {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 20px 0;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--brand-blue, #004b99);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.author-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.author-name {
    font-weight: 700;
    color: var(--text-dark, #1e293b);
    font-size: 1rem;
}

.author-role {
    font-size: 0.85rem;
    color: var(--brand-orange, #f28b00);
    font-weight: 600;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-text {
    font-weight: 600;
    color: var(--text-gray, #64748b);
    margin-right: 5px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #000000; }
.share-btn.linkedin { background: #0A66C2; }

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

/* --- Banner Image --- */
.blog-banner-container {
    max-width: 1100px;
    margin: 0 auto 50px auto;
    padding: 0 20px;
    animation: fadeInUp 1s ease 0.2s both;
}

.post-banner-img {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 8px solid white;
}

/* --- Main Text Content --- */
.blog-post-content {
    max-width: 800px; /* Perfect reading width */
    margin: 0 auto;
    padding: 0 20px;
    font-size: 1.15rem; /* Large enough for easy reading */
    line-height: 1.8;
    color: var(--text-dark, #1e293b);
    animation: fadeInUp 1s ease 0.4s both;
}

.blog-post-content p {
    margin-bottom: 25px;
    color: #334155; /* Slightly darker gray for better readability */
}

.blog-post-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-blue, #004b99);
    margin-top: 50px;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* Premium Styling for Interlinked URLs inside paragraphs */
.blog-post-content a {
    color: var(--brand-blue, #004b99);
    font-weight: 700;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    padding: 0 2px;
}

/* Animated Underline effect for links */
.blog-post-content a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 3px;
    bottom: -2px;
    left: 0;
    background-color: var(--brand-orange, #f28b00);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.86, 0, 0.07, 1);
}

.blog-post-content a:hover {
    color: var(--brand-orange, #f28b00);
}

.blog-post-content a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- Bottom Return Button --- */
.back-to-blogs-wrapper {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px dashed #cbd5e1;
    text-align: center;
}

.back-to-blogs-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--brand-blue, #004b99);
    font-weight: 700;
    padding: 14px 30px;
    border-radius: 50px;
    border: 2px solid var(--brand-blue, #004b99);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.back-to-blogs-btn:hover {
    background: var(--brand-blue, #004b99);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 75, 153, 0.15);
}

/* --- Intro Animations --- */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .single-blog-wrapper { padding-top: 120px; }
    .post-main-title { font-size: 2.2rem; }
    .post-caption { font-size: 1.1rem; padding: 15px; }
    .blog-post-content h2 { font-size: 1.6rem; margin-top: 35px; }
    .blog-post-content { font-size: 1.05rem; }
    .post-author-share { flex-direction: column; align-items: flex-start; }
}