/* ===================================
   ADETUTU HAIR - TUTORIALS CSS
   Styles for tutorial video section
   =================================== */

/* Tutorial Grid */
.tutorials-section {
    background: #f9f7f5;
    padding: 80px 0;
}

.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Tutorial Card */
.tutorial-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.tutorial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Video Container */
.tutorial-video {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.tutorial-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tutorial-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* YouTube Wrapper */
.youtube-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    background: #000;
}

.youtube-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: all 0.3s ease;
}

.youtube-wrapper:hover img {
    opacity: 0.8;
    transform: scale(1.05);
}

/* YouTube iframe when playing */
.tutorial-video iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
}

/* Play Button Overlay */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(212, 175, 55, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.tutorial-card:hover .play-button {
    background: #d4af37;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* YouTube specific play button style */
.youtube-wrapper .play-button {
    background: rgba(255, 0, 0, 0.8);
    width: 80px;
    height: 80px;
    font-size: 32px;
}

.youtube-wrapper:hover .play-button {
    background: rgba(255, 0, 0, 0.95);
    transform: translate(-50%, -50%) scale(1.15);
}

/* Tutorial Info */
.tutorial-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a0f0a;
    padding: 20px 20px 10px;
    font-family: 'Georgia', serif;
}

.tutorial-description {
    font-size: 14px;
    color: #666;
    padding: 0 20px 20px;
    line-height: 1.5;
}

/* View All Button */
.view-all-tutorials-btn {
    display: inline-block;
    margin: 0 auto;
    padding: 15px 50px;
    background: linear-gradient(135deg, #d4af37, #f4e4bc, #d4af37);
    background-size: 200% 100%;
    color: #1a0f0a;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    width: max-content;
}

.view-all-tutorials-btn:hover {
    background-position: -100% 0;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tutorials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .youtube-wrapper .play-button {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}

/* Loading state for videos */
.tutorial-video.loading {
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-video.loading::after {
    content: 'Loading video...';
    color: #999;
    font-size: 14px;
}

/* Error state */
.tutorial-video.error {
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

.tutorial-video.error::before {
    content: '⚠️';
    font-size: 48px;
    margin-bottom: 10px;
}

.tutorial-video.error::after {
    content: 'Video unavailable';
    color: #999;
    font-size: 14px;
}