/**
 * Blu Interviews - Styles
 * 
 * @package BluInterviewsElementor
 * @version 1.0.0
 */

/* ==================== متغیرهای CSS ==================== */
:root {
    --blu-primary-color: #3A7BF6;
    --blu-text-dark: #091e3e;
    --blu-text-light: #667085;
    --blu-bg-light: #f3f4f6;
    --blu-border-radius: 12px;
    --blu-transition: 0.3s ease;
    --blu-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --blu-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==================== ساختار اصلی ==================== */
.blu-interviews-wrapper {
    font-family: IRANSansXV, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 100%;
    direction: rtl;
}

.blu-interviews-wrapper * {
    box-sizing: border-box;
}

/* ==================== هدر ==================== */
.blu-interviews-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.blu-interviews-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--blu-text-dark);
    margin: 0;
    line-height: 1.3;
}

/* ==================== گرید مصاحبه‌ها ==================== */
.blu-interviews-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ==================== کارت مصاحبه ==================== */
.blu-interview-item {
    border-radius: var(--blu-border-radius);
    overflow: hidden;
    box-shadow: var(--blu-shadow);
    cursor: pointer;
    transition: all var(--blu-transition);
    background: #fff;
}

.blu-interview-item:hover {
    box-shadow: var(--blu-shadow-hover);
    transform: translateY(-4px);
}

/* ==================== تصویر مصاحبه ==================== */
.blu-interview-thumb {
    position: relative;
    height: 200px;
    background: var(--blu-bg-light);
    overflow: hidden;
}

.blu-interview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--blu-transition);
}

.blu-interview-item:hover .blu-interview-thumb img {
    transform: scale(1.05);
}

/* ==================== دکمه پخش ==================== */
.blu-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity var(--blu-transition);
}

.blu-interview-item:hover .blu-play-overlay {
    opacity: 1;
}

.blu-play-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--blu-primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all var(--blu-transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.blu-play-button svg {
    width: 24px;
    height: 24px;
    margin-right: 3px;
}

.blu-interview-item:hover .blu-play-button {
    transform: scale(1.1);
    background: #fff;
}

/* ==================== محتوای کارت ==================== */
.blu-interview-content {
    padding: 16px;
}

.blu-interview-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--blu-text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.blu-interview-field,
.blu-interview-university {
    font-size: 14px;
    color: var(--blu-text-light);
    line-height: 1.5;
    margin-bottom: 4px;
}

/* ==================== مودال ویدیو ==================== */
.blu-video-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

.blu-video-modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.blu-video-modal-content {
    width: 90%;
    max-width: 1200px;
    background: #000;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.blu-video-container {
    position: relative;
    width: 100%;
}

.blu-video-container iframe,
.blu-video-container video {
    width: 100%;
    height: 540px;
    display: block;
    border: none;
}

/* ==================== دکمه بستن ==================== */
.blu-close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #fff;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    transition: all var(--blu-transition);
    line-height: 1;
}

.blu-close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ==================== حالت خالی ==================== */
.blu-interviews-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--blu-text-light);
    font-size: 16px;
    background: var(--blu-bg-light);
    border-radius: var(--blu-border-radius);
}

/* ==================== Responsive - تبلت ==================== */
@media (max-width: 1024px) {
    .blu-interviews-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .blu-interviews-title {
        font-size: 24px;
    }

    .blu-interview-thumb {
        height: 180px;
    }

    .blu-video-container iframe,
    .blu-video-container video {
        height: 450px;
    }
}

/* ==================== Responsive - موبایل بزرگ ==================== */
@media (max-width: 768px) {
    .blu-interviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .blu-interviews-title {
        font-size: 20px;
    }

    .blu-interview-thumb {
        height: 160px;
    }

    .blu-play-button {
        width: 50px;
        height: 50px;
    }

    .blu-play-button svg {
        width: 20px;
        height: 20px;
    }

    .blu-interview-content {
        padding: 12px;
    }

    .blu-interview-name {
        font-size: 14px;
    }

    .blu-interview-field,
    .blu-interview-university {
        font-size: 12px;
    }

    .blu-video-modal-content {
        width: 95%;
    }

    .blu-video-container iframe,
    .blu-video-container video {
        height: 360px;
    }

    .blu-close-modal {
        top: 10px;
        left: 10px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
}

/* ==================== Responsive - موبایل کوچک ==================== */
@media (max-width: 480px) {
    .blu-interviews-grid {
        grid-template-columns: 1fr;
    }

    .blu-interviews-header {
        margin-bottom: 16px;
    }

    .blu-interview-thumb {
        height: 200px;
    }

    .blu-video-container iframe,
    .blu-video-container video {
        height: 250px;
    }
}

/* ==================== حالت Dark Mode ==================== */
@media (prefers-color-scheme: dark) {
    .blu-interview-item {
        background: #1a1a1a;
    }

    .blu-interviews-title {
        color: #fff;
    }

    .blu-interview-name {
        color: #f0f0f0;
    }

    .blu-interview-field,
    .blu-interview-university {
        color: #a0a0a0;
    }
}

/* ==================== انیمیشن Loading ==================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.blu-interview-thumb.loading {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ==================== Print Styles ==================== */
@media print {
    .blu-video-modal,
    .blu-play-overlay {
        display: none !important;
    }
}

/* ==================== تنظیمات دسترسی‌پذیری ==================== */
.blu-interview-item:focus {
    outline: 2px solid var(--blu-primary-color);
    outline-offset: 2px;
}

.blu-close-modal:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* کاهش انیمیشن برای کاربران حساس */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
