/*
Theme Name: TurkishPlanet Flagship
Theme URI: https://www.turkishplanet.ir/
Author: OpenAI
Author URI: https://openai.com/
Description: قالب حرفه‌ای TurkishPlanet با سازگاری کامل با افزونه Enterprise V4، preloader، ساختار SEO-friendly، رنگ‌بندی هماهنگ با کارت برند و آماده برای PHP 8.4.
Version: 2.2.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.4
Text Domain: turkishplanet-flagship
*/

/* TP_MEDIA_FIT_REPAIR_v1 START */
/* هدف: استانداردسازی نمایش عکس و ویدیو در TurkishPlanet و افزونه املاک */

:where(.property-featured-image, .entry-featured, .tpev3-gallery-slider figure, .tpev3-thumb, .tpev3-media, .entry-content figure, .property-entry figure){
    overflow:hidden;
    border-radius:24px;
}

:where(.property-featured-image img, .entry-featured img, .tpev3-main-image){
    width:100% !important;
    max-width:100% !important;
    aspect-ratio:16 / 9;
    height:auto !important;
    max-height:min(72vh, 760px);
    object-fit:cover;
    display:block;
}

:where(.tpev3-gallery-slider){
    grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
    gap:14px;
}

:where(.tpev3-gallery-slider img, .gallery img, .blocks-gallery-item img, .wp-block-gallery img){
    width:100% !important;
    max-width:100% !important;
    aspect-ratio:4 / 3;
    height:auto !important;
    max-height:420px;
    object-fit:cover;
    display:block;
}

:where(.entry-content img, .property-entry img, .wp-block-image img, .tpev3-single-card .entry-content img){
    width:auto;
    max-width:100% !important;
    height:auto !important;
    max-height:72vh;
    object-fit:contain;
    display:block;
    margin-inline:auto;
    border-radius:22px;
}

:where(.entry-content iframe, .property-entry iframe, .entry-content video, .property-entry video, .tpev3-video, .tpev3-media iframe, .tpev3-media video, .wp-video-shortcode, .wp-block-embed iframe){
    display:block;
    width:100% !important;
    max-width:100% !important;
    aspect-ratio:16 / 9;
    height:auto !important;
    max-height:min(72vh, 760px);
    border:0;
    border-radius:24px;
    background:#000;
    overflow:hidden;
}

:where(.wp-video, .mejs-container, .mejs__container, .tpev3-media, .entry-content .wp-block-embed, .entry-content .wp-block-video){
    width:100% !important;
    max-width:100% !important;
    margin-inline:auto;
    border-radius:24px;
    overflow:hidden;
}

:where(.tpev3-thumb img){
    height:260px;
    object-fit:cover;
}

@media (max-width: 1024px){
    :where(.property-featured-image img, .entry-featured img, .tpev3-main-image, .entry-content iframe, .property-entry iframe, .entry-content video, .property-entry video, .tpev3-video, .tpev3-media iframe, .tpev3-media video){
        max-height:60vh;
    }
}

@media (max-width: 680px){
    :where(.property-featured-image img, .entry-featured img, .tpev3-main-image){
        aspect-ratio: 16 / 10;
        max-height: 44vh;
        border-radius:18px;
    }

    :where(.tpev3-gallery-slider){
        grid-template-columns:1fr 1fr;
        gap:10px;
    }

    :where(.tpev3-gallery-slider img, .gallery img, .blocks-gallery-item img, .wp-block-gallery img){
        aspect-ratio:1 / 1;
        max-height:220px;
        border-radius:16px;
    }

    :where(.entry-content iframe, .property-entry iframe, .entry-content video, .property-entry video, .tpev3-video, .tpev3-media iframe, .tpev3-media video){
        max-height:42vh;
        border-radius:18px;
    }
}
/* TP_MEDIA_FIT_REPAIR_v1 END */

/* TP_UI_VISIBILITY_REPAIR_v1 START */
/* هدف: خواناسازی مشخصات ملک در هدر و اصلاح رنگ لینک‌های فوتر */

.property-hero .property-summary-card,
.page-hero .property-summary-card{
    background:rgba(255,255,255,.98) !important;
    color:#161616 !important;
    border:1px solid rgba(22,22,22,.08) !important;
    box-shadow:0 20px 50px rgba(15,8,9,.14) !important;
}

.property-hero .property-summary-card *,
.page-hero .property-summary-card *{
    color:#161616 !important;
}

.property-hero .property-summary-card .property-specs strong,
.page-hero .property-summary-card .property-specs strong{
    color:#6b1a1f !important;
    font-weight:800 !important;
}

.property-hero .property-summary-card .property-specs span,
.page-hero .property-summary-card .property-specs span{
    color:#111111 !important;
    font-weight:700 !important;
}

.property-hero .property-summary-card .property-specs li,
.page-hero .property-summary-card .property-specs li{
    border-bottom:1px solid rgba(24,33,46,.12) !important;
}

.site-footer .footer-menu a,
.site-footer .footer-contact a,
.site-footer .footer-grid a{
    color:#ffd767 !important;
    opacity:1 !important;
}

.site-footer .footer-menu a:hover,
.site-footer .footer-contact a:hover,
.site-footer .footer-grid a:hover{
    color:#d72830 !important;
}

.site-footer .footer-menu li,
.site-footer .footer-contact li,
.site-footer .footer-grid p,
.site-footer .footer-bottom,
.site-footer .footer-bottom p{
    color:rgba(255,255,255,.88) !important;
}

/* کمی خوانایی بهتر برای فوتر در تم فعلی */
.site-footer .footer-grid h3,
.site-footer .footer-grid h4{
    color:#ffffff !important;
}
/* TP_UI_VISIBILITY_REPAIR_v1 END */
