﻿/* ==========================================================================
   Literature Media Plugin Styles
   Vishwa Hindi Parishad - Photos & Videos Showcase
   ========================================================================== */

:root {
    --lit-primary: #b91c1c;
    --lit-primary-dark: #8c1414;
    --lit-accent: #df7500;
    --lit-gradient: linear-gradient(135deg, #b91c1c 0%, #df7500 100%);
    --lit-text-dark: #1e293b;
    --lit-text-light: #64748b;
    --lit-border: #e2e8f0;
    --lit-bg-gray: #f8fafc;
    --lit-card-shadow: 0 4px 14px rgba(0,0,0,0.08);
    --lit-hover-shadow: 0 14px 28px rgba(0,0,0,0.16);
    --lit-radius: 12px;
}

.lit-media-wrapper {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto 50px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    box-sizing: border-box;
}

.lit-media-wrapper * {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   1. Dual Tab Switcher Buttons (छायाचित्र & वीडियो)
   -------------------------------------------------------------------------- */
.lit-tabs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 35px auto;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 50px;
    max-width: 480px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.06);
}

.lit-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    font-size: 16px;
    font-weight: 700;
    color: #475569;
    background: transparent;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
    text-decoration: none;
    user-select: none;
}

.lit-tab-btn .lit-tab-icon {
    font-size: 19px;
    display: inline-block;
    transition: transform 0.25s ease;
}

.lit-tab-btn:hover {
    color: #0f172a;
}

.lit-tab-btn:hover .lit-tab-icon {
    transform: scale(1.15);
}

.lit-tab-btn.lit-active {
    background: var(--lit-gradient);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(185, 28, 28, 0.35);
}

.lit-tab-btn.lit-active .lit-tab-icon {
    transform: scale(1.1);
}

/* Tab Panes */
.lit-tab-pane {
    display: none;
    animation: litFadeIn 0.35s ease forwards;
}

.lit-tab-pane.lit-pane-active {
    display: block;
}

@keyframes litFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   2. Category Section & Headings
   -------------------------------------------------------------------------- */
.lit-category-section {
    margin-bottom: 45px;
}

.lit-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
}

.lit-category-header::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--lit-gradient);
    border-radius: 2px;
}

.lit-category-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--lit-text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lit-category-title-icon {
    color: var(--lit-primary);
    font-size: 20px;
}

.lit-category-badge {
    display: inline-block;
    background: #fee2e2;
    color: var(--lit-primary);
    font-size: 13px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
}

/* --------------------------------------------------------------------------
   3. Photos Grid & Cards (छायाचित्र)
   -------------------------------------------------------------------------- */
.lit-photos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.lit-photo-card {
    position: relative;
    border-radius: var(--lit-radius);
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--lit-card-shadow);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.lit-photo-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--lit-hover-shadow);
}

.lit-photo-aspect {
    position: relative;
    width: 100%;
    padding-top: 66.66%; /* 3:2 aspect ratio */
    background: #0f172a;
    overflow: hidden;
}

.lit-photo-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lit-photo-card:hover .lit-photo-img {
    transform: scale(1.08);
}

.lit-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.3) 50%, rgba(15, 23, 42, 0.05) 100%);
    opacity: 0.9;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px 16px;
    color: #ffffff;
}

.lit-photo-card:hover .lit-photo-overlay {
    opacity: 1;
}

.lit-photo-zoom-icon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.lit-photo-card:hover .lit-photo-zoom-icon {
    opacity: 1;
    transform: scale(1);
    background: var(--lit-gradient);
}

.lit-photo-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}

.lit-photo-date {
    font-size: 11px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --------------------------------------------------------------------------
   4. Videos Grid & Cards (वीडियो)
   -------------------------------------------------------------------------- */
.lit-videos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.lit-video-card {
    position: relative;
    border-radius: var(--lit-radius);
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--lit-card-shadow);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.lit-video-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--lit-hover-shadow);
}

.lit-video-aspect {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #000000;
    overflow: hidden;
}

.lit-video-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lit-video-card:hover .lit-video-thumb {
    transform: scale(1.07);
}

.lit-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(220, 38, 38, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.5);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lit-video-play-btn::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 15px solid #ffffff;
    margin-left: 3px;
}

.lit-video-card:hover .lit-video-play-btn {
    transform: translate(-50%, -50%) scale(1.15);
    background: #ff0000;
    box-shadow: 0 6px 22px rgba(255, 0, 0, 0.7);
}

.lit-video-content {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.lit-video-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    color: var(--lit-text-dark);
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lit-video-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--lit-text-light);
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
}

.lit-video-watch-link {
    color: var(--lit-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --------------------------------------------------------------------------
   5. Fullscreen Lightbox Modal (for Photos)
   -------------------------------------------------------------------------- */
.lit-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lit-lightbox-modal.lit-show {
    display: flex;
    opacity: 1;
}

.lit-lightbox-dialog {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lit-lightbox-img-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 86vw;
    max-height: 78vh;
}

.lit-lightbox-img {
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    user-select: none;
    transition: transform 0.25s ease;
}

.lit-lightbox-caption-bar {
    margin-top: 15px;
    text-align: center;
    color: #ffffff;
    max-width: 750px;
    padding: 0 20px;
}

.lit-lightbox-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.lit-lightbox-meta {
    font-size: 13px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.lit-lightbox-article-btn {
    display: inline-block;
    background: var(--lit-gradient);
    color: #ffffff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.lit-lightbox-article-btn:hover {
    opacity: 0.9;
    color: #ffffff;
}

/* Lightbox Controls */
.lit-lightbox-close {
    position: fixed;
    top: 22px;
    right: 25px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000000;
}

.lit-lightbox-close:hover {
    background: var(--lit-primary);
    transform: rotate(90deg);
}

.lit-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000000;
    user-select: none;
}

.lit-lightbox-nav:hover {
    background: var(--lit-primary);
    transform: translateY(-50%) scale(1.1);
}

.lit-lightbox-prev {
    left: 25px;
}

.lit-lightbox-next {
    right: 25px;
}

/* --------------------------------------------------------------------------
   6. Video Lightbox Modal (for YouTube)
   -------------------------------------------------------------------------- */
.lit-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lit-video-modal.lit-show {
    display: flex;
    opacity: 1;
}

.lit-video-modal-dialog {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.lit-video-modal-aspect {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
}

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

.lit-video-modal-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lit-video-modal-close:hover {
    background: var(--lit-primary);
    transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   7. Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .lit-photos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    .lit-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .lit-photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .lit-videos-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 18px;
    }
    .lit-tab-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    .lit-category-title {
        font-size: 19px;
    }
    .lit-lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }
    .lit-lightbox-prev {
        left: 10px;
    }
    .lit-lightbox-next {
        right: 10px;
    }
    .lit-lightbox-close {
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .lit-photos-grid {
        grid-template-columns: 1fr;
    }
    .lit-tabs-container {
        max-width: 100%;
        margin-bottom: 25px;
    }
}
