/* YouTube Video Gallery Styles */

/* Video grid layout */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Video card styling */
.video-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
}

/* Animation for video cards appearing */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animation delay to each card */
.video-card:nth-child(1) { animation-delay: 0.1s; }
.video-card:nth-child(2) { animation-delay: 0.2s; }
.video-card:nth-child(3) { animation-delay: 0.3s; }
.video-card:nth-child(4) { animation-delay: 0.4s; }
.video-card:nth-child(5) { animation-delay: 0.5s; }
.video-card:nth-child(6) { animation-delay: 0.6s; }
.video-card:nth-child(7) { animation-delay: 0.7s; }
.video-card:nth-child(8) { animation-delay: 0.8s; }
.video-card:nth-child(9) { animation-delay: 0.9s; }
.video-card:nth-child(10) { animation-delay: 1s; }

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #f5a623;
}

/* Video container with proper aspect ratio */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    transition: all 0.3s ease;
}

/* YouTube thumbnail styling */
.youtube-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    text-decoration: none;
}

.youtube-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.youtube-thumbnail:hover img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.youtube-thumbnail:hover .play-button {
    background: rgb(255, 0, 0);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
}

.youtube-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
    transition: background 0.3s ease;
}

.youtube-thumbnail:hover::before {
    background: rgba(0, 0, 0, 0.4);
}

/* Video info section */
.video-content {
    padding: 20px;
    position: relative;
}

.video-date {
    color: #f5a623;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-date i {
    font-size: 0.8rem;
}

.video-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.3;
    font-weight: 600;
    transition: color 0.3s ease;
}

.video-card:hover .video-title {
    color: #f5a623;
}

.video-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 50px 0;
    color: #f5a623;
    font-size: 1.5rem;
}

.loading-spinner i {
    margin-right: 10px;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error message */
.error-message {
    text-align: center;
    padding: 30px;
    color: #721c24;
    background-color: #f8d7da;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #f5c6cb;
}

/* YouTube channel subscription button */
.youtube-subscribe {
    text-align: center;
    margin-top: 40px;
}

.subscribe-btn {
    display: inline-flex;
    align-items: center;
    background-color: #ff0000;
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.subscribe-btn:hover {
    background-color: #cc0000;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

.subscribe-btn i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Load more button */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    padding: 10px 25px;
    background-color: #0a2342;
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(10, 35, 66, 0.3);
}

.load-more-btn:hover {
    background-color: #153a68;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10, 35, 66, 0.4);
}

.load-more-btn i {
    margin-left: 10px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .video-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}

/* Video play button overlay */
.video-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video-container::after {
    content: '\f04b';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(245, 166, 35, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
}

.video-card:hover .video-container::before,
.video-card:hover .video-container::after {
    opacity: 1;
}

.video-card:hover .video-container::after {
    transform: translate(-50%, -50%) scale(1.1);
} 