/**
 * Video Optimization CSS for Google Video Indexing
 * @version 4.3.00
 * @package Com_yutub
 * @author Alberto Santini - Clickandfly.it
 * @copyright  Alberto Santini - click and fly
 */

/* Video-centric page structure */
.video-page-main {
    width: 100%;
    max-width: 100%;
}

.video-article-primary {
    background: #ffffff;
    border-radius: 8px;
    /*box-shadow: 0 2px 10px rgba(0,0,0,0.1);*/
}

/* Primary video section - make video the dominant content */
.primary-video-section {
    position: relative;
    z-index: 10;
}

.video-player-container {
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.main-video-content {
    position: relative;
    width: 100%;
    min-height: 300px;
}

.primary-video-content {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

.primary-video-link {
    display: block;
    position: relative;
    width: 100%;
    text-decoration: none;
}

.video-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 4px;
}

/* Responsive video container */
.responsive-16by9 {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.responsive-16by9 > div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.responsive-16by9 img,
.responsive-16by9 video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video play button styling - only enhance, don't override positioning */
.primary-video-link .vjs-big-play-button {
    /* Only style the button when it's inside our video link, preserve existing positioning */
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.primary-video-link .vjs-big-play-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* Don't override the icon, let the existing styles handle it */
.primary-video-link .vjs-big-play-button .vjs-icon-placeholder {
    color: #ffffff;
}

/* Video information styling */
.video-details {
    padding: 20px;
    /*background: #ffffff;*/
}

.video-header {
    margin-bottom: 20px;
}

.video-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 12px;
}

.video-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.video-meta img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.video-description {
    line-height: 1.6;
    color: #555;
}

/* Related content styling */
.related-content {
    border-radius: 8px;
    padding: 20px;
}

.related-content h3 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

/* Video list improvements */
.dativideo {
    padding: 12px;
    border-radius: 6px;
    background: #ffffff;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.dativideo:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.titolovideolista {
    display: block;
    text-decoration: none;
    color: inherit;
}

.titolovideolista:hover {
    text-decoration: none;
}

/* Responsive improvements */
@media (max-width: 960px) {
    .primary-video-section {
        flex-direction: column;
    }

    .video-title {
        font-size: 1.3rem;
    }

    .video-meta {
        font-size: 13px;
    }

    .related-content {
        margin-top: 20px;
    }
}

@media (max-width: 640px) {
    .video-title {
        font-size: 1.2rem;
    }

    .video-details {
        padding: 15px;
    }
}

/* Focus states for accessibility */
.primary-video-link:focus,
.primary-video-link .vjs-big-play-button:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Loading states */
.video-thumbnail[loading='eager'] {
    background: #f0f0f0;
}

/* Schema.org VideoObject page optimization */
.video-page-main[itemscope] {
    display: block;
    width: 100%;
}

/* Ensure video is recognized as primary content */
.main-video-player {
    position: relative;
    z-index: 20;
    margin-bottom: 20px;
}

/* Print styles */
@media print {
    .related-content,
    .primary-video-link .vjs-big-play-button {
        display: none;
    }

    .video-thumbnail {
        max-height: 400px;
    }
}
