/* --- Global Font Update --- */
:root {
    --blog-font-main: 'Poppins', sans-serif;
}

.edutech-blog-main-feed,
.edutech-blog-banner-section {
    font-family: var(--blog-font-main) !important;
}

/* --- Specific Typography Updates --- */
.edutech-blog-banner-title {
    font-family: var(--blog-font-main);
    font-weight: 800; /* Extra Bold for Impact */
    letter-spacing: -0.5px;
}

.edutech-blog-section-title {
    font-family: var(--blog-font-main);
    font-weight: 700;
    color: #1e293b;
}

.edutech-blog-video-info h4 {
    font-family: var(--blog-font-main);
    font-weight: 600;
    line-height: 1.4;
}

.edutech-blog-video-info p, 
.edutech-blog-banner-text {
    font-family: var(--blog-font-main);
    font-weight: 400;
    color: #64748b;
}

/* Button Styling */
.edutech-blog-btn-see-all {
    font-family: var(--blog-font-main);
    font-weight: 600;
}





/* ==========================================================================
   1. Edutech Blog Banner Section
   ========================================================================== */
.edutech-blog-banner-section {
    padding: 20px 5%;
    background-color: #ffffff;
}

.edutech-blog-banner-container {
    width: 100%;
    max-width: 1400px;
    margin: 20px auto 40px;
    height: 220px;
    background-image: url('../images/blog/blog-banner.png');
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    background-color: #f0f9ff;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    padding-left: 60px;
}

.edutech-blog-banner-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 3.2rem;
    font-weight: 800;
    color: #1e3a8a;
    margin: 0;
    letter-spacing: -1.5px;
}

.edutech-blog-banner-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.1rem;
    color: #475569;
    margin-top: 8px;
    max-width: 380px;
    line-height: 1.5;
}

/* ==========================================================================
   2. Layout & Grid System
   ========================================================================== */
.edutech-blog-main-feed {
    padding: 40px 0;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.edutech-blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.edutech-blog-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.edutech-blog-videos-header, 
.edutech-blog-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.edutech-blog-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

/* ==========================================================================
   3. Video Card Styling (Unified Local & YouTube)
   ========================================================================== */
.edutech-blog-video-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.2s ease;
}

.edutech-blog-video-card:hover { 
    transform: translateY(-5px); 
}

/* 16:9 Aspect Ratio Container */
.edutech-blog-thumbnail {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Math: (9 / 16) * 100 */
    background: #000;
    overflow: hidden;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    cursor: pointer;
}

/* Local Video & YouTube Frame Positioning */
.edutech-blog-video-preview,
.edutech-blog-youtube-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover; /* Ensures local MP4s fill the space without black bars */
}

/* UI Elements for Local Videos */
.edutech-blog-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.edutech-blog-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    z-index: 2;
}

/* Card Information */
.edutech-blog-video-info {
    padding: 16px;
    flex-grow: 1;
}

.edutech-blog-video-info h4 { 
    font-size: 1rem; 
    font-weight: 700; 
    margin-bottom: 5px; 
    color: #1e293b;
}

.edutech-blog-video-info p { 
    color: #64748b; 
    font-size: 0.85rem; 
    margin: 0;
}

/* ==========================================================================
   4. Buttons & Utilities
   ========================================================================== */
.edutech-blog-btn-see-all {
    text-decoration: none;
    color: #1e40af;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 16px;
    border: 1.5px solid #dbeafe;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.edutech-blog-btn-see-all:hover {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

/* ==========================================================================
   5. Responsive Media Queries
   ========================================================================== */
@media (max-width: 991px) {
    .edutech-blog-grid-3 { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 768px) {
    /* Banner Mobile Adjustments */
    .edutech-blog-banner-container {
        padding-left: 30px;
        height: auto;
        padding-top: 40px;
        padding-bottom: 40px;
        background-position: center;
        border-radius: 16px;
    }
    
    .edutech-blog-banner-title {
        font-size: 2.2rem;
    }

    /* Grid Mobile Adjustments */
    .edutech-blog-grid-3 { 
        grid-template-columns: 1fr; 
    }
}


/* --- Final Global Mobile Optimization for Blog (Max 768px) --- */
@media (max-width: 768px) {

    /* 1. Banner Fix: Clean, Left-Aligned Title Only */
    .edutech-blog-banner-section {
        padding: 10px 15px !important;
        margin-top: 60px !important; 
    }

    .edutech-blog-banner-container {
        height: 120px !important;
        min-height: auto !important;
        padding-left: 20px !important;
        margin-bottom: 20px !important;
        border-radius: 16px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: flex-start !important;
        background-position: right center !important; 
        background-size: contain !important;
    }

    .edutech-blog-banner-title {
        font-size: 1.6rem !important;
        white-space: nowrap !important;
        color: #1e3a8a !important;
        margin: 0 !important;
        letter-spacing: -0.5px !important;
    }

    .edutech-blog-banner-text {
        display: none !important; 
    }

    /* 2. Video Feed: Forced 2-Column Grid for 3 Rows */
    .edutech-blog-main-feed {
        padding: 10px 0 !important; /* Reduced padding to tighten layout */
    }

    .edutech-blog-grid-3 {
        display: grid !important;
        /* Forces 2 cards per row across the screen */
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important;
        padding: 0 12px !important;
        margin-bottom: 30px !important;
    }

    /* 3. Video Card Refinements: Same Style, Smaller Size */
    .edutech-blog-video-card {
        border-radius: 12px !important;
        background: #ffffff !important;
        border: 1px solid #f1f5f9 !important;
        height: 100% !important;
    }

    .edutech-blog-thumbnail {
        border-top-left-radius: 12px !important;
        border-top-right-radius: 12px !important;
    }

    .edutech-blog-video-info {
        padding: 8px 10px !important; /* Slightly tighter padding for small cards */
    }

    .edutech-blog-video-info h4 {
        font-size: 0.8rem !important; /* Scaled down for 2-per-row visibility */
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
    }

    .edutech-blog-video-info p {
        font-size: 0.7rem !important;
        line-height: 1.1 !important;
        color: #64748b !important;
    }

    /* 4. Section Headers & Buttons Alignment */
    .edutech-blog-section-header {
        padding: 0 12px !important;
        margin-bottom: 12px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .edutech-blog-section-title {
        font-size: 1.1rem !important; /* Compact "Latest Videos" title */
        font-weight: 800 !important;
    }

    .edutech-blog-btn-see-all {
        font-size: 0.7rem !important;
        padding: 5px 10px !important;
        border-radius: 20px !important;
    }
}

/* Ensure 2 columns remain even on smaller phones */
@media (max-width: 480px) {
    .edutech-blog-grid-3 {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 8px !important; /* Narrower gap for small screens */
    }
}