.tzi-page,
.tzi-page * {
    box-sizing: border-box;
}

.tzi-page {
    --tzi-navy: #173f78;
    --tzi-navy-dark: #102e59;
    --tzi-gold: #e4b33f;
    --tzi-bg: #f4f6f9;
    --tzi-text: #263342;
    --tzi-muted: #697586;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    color: var(--tzi-text);
    background: var(--tzi-bg);
    line-height: 1.8;
    width: 100%;
    overflow: hidden;
    direction: rtl;
}

.tzi-page button,
.tzi-page a,
.tzi-page input {
    font-family: inherit;
}

.tzi-hero {
    position: relative;
    overflow: hidden;
    min-height: 370px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 54px 20px 78px;
    background: linear-gradient(115deg, #383d69 0%, #233e70 46%, #104d70 100%);
}

.tzi-hero-inner {
    position: relative;
    z-index: 2;
    width: min(900px, 100%);
    margin: 0 auto;
}

.tzi-hero-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.tzi-hero-glow-1 {
    width: 440px;
    height: 440px;
    left: -190px;
    top: -240px;
    background: radial-gradient(circle, rgba(228,179,63,.17), transparent 67%);
}

.tzi-hero-glow-2 {
    width: 500px;
    height: 500px;
    right: -220px;
    bottom: -360px;
    background: radial-gradient(circle, rgba(0,174,239,.15), transparent 67%);
}

.tzi-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 20px;
    border: 1px solid rgba(228,179,63,.95);
    border-radius: 24px;
    background: rgba(255,255,255,.07);
    color: var(--tzi-gold);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

.tzi-hero h1 {
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(25px, 3.2vw, 36px);
    font-weight: 800;
    line-height: 1.55;
}

.tzi-hero p {
    width: min(850px, 100%);
    margin: 0 auto 26px;
    color: rgba(255,255,255,.88);
    font-size: 14px;
    line-height: 2.1;
}

.tzi-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 53px;
    padding: 12px 30px;
    border-radius: 30px;
    background: var(--tzi-gold);
    color: #132f58 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(228,179,63,.23);
    transition: .25s;
}

.tzi-hero-button:hover {
    transform: translateY(-2px);
    background: #efc45a;
}

.tzi-filter-box {
    position: relative;
    z-index: 20;
    width: min(1100px, calc(100% - 30px));
    margin: -27px auto 0;
    padding: 22px 25px 20px;
    background: #fff;
    border: 1px solid rgba(229,233,240,.85);
    border-radius: 9px;
    box-shadow: 0 12px 35px rgba(17,45,94,.11);
}

.tzi-filter-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #edf0f4;
}

.tzi-filter-section-last {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.tzi-filter-title {
    flex: 0 0 auto;
    color: #344154;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tzi-filter-title span {
    color: #c99b2d;
    margin-left: 5px;
}

.tzi-filter-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

.tzi-chip {
    position: relative;
    border: 1px solid #e0e6ee;
    background: #fff;
    color: #435064;
    min-height: 43px;
    padding: 7px 19px;
    border-radius: 24px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: .2s;
    appearance: none;
    -webkit-appearance: none;
}

.tzi-chip:hover {
    border-color: #b9c6d7;
    color: var(--tzi-navy);
    transform: translateY(-1px);
}

.tzi-chip.is-active {
    background: #2f2f6b;
    border-color: #2f2f6b;
    color: #fff;
    box-shadow: 0 5px 14px rgba(47,47,107,.18);
}

.tzi-chip:disabled,
.tzi-chip.tzi-chip-soon {
    opacity: .7;
    border-style: dashed;
    cursor: not-allowed;
}

.tzi-chip-soon small {
    display: inline-block;
    margin-right: 5px;
    padding: 1px 7px;
    border-radius: 12px;
    background: #f3dfad;
    color: #9b7420;
    font-size: 9px;
}

.tzi-results {
    width: min(1100px, calc(100% - 30px));
    margin: 32px auto 18px;
    color: #657184;
    font-size: 13px;
}

.tzi-results strong {
    color: #233f72;
}

.tzi-grid {
    width: min(1100px, calc(100% - 30px));
    margin: 0 auto;
    padding-bottom: 28px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.tzi-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #edf0f4;
    border-radius: 14px;
    box-shadow: 0 7px 20px rgba(16,44,82,.075);
    transition: .25s;
}

.tzi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(16,44,82,.13);
}

.tzi-hidden {
    display: none !important;
}

/* قاب رسانه دقیقاً همان ابعاد کاور است */
.tzi-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #0b2545;
}

.tzi-cover-image,
.tzi-cover-placeholder {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    max-height: none !important;
    object-fit: cover !important;
}

.tzi-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 25% 25%, rgba(228,179,63,.35), transparent 25%),
        linear-gradient(145deg,#173f78,#0b2545);
}

.tzi-cover-placeholder strong {
    font-size: 17px;
}

.tzi-cover-placeholder span {
    margin-top: 4px;
    color: #dce6f5;
    font-size: 12px;
}

.tzi-card-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 12;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tzi-card-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 11px;
    border-radius: 15px;
    background: rgba(17,47,86,.92);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.tzi-card-badge.gold {
    background: var(--tzi-gold);
    color: #17365f;
}


/*
 * The card uses the site's/WordPress video shortcode player directly.
 * No custom play button is layered over the player, so there is only one
 * source of truth for play/pause, seeking, volume and fullscreen.
 */
.tzi-video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    z-index: 5;
}

.tzi-video-player .wp-video,
.tzi-video-player .mejs-container,
.tzi-video-player .mejs-inner,
.tzi-video-player .mejs-mediaelement,
.tzi-video-player .mejs-layers,
.tzi-video-player .mejs-controls,
.tzi-video-player video,
.tzi-video-player .tzi-fallback-video {
    box-sizing: border-box !important;
}

.tzi-video-player .wp-video,
.tzi-video-player .mejs-container,
.tzi-video-player .mejs-inner,
.tzi-video-player .mejs-mediaelement,
.tzi-video-player video,
.tzi-video-player .tzi-fallback-video {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
}

.tzi-video-player .wp-video,
.tzi-video-player .mejs-container,
.tzi-video-player .mejs-mediaelement,
.tzi-video-player video,
.tzi-video-player .tzi-fallback-video {
    height: 100% !important;
    max-height: none !important;
    min-height: 0 !important;
}

.tzi-video-player .wp-video {
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
}

.tzi-video-player .mejs-container {
    position: absolute !important;
    inset: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    font-family: Vazirmatn, Tahoma, Arial, sans-serif !important;
}

.tzi-video-player .mejs-mediaelement,
.tzi-video-player .mejs-layers {
    position: absolute !important;
    inset: 0 !important;
}

.tzi-video-player video,
.tzi-video-player .tzi-fallback-video {
    display: block !important;
    object-fit: contain !important;
    object-position: center center !important;
    margin: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: #000 !important;
}

/* Keep the native/theme controls above the video and never cover them with
   our own overlay. */
.tzi-video-player .mejs-controls {
    z-index: 20 !important;
    direction: ltr !important;
}

.tzi-video-player .mejs-overlay-button {
    z-index: 15 !important;
}

.tzi-video-player .mejs-overlay,
.tzi-video-player .mejs-poster {
    width: 100% !important;
    height: 100% !important;
}

.tzi-video-player .mejs-poster {
    background-size: cover !important;
    background-position: center center !important;
}

.tzi-video-unavailable {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #fff;
    text-align: center;
    background: #102e59;
    font-size: 12px;
}

.tzi-card-info {
    padding: 13px 14px 15px;
}

.tzi-card-name {
    margin: 0 0 3px;
    color: #173f78;
    font-size: 14px;
    font-weight: 800;
}

.tzi-card-school {
    min-height: 25px;
    margin: 0 0 11px;
    color: #6a7482;
    font-size: 11.5px;
}

.tzi-full {
    width: 100%;
    min-height: 39px;
    border: 0;
    border-radius: 9px;
    background: #173f78;
    color: #fff;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 700;
    transition: .2s;
}

.tzi-full:hover {
    background: #245db4;
}

.tzi-full.is-disabled {
    background: #eef1f5;
    color: #a0a8b4;
    cursor: default;
}

.tzi-empty {
    width: min(1100px, calc(100% - 30px));
    margin: 0 auto 30px;
    padding: 50px 20px;
    text-align: center;
    color: #738094;
}

.tzi-empty[hidden] {
    display: none !important;
}

.tzi-empty div {
    color: #c3ccd8;
    font-size: 44px;
}

.tzi-seo-box {
    width: min(1100px, calc(100% - 30px));
    margin: 10px auto 40px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #edf0f4;
    border-radius: 14px;
}

.tzi-seo-box h2 {
    margin: 0 0 8px;
    color: #173f78;
    font-size: 18px;
}

.tzi-seo-box p {
    margin: 0;
    color: #6b7584;
    font-size: 13px;
    line-height: 2;
}

.tzi-modal {
    position: fixed !important;
    z-index: 2147483000 !important;
    inset: 0 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tzi-modal.is-open {
    display: flex !important;
}

.tzi-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5,15,28,.91);
    backdrop-filter: blur(5px);
}

.tzi-modal-box {
    position: relative;
    z-index: 2;
    width: min(920px, 94vw);
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    background: #000;
    box-shadow: 0 25px 70px rgba(0,0,0,.55);
}

.tzi-video-frame,
.tzi-video-frame iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    border-radius: 14px;
    background: #000;
}

.tzi-modal-close {
    position: absolute;
    z-index: 3;
    top: -45px;
    left: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--tzi-gold);
    color: #17365f;
    font-size: 25px;
    cursor: pointer;
}

html.tzi-modal-open,
body.tzi-modal-open {
    overflow: hidden !important;
}

@media (max-width: 900px) {
    .tzi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tzi-filter-section {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .tzi-filter-buttons {
        width: 100%;
    }
}

@media (max-width: 650px) {
    .tzi-hero {
        min-height: 350px;
        padding: 42px 16px 65px;
    }

    .tzi-hero h1 {
        font-size: 24px;
    }

    .tzi-hero p {
        font-size: 12.5px;
    }

    .tzi-filter-box {
        width: calc(100% - 20px);
        padding: 18px 14px;
    }

    .tzi-chip {
        min-height: 39px;
        padding: 6px 13px;
        font-size: 11.5px;
    }

    .tzi-grid {
        width: calc(100% - 20px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .tzi-results {
        width: calc(100% - 20px);
        font-size: 11.5px;
    }

    .tzi-card-info {
        padding: 10px;
    }

    .tzi-card-name {
        font-size: 12.5px;
    }

    .tzi-card-school {
        font-size: 10.5px;
    }

    .tzi-full {
        font-size: 10px;
    }

    .tzi-modal {
        padding: 12px;
    }

    .tzi-modal-box {
        width: 96vw;
    }
}


/* WordPress/MediaElement can inject inline dimensions. The player must fill
   the card on every breakpoint. */
.tzi-cover .mejs-container,
.tzi-cover .wp-video {
    margin: 0 !important;
}

@media (max-width: 650px) {
    .tzi-video-player .mejs-controls {
        min-height: 34px;
    }

    .tzi-video-player .mejs-button button {
        transform: scale(.9);
    }
}
