/*
Theme Name: uTech Child
Theme URI: https://wp.mehedidb.com/utech
Description: Child theme for uTech
Author: BDEXPERT
Author URI: https://themeforest.net/user/bdexpert/portfolio
Template: utech
Version: 2.0.0
Text Domain: utech-child
*/

/* ===== YouTube Integration Styles ===== */
.youtube-channel-wrapper {
    margin-top: 150px;
    padding: 30px;
    background: #ffffff00;
    border-radius: 8px;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    color: #428bca;
    text-align: center;
}

/* Playlists Section */
.playlists-section {
    position: relative;
}

/* Search Boxes */
.search-box {
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-box input {
    padding: 12px 18px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Playlists Grid - FIXED GRID ISSUE */
.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}

.playlist-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background: white;
    transform: translateY(0);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.playlist-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.playlist-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.playlist-card h3 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #428bca;
    text-align: center;
    background: #f9f9f9;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Videos Container */
.videos-container {
    margin-top: 30px;
    padding-top: 20px;
}

.back-button {
    background: #e27d27;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 25px;
    font-size: 15px;
    transition: background 0.3s;
}

.back-button:hover {
    background: #428bca;
}

.playlist-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.video-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.video-item:hover {
    transform: translateY(-5px);
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-item h3 {
    padding: 15px;
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

/* Loading and Error States */
.loading-videos {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
    grid-column: 1 / -1;
}

.video-error {
    text-align: center;
    padding: 30px;
    color: #e74c3c;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Responsive styles */
@media (max-width: 992px) {
    .playlists-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .youtube-channel-wrapper {
        padding: 20px 15px;
    }
    
    .playlists-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .playlists-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .playlist-card h3 {
        padding: 12px 10px;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        max-width: 100%;
    }
}