/* ==========================================================================
   MG Education & Social Development Organization
   Premium YouTube Free Classes Component CSS — White Professional Theme
   ========================================================================== */

/* Main Section Wrapper */
.yt-classes-section {
    padding: 60px 0;
    background-color: #ffffff;
    border-top: 1px solid #eef2f6;
    font-family: 'Inter', sans-serif;
    color: #1c1d1f;
}

.yt-classes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============== HEADER =============== */

.yt-classes-header {
    margin-bottom: 20px;
}

.yt-header-left h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1c1d1f;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.yt-heading-icon {
    color: #ff0000;
    font-size: 32px;
}

.yt-header-left p {
    font-size: 15px;
    color: #6a6f73;
    margin: 0;
    line-height: 1.5;
}


/* =============== CHANNEL SUBSCRIBE BANNER =============== */

.yt-channel-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.yt-channel-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.yt-channel-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.yt-channel-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.yt-channel-name {
    font-size: 15px;
    font-weight: 700;
    color: #1c1d1f;
    display: flex;
    align-items: center;
    gap: 5px;
}

.yt-verified {
    font-size: 13px;
    color: #6a6f73;
}

.yt-sub-count {
    font-size: 12px;
    color: #6a6f73;
    font-weight: 500;
}

/* Subscribe Button */
.yt-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: #1c1d1f;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 20px;
    border-radius: 24px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.yt-subscribe-btn .fa-youtube {
    color: #ff0000;
    font-size: 15px;
}

.yt-subscribe-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-20deg);
    animation: subscribe-shimmer 3s ease-in-out infinite;
}

@keyframes subscribe-shimmer {
    0% { left: -75%; }
    100% { left: 150%; }
}

.yt-subscribe-btn:hover {
    background-color: #cc0000;
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(204, 0, 0, 0.25);
}

.yt-subscribe-btn:hover .fa-youtube {
    color: #ffffff;
}

.bell-icon {
    font-size: 12px;
    animation: bell-ring 3s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes bell-ring {
    0%, 80%, 100% { transform: rotate(0deg); }
    85% { transform: rotate(12deg); }
    90% { transform: rotate(-10deg); }
    95% { transform: rotate(6deg); }
}


/* =============== FILTER TABS =============== */

.yt-filter-wrapper {
    margin-bottom: 28px;
    border-bottom: 1px solid #d1d7dc;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.yt-filter-wrapper::-webkit-scrollbar { display: none; }
.yt-filter-wrapper { -ms-overflow-style: none; scrollbar-width: none; }

.yt-filter-tabs {
    display: flex;
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
    white-space: nowrap;
}

.yt-filter-tab {
    background: none;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #6a6f73;
    padding: 12px 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    outline: none;
}

.yt-filter-tab:hover {
    color: #1c1d1f;
}

.yt-filter-tab.active {
    color: #1c1d1f;
}

.yt-filter-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #1c1d1f;
    border-radius: 2px;
}


/* =============== SLIDER GRID =============== */

.yt-grid-container {
    position: relative;
    width: 100%;
    margin-bottom: 30px;
}

.yt-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px;
}

.yt-grid::-webkit-scrollbar { display: none; }

/* Slider Arrows */
.yt-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #d1d7dc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    color: #1c1d1f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.yt-nav-btn:hover {
    background-color: #f7f9fa;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    border-color: #8c9096;
    transform: translateY(-50%) scale(1.05);
}

.yt-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.yt-nav-btn.prev-btn { left: -22px; }
.yt-nav-btn.next-btn { right: -22px; }

.yt-nav-btn:disabled {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}


/* =============== VIDEO CARD =============== */

.yt-card {
    flex: 0 0 calc(25% - 15px);
    min-width: 260px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #1c1d1f;
    background-color: #ffffff;
    border: 1px solid #d1d7dc;
    border-radius: 8px;
    padding: 14px;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.yt-card.hidden {
    display: none !important;
}

.yt-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    border-color: #8c9096;
}

/* Thumbnail Box with Play Button Overlay */
.yt-thumbnail-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
    background-color: #f7f9fa;
    margin-bottom: 12px;
}

.yt-thumbnail-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    display: block;
}

.yt-card:hover .yt-thumbnail-box img {
    transform: scale(1.03);
}

/* Play Button Overlay */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yt-card:hover .play-overlay {
    opacity: 1;
}

.play-button-glowing {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 17px;
    box-shadow: 0 0 16px rgba(255, 0, 0, 0.5), 0 0 32px rgba(255, 0, 0, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.play-button-glowing i {
    margin-left: 3px; /* Visual centering for play triangle */
}

.yt-card:hover .play-button-glowing {
    transform: scale(1.1);
    box-shadow: 0 0 22px rgba(255, 0, 0, 0.6), 0 0 44px rgba(255, 0, 0, 0.3);
}

/* Video Duration Pill */
.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.78);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 3;
}


/* =============== CARD INFO =============== */

.yt-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.yt-title {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.3;
    color: #1c1d1f;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.yt-card:hover .yt-title {
    color: #cc0000;
}

.yt-excerpt {
    font-size: 12px;
    color: #6a6f73;
    line-height: 1.4;
    margin: 2px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
}

.yt-meta {
    font-size: 11.5px;
    color: #6a6f73;
    margin: 0;
}

.yt-views {
    font-weight: 600;
}

/* Author Row */
.yt-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #eef2f6;
}

.yt-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    flex-shrink: 0;
}

.yt-author-name {
    font-size: 12px;
    font-weight: 600;
    color: #6a6f73;
}


/* =============== SHOW ALL FOOTER LINK =============== */

.yt-show-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4f46e5;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
    transition: gap 0.2s ease;
    margin-top: 15px;
}

.yt-show-all:hover {
    gap: 12px;
    text-decoration: underline;
}


/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
    .yt-card {
        flex: 0 0 calc(33.333% - 14px);
    }
}

@media (max-width: 768px) {
    .yt-classes-section {
        padding: 40px 0;
    }

    .yt-header-left h2 {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .yt-heading-icon {
        font-size: 26px;
    }

    .yt-header-left p {
        font-size: 13px;
    }

    /* Channel Banner compact */
    .yt-channel-banner {
        padding: 10px 14px;
        gap: 12px;
    }

    .yt-channel-avatar-circle {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .yt-channel-name {
        font-size: 13px;
    }

    .yt-sub-count {
        font-size: 11px;
    }

    .yt-subscribe-btn {
        font-size: 12px;
        padding: 7px 14px;
    }

    /* Hide slider navigation arrows on mobile */
    .yt-nav-btn {
        display: none !important;
    }

    /* High-density 2x2 grid layout on mobile */
    .yt-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        overflow-x: visible !important;
        padding: 0 !important;
    }

    .yt-card {
        flex: none !important;
        min-width: 0 !important;
        padding: 10px !important;
        border-radius: 8px !important;
    }

    .yt-title {
        font-size: 12.5px;
        min-height: 32px;
    }

    .yt-excerpt {
        font-size: 11px;
        min-height: 28px;
    }

    .play-button-glowing {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .yt-avatar {
        width: 22px;
        height: 22px;
        font-size: 8px;
    }

    .yt-author-name {
        font-size: 11px;
    }
}
