@import url('style.css');

.tadabor-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* ثلاث أعمدة ثابتة */
    gap: 1.5rem;
}

.tadabor-item {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0f2f1;
    height: fit-content;
    margin-bottom: 0;
}

.tadabor-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,77,64,0.1);
}

.item-header h2 {
    color: #004d40;
    margin: 0 0 1rem 0;
    text-align: center;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.item-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #004d40, #00897b);
    border-radius: 3px;
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.reciter-name {
    color: #00695c;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    background-color: #e0f2f1;
    padding: 0.5rem;
    border-radius: 5px;
    display: inline-block;
    margin: 0 auto;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    background: #000; /* خلفية سوداء */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0.5rem 0;
    min-height: 200px;
}

.tadabor-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* لعرض الصورة كاملة */
    transition: transform 0.3s ease;
    padding: 0;
    margin: 0;
    max-height: 100%;
    object-position: center;
}

.video-thumbnail:hover .tadabor-image {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,77,64,0.9);
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: #004d40;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button svg {
    width: 35px;
    height: 35px;
    color: white;
    margin-left: 5px;
}

.tadabor-text {
    line-height: 1.6;
    text-align: justify;
    color: #333;
    font-size: 1rem;
    padding: 0.8rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-right: 4px solid #004d40;
    max-height: 120px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    margin: 5% auto;
    aspect-ratio: 16/9;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

#videoFrame {
    width: 100%;
    height: 100%;
    background: #000;
}

.error-message, .no-data {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 10px;
    color: #e74c3c;
    font-size: 1.2rem;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    border: 1px solid #fde8e7;
}

@media (max-width: 1200px) {
    .tadabor-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 992px) {
    .tadabor-content {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .tadabor-content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .tadabor-item {
        padding: 1rem;
    }
    
    .item-header h2 {
        font-size: 1.3rem;
    }

    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-button svg {
        width: 25px;
        height: 25px;
    }

    .tadabor-text {
        font-size: 0.95rem;
        padding: 0.8rem;
    }
}