/* ═══════════════════════════════════════════════════════════════════════
   BOLMOL — landing page stylesheet
   Loaded by: welcome.php
   Theme: light
   Namespace: .bm-welcome
   ═══════════════════════════════════════════════════════════════════════ */

.bm-welcome {
    --bm-wl-surface:       #ffffff;
    --bm-wl-surface-2:     #f5f6f7;
    --bm-wl-surface-hover: #eef2f8;

    --bm-wl-border:        #ced0d4;
    --bm-wl-border-soft:   #e4e6eb;
    --bm-wl-border-faint:  #ebedf0;

    --bm-wl-text:          #050505;
    --bm-wl-text-soft:     #65676b;
    --bm-wl-text-faint:    #8a8d91;
    --bm-wl-text-inverse:  #ffffff;

    --bm-wl-primary:       #1877f2;
    --bm-wl-primary-hi:    #166fe5;

    --bm-wl-radius:        10px;
    --bm-wl-radius-lg:     14px;

    --bm-wl-shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.08);
    --bm-wl-shadow:        0 2px 8px rgba(0, 0, 0, 0.08);

    --bm-wl-container-max: 1200px;

    --bm-wl-transition-fast: 90ms ease;

    font-family: var(--bm-font, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    color: var(--bm-wl-text);
}

.bm-welcome *,
.bm-welcome *::before,
.bm-welcome *::after {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════════════
   1. HERO
   ═══════════════════════════════════════════════════════════════════════ */

.bm-welcome .bm-hero {
    padding: 56px 0 40px;
    background: var(--bm-wl-surface);
    border-bottom: 1px solid var(--bm-wl-border-soft);
}

.bm-welcome .bm-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
    padding-left: 16px;
    padding-right: 16px;
}

.bm-welcome .bm-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.bm-welcome .bm-hero-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--bm-wl-text);
    margin: 0;
}

.bm-welcome .bm-hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.55;
    color: var(--bm-wl-text-soft);
    max-width: 540px;
    margin: 0;
}

.bm-welcome .bm-hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.bm-welcome .bm-hero-cta .btn {
    padding: 12px 24px;
    font-size: 1rem;
    min-height: 48px;
    font-weight: 700;
    border-radius: var(--bm-wl-radius);
}

/* ═══════════════════════════════════════════════════════════════════════
   2. STATS
   ═══════════════════════════════════════════════════════════════════════ */

.bm-welcome .bm-hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid var(--bm-wl-border-soft);
    margin: 8px 0 0;
}

.bm-welcome .bm-hero-stats { column-gap: 26px; row-gap: 14px; }

.bm-welcome .bm-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bm-welcome .bm-hero-stat dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bm-wl-text-faint);
    font-weight: 700;
    order: 2;
    margin: 0;
}

.bm-welcome .bm-hero-stat dd {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bm-wl-text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    order: 1;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   3. RECENT MEMBERS PANEL
   ═══════════════════════════════════════════════════════════════════════ */

.bm-welcome .bm-hero-panel {
    padding: 22px;
    background: var(--bm-wl-surface);
    border: 1px solid var(--bm-wl-border-soft);
    border-radius: var(--bm-wl-radius-lg);
    box-shadow: var(--bm-wl-shadow-sm);
    min-width: 0;
}

.bm-welcome .bm-hero-panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bm-wl-text-faint);
    margin: 0 0 14px;
}

.bm-welcome .bm-hero-panel-empty {
    font-size: 0.9rem;
    color: var(--bm-wl-text-soft);
    margin: 0;
    line-height: 1.5;
}

.bm-welcome .bm-hero-members {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bm-welcome .bm-hero-member-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--bm-wl-radius);
    text-decoration: none;
    color: inherit;
    transition: background var(--bm-wl-transition-fast);
    min-width: 0;
}

.bm-welcome .bm-hero-member-link:hover,
.bm-welcome .bm-hero-member-link:focus {
    background: var(--bm-wl-surface-2);
    color: inherit;
    text-decoration: none;
}

.bm-welcome .bm-hero-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bm-wl-surface-2);
    flex-shrink: 0;
}

.bm-welcome .bm-hero-member-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bm-welcome .bm-hero-member-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--bm-wl-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bm-welcome .bm-hero-member-handle {
    font-size: 0.78rem;
    color: var(--bm-wl-text-soft);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════
   4. LATEST POSTS
   ═══════════════════════════════════════════════════════════════════════ */

.bm-welcome .bm-latest {
    padding: 40px 16px;
    max-width: var(--bm-wl-container-max);
    margin: 0 auto;
}

.bm-welcome .bm-trending-title {
    max-width: var(--bm-wl-container-max);
    margin: 32px auto -22px;
    padding: 0 16px;
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.bm-welcome .bm-trending-title::after {
    display: block;
    width: 52px;
    height: 4px;
    margin-top: 11px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--bm-wl-primary), #62a3ff);
    content: "";
}

.bm-welcome .bm-latest-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.bm-welcome .bm-latest-title {
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    font-weight: 800;
    color: var(--bm-wl-text);
    margin: 0;
    letter-spacing: -0.015em;
}

.bm-welcome .bm-latest-empty {
    font-size: 0.95rem;
    color: var(--bm-wl-text-soft);
    padding: 32px 0;
    margin: 0;
    text-align: center;
}

.bm-welcome .bm-post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.bm-welcome .bm-post-card {
    display: flex;
    flex-direction: column;
    background: var(--bm-wl-surface);
    border: 1px solid var(--bm-wl-border-soft);
    border-radius: var(--bm-wl-radius-lg);
    overflow: hidden;
    height: 100%;
    transition: border-color var(--bm-wl-transition-fast),
                box-shadow   var(--bm-wl-transition-fast);
}
.bm-welcome .bm-post-card:hover {
    border-color: var(--bm-wl-border);
    box-shadow: var(--bm-wl-shadow);
}

.bm-welcome .bm-post-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}
.bm-welcome .bm-post-card-link:hover,
.bm-welcome .bm-post-card-link:focus {
    color: inherit;
    text-decoration: none;
}

.bm-welcome .bm-post-card-media-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--bm-wl-surface-2);
    overflow: hidden;
    display: block;
}

.bm-welcome .bm-post-card-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bm-welcome .bm-post-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.bm-welcome .bm-post-card-play i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: var(--bm-wl-text-inverse);
    font-size: 1.3rem;
    padding-left: 3px;
}

.bm-welcome .bm-post-card-body {
    padding: 16px 16px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}

.bm-welcome .bm-post-card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--bm-wl-text);
    margin: 0;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bm-welcome .bm-post-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    min-width: 0;
}

.bm-welcome .bm-post-card-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bm-wl-surface-2);
    flex-shrink: 0;
}

.bm-welcome .bm-post-card-author-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bm-welcome .bm-post-card-author-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bm-wl-text);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bm-welcome .bm-post-card-author-handle {
    font-size: 0.72rem;
    color: var(--bm-wl-text-soft);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bm-welcome .bm-post-card-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-top: 1px solid var(--bm-wl-border-faint);
    font-size: 0.78rem;
    color: var(--bm-wl-text-soft);
    font-weight: 500;
}

.bm-welcome .bm-post-card-footer > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
}
.bm-welcome .bm-post-card-footer i { font-size: 0.9rem; }

.bm-welcome .bm-post-card-time {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════════════════
   5. BOTTOM CTA
   ═══════════════════════════════════════════════════════════════════════ */

.bm-welcome .bm-cta-section {
    padding: 48px 16px;
    max-width: var(--bm-wl-container-max);
    margin: 0 auto;
}

.bm-welcome .bm-cta {
    padding: 48px 32px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f6f7 100%);
    border: 1px solid var(--bm-wl-border-soft);
    border-radius: var(--bm-wl-radius-lg);
    text-align: center;
    box-shadow: var(--bm-wl-shadow-sm);
}

.bm-welcome .bm-cta-title {
    font-size: clamp(1.4rem, 2.8vw, 1.85rem);
    font-weight: 800;
    color: var(--bm-wl-text);
    margin: 0 0 8px;
    letter-spacing: -0.015em;
}

.bm-welcome .bm-cta-sub {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--bm-wl-text-soft);
    max-width: 520px;
    margin: 0 auto 24px;
}

.bm-welcome .bm-cta .btn {
    padding: 12px 24px;
    font-size: 1rem;
    min-height: 48px;
    font-weight: 700;
    border-radius: var(--bm-wl-radius);
}

/* ═══════════════════════════════════════════════════════════════════════
   6. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 991.98px) {
    .bm-welcome .bm-hero { padding: 40px 0 32px; }
    .bm-welcome .bm-hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .bm-welcome .bm-hero-stats { gap: 24px; }
    .bm-welcome .bm-hero-stat dd { font-size: 1.3rem; }
    .bm-welcome .bm-post-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .bm-welcome .bm-cta { padding: 36px 24px; }
}

@media (max-width: 575.98px) {
    .bm-welcome .bm-hero { padding: 32px 0 24px; }
    .bm-welcome .bm-hero-cta .btn { flex: 1 1 auto; min-width: 140px; }
    .bm-welcome .bm-hero-stats { gap: 20px; }
    .bm-welcome .bm-hero-stat dd { font-size: 1.15rem; }
    .bm-welcome .bm-hero-stat dt { font-size: 0.68rem; }
    .bm-welcome .bm-post-grid { grid-template-columns: 1fr; gap: 16px; }
    .bm-welcome .bm-cta { padding: 28px 20px; }
    .bm-welcome .bm-cta .btn { width: 100%; }
    .bm-welcome .bm-post-card-text--xl { font-size: 1.6rem; }
    .bm-welcome .bm-post-card-text--lg { font-size: 1.4rem; }
    .bm-welcome .bm-post-card-text--m { font-size: 1.2rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
   7. RTL (Arabic / Urdu)
   ═══════════════════════════════════════════════════════════════════════ */

html[dir="rtl"] .bm-welcome {
    font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic",
                 "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq",
                 system-ui, -apple-system, sans-serif;
}

html[dir="rtl"] .bm-welcome .bm-hero-copy,
html[dir="rtl"] .bm-welcome .bm-hero-panel,
html[dir="rtl"] .bm-welcome .bm-latest-head,
html[dir="rtl"] .bm-welcome .bm-post-card-body,
html[dir="rtl"] .bm-welcome .bm-cta {
    text-align: right;
}

/* Reverse the visual order of the two hero columns so the copy
   appears on the right and the panel on the left, matching the
   reading order in RTL. */
html[dir="rtl"] .bm-welcome .bm-hero-inner {
    direction: rtl;
}

/* Mirror the arrow-bearing button icons (none currently, but
   future-proof for CTA buttons that add a trailing chevron). */
html[dir="rtl"] .bm-welcome .btn .fa-arrow-right,
html[dir="rtl"] .bm-welcome .btn .fa-arrow-left {
    transform: scaleX(-1);
}

/* Urdu prefers a little more line-height across the board. */
html[lang="ur"] .bm-welcome .bm-hero-title,
html[lang="ur"] .bm-welcome .bm-hero-sub,
html[lang="ur"] .bm-welcome .bm-post-card-text,
html[lang="ur"] .bm-welcome .bm-cta-sub,
html[lang="ur"] .bm-welcome .bm-hero-member-name {
    line-height: 1.75;
}

/* ═══════════════════════════════════════════════════════════════════════
   8. REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .bm-welcome *,
    .bm-welcome *::before,
    .bm-welcome *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

.bm-welcome .bm-post-card-text--xl {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
    -webkit-line-clamp: 6;
    line-clamp: 6;
}

.bm-welcome .bm-post-card-text--lg {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.02em;
    -webkit-line-clamp: 5;
    line-clamp: 5;
}

.bm-welcome .bm-post-card-text--m {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.01em;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

.bm-welcome .bm-post-card-text--base {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.bm-welcome .bm-home-products {
    width: min(var(--bm-wl-container-max), calc(100% - 32px));
    margin: 28px auto 36px;
}

.bm-welcome .bm-home-product-store {
    color: var(--bm-wl-primary);
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.bm-welcome .bm-home-product-store:hover {
    text-decoration: underline;
}

.bm-welcome .bm-home-products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.bm-welcome .bm-home-product-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--bm-wl-border-soft);
    border-radius: var(--bm-wl-radius-lg);
    background: var(--bm-wl-surface);
    box-shadow: var(--bm-wl-shadow-sm);
    transition: box-shadow var(--bm-wl-transition-fast), transform var(--bm-wl-transition-fast);
}

.bm-welcome .bm-home-product-card:hover {
    box-shadow: var(--bm-wl-shadow);
    transform: translateY(-2px);
}

.bm-welcome .bm-home-product-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bm-wl-surface-2);
}

.bm-welcome .bm-home-product-image img,
.bm-welcome .bm-home-product-image-empty {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bm-welcome .bm-home-product-image-secondary {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .bm-welcome .bm-home-product-image.has-second-image:hover .bm-home-product-image-secondary {
        opacity: 1;
    }
}

.bm-welcome .bm-home-product-image-empty {
    display: grid;
    place-items: center;
    color: var(--bm-wl-text-faint);
    font-size: 2rem;
}

.bm-welcome .bm-home-product-copy {
    padding: 12px 14px 14px;
}

.bm-welcome .bm-home-product-store {
    display: block;
    overflow: hidden;
    margin-bottom: 5px;
    color: var(--bm-wl-text-soft);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bm-welcome .bm-home-product-copy h3 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 2.8em;
    margin: 0;
    font-size: 0.98rem;
    font-weight: 650;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.bm-welcome .bm-home-product-copy h3 a {
    color: inherit;
    text-decoration: none;
}

.bm-welcome .bm-home-product-copy h3 a:hover {
    color: var(--bm-wl-primary);
}

.bm-welcome .bm-home-product-price {
    margin: 8px 0 0;
    font-size: 0.95rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 767.98px) {
    .bm-welcome .bm-home-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .bm-welcome .bm-home-product-copy { padding: 10px 11px 12px; }
}

@media (max-width: 359.98px) {
    .bm-welcome .bm-home-products-grid { grid-template-columns: 1fr; }
}
