:root {
    --bg-light: #F9FAFB;
    --bg-card: #FFFFFF;
    --bg-header: #0D1117;
    --bg-footer: #000000;
    --border-light: #E5E7EB;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --brand-blue: #2563EB;
    --brand-blue-light: #EFF6FF;
    --brand-blue-text: #3B82F6;
    --brand-gradient: linear-gradient(to right, #3B82F6, #8B5CF6);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {

    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}


/* --- Main Content & Blog Listing --- */
main {
    /* padding-top: 2rem; */
    padding-bottom: 4rem;
}

.page-header {
    text-align: center;
    padding: 3rem 0;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 4rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: auto;
}

.blogHead {
    color: #3B82F6;
}
.blog-listing-page {
  background-image: linear-gradient(
      to right, 
      rgba(15, 23, 42, 0.8), 
      rgba(30, 64, 175, 0.7) 
    ),url('../Imgs/BlogImgs/BLogPost/card-Img-5.webp');
  background-size: cover; 
  background-position: center;
  background-attachment: fixed; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Slider Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title-blog {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
    text-align: left;
    color: var(--border-light);
}

.slider-nav {
    display: flex;
    gap: 0.5rem;
}

.slider-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow-sm);
}

.slider-btn:hover:not(:disabled) {
    background-color: var(--brand-blue-light);
    color: var(--brand-blue);
    transform: scale(1.05);
}

.slider-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.slider-wrapper {
    position: relative;
}

.posts-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 1.5rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.posts-grid::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, and Opera */
}

.blog-card {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(229, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: start;
    flex: 0 0 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.card-image-wrapper {
    overflow: hidden;
    object-fit: cover;

    img {
        width: 100%;
        /* height: 100%; */
        object-fit: cover;
    }
}

.blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover img {
    transform: scale(1.05);
}

.blog-card .card-content {
    padding: 1.5rem;
}

.card-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-blue);
    background-color: var(--brand-blue-light);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
}

.blog-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.75rem;
    line-height: 1.4;
    color: var(--text-dark);
}

.card-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.card-meta .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.card-meta .author-name {
    font-weight: 600;
    display: block;
    color: var(--text-dark);
}

.card-meta .post-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}


/* --- Single Blog Post Page --- */
.blog-post {
    max-width: 800px;
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--brand-blue);
}

.post-header {
    margin-bottom: 3rem;
}

.post-header .category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-blue);
    background-color: var(--brand-blue-light);
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    margin-bottom: 1rem;
}

.post-header .category-tag svg {
    width: 16px;
    height: 16px;
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.post-header .subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.post-meta {
    margin-top: 1.5rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 600;
    color: var(--text-dark);
}

.meta-details {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.feature-image {
    margin-bottom: 3rem;
}

.feature-image img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.post-content {
    font-size: 1.125rem;
    color: var(--text-dark);
}

.post-content p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
    color: #374151;
}

.post-content h2 {
    color: var(--text-dark);
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.post-content a {
    color: var(--brand-blue-text);
    text-decoration: none;
    font-weight: 500;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content ul {
    list-style-position: outside;
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.post-content ul li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    border-left: 4px solid var(--brand-blue);
    background-color: var(--brand-blue-light);
    font-size: 1.1rem;
    font-style: italic;
    color: #111827;
    border-radius: 0 0.5rem 0.5rem 0;
}

.post-content code {
    background-color: var(--border-light);
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    border-radius: 6px;
    font-family: monospace;
    color: var(--text-dark);
}

.code-block {
    background-color: #1F2937;
    border-radius: 0.75rem;
    margin: 2rem 0;
    overflow: hidden;
    color: #E5E7EB;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #374151;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #4B5563;
}

.code-header span {
    font-size: 0.75rem;
    color: #D1D5DB;
    text-transform: uppercase;
    font-weight: 500;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #D1D5DB;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: white;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.code-block pre {
    padding: 1rem;
    overflow-x: auto;
}

.code-block pre code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
    color: inherit;
}

.author-bio {
    margin-top: 4rem;
    padding: 2rem;
    background-color: var(--brand-blue-light);
    border-radius: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.author-bio .bio-title {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.author-bio h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.author-bio .bio-description {
    color: var(--text-muted);
    font-size: 1rem;
}


/* =========================================== */
/* =================Blog Posts =============== */
/* ========================================== */
/* Main Section Container */

.ib-blog-section {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
    /* Keeps decorative shapes contained */
}

/* Decorative background shapes */
.ib-blog-section::before {
    content: '';
    position: absolute;
    top: -150px;
    left: -200px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(66, 165, 245, 0.1) 0%, rgba(66, 165, 245, 0) 70%);
    z-index: 0;
}

.ib-blog-section::after {
    content: '';
    position: absolute;
    bottom: -180px;
    right: -220px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(30, 136, 229, 0.1) 0%, rgba(30, 136, 229, 0) 70%);
    z-index: 0;
}

/* Content Wrapper */
.ib-blog-container {
    max-width: 1100px;
    /* Wider container */
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Section Header */
.ib-blog-header {
    text-align: center;
    margin-bottom: 50px;
}

.ib-blog-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.ib-blog-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: #42a5f5;
    border-radius: 2px;
}

.ib-blog-header p {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* Two-column layout for content and sidebar */
.ib-blog-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    /* Main content is 2.5 times wider than sidebar */
    gap: 40px;
}

/* List container for blog cards */
.ib-blog-list {
    display: grid;
    gap: 30px;
}

/* Individual Blog Card */
.ib-blog-card {
    display: flex;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0;
}

.ib-blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

.ib-card-image-wrapper {
    flex-shrink: 0;
    width: 250px;
    position: relative;
}

.ib-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ib-card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #42a5f5;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ib-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.ib-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.ib-card-title a {
    text-decoration: none;
    color: #1a202c;
    transition: color 0.3s ease;
}

.ib-card-title a:hover {
    color: #42a5f5;
}

.ib-card-excerpt {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.ib-card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #42a5f5;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: gap 0.3s ease;
}

.ib-card-read-more:hover {
    gap: 12px;
    text-decoration: none;
}

/* Sidebar Styling */
.ib-sidebar-widget {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
}

.ib-sidebar-widget h4 {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    color: #333;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    font-weight: 600;
}

.ib-sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ib-sidebar-widget ul li a {
    text-decoration: none;
    color: #555;
    display: block;
    padding: 8px 0;
    transition: color 0.3s;
}

.ib-sidebar-widget ul li a:hover {
    color: #42a5f5;
}

.ib-featured-internship {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background-color: #f8f9fa;
    margin-bottom: 10px;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.ib-featured-internship:hover {
    background-color: #e3f2fd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.ib-featured-internship span {
    font-size: 0.9rem;
    color: #777;
}

/* Find the CSS for your review section */
.review-cta-section {
    position: relative; /* This is CRITICAL for z-index to work */
    isolation: isolate; /* Creates a new stacking context */
}

/* This is the overlay element that is causing the problem */
.review-cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #60A5FA; /* The blue color from your screenshot */
    opacity: 0.8; /* Example opacity */
    
    /* This is the FIX: */
    z-index: -1; /* This moves the overlay behind the content */
}

/* Responsive Design */
@media (max-width: 992px) {
    .ib-blog-layout {
        grid-template-columns: 1fr;
        /* Single column layout */
    }
}

@media (max-width: 768px) {
    .ib-blog-card {
        flex-direction: column;
    }

    .ib-card-image-wrapper {
        width: 100%;
        height: 200px;
    }

    .ib-blog-header h2 {
        font-size: 2rem;
    }

    .ib-blog-section {
        padding: 60px 15px;
    }
}

/* --- Responsive Design --- */
@media (min-width: 640px) {
    .blog-post {
        padding: 3rem;
    }

    .blog-card {
        flex-basis: calc(50% - (1.5rem / 2));
    }
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }

    .nav-links {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-about {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .page-header h1 {
        font-size: 3rem;
    }

    .blog-card {
        flex-basis: calc(33.333% - (1.5rem * 2 / 3));
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }

    .footer-about {
        grid-column: auto;
    }
}
