/* =========================================================================
 * Attorna — Legal Blog Section (RTL, Swiper, pagination dots)
 * Design tokens scoped to .lb-section (cream base, gold accent)
 * ========================================================================= */

.lb-section {
    --lb-ink:    #1c1c1c;
    --lb-gold:   #a67c52;
    --lb-gold-d: #8b6542;
    --lb-bg:     #fbf8f3;
    --lb-line:   rgba(30, 28, 24, 0.12);

    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg,
            rgba(251, 248, 243, 0.99) 0%,
            rgba(251, 248, 243, 0.92) 100%
        );
    color: var(--lb-ink);
    direction: rtl;
    text-align: right;
    padding: 88px 0 96px;
    font-family: var(--font-family-base, 'IRANSans', Tahoma, sans-serif);
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
}

/* Soft gold glow behind the header */
.lb-section::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 480px;
    background: radial-gradient(closest-side, rgba(166, 124, 82, 0.08), transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Ensure the shared wrapper sits above the watermark/glow */
.lb-section .container {
    position: relative;
    z-index: 2;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- Watermark ---------- */
.lb-watermark {
    position: absolute;
    inset-inline: 0;
    top: 18px;
    transform: none;
    font-family: 'Playfair Display', serif, sans-serif;
    font-size: clamp(80px, 12vw, 150px);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(166, 124, 82, 0.08);
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    pointer-events: none;
    user-select: none;
    overflow: hidden;
    z-index: 1;
}

/* ---------- Header block ---------- */
.lb-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    position: relative;
    z-index: 2;
    margin-bottom: 48px;
    text-align: right;
}

.lb-head__bar {
    display: block;
    width: 56px;
    height: 3px;
    margin-bottom: 12px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--lb-gold) 0%, #c7a67d 100%);
}

.lb-title {
    margin: 0;
    font-family: var(--font-family-heading, 'Jost', 'IRANSans', Tahoma, sans-serif);
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.4;
    font-weight: var(--font-weight-bold, 700);
    color: var(--lb-ink);
    text-align: right;
}

.lb-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: var(--lb-ink);
    font-family: var(--font-family-heading, 'Jost', 'IRANSans', Tahoma, sans-serif);
    font-weight: var(--font-weight-bold, 700);
    font-size: 15px;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
    white-space: nowrap;
    position: relative;
}
.lb-view-all::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--lb-gold-d);
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.3s cubic-bezier(0.33, 1, 0.68, 1);
}
.lb-view-all:hover,
.lb-view-all:focus-visible {
    color: var(--lb-gold-d);
    text-decoration: none;
}
.lb-view-all:hover::after,
.lb-view-all:focus-visible::after {
    transform: scaleX(1);
}
.lb-view-all__arrow {
    font-size: 15px;
    line-height: 1;
    transition: transform 0.25s ease;
}
.lb-view-all:hover .lb-view-all__arrow {
    transform: translateX(-4px);
}

/* =========================================================================
 * Swiper + Cards (image-less text cards)
 * ========================================================================= */
.lb-swiper {
    position: relative;
    width: 100%;
    z-index: 2;
    padding-bottom: 4px;
}

.lb-swiper__wrapper {
    display: flex;
    width: 100%;
}

.lb-swiper__slide {
    width: 100%;
    height: auto;
}

.lb-card {
    background: #fff;
    padding: 32px 28px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    color: inherit;
    transition: transform .3s, box-shadow .3s;
}

.lb-card:hover,
.lb-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
}

.lb-card__title {
    margin: 0;
    font-family: var(--font-family-heading, 'Jost', 'IRANSans', Tahoma, sans-serif);
    font-size: 1.05rem;
    line-height: 1.8;
    font-weight: 700;
    color: var(--lb-ink);
}

.lb-card__title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.25s ease;
}
.lb-card:hover .lb-card__title-link,
.lb-card__title-link:hover,
.lb-card__title-link:focus-visible {
    color: var(--lb-gold-d);
    text-decoration: none;
}

.lb-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
    font-size: .82rem;
    color: var(--text-secondary, #777);
}

.lb-card__sep {
    color: var(--lb-gold);
    font-weight: 700;
}

/* =========================================================================
 * Pagination dots (Swiper)
 * ========================================================================= */
.lb-pagination {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 32px;
}

.lb-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d3c5b4;
    opacity: .7;
    margin: 0 5px;
    transition: width .3s, border-radius .3s, background .3s, opacity .3s;
}

.lb-pagination .swiper-pagination-bullet-active {
    width: 24px;
    height: 8px;
    border-radius: 4px;
    background: var(--lb-gold);
    opacity: 1;
}

/* =========================================================================
 * Responsive
 * ========================================================================= */
@media (max-width: 768px) {
    .lb-section { padding: 72px 0 80px; }
    .lb-section .container { padding: 0 18px; }
    .lb-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .lb-section { padding: 56px 0 64px; }
    .lb-section .container { padding: 0 14px; }
    .lb-watermark { font-size: clamp(3rem, 14vw, 5rem); }
    .lb-title { font-size: clamp(24px, 7.2vw, 32px); }
    .lb-card { padding: 24px 20px; min-height: 190px; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .lb-card,
    .lb-view-all,
    .lb-view-all::after,
    .lb-card__title-link {
        transition: none !important;
    }
    .lb-pagination .swiper-pagination-bullet {
        transition: none !important;
    }
}
