﻿/* استایل‌های responsive برای parent_aparat و child_aparat (۲ ستونی/۱ ستونی) */
.parent_text_photo {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* پیش‌فرض: ۲ ستون برای دسکتاپ/تبلت (>700px) */
    gap: 0px; /* فاصله مناسب بین childها */
    padding: 15px; /* فاصله از لبه‌ها */
    max-width: 100%;
    margin: 0 auto;
    direction: rtl; /* برای متن فارسی */
    box-sizing: border-box;
}

.child_text_photo {
    background: #d1e0ef; /* بک‌گراند روشن */
    border-radius: 0px;
    overflow: hidden; /* جلوگیری از overflow iframe */
    height: auto; /* دینامیک، بدون height ثابت */
    box-shadow: 0 2px 0px rgba(0, 0, 0, 0.1); /* سایه ملایم */
    transition: box-shadow 0.3s ease; /* انیمیشن ساده hover */
    position: relative; /* برای positioning iframe */
    padding: 30px ;
}

.child_text_photo h3 {
text-align: center}


.child_text_photo img {
    max-width: 100%;
    transition: transform 0.3s ease;

}

.child_text_photo img:hover {
    transform: scale(1.1);
}


.child_text_photo iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* full height wrapper */
    border: none;
    display: block;
}

/* Media Query برای موبایل: ۱ ستون (کمتر از 700px) */
@media (max-width: 700px) {
    .parent_text_photo {
        grid-template-columns: 1fr; /* ۱ ستون full-width */
        gap: 10px; /* فاصله عمودی کمتر */
        padding: 10px;
    }

    .child_text_photo {
        border-radius: 8px; /* کمی کوچکتر برای موبایل */
    }

    .child_text_photo .video-wrapper {
        padding-bottom: 75%; /* aspect-ratio کمی بلندتر برای portrait موبایل (4:3) */
    }
}

/* برای صفحه‌های خیلی کوچک (مثل portrait موبایل) */
@media (max-width: 480px) {
    .parent_text_photo {
        padding: 5px;
        gap: 8px;
    }

    .child_text_photo .video-wrapper {
        border-radius: 5px;
    }
}