﻿/* التنسيقات المتجاوبة للحاوية الرئيسية والعناصر الفرعية (النص والصورة) */

.parent_text_photo {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0px;
    padding: 15px;
    max-width: 100%;
    margin: 0 auto;
    direction: rtl;
    box-sizing: border-box;
}

/* البطاقات الفرعية */
.child_text_photo {
    background: #eeeeff;
    overflow: hidden;
    height: auto;
    box-shadow: 0 2px 0px rgba(0, 0, 0, 0.1);
    position: relative;
    padding: 30px;
    line-height: 2;
    margin: 5px;
    border-radius: 20px;
    font-family: "Tahoma", "Segoe UI", Arial, sans-serif;
    text-align: right;

    /* الحالة الأولية قبل التمرير */
    opacity: 0;
    transform: translateX(80px);
    transition:
            transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.3s ease;
}

/* عند الظهور داخل إطار العرض (Viewport) */
.child_text_photo.show {
    opacity: 1;
    transform: translateX(0);
}

/* العنوان */
.child_text_photo h3 {
    text-align: center;
}

/* الصورة */
.child_text_photo img {
    max-width: 100%;
    transition: transform 0.3s ease;
}

.child_text_photo img:hover {
    animation: shakeEffect 0.9s ease-in-out infinite;
}

/* تأثير الاهتزاز */
@keyframes shakeEffect {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* إطار الفيديو المضمن (iframe) */
.child_text_photo iframe {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* الشاشات الصغيرة والهواتف: عمود واحد */
@media (max-width: 700px) {

    .parent_text_photo {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .child_text_photo {
        border-radius: 8px;
    }

    .child_text_photo .video-wrapper {
        padding-bottom: 75%;
    }
}

/* الشاشات الصغيرة جداً */
@media (max-width: 480px) {

    .parent_text_photo {
        padding: 5px;
        gap: 8px;
    }

    .child_text_photo .video-wrapper {
        border-radius: 5px;
    }
}
