/* Стили для страницы видео */
.videos-page {
    background-color: var(--color-bg);
    min-height: 100vh;
}

.videos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Header как в inspiration-list */
.videos-header {
    position: relative;
    margin-bottom: 3rem;
    text-align: center;
}

.videos-header .back-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.videos-header .back-button:hover {
    opacity: 0.7;
}

.videos-header .back-button i {
    width: 20px;
    height: 20px;
}

.videos-header .page-title {
    font-family: 'Comfortaa', cursive;
    font-size: 2.5rem;
    color: var(--color-text);
    margin: 0 0 1rem 0;
    text-align: center;
}

.videos-header .page-description {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    text-align: center;
}

/* Search Bar */
.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-right: 3rem;
    background-color: white;
    border: 2px solid var(--color-secondary);
    border-radius: 4px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--color-text);
    outline: none;
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(193, 122, 92, 0.1);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-secondary);
    width: 20px;
    height: 20px;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-image-container {
    height: 280px;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 1rem;
    position: relative;
}

.video-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .video-image {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s;
}

.video-card:hover .video-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}

.play-button {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
}

.play-button svg {
    width: 28px;
    height: 28px;
    color: var(--color-bg);
    fill: var(--color-bg);
    margin-left: 2px;
}

.duration-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.75rem;
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--color-bg);
}

.video-title {
    font-family: 'Comfortaa', cursive;
    font-size: 1.25rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.video-views {
    font-family: 'Nunito', sans-serif;
    font-size: 0.875rem;
    opacity: 0.7;
    color: var(--color-text);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    background-color: var(--color-secondary);
    color: var(--color-bg);
}

.load-more-btn:hover {
    opacity: 0.8;
}

/* Адаптивность для списка видео */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .videos-header {
        padding-top: 40px;
    }
    
    .videos-header .back-button {
        top: 0;
        transform: none;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .videos-header .page-title {
        font-size: 2rem;
        margin-top: 40px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-image-container {
        height: 240px;
    }
}

@media (max-width: 480px) {
    .videos-container {
        padding: 20px 15px 40px;
    }
}

/* Стили для детальной страницы видео */
.video-detail-page {
    background-color: var(--color-bg);
    min-height: 100vh;
}

.video-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.video-detail-header {
    position: relative;
    margin-bottom: 2rem;
    text-align: center;
}

.video-detail-header .back-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.video-detail-header .back-button:hover {
    opacity: 0.7;
}

.video-detail-header .page-title {
    font-family: 'Comfortaa', cursive;
    font-size: 2.5rem;
    color: var(--color-text);
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.video-detail-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

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

.video-info-section {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.video-info-section h2 {
    font-family: 'Comfortaa', cursive;
    font-size: 1.5rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.video-description {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.recipe-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--color-bg);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.recipe-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-info {
    flex-grow: 1;
}

.recipe-info h3 {
    font-family: 'Comfortaa', cursive;
    font-size: 1.3rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.recipe-info p {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.recipe-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: var(--color-primary);
    text-decoration: none;
    transition: gap 0.2s;
}

.recipe-link:hover {
    gap: 8px;
    text-decoration: underline;
}

/* Стили для похожих видео */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.related-title {
    font-family: 'Comfortaa', cursive;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-card {
    background: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-4px);
}

.related-card .video-thumb {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.related-card .video-thumb img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.related-card .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
}

.related-card .play-button {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-primary);
}

.related-card .play-button svg {
    width: 24px;
    height: 24px;
    color: var(--color-bg);
    fill: var(--color-bg);
    margin-left: 2px;
}

.related-card .duration-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.75rem;
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--color-bg);
    z-index: 2;
}

.related-card .video-info {
    padding: 1rem 0 0 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-card .video-info h4 {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    color: var(--color-text);
    line-height: 1.4;
    min-height: 2.8rem;
}

.related-card .watch-link {
    background: none;
    border: none;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0;
    margin: 0;
    text-align: left;
    transition: opacity 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
}

.related-card .watch-link:hover {
    opacity: 0.7;
    text-decoration: underline;
    gap: 8px;
}

/* Адаптивность для детальной страницы */
@media (max-width: 768px) {
    .video-detail-header {
        padding-top: 40px;
    }
    
    .video-detail-header .back-button {
        top: 0;
        transform: none;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .video-detail-header .page-title {
        font-size: 2rem;
        margin-top: 40px;
    }
    
    .recipe-card {
        flex-direction: column;
        text-align: center;
    }
    
    .recipe-image {
        width: 100%;
        height: 200px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}