/**
 * صفحات عمومی Tenant (ساب‌دامنه) — استایل اختصاصی
 */

body.tenant-site-page {
    --tenant-glow: color-mix(in srgb, var(--color-primary) 35%, transparent);
    --tenant-sky: color-mix(in srgb, var(--color-secondary) 30%, transparent);
}

body.tenant-site-page main.container {
    max-width: 72rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

/* ─── انیمیشن ورود ─── */

@keyframes tenant-fade-up {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tenant-hero-animate .tenant-hero-badge {
    animation: tenant-fade-up 0.65s ease 0.05s backwards;
}

.tenant-hero-animate .tenant-hero-title {
    animation: tenant-fade-up 0.7s ease 0.12s backwards;
}

.tenant-hero-animate .tenant-hero-subtitle {
    animation: tenant-fade-up 0.7s ease 0.2s backwards;
}

.tenant-hero-animate .tenant-hero-pills,
.tenant-hero-animate .tenant-stats-grid {
    animation: tenant-fade-up 0.7s ease 0.28s backwards;
}

.tenant-reveal {
    opacity: 0;
    transform: translateY(1.25rem);
    transition:
        opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.tenant-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tenant-features.is-visible .tenant-feature-card {
    opacity: 1;
    transform: translateY(0);
}

.tenant-feature-card {
    opacity: 0;
    transform: translateY(1rem);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease,
        box-shadow 0.25s;
}

.tenant-features.is-visible .tenant-feature-card:nth-child(1) { transition-delay: 0.04s; }
.tenant-features.is-visible .tenant-feature-card:nth-child(2) { transition-delay: 0.1s; }
.tenant-features.is-visible .tenant-feature-card:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
    .tenant-hero-animate .tenant-hero-badge,
    .tenant-hero-animate .tenant-hero-title,
    .tenant-hero-animate .tenant-hero-subtitle,
    .tenant-hero-animate .tenant-hero-pills,
    .tenant-hero-animate .tenant-stats-grid {
        animation: none;
    }

    .tenant-reveal,
    .tenant-feature-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ─── ناوبری بالا ─── */

body.tenant-site-page .tenant-top-nav {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid color-mix(in srgb, var(--color-border) 80%, transparent);
    box-shadow: 0 4px 24px rgba(61, 61, 61, 0.04);
}

body.tenant-site-page .tenant-top-nav .navbar-brand {
    font-weight: 700;
    font-size: 1rem;
    gap: 0.5rem;
}

body.tenant-site-page .tenant-top-link {
    padding: 0.4rem 0.875rem;
    border-radius: 999px;
    font-weight: 500;
}

body.tenant-site-page .tenant-top-link:hover {
    background: color-mix(in srgb, var(--color-accent) 70%, white);
}

body.tenant-site-page .tenant-top-link.is-active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--tenant-glow);
}

/* ─── Hero صفحه اصلی tenant ─── */

.tenant-hero {
    position: relative;
    text-align: center;
    padding: 2rem 0 2.5rem;
    margin-bottom: 0.5rem;
}

.tenant-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.tenant-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(56px);
    opacity: 0.65;
}

.tenant-blob-1 {
    width: 16rem;
    height: 16rem;
    top: -4rem;
    inset-inline-end: 10%;
    background: var(--tenant-glow);
}

.tenant-blob-2 {
    width: 12rem;
    height: 12rem;
    bottom: -2rem;
    inset-inline-start: 5%;
    background: var(--tenant-sky);
}

.tenant-hero-inner {
    position: relative;
    z-index: 1;
}

.tenant-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-border);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(61, 61, 61, 0.06);
}

.tenant-hero-title {
    font-size: clamp(1.875rem, 5.5vw, 3rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 0.875rem;
    letter-spacing: -0.02em;
}

.tenant-hero-title-accent {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tenant-hero-subtitle {
    font-size: 1.0625rem;
    color: var(--color-muted);
    max-width: 32rem;
    margin: 0 auto;
    line-height: 1.7;
}

.tenant-hero-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tenant-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.875rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--color-border);
    font-size: 0.8125rem;
    color: var(--color-text);
}

.tenant-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 20rem;
    margin: 1.75rem auto 0;
}

.tenant-stat {
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(61, 61, 61, 0.05);
}

.tenant-stat-value {
    display: block;
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    line-height: 1.2;
}

.tenant-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 0.125rem;
}

/* ─── جذب مهمان بدون دسترسی ─── */

.tenant-private-teaser {
    position: relative;
    max-width: 46rem;
    margin: 2rem auto 1.75rem;
    padding: 1.25rem;
    border-radius: 1.25rem;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 32px rgba(61, 61, 61, 0.08);
}

.tenant-private-teaser::before {
    content: "";
    display: block;
    width: min(260px, 62%);
    height: 1px;
    margin: 0 auto 1rem;
    background: linear-gradient(
        90deg,
        transparent 0%,
        color-mix(in srgb, var(--color-border) 90%, var(--color-primary) 10%) 20%,
        color-mix(in srgb, var(--color-primary) 25%, var(--color-border) 75%) 50%,
        color-mix(in srgb, var(--color-border) 90%, var(--color-primary) 10%) 80%,
        transparent 100%
    );
}

.tenant-private-teaser-head {
    text-align: center;
}

.tenant-private-teaser-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-accent) 60%, white);
    color: var(--color-primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
}

.tenant-private-teaser-head h2 {
    margin: 0.75rem 0 0.5rem;
    font-size: clamp(1.125rem, 3.3vw, 1.45rem);
    font-weight: 800;
}

.tenant-private-teaser-head p {
    margin: 0 auto;
    max-width: 34rem;
    color: var(--color-muted);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.tenant-private-metrics {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

.tenant-private-metric {
    padding: 0.75rem 0.875rem;
    border-radius: 0.875rem;
    background: color-mix(in srgb, var(--color-bg) 75%, white);
    border: 1px solid color-mix(in srgb, var(--color-border) 85%, transparent);
    text-align: center;
}

.tenant-private-metric strong {
    display: block;
    font-size: 1.125rem;
    color: var(--color-primary-dark);
    line-height: 1.2;
}

.tenant-private-metric span {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--color-muted);
}

.tenant-private-preview {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.tenant-private-preview span {
    display: block;
    aspect-ratio: 1;
    border-radius: 0.875rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.06)),
        linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 24%, white), color-mix(in srgb, var(--color-secondary) 30%, white));
    filter: blur(2px) saturate(0.75);
    opacity: 0.85;
}

.tenant-private-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.625rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tenant-private-actions [data-private-action].is-active,
.tenant-private-actions [data-access-open].is-active {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.tenant-access-request-form {
    margin-top: 1rem;
    padding: 1.1rem 1rem 1rem;
    border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--color-primary) 28%, var(--color-border));
    background: color-mix(in srgb, var(--color-bg) 72%, white);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.tenant-access-request-form.is-open {
    border-color: color-mix(in srgb, var(--color-primary) 55%, var(--color-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 16%, transparent);
    background: color-mix(in srgb, var(--color-primary) 6%, var(--color-bg));
}

.tenant-access-request-head {
    margin-bottom: 0.85rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--color-border) 75%, transparent);
}

.tenant-access-request-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-foreground, inherit);
}

.tenant-access-request-lead {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: var(--color-muted, #667085);
    line-height: 1.55;
}

.tenant-access-success {
    margin-top: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid color-mix(in srgb, #2e7d32 35%, var(--color-border));
    background: color-mix(in srgb, #e8f5e9 80%, white);
    text-align: center;
}

.tenant-access-success-title {
    margin: 0;
    font-weight: 700;
    color: #1b5e20;
}

.tenant-access-success-body {
    margin: 0.4rem 0 0;
    font-size: 0.9rem;
    color: #2e7d32;
    line-height: 1.6;
}

.tenant-access-request-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.tenant-access-request-form .btn {
    margin-top: 0.25rem;
}

.tenant-access-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tenant-access-request-actions .btn {
    margin-top: 0;
}

.tenant-access-progress {
    margin-top: 0.5rem;
    width: 100%;
    height: 0.35rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-border) 70%, white);
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.18s ease-out;
}

.tenant-access-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.tenant-access-progress.is-fading-out {
    opacity: 0;
}

.tenant-hp-field {
    position: absolute;
    inset-inline-start: -9999px;
    opacity: 0;
    pointer-events: none;
}

/* ─── کارت‌های بخش‌ها ─── */

.tenant-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 56rem;
    margin: 0 auto;
    padding: 0.5rem 0 1rem;
}

body.tenant-site-page .tenant-feature-card.feature-card-cover {
    border-radius: 1.25rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(61, 61, 61, 0.06);
    overflow: hidden;
}

body.tenant-site-page .tenant-feature-card.feature-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px var(--tenant-glow);
}

body.tenant-site-page .tenant-feature-card .feature-card-media {
    aspect-ratio: 4 / 3;
}

body.tenant-site-page .tenant-feature-card .feature-card-badge {
    inset-inline-end: 0.75rem;
    inset-inline-start: auto;
}

.tenant-site-footer-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 2rem;
    padding-top: 1rem;
}

.tenant-site-footer-note span {
    direction: ltr;
    unicode-bidi: isolate;
}

/* ─── هدر صفحات داخلی ─── */

.tenant-page-header {
    text-align: center;
    padding: 1.5rem 0 2rem;
    margin-bottom: 0.5rem;
}

.tenant-section-tag {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-accent) 60%, white);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin-bottom: 0.875rem;
}

.tenant-page-title {
    font-size: clamp(1.625rem, 4.5vw, 2.25rem);
    font-weight: 800;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.tenant-page-desc {
    font-size: 1rem;
    color: var(--color-muted);
    margin: 0 auto;
    max-width: 28rem;
    line-height: 1.6;
}

/* ─── گالری ─── */

.tenant-album-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    padding: 0 0.25rem;
}

.tenant-album-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-border);
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.tenant-album-chip:hover {
    border-color: var(--color-primary);
    background: color-mix(in srgb, var(--color-accent) 50%, white);
}

.tenant-album-chip.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--tenant-glow);
}

body.tenant-site-page .media-grid-public {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.625rem;
}

body.tenant-site-page .media-card-public {
    border-radius: 0.875rem;
    border: none;
    box-shadow: 0 2px 12px rgba(61, 61, 61, 0.08);
    overflow: hidden;
}

body.tenant-site-page .ig-gallery-card-interactive .media-thumb,
body.tenant-site-page .ig-gallery-card-interactive video.media-thumb,
body.tenant-site-page .ig-gallery-card-interactive .media-video-placeholder {
    border-radius: 0;
}

body.tenant-site-page .media-card-public:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 28px var(--tenant-glow);
}

body.tenant-site-page .media-thumb {
    border-radius: 0.875rem;
}

/* ─── راهنمای تعامل (گالری / خط زمانی) ─── */

.tenant-interaction-hint,
.tenant-gallery-hint {
    margin-bottom: 1rem;
}

.tenant-interaction-hint.is-dismissed,
.tenant-gallery-hint.is-dismissed {
    display: none;
}

.tenant-interaction-hint-inner,
.tenant-gallery-hint-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--color-accent) 45%, white);
    border: 1px solid color-mix(in srgb, var(--color-primary) 25%, var(--color-border));
    box-shadow: 0 4px 16px rgba(61, 61, 61, 0.06);
}

.tenant-interaction-hint-icons,
.tenant-gallery-hint-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    padding-top: 0.125rem;
    color: var(--color-primary-dark);
}

.tenant-interaction-hint-icons svg,
.tenant-gallery-hint-icons svg {
    fill: var(--color-primary-dark);
}

.tenant-interaction-hint-text,
.tenant-gallery-hint-text {
    flex: 1;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--color-text);
}

.tenant-interaction-hint-dismiss,
.tenant-gallery-hint-dismiss {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.65);
    color: var(--color-muted);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tenant-interaction-hint-dismiss:hover,
.tenant-gallery-hint-dismiss:hover {
    background: #fff;
    color: var(--color-text);
}

/* ─── خط زمانی ─── */

body.tenant-site-page .tenant-timeline {
    --timeline-rail-width: 2rem;
    --timeline-rail-gap: 0.875rem;
    --timeline-scroll-ratio: 0;
    max-width: 44rem;
    margin-inline: auto;
    position: relative;
    padding-inline-end: 0;
}

body.tenant-site-page .tenant-timeline::before {
    content: "";
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    inset-inline-start: calc(var(--timeline-rail-width) / 2);
    inset-inline-end: auto;
    width: 2px;
    margin-inline-start: -1px;
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--color-primary) 12%, transparent) 0%,
        color-mix(in srgb, var(--color-primary) 22%, var(--color-border)) 8%,
        color-mix(in srgb, var(--color-primary) 22%, var(--color-border)) 92%,
        color-mix(in srgb, var(--color-primary) 12%, transparent) 100%
    );
    pointer-events: none;
    z-index: 0;
}

body.tenant-site-page .tenant-timeline::after {
    content: "";
    position: absolute;
    top: 0.5rem;
    inset-inline-start: calc(var(--timeline-rail-width) / 2);
    inset-inline-end: auto;
    width: 2px;
    margin-inline-start: -1px;
    height: calc(var(--timeline-scroll-ratio) * (100% - 1rem));
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--color-primary) 75%, white),
        var(--color-primary)
    );
    box-shadow: 0 0 10px color-mix(in srgb, var(--color-primary) 35%, transparent);
    pointer-events: none;
    z-index: 0;
    transition: height 0.18s ease-out;
}

body.tenant-site-page .timeline-group {
    position: relative;
    display: grid;
    grid-template-columns: var(--timeline-rail-width) minmax(0, 1fr);
    column-gap: var(--timeline-rail-gap);
    align-items: start;
    margin-bottom: 2.25rem;
    padding-bottom: 0.25rem;
    transition: opacity 0.25s ease;
}

body.tenant-site-page .timeline-group:not(.is-active) {
    opacity: 0.88;
}

body.tenant-site-page .timeline-group.is-active {
    opacity: 1;
}

body.tenant-site-page .timeline-group-rail {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: center;
    padding-top: 1rem;
    z-index: 1;
}

body.tenant-site-page .timeline-rail-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-primary) 55%, var(--color-border));
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--color-bg) 90%, white),
        0 0 0 5px color-mix(in srgb, var(--color-primary) 15%, transparent);
    flex-shrink: 0;
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.28s ease,
        box-shadow 0.28s ease;
}

body.tenant-site-page .timeline-group.is-active .timeline-rail-dot {
    transform: scale(1.45);
    background: var(--color-primary);
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--color-bg) 88%, white),
        0 0 0 6px color-mix(in srgb, var(--color-primary) 40%, transparent),
        0 0 14px color-mix(in srgb, var(--color-primary) 45%, transparent);
}

body.tenant-site-page .timeline-group-body {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

body.tenant-site-page .timeline-date {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem 0.625rem;
    margin-bottom: 0.875rem;
    text-align: start;
}

body.tenant-site-page .timeline-date-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--color-border);
    color: var(--color-primary-dark);
    box-shadow: 0 4px 16px rgba(61, 61, 61, 0.06);
    padding: 0.45rem 1.125rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.4;
    transition:
        background 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

body.tenant-site-page .timeline-group.is-active .timeline-date-badge {
    background: color-mix(in srgb, var(--color-accent) 55%, white);
    border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
    box-shadow: 0 6px 20px var(--tenant-glow);
    transform: translateY(-1px);
}

body.tenant-site-page .timeline-group.is-active .timeline-date-stat {
    color: var(--color-primary-dark);
    background: color-mix(in srgb, var(--color-accent) 50%, white);
}

.timeline-date-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.timeline-date-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-muted);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-accent) 35%, white);
    border: 1px solid color-mix(in srgb, var(--color-border) 80%, transparent);
    white-space: nowrap;
}

.timeline-date-stat svg {
    width: 0.875rem;
    height: 0.875rem;
    opacity: 0.85;
    flex-shrink: 0;
}

body.tenant-site-page .tenant-timeline .timeline-day-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 0.625rem;
    margin-bottom: 0.5rem;
    align-items: start;
}

body.tenant-site-page .tenant-timeline .timeline-day-media .ig-gallery-card,
body.tenant-site-page .tenant-timeline .timeline-day-media .media-card-public {
    width: 100%;
    min-width: 0;
    margin: 0;
}

body.tenant-site-page .tenant-timeline .timeline-day-media .ig-gallery-card-interactive {
    height: auto;
    border-radius: 0.75rem;
    overflow: hidden;
}

body.tenant-site-page .tenant-timeline .timeline-day-media .ig-gallery-card-footer {
    border-radius: 0 0 0.75rem 0.75rem;
}

body.tenant-site-page .tenant-timeline .timeline-day-media .ig-gallery-card-media .media-thumb,
body.tenant-site-page .tenant-timeline .timeline-day-media .ig-gallery-card-media video.media-thumb {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
    border-radius: 0.75rem 0.75rem 0 0;
}

body.tenant-site-page .tenant-timeline .timeline-day-media-wrap {
    width: 100%;
}

.timeline-day-memories {
    display: grid;
    gap: 0.875rem;
    width: 100%;
    margin-inline: 0;
}

.timeline-day-memories .memory-card-cover {
    margin: 0;
}

@media (max-width: 640px) {
    body.tenant-site-page .tenant-timeline {
        --timeline-rail-width: 1.5rem;
        --timeline-rail-gap: 0.625rem;
    }

    body.tenant-site-page .tenant-timeline .timeline-day-media {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    body.tenant-site-page .timeline-group-rail {
        padding-top: 0.875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.tenant-site-page .tenant-timeline::after,
    body.tenant-site-page .timeline-rail-dot,
    body.tenant-site-page .timeline-date-badge,
    body.tenant-site-page .timeline-group {
        transition: none;
    }

    body.tenant-site-page .timeline-group:not(.is-active) {
        opacity: 1;
    }
}

.timeline-pagination {
    max-width: 44rem;
    margin: 2rem auto 0.5rem;
    padding: 1rem 1.125rem;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--color-accent) 32%, white);
    border: 1px solid color-mix(in srgb, var(--color-border) 85%, transparent);
    text-align: center;
}

.timeline-pagination-summary {
    margin: 0 0 0.875rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--color-muted);
}

.timeline-pagination-summary strong {
    color: var(--color-text);
    font-weight: 800;
}

.timeline-pagination-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.timeline-pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid color-mix(in srgb, var(--color-primary) 22%, var(--color-border));
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.timeline-pagination-btn:hover {
    background: #fff;
    box-shadow: 0 4px 14px var(--tenant-glow);
}

.timeline-pagination-btn.is-disabled {
    opacity: 0.38;
    pointer-events: none;
}

.timeline-pagination-page {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--color-muted);
    white-space: nowrap;
}

.timeline-pagination-mode {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-muted);
}

.timeline-day-media-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.625rem 0 0.25rem;
}

.timeline-day-media-page-summary {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-muted);
    min-width: 6.5rem;
    text-align: center;
}

.timeline-day-media-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--color-border) 85%, transparent);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--color-primary-dark);
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.timeline-day-media-page-btn:hover:not(:disabled) {
    background: #fff;
    box-shadow: 0 2px 10px var(--tenant-glow);
}

.timeline-day-media-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.timeline-day-media-load {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px dashed color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--color-accent) 28%, white);
    color: var(--color-primary-dark);
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.timeline-day-media-load:hover {
    background: color-mix(in srgb, var(--color-accent) 45%, white);
    border-color: var(--color-primary);
}

.timeline-day-media-load[hidden] {
    display: none;
}

.tenant-timeline-memories {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.tenant-timeline-memories-title {
    font-size: 1.25rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.25rem;
}

/* ─── کارت خاطره ─── */

body.tenant-site-page .memory-card-cover {
    border-radius: 1.125rem;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(61, 61, 61, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

body.tenant-site-page .memory-card-cover:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px var(--tenant-glow);
}

body.tenant-site-page .memory-card-media {
    border-radius: 1.125rem 1.125rem 0 0;
}

body.tenant-site-page .memory-card-date {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ─── فعالیت‌ها ─── */

.tenant-activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 32rem;
    margin: 0 auto;
}

.tenant-activity-card {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.125rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(61, 61, 61, 0.04);
}

.tenant-activity-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-accent) 55%, white);
    color: var(--color-primary-dark);
    flex-shrink: 0;
}

.tenant-activity-label {
    font-weight: 700;
    font-size: 0.9375rem;
    margin: 0 0 0.25rem;
}

.tenant-activity-meta {
    font-size: 0.8125rem;
    color: var(--color-muted);
    margin: 0;
}

/* ─── فوتر tenant ─── */

.tenant-footer {
    margin-top: 3rem;
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.tenant-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.tenant-footer-url {
    font-size: 0.75rem;
    color: var(--color-muted);
    direction: ltr;
    unicode-bidi: isolate;
}

.tenant-footer-powered {
    font-size: 0.6875rem;
    color: var(--color-muted);
    margin-top: 0.75rem;
}

.tenant-footer-powered a {
    color: var(--color-primary-dark);
    text-decoration: none;
}

.tenant-footer-powered a:hover {
    text-decoration: underline;
}

/* ─── جزئیات خاطره / رسانه — سبک IG با تم خانواده ─── */

body.tenant-ig-page main.container {
    padding-left: 0;
    padding-right: 0;
    padding-top: 0.5rem;
}

body.tenant-ig-page .tenant-ig-post {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--color-border);
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

body.tenant-ig-page .ig-post-content {
    padding: 0 1rem 1.25rem;
}

/* Chrome بالای پست */
.ig-chrome {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.92);
}

.ig-chrome-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    color: var(--color-text);
    text-decoration: none;
    background: color-mix(in srgb, var(--color-accent) 45%, white);
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}

.ig-chrome-back:hover {
    background: var(--color-accent);
}

.ig-chrome-back:active {
    transform: scale(0.94);
}

.ig-chrome-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex: 1;
    min-width: 0;
}

.ig-chrome .share-widget {
    margin-inline-start: auto;
    flex-shrink: 0;
}

.ig-chrome-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--tenant-glow);
}

.ig-chrome-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ig-chrome-name {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ig-chrome-context {
    font-size: 0.6875rem;
    color: var(--color-muted);
}

/* رسانه */
body.tenant-ig-page .ig-post-media-themed {
    border-radius: 0;
    margin-bottom: 0;
    background: #0a0a0a;
}

body.tenant-ig-page .ig-post-media-img {
    max-height: 75vh;
}

body.tenant-ig-page .ig-post-gallery-themed {
    gap: 2px;
    margin-bottom: 0;
    border-radius: 0;
}

body.tenant-ig-page .ig-post-gallery-single {
    grid-template-columns: 1fr;
}

body.tenant-ig-page .ig-post-gallery-single .ig-gallery-tap-img {
    aspect-ratio: 4 / 5;
    max-height: 70vh;
}

body.tenant-ig-page .ig-gallery-tap-link {
    display: block;
    line-height: 0;
}

.ig-media-full-link-themed {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: color-mix(in srgb, var(--color-bg) 80%, white);
}

.ig-media-full-link-themed a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    text-decoration: none;
}

.ig-media-full-link-themed a:hover {
    text-decoration: underline;
}

/* اکشن‌ها و کپشن */
body.tenant-ig-page .ig-post-footer {
    padding: 0.5rem 0 0.25rem;
    border-bottom: none;
}

body.tenant-ig-page .ig-action-buttons {
    padding: 0.25rem 0 0.375rem;
    gap: 1rem;
}

body.tenant-ig-page .ig-like-btn,
body.tenant-ig-page .ig-comment-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-accent) 35%, white);
    transition: transform 0.15s, background 0.2s;
}

body.tenant-ig-page .ig-like-btn:hover,
body.tenant-ig-page .ig-comment-btn:hover {
    background: color-mix(in srgb, var(--color-accent) 65%, white);
}

body.tenant-ig-page .ig-like-count,
body.tenant-ig-page .ig-comment-count {
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.ig-post-caption-themed {
    padding: 0.75rem 0 1rem;
    border-bottom: 1px solid color-mix(in srgb, var(--color-border) 70%, transparent);
}

.ig-caption-title {
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: 1.45;
    margin: 0 0 0.375rem;
    letter-spacing: -0.01em;
}

.ig-caption-date {
    display: block;
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-bottom: 0.625rem;
}

body.tenant-ig-page .ig-caption-text {
    font-size: 0.9375rem;
    line-height: 1.75;
    margin: 0;
    color: var(--color-text);
}

/* کامنت‌ها */
body.tenant-ig-page .ig-comments {
    padding: 0.875rem 0 0.25rem;
}

body.tenant-ig-page .ig-comment {
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.875rem;
    background: color-mix(in srgb, var(--color-accent) 22%, white);
    border: 1px solid color-mix(in srgb, var(--color-border) 80%, transparent);
}

body.tenant-ig-page .ig-comment-author {
    color: var(--color-primary-dark);
}

body.tenant-ig-page .ig-no-comments {
    text-align: center;
    padding: 1rem;
    border-radius: 0.875rem;
    background: color-mix(in srgb, var(--color-accent) 18%, white);
}

body.tenant-ig-page .ig-comment-form-themed {
    margin-top: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 20px rgba(61, 61, 61, 0.06);
}

body.tenant-ig-page .ig-bar-send {
    background: color-mix(in srgb, var(--color-primary) 18%, white);
    color: var(--color-primary-dark);
}

body.tenant-ig-page .ig-bar-send:not(:disabled):hover {
    background: color-mix(in srgb, var(--color-primary) 30%, white);
}

@media (min-width: 640px) {
    body.tenant-ig-page main.container {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 1.25rem;
    }

    body.tenant-ig-page .tenant-ig-post {
        border-radius: 1.25rem;
        box-shadow: 0 12px 40px rgba(61, 61, 61, 0.1);
    }

    body.tenant-ig-page .ig-post-media-themed {
        border-radius: 0;
    }

    body.tenant-ig-page .ig-post-gallery-themed {
        border-radius: 0;
    }
}

/* ─── ریسپانسیو ─── */

@media (min-width: 640px) {
    body.tenant-site-page .media-grid-public {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 900px) {
    .tenant-features {
        grid-template-columns: 1fr;
        max-width: 24rem;
    }
}

@media (max-width: 640px) {
    body.tenant-site-page main.container {
        padding-top: 1rem;
    }

    .tenant-hero {
        padding: 1.25rem 0 2rem;
    }

    .tenant-stats-grid {
        max-width: 100%;
    }

    .tenant-private-metrics {
        grid-template-columns: 1fr;
    }

    .tenant-private-preview {
        grid-template-columns: repeat(2, 1fr);
    }

    .tenant-access-request-grid {
        grid-template-columns: 1fr;
    }

    .tenant-access-request-actions .btn {
        width: 100%;
    }
}
