/**
 * Video Components CSS
 * Styles for YouTube video embeds and video sections
 * @author ultramaxlink.win Team
 * @version 1.0.0
 */

/* ===== VIDEO TUTORIALS SECTION ===== */
.video-tutorials-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    position: relative;
    overflow: hidden;
}

.video-tutorials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="video-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(0,230,118,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23video-pattern)"/></svg>');
    pointer-events: none;
}

.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

/* ===== VIDEO CARD STYLES ===== */
.video-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 230, 118, 0.2);
    border-color: var(--accent-green);
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: var(--bg-primary);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px 12px 0 0;
}

.video-info {
    padding: 1.5rem;
}

.video-info h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.video-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== STRATEGY VIDEO SECTION ===== */
.strategy-video-section {
    padding: 4rem 0;
    background: var(--bg-primary);
}

.strategy-video-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .strategy-video-card {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
}

.strategy-video-card .video-wrapper {
    border-radius: 0;
    padding-bottom: 56.25%;
}

.strategy-video-card .video-wrapper iframe {
    border-radius: 0;
}

.video-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.video-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.video-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.video-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.video-highlights li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.video-highlights li:last-child {
    margin-bottom: 0;
}

/* ===== INGREDIENT VIDEO SECTION ===== */
.ingredient-video-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.ingredient-video-grid {
    margin-top: 2rem;
}

.video-tutorial {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.tutorial-info {
    padding: 2rem;
}

.tutorial-info h3 {
    color: var(--text-primary);
    font-size: 1.375rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tutorial-info p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* ===== UPDATES VIDEO SECTION ===== */
.updates-video-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.updates-video-showcase {
    margin-top: 2rem;
}

.featured-update-video {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .featured-update-video {
        grid-template-columns: 2fr 1fr;
        gap: 0;
    }
}

.update-details {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.update-details h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.update-details p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.update-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.highlight-tag {
    background: var(--accent-green);
    color: var(--bg-primary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== RECIPE VIDEO SECTION ===== */
.recipe-video-section {
    margin: 3rem 0;
    padding: 2rem 0;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.video-tutorial-card {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.video-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.recipe-video-section .video-wrapper {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.recipe-video-section .video-wrapper iframe {
    border-radius: 12px;
}

.video-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 767px) {
    .video-tutorials-section,
    .strategy-video-section,
    .ingredient-video-section,
    .updates-video-section {
        padding: 2rem 0;
    }
    
    .video-info,
    .video-content,
    .tutorial-info,
    .update-details {
        padding: 1.5rem;
    }
    
    .video-info h3,
    .video-content h3,
    .tutorial-info h3,
    .update-details h3 {
        font-size: 1.125rem;
    }
    
    .video-title {
        font-size: 1.25rem;
    }
    
    .video-tutorial-card {
        padding: 0 1rem;
    }
}

/* ===== LOADING STATES ===== */
.video-wrapper.loading {
    background: linear-gradient(90deg, var(--bg-primary) 25%, var(--bg-secondary) 50%, var(--bg-primary) 75%);
    background-size: 200% 100%;
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===== ACCESSIBILITY ===== */
.video-wrapper:focus-within {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

/* ===== DARK MODE OPTIMIZATIONS ===== */
@media (prefers-color-scheme: dark) {
    .video-card,
    .strategy-video-card,
    .video-tutorial,
    .featured-update-video {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    }
    
    .video-card:hover {
        box-shadow: 0 16px 48px rgba(0, 230, 118, 0.3);
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .video-card,
    .strategy-video-card,
    .video-tutorial,
    .featured-update-video {
        border: 2px solid var(--text-primary);
    }
    
    .highlight-tag {
        border: 1px solid var(--bg-primary);
    }
}