/* ============================================================
   YouTube Latest Videos Section - NimkarGuruji
   ============================================================ */

.yt-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #fff8ef 0%, #fdeede 100%);
    position: relative;
    overflow: hidden;
}

.yt-section .section-header {
    margin-bottom: 36px;
}

/* Channel banner */
.yt-channel-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff;
    border: 1px solid rgba(212, 160, 23, 0.25);
    border-radius: 16px;
    padding: 18px 24px;
    box-shadow: 0 8px 28px rgba(120, 70, 0, 0.08);
    max-width: 880px;
    margin: 0 auto 40px;
}

.yt-channel-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.yt-channel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #d4a017;
    background: #fdeede;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-channel-avatar .yt-avatar-fallback {
    font-size: 1.6rem;
    color: #d4a017;
}

.yt-channel-text h3 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    color: #4a2c00;
}

.yt-channel-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #8a6d3b;
}

.yt-subscribe-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ff0000;
    color: #fff;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.25s, transform 0.25s;
    white-space: nowrap;
}

.yt-subscribe-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
    color: #fff;
}

/* Horizontal scroll container */
.yt-scroll-container {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
}

.yt-video-scroll {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 4px 18px;
    scrollbar-width: thin;
    scrollbar-color: #d4a017 transparent;
}

.yt-video-scroll::-webkit-scrollbar {
    height: 8px;
}

.yt-video-scroll::-webkit-scrollbar-thumb {
    background: #d4a017;
    border-radius: 10px;
}

.yt-video-scroll::-webkit-scrollbar-track {
    background: rgba(212, 160, 23, 0.12);
    border-radius: 10px;
}

/* Video card */
.yt-video-card {
    flex: 0 0 300px;
    width: 300px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(120, 70, 0, 0.1);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.yt-video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 34px rgba(120, 70, 0, 0.18);
}

.yt-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    background: #1a1a1a;
    overflow: hidden;
}

.yt-thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.yt-video-card:hover .yt-thumb-wrapper img {
    transform: scale(1.06);
}

.yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 58px;
    height: 58px;
    background: rgba(255, 0, 0, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    padding-left: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s, background 0.25s;
}

.yt-thumb-wrapper:hover .yt-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    background: #ff0000;
}

.yt-video-date {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.yt-video-info {
    padding: 14px 16px 18px;
}

.yt-video-info h4 {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.45;
    color: #3a2400;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

/* Scroll arrow buttons */
.yt-scroll-btn {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 5;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #d4a017;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(120, 70, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.yt-scroll-btn:hover {
    background: #d4a017;
    color: #fff;
}

.yt-scroll-left  { left: -10px; }
.yt-scroll-right { right: -10px; }

/* Loading state */
.yt-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8a6d3b;
    font-size: 1rem;
    padding: 40px 10px;
    width: 100%;
    justify-content: center;
}

/* CTA */
.yt-channel-cta {
    text-align: center;
    margin-top: 34px;
}

/* Modal */
.yt-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.yt-modal.active {
    display: flex;
}

.yt-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
}

.yt-modal-content {
    position: relative;
    z-index: 2;
    width: min(92vw, 960px);
    animation: ytModalIn 0.3s ease;
}

@keyframes ytModalIn {
    from { opacity: 0; transform: scale(0.94); }
    to   { opacity: 1; transform: scale(1); }
}

.yt-modal-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.yt-modal-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.yt-modal-close {
    position: absolute;
    top: -46px;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.yt-modal-close:hover {
    background: #ff0000;
    color: #fff;
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .yt-section { padding: 56px 0; }
    .yt-video-card { flex: 0 0 240px; width: 240px; }
    .yt-scroll-btn { display: none !important; }
    .yt-channel-banner { padding: 16px; }
    .yt-channel-text h3 { font-size: 1.08rem; }
    .yt-modal-close { top: -42px; }
}
