/* =========================================================================
 * Attorna — Native Hero Slider (RTL)
 * Design tokens inherited from variables.css
 * ========================================================================= */

.attorna-hero-slider {
    --hs-bg: #fbf8f2;
    --hs-ink: #1d1d1d;
    --hs-ink-soft: #5c564c;
    --hs-gold: #a38753;
    --hs-gold-dark: #8c6f3f;
    --hs-line: rgba(30, 28, 24, 0.12);
    --hs-card-shadow: 0 30px 60px -20px rgba(23, 20, 14, 0.35),
                      0 8px 20px -8px rgba(23, 20, 14, 0.18);

    position: relative;
    background: var(--hs-bg);
    color: var(--hs-ink);
    direction: rtl;
    text-align: right;
    min-height: min(78vh, 680px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 96px 0 88px;
    font-family: var(--font-family-base, 'IRANSans', Tahoma, sans-serif);
    line-height: 1.9;
}

/* Background: soft cream + watermark vector + decorative column grid */
.attorna-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.attorna-hero-bg-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 50%, rgba(163, 135, 83, 0.10), transparent 42%),
        radial-gradient(circle at 88% 20%, rgba(41, 59, 109, 0.07), transparent 46%);
}

.attorna-hero-bg-pattern::after {
    content: "\f0e7"; /* Font Awesome scales of justice watermark */
    position: absolute;
    left: 6%;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: clamp(200px, 34vw, 480px);
    line-height: 1;
    color: rgba(29, 29, 29, 0.045);
}

.attorna-hero-bg-columns {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to left, transparent calc(100% - 1px), var(--hs-line) 0) ;
    background-size: 25% 100%;
    background-repeat: repeat-x;
    opacity: .55;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

/* Track: grid stack so all slides occupy the same cell and drive height */
.attorna-hero-track {
    position: relative;
    flex: 1 1 auto;
    display: grid;
    grid-template: "stack" 1fr / 1fr;
    overflow: hidden;
}

/* Slide: participates in the grid, cross-fade handled by opacity */
.attorna-hero-slide {
    position: relative;
    grid-area: stack;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .55s ease, visibility 0s linear .55s;
}

.attorna-hero-slide * {
    pointer-events: none;
}

.attorna-hero-slide--active {
    opacity: 1;
    visibility: visible;
    transition: opacity .55s ease, visibility 0s;
    z-index: 2;
}

.attorna-hero-slide--active,
.attorna-hero-slide--active * {
    pointer-events: auto;
}

.attorna-hero-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 48px;
}

/* ---------- Content (left side in RTL) ---------- */
.attorna-hero-content {
    position: relative;
    z-index: 2;
}

.attorna-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--hs-gold);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 18px;
}
.attorna-hero-eyebrow::before {
    content: "";
    width: 38px;
    height: 1px;
    background: currentColor;
    opacity: .7;
}

.attorna-hero-title {
    font-family: var(--font-family-heading, 'IRANSans', Tahoma, sans-serif);
    font-size: clamp(28px, 4.2vw, 46px);
    line-height: 1.55;
    font-weight: 700;
    margin: 0 0 18px;
    color: var(--hs-ink);
}

.attorna-hero-desc {
    font-size: clamp(15px, 1.4vw, 17px);
    color: var(--hs-ink-soft);
    text-align: justify;
    margin: 0 0 30px;
}

.attorna-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 26px;
}

.attorna-hero-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: var(--hs-gold);
    color: #fff;
    border-radius: 3px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    transition: background-color .25s ease, transform .2s ease, box-shadow .25s ease;
}
.attorna-hero-btn::after {
    content: "";
    position: absolute;
    top: 0;
    right: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,.35), transparent);
    transform: skewX(-18deg);
    transition: right .5s ease;
}
.attorna-hero-btn:hover {
    background: var(--hs-gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(163, 135, 83, .55);
    text-decoration: none;
}
.attorna-hero-btn:hover::after {
    right: 140%;
}
.attorna-hero-btn:focus-visible {
    outline: 2px solid var(--hs-gold-dark);
    outline-offset: 3px;
}

/* Signature block */
.attorna-hero-signature {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 20px;
    border-top: 1px solid var(--hs-line);
    max-width: 280px;
}
.attorna-hero-signature-name {
    font-family: 'Jost', 'IRANSans', Tahoma, sans-serif;
    font-size: 22px;
    font-style: italic;
    font-weight: 500;
    letter-spacing: .01em;
    color: var(--hs-ink);
    opacity: .9;
}
.attorna-hero-signature-role {
    font-size: 13px;
    color: var(--hs-gold-dark);
}

/* ---------- Visual card (right side in RTL) ---------- */
.attorna-hero-visual {
    position: relative;
    justify-self: start;
    width: min(100%, 420px);
}

.attorna-hero-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--hs-card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: #fff;
    aspect-ratio: 4 / 5;
}
.attorna-hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.attorna-hero-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
    z-index: 1;
    pointer-events: none;
}
.attorna-hero-card-placeholder {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(150deg, #efe9dd, #e5dcc9),
        repeating-linear-gradient(45deg, rgba(163,135,83,.06) 0 12px, transparent 12px 24px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.attorna-hero-card-placeholder::after {
    content: "\f0e7";
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 96px;
    color: rgba(140, 111, 63, .35);
}

.attorna-hero-card-shadow {
    position: absolute;
    left: -14px;
    right: -14px;
    bottom: -18px;
    height: 34px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(23,20,14,.28), transparent 70%);
    filter: blur(6px);
    z-index: -1;
}

/* Gold corner accents on the card */
.attorna-hero-visual::before,
.attorna-hero-visual::after {
    content: "";
    position: absolute;
    width: 56px;
    height: 56px;
    border: 2px solid var(--hs-gold);
    z-index: 0;
    opacity: .8;
}
.attorna-hero-visual::before {
    top: -14px;
    right: -14px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 6px;
}
.attorna-hero-visual::after {
    bottom: -14px;
    left: -14px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 6px;
}

/* ---------- Controls: dots + arrows ---------- */
.attorna-hero-controls {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: 40px;
}

.attorna-hero-dots {
    display: flex;
    gap: 10px;
}

.attorna-hero-dot {
    width: 34px;
    height: 5px;
    border-radius: 3px;
    border: none;
    padding: 0;
    background: rgba(29, 29, 29, .18);
    cursor: pointer;
    transition: background-color .25s ease, width .3s ease;
}
.attorna-hero-dot:hover {
    background: rgba(163, 135, 83, .55);
}
.attorna-hero-dot.is-active {
    width: 52px;
    background: var(--hs-gold);
}
.attorna-hero-dot:focus-visible {
    outline: 2px solid var(--hs-gold);
    outline-offset: 4px;
}

.attorna-hero-arrows {
    display: flex;
    gap: 10px;
}

.attorna-hero-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--hs-line);
    background: rgba(255, 255, 255, .6);
    color: var(--hs-ink);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.attorna-hero-arrow:hover {
    background: var(--hs-gold);
    border-color: var(--hs-gold);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}
.attorna-hero-arrow:focus-visible {
    outline: 2px solid var(--hs-gold);
    outline-offset: 3px;
}
.attorna-hero-arrow:active {
    transform: translateY(0);
}

/* Single-slide (no autoplay) hide controls helpers */
.attorna-hero-slider .attorna-hero-controls {
    margin-top: 40px;
}

/* ---------- Staggered entrance animation ---------- */
.hs-anim {
    opacity: 0;
    transform: translateY(26px);
    will-change: opacity, transform;
}

.attorna-hero-slide--active .hs-anim {
    animation: attornaHsFadeUp .7s cubic-bezier(.22, .61, .36, 1) forwards;
}
.attorna-hero-slide--active .hs-anim:nth-child(1) { animation-delay: .05s; }
.attorna-hero-slide--active .hs-anim:nth-child(2) { animation-delay: .15s; }
.attorna-hero-slide--active .hs-anim:nth-child(3) { animation-delay: .25s; }
.attorna-hero-slide--active .hs-anim:nth-child(4) { animation-delay: .35s; }
.attorna-hero-slide--active .hs-anim:nth-child(5) { animation-delay: .45s; }

.attorna-hero-slide--active .attorna-hero-visual.hs-anim {
    animation-name: attornaHsSlideUp;
    animation-delay: .12s;
}

@keyframes attornaHsFadeUp {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes attornaHsSlideUp {
    from { opacity: 0; transform: translateY(44px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .attorna-hero-slide,
    .hs-anim,
    .attorna-hero-btn::after {
        animation: none !important;
        transition: none !important;
    }
    .hs-anim {
        opacity: 1;
        transform: none;
    }
}

/* =========================================================================
 * Responsive
 * ========================================================================= */

/* Tablet: stack content over visual */
@media (max-width: 992px) {
    .attorna-hero-slider {
        padding: 72px 0 64px;
        min-height: 0;
    }
    .attorna-hero-container {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: right;
    }
    .attorna-hero-visual {
        justify-self: center;
        width: min(100%, 380px);
    }
}

/* Mobile */
@media (max-width: 600px) {
    .attorna-hero-slider {
        padding: 56px 0 48px;
    }
    .attorna-hero-bg-pattern::after {
        left: -8%;
        font-size: 150px;
    }
    .attorna-hero-container {
        gap: 28px;
    }
    .attorna-hero-title {
        font-size: 26px;
        line-height: 1.6;
    }
    .attorna-hero-desc {
        font-size: 14.5px;
        margin-bottom: 24px;
    }
    .attorna-hero-btn {
        width: 100%;
        justify-content: center;
        padding: 13px 20px;
    }
    .attorna-hero-visual {
        width: 100%;
    }
    .attorna-hero-visual::before,
    .attorna-hero-visual::after {
        width: 42px;
        height: 42px;
    }
    .attorna-hero-visual::before {
        top: -10px;
        right: -8px;
    }
    .attorna-hero-visual::after {
        bottom: -10px;
        left: -8px;
    }
    .attorna-hero-card {
        aspect-ratio: 4 / 4.4;
    }
    .attorna-hero-controls {
        margin-top: 28px;
        gap: 16px;
    }
    .attorna-hero-arrow {
        width: 36px;
        height: 36px;
    }
    .attorna-hero-signature-name {
        font-size: 20px;
    }
}
