/* YouTube Section Styles */
.youtube-section {
    background-color: #f9f9f9;
    padding: 4rem 0;
}

.youtube-section .section-title {
    color: #c4302b;
}

.youtube-section .section-subtitle {
    color: #555;
}

.youtube-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.youtube-channel-info {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
}

.channel-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.channel-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.channel-title {
    font-size: 1.5rem;
    color: #333;
}

.channel-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #c4302b;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.btn-subscribe {
    background-color: #c4302b;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-subscribe:hover {
    background-color: #a02721;
}

.youtube-videos-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.videos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.videos-header h3 {
    font-size: 1.5rem;
    color: #333;
}

.youtube-channel-link {
    color: #c4302b;
    text-decoration: none;
    font-weight: 600;
}

.youtube-channel-link:hover {
    text-decoration: underline;
}

.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Ensure 4 columns on large screens -> 8 items = 2 rows */
@media (min-width: 1024px) {
    .youtube-videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.youtube-video-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.youtube-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.video-thumbnail {
    position: relative;
}

.video-thumbnail img {
    width: 100%;
    display: block;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.youtube-video-card:hover .play-button {
    opacity: 1;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: #333;
    height: auto;
    overflow: visible;
    white-space: normal;
    word-break: break-word;
}

.video-date {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 1rem;
}

.btn-watch-youtube {
    display: inline-block;
    background: #c4302b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-watch-youtube:hover {
    background: #a02721;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content.youtube-modal {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: black;
    padding: 0;
}

.modal-close {
    position: absolute;
    top: -30px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading-spinner,
.error-message {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #555;
}
