/* ═══════════════════════════════════════════════════════════════
   Customer Satisfaction Videos - Frontend Styles
   ═══════════════════════════════════════════════════════════════ */

.csv-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f5f5f5;
    border-radius: 12px;
    margin: 20px auto;
    max-width: 600px;
}

/* ═══════════════════════════════════════════════════════════════
   🏠 صفحه اصلی - Home Section
   ═══════════════════════════════════════════════════════════════ */

.csv-home-section {
    padding: 20px 15px;
    direction: rtl;
    font-family: inherit;
}

.csv-home-container {
    max-width: 1300px;
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 25px;
}

/* ─── Text + Button ─── */
.csv-home-text {
    flex: 0 0 280px;
    text-align: center;
}

.csv-home-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--csv-title-color, #a92525);
    margin: 0 0 20px;
}

.csv-home-btn {
    display: inline-block;
    background: var(--csv-btn-bg, #e53935);
    color: var(--csv-btn-color, #fff) !important;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.csv-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 57, 53, 0.3);
    color: var(--csv-btn-color, #fff);
}

/* ─── Videos Grid ─── */
.csv-home-videos {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.csv-home-video {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.csv-home-video:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.csv-home-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}

.csv-home-video:hover img {
    transform: scale(1.08);
}

.csv-home-play {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: all 0.3s;
}

.csv-home-video:hover .csv-home-play {
    background: var(--csv-btn-bg, #e53935);
    transform: scale(1.1);
}

/* ─── Responsive: Tablet ─── */
@media (max-width: 1024px) {
    .csv-home-container {
        flex-direction: column;
        gap: 20px;
    }
    .csv-home-text {
        flex: none;
        width: 100%;
    }
    .csv-home-videos {
        width: 100%;
    }
}

/* ─── Responsive: Mobile ─── */
@media (max-width: 640px) {
    .csv-home-section {
        padding: 15px 10px;
    }
    .csv-home-container {
        padding: 15px;
        border-radius: 15px;
    }
    .csv-home-title {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    .csv-home-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    .csv-home-videos {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .csv-home-play {
        width: 28px;
        height: 28px;
        font-size: 11px;
        bottom: 8px;
        left: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   📄 صفحه گالری کامل
   ═══════════════════════════════════════════════════════════════ */

.csv-gallery-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 15px;
    direction: rtl;
}

.csv-gallery-page {
    direction: rtl;
}

.csv-gallery-title {
    font-size: clamp(22px, 3.5vw, 32px);
    font-weight: 700;
    text-align: center;
    margin: 20px 0 10px;
    color: #1a1a1a;
}

.csv-gallery-subtitle {
    text-align: center;
    font-size: clamp(15px, 2vw, 18px);
    color: #666;
    margin-bottom: 30px;
}

.csv-group-title {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 700;
    color: #1a1a1a;
    margin: 40px 0 20px;
    padding-right: 12px;
    border-right: 4px solid var(--csv-btn-bg, #e53935);
}

/* ─── Masonry Layout ─── */
.csv-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.csv-masonry-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.csv-masonry-item {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.csv-masonry-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.csv-masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.4s;
}

.csv-masonry-item:hover img {
    transform: scale(1.05);
}

.csv-masonry-play {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s;
}

.csv-masonry-item:hover .csv-masonry-play {
    background: var(--csv-btn-bg, #e53935);
    transform: scale(1.15);
}

/* ─── Responsive: Tablet ─── */
@media (max-width: 900px) {
    .csv-masonry {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ─── Responsive: Mobile ─── */
@media (max-width: 640px) {
    .csv-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .csv-masonry-col {
        gap: 8px;
    }
    .csv-masonry-play {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   🎬 Modal Player
   ═══════════════════════════════════════════════════════════════ */

.csv-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.csv-modal.active {
    display: flex;
    animation: csvFade 0.3s;
}

@keyframes csvFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.csv-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.csv-modal-box {
    position: relative;
    width: 100%;
    max-width: 900px;
    z-index: 1;
    animation: csvSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes csvSlide {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.csv-modal-title {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    padding: 0 10px;
}

.csv-player video,
.csv-player iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: #000;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.csv-close {
    position: absolute;
    top: -50px;
    left: 0;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    color: #333;
    font-weight: bold;
}

.csv-close:hover {
    transform: rotate(90deg);
    background: var(--csv-btn-bg, #e53935);
    color: #fff;
}

.csv-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.csv-modal-nav:hover {
    background: var(--csv-btn-bg, #e53935);
    transform: translateY(-50%) scale(1.1);
}

.csv-modal-prev {
    right: -70px;
}

.csv-modal-next {
    left: -70px;
}

@media (max-width: 1000px) {
    .csv-modal-prev { right: 10px; }
    .csv-modal-next { left: 10px; }
    .csv-modal-nav {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
}