:root{
  --tpev3-primary:#b5161a;--tpev3-secondary:#16090b;--tpev3-accent:#ffffff;--tpev3-bg:#f8fafc;--tpev3-card:#fff;--tpev3-border:#e5e7eb;--tpev3-muted:#6b7280;
}
.tpev3-container{width:min(1240px,92%);margin-inline:auto}
.tpev3-section{padding:56px 0}
.tpev3-section.alt{background:#f3f4f6}
.tpev3-hero{padding:108px 0;background:linear-gradient(135deg,rgba(22,9,11,.92),rgba(181,22,26,.82));background-size:cover;background-position:center;color:#fff}
.tpev3-kicker{display:inline-block;padding:7px 14px;border:1px solid rgba(255,255,255,.28);border-radius:999px;margin-bottom:16px}
.tpev3-hero h1{font-size:clamp(32px,4.4vw,58px);line-height:1.04;margin:0 0 16px}
.tpev3-hero p{max-width:720px;font-size:18px;opacity:.96}
.tpev3-actions,.tpev3-card-actions,.tpev3-mini-actions,.tpev3-trust-row{display:flex;gap:12px;flex-wrap:wrap}
.tpev3-actions{margin-top:24px}
.tpev3-trust-row{margin-top:26px}
.tpev3-trust-row span{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.16);padding:10px 14px;border-radius:999px}
.tpev3-btn,.tpev3-chip,.tpev3-ghost{display:inline-flex;align-items:center;justify-content:center;padding:12px 18px;border-radius:14px;background:var(--tpev3-primary);color:#fff;text-decoration:none;border:none;cursor:pointer;transition:.2s}
.tpev3-btn:hover,.tpev3-chip:hover,.tpev3-ghost:hover{transform:translateY(-1px)}
.tpev3-btn.is-outline,.tpev3-ghost{background:#fff;color:var(--tpev3-secondary);border:1px solid var(--tpev3-border)}
.tpev3-chip{background:#eef2ff;color:#111827;border:1px solid #c7d2fe;padding:9px 12px;font-size:14px}
.tpev3-chip.is-active{background:var(--tpev3-secondary);color:#fff;border-color:var(--tpev3-secondary)}
.tpev3-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:24px}
.tpev3-card,.tpev3-panel{background:var(--tpev3-card);border:1px solid var(--tpev3-border);border-radius:22px;overflow:hidden;box-shadow:0 10px 30px rgba(15,23,42,.06)}
.tpev3-card-body{padding:18px}
.tpev3-thumb{display:block;background:#eef2f7}
.tpev3-thumb img,.tpev3-gallery-slider img,.tpev3-main-image{width:100%;height:auto;display:block}
.tpev3-thumb-placeholder{display:block;padding:60px 20px;text-align:center;color:var(--tpev3-muted)}
.tpev3-price{font-weight:800;font-size:22px;color:var(--tpev3-primary);margin:8px 0}
.tpev3-badges{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.tpev3-badges span,.tpev3-detail-grid div,.tpev3-badge,.tpev3-code{background:#f8fafc;border:1px solid var(--tpev3-border);padding:7px 10px;border-radius:12px}
.tpev3-badge{background:#fff1f2;color:#9f1239;border-color:#fecdd3}
.tpev3-badge.is-alt{background:#fff;color:#991b1b;border-color:#fecaca}
.tpev3-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:22px}
.tpev3-head h1,.tpev3-head h2{margin:0}
.tpev3-filter,.tpev3-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;background:#fff;border:1px solid var(--tpev3-border);padding:20px;border-radius:20px}
.tpev3-filter input,.tpev3-filter select,.tpev3-form input,.tpev3-form textarea,.tpev3-form select{width:100%;padding:12px 14px;border:1px solid #d1d5db;border-radius:14px;background:#fff}
.tpev3-form textarea{min-height:120px;grid-column:1/-1}
.tpev3-form-result{grid-column:1/-1;font-weight:600}
.tpev3-hp{position:absolute!important;left:-9999px!important;opacity:0!important}
.tpev3-extra{padding:24px 0 10px}
.tpev3-detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:18px 0 24px}
.tpev3-detail-grid strong{display:block;margin-bottom:6px}
.tpev3-gallery-slider{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:20px 0}
.tpev3-video{width:100%;max-width:100%;border-radius:18px;background:#000}
.tpev3-media{margin:24px 0}
.tpev3-link{text-decoration:none;color:var(--tpev3-primary);font-weight:700}
.tpev3-empty,.tpev3-loading{padding:22px;background:#fff;border:1px dashed var(--tpev3-border);border-radius:18px}
.service-card{padding:20px}
.tpev3-single-card{padding:26px;background:#fff;border:1px solid var(--tpev3-border);border-radius:24px;margin:36px 0}
.tpev3-single-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;flex-wrap:wrap}
.tpev3-faq details{background:#fff;border:1px solid var(--tpev3-border);padding:14px 16px;border-radius:14px;margin-bottom:10px}
.tpev3-list-block ul,.tpev3-list-block ol{padding-inline-start:22px}
.tpev3-subtitle{font-size:18px;color:#374151}
.tpev3-pagination,.tpev3-pager{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:18px}
.tpev3-page-btn{border:1px solid var(--tpev3-border);background:#fff;border-radius:12px;padding:10px 14px;cursor:pointer}
.tpev3-page-btn.is-active{background:var(--tpev3-primary);color:#fff;border-color:var(--tpev3-primary)}
.tpev3-compare-table-wrap{overflow:auto;background:#fff;border:1px solid var(--tpev3-border);border-radius:20px}
.tpev3-compare-table{width:100%;border-collapse:collapse;min-width:760px}
.tpev3-compare-table th,.tpev3-compare-table td{border-bottom:1px solid var(--tpev3-border);padding:14px;text-align:right;vertical-align:top}
.tpev3-compare-table thead th{background:#f8fafc;position:sticky;top:0}
.tpev3-topline{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px}
@media (max-width:768px){
  .tpev3-hero{padding:72px 0}
  .tpev3-actions{flex-direction:column;align-items:flex-start}
  .tpev3-single-hero{flex-direction:column}
}

/* 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 */
