/* Single Video Page Specific Styles */

/* Breadcrumb Navigation */
.breadcrumb-container {
    background-color: var(--light-navy);
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 10px;
    color: var(--light-gray);
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--red);
}

.breadcrumb .active {
    color: var(--light-gray);
}

/* Article Layout */
.video-article {
    margin: 40px 0;
}

/* Primary Video Section */
.video-primary {
    margin-bottom: 30px;
    background-color: var(--light-navy);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-player-container {
    margin-top: 0px;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background-color: #000;
}

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

.video-meta {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-title {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--white);
    font-weight: bold;
}

.video-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--light-gray);
    font-size: 0.9rem;
}

.video-stats a {
    color: var(--light-gray);
}

.video-date {
    display: flex;
    align-items: center;
}

.video-date::before {
    content: '\f073';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 5px;
}

/* Video Thumbnail and Link Styles */
.video-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.play-icon i {
    color: white;
    font-size: 1.5rem;
}

.video-thumbnail:hover .play-icon {
    opacity: 1;
}

.video-clickable {
    cursor: pointer;
}

.video-title-link {
    text-decoration: none;
    color: var(--white);
}

.video-title-link:hover h3 {
    color: var(--red);
}

.video-info h3 {
    color: var(--white);
    margin: 10px 0 5px;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.video-info p {
    color: var(--light-gray);
    font-size: 1rem;
    margin: 0;
}

.video-info h3, .video-info p {
    text-decoration: none;
}

.video-card {
    margin-bottom: 20px;
}

/* Social Sharing */
.social-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.social-share span {
    margin-right: 10px;
    font-weight: bold;
}

@media (max-width: 480px) {
    .social-share span {
        width: 100%;
    }
}

.social-share a, .social-share button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-decoration: none;
    transition: transform 0.3s, background-color 0.3s;
}

@media (max-width: 768px) {
    .social-share a, .social-share button {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: var(--white);
        text-decoration: none;
        transition: transform 0.3s, background-color 0.3s;
    }
}

.social-share a:hover, .social-share button:hover {
    transform: translateY(-3px);
}

.share-facebook {
    background-color: #3b5998;
}

.share-twitter {
    background-color: #1da1f2;
}

.share-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.share-whatsapp {
    background-color: #25D366; /* WhatsApp green */
}

.share-tiktok {
    background-color: #000000;
}

.share-email {
    background-color: #757575;
}

.share-link {
    background-color: var(--red);
    border: none;
    cursor: pointer;
}

/* Video Description */
.video-description {
    padding: 30px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.5s ease;
    position: relative; /* Important for the pseudo-element positioning */
}

/* The expanded class is just a marker - we handle max-height via inline styles */
.video-description.expanded {
    /* No specific max-height here - handled dynamically by JS */
}

/* Add fade effect at the bottom of collapsed description */
.video-description::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px; /* Height of the fade effect */
    background: linear-gradient(to bottom, rgba(19, 28, 49, 0.01), var(--light-navy) 95%); /* Fade from transparent to background color */
    pointer-events: none; /* Makes sure the fade doesn't block clicks */
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Hide the fade effect when expanded */
.video-description.expanded::after {
    opacity: 0;
}

.video-description .lead {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: var(--white);
    line-height: 1.6;
}

.description-content {
    margin-bottom: 25px;
    color: #cccccc;
}

.description-content p {
    margin-bottom: 15px;
}

.description-content a {
    color: #ffffff;
    text-decoration: underline;
}
.description-content a:hover {
    color: #ffffff;
}

.read-more-btn {
    display: block;
    margin: 0 30px 20px auto; /* Changed from 'margin: 0 auto 20px' to align right */
    background-color: var(--red);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.read-more-btn:hover {
    background-color: #a00b33;
}

/* Video Tags */
.video-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

.tag-label {
    font-weight: bold;
    color: var(--light-gray);
}

.tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: var(--red);
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    color: var(--white);
    text-decoration: none;
    margin-bottom: 15px;
    background-color: var(--dark-navy);
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: var(--red);
}

.back-button i {
    margin-right: 8px;
}

/* Categories */
.video-meta-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.video-category-link {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 22px;
    border-radius: 20px;
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s;
    margin-bottom: 10px;
    margin-top: -5px;
}

@media (max-width: 576px) {
    .video-category-link {
        display: inline-block;
        background-color: rgba(255, 255, 255, 0.2);
        padding: 4px 12px;
    }
}

.video-category-link:hover {
    background-color: var(--red);
}

/* Transcript Section */
.video-transcript {
    background-color: var(--light-navy);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-transcript h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--white);
}

.transcript-container {
    color: #cccccc;
}

.transcript-container p {
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.transcript-container p:last-of-type {
    border-bottom: none;
}

.transcript-container strong {
    color: var(--white);
    margin-right: 10px;
}

.transcript-toggle {
    background-color: var(--red);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    margin-top: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.transcript-toggle:hover {
    background-color: #a00b33;
}

.full-transcript {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Comments Section */
.comments-section {
    background-color: var(--light-navy);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: none;
    opacity: 0;
}

.comments-section.visible {
    /* Don't set display here; it's handled dynamically by JS */
}
.comments-section.visible {
    /* display: block; */
}

.comments-section h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--white);
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--white);
    resize: vertical;
    min-height: 100px;
    margin-bottom: 15px;
    font-family: inherit;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--red);
}

.comment-submit {
    background-color: var(--red);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.comment-submit:hover {
    background-color: #a00b33;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment {
    display: flex;
    gap: 15px;
}

.comment-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: bold;
    color: var(--white);
}

.comment-date {
    font-size: 0.8rem;
    color: var(--light-gray);
}

.comment-content p {
    color: #cccccc;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-reply-btn {
    background: none;
    border: none;
    color: var(--light-gray);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    transition: color 0.3s ease;
}

.comment-reply-btn:hover {
    color: var(--red);
}

/* Video Grid for Related Videos */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--red);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 9999;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    position: relative;
}

.modal-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
}

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

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .video-meta {
        padding: 15px 20px;
    }
    
    .video-title {
        font-size: 1.5rem;
    }
    
    .video-description {
        padding: 20px;
    }
    
    .social-share {
        justify-content: center;
    }
    
    .comment {
        flex-direction: column;
    }
    
    .comment-avatar {
        align-self: flex-start;
    }
    
    .video-transcript, 
    .comments-section {
        padding: 20px;
    }
    
    .video-stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-meta-categories,
    .video-tags {
        justify-content: center;
    }
}

.video-player-container iframe, 
.video-player-container #player-container,
.video-player-container #player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info a.video-link h3,
.video-info a.video-link p {
    text-decoration: none!important;
}
.video-info a.video-link:hover {
    text-decoration: none!important;
}

.video-info a.video-link:hover h3 {
    color: var(--red); /* Changes just the title color on hover */
}

/* Make sure related videos don't compete with main video */
.related-videos {
    margin-top: 40px;
    border-top: 1px solid #dddddd56;
    padding-top: 20px;
}