/* آراء طلابنا — homepage student reviews (<x-uowa.index.feedbacks>).

   Two full-bleed rows of quote cards drifting in opposite directions under a
   start-aligned heading. Same seamless-loop rule as home-partners.css: each
   row is printed twice and travels exactly half its width, so every card
   carries its own trailing margin instead of the track having a `gap`. */

.ul-home-reviews {
    --hr-ink: var(--ul-primary, #0b254e);
    --hr-gold: var(--ul-c3, #febe35);
    --hr-muted: #8a93a3;
    --hr-bg: #fff;
    --hr-gap: 24px;
    --hr-ease: cubic-bezier(.22, 1, .36, 1);

    padding: clamp(64px, 7vw, 110px) 0;
    background: var(--hr-bg);
    overflow: hidden;
}

/* --------------------------------------------------------------------------
   Heading
   -------------------------------------------------------------------------- */
.ul-hr-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: clamp(36px, 4vw, 60px);
    text-align: start;
}

/* The "read more" link sits across from the title, on the far side, level
   with its baseline; on a phone it drops back under the title. */
@media (min-width: 576px) {
    .ul-hr-head {
        display: grid;
        grid-template-columns: 1fr auto;
        column-gap: 24px;
        align-items: end;
    }

    .ul-hr-head .ul-hr-label,
    .ul-hr-head .ul-hr-title {
        grid-column: 1;
    }

    .ul-hr-head .ul-hr-label {
        justify-self: start;
    }

    .ul-hr-head .ul-hr-more {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: end;
        margin-top: 0;
        padding-bottom: 0.4em;
    }
}

.ul-hr-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--hr-muted);
}

/* The gold dash the site uses in front of section labels. */
.ul-hr-label::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 2px;
    background: var(--hr-gold);
}

.ul-hr-title {
    margin: 0;
    font-size: clamp(30px, 3.6vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--hr-ink);
}

[dir="ltr"] .ul-hr-title {
    letter-spacing: -0.03em;
}

.ul-hr-title-lead {
    font-weight: 400;
    color: var(--hr-muted);
}

/* The title links through to the full list; it keeps the title's own look. */
.ul-hr-title-link,
.ul-hr-title-link:hover {
    color: inherit;
    text-decoration: none;
}

.ul-hr-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--hr-ink);
    text-decoration: none;
}

.ul-hr-more i {
    font-size: 12px;
    color: var(--hr-gold);
    transition: transform .35s var(--hr-ease);
}

.ul-hr-more:hover {
    color: var(--hr-ink);
}

.ul-hr-more:hover i {
    transform: translateX(-4px);
}

[dir="ltr"] .ul-hr-more:hover i {
    transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Rows
   -------------------------------------------------------------------------- */
.ul-hr-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ul-hr-rail {
    position: relative;
    overflow: hidden;
    /* Room for the hover lift and shadow, which overflow would clip. */
    padding-block: 10px 18px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ul-hr-track {
    --hr-from: 0%;
    --hr-to: -50%;

    display: flex;
    align-items: stretch;
    width: max-content;
    animation: ul-hr-drift var(--hr-lap, 48s) linear infinite;
}

.ul-hr-track.is-reverse {
    --hr-from: -50%;
    --hr-to: 0%;
}

/* RTL rows start at the right, so both directions flip. */
[dir="rtl"] .ul-hr-track {
    --hr-to: 50%;
}

[dir="rtl"] .ul-hr-track.is-reverse {
    --hr-from: 50%;
    --hr-to: 0%;
}

@keyframes ul-hr-drift {
    from { transform: translateX(var(--hr-from)); }
    to   { transform: translateX(var(--hr-to)); }
}

.ul-hr-rail:hover .ul-hr-track,
.ul-hr-rail:focus-within .ul-hr-track {
    animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.ul-hr-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    flex: 0 0 auto;
    width: clamp(300px, 30vw, 440px);
    min-height: 240px;
    margin: 0;
    margin-inline-end: var(--hr-gap);
    padding: 30px 30px 26px;
    background: #fff;
    /* White on a white section, so the edge comes from a border and a soft shadow. */
    border: 1px solid rgba(11, 37, 78, .1);
    box-shadow: 0 10px 30px -18px rgba(11, 37, 78, .18);
    border-radius: 22px;
    transition:
        transform .4s var(--hr-ease),
        box-shadow .4s var(--hr-ease),
        border-color .4s var(--hr-ease);
}

.ul-hr-card:hover {
    transform: translateY(-4px);
    border-color: rgba(254, 190, 53, .55);
    box-shadow: 0 20px 40px -24px rgba(11, 37, 78, .35);
}

/* Large, faint gold quote mark in the top corner. */
.ul-hr-mark {
    position: absolute;
    inset-block-start: 22px;
    inset-inline-end: 26px;
    font-size: 30px;
    color: var(--hr-gold);
    opacity: .28;
    transition: opacity .4s var(--hr-ease);
}

[dir="ltr"] .ul-hr-mark {
    transform: scaleX(-1);
}

.ul-hr-card:hover .ul-hr-mark {
    opacity: .6;
}

.ul-hr-quote {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    padding-inline-end: 34px;
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.85;
    color: #3d4757;
}

/* A video review: the picture with a play button in place of the quote. */
.ul-hr-card.is-video {
    gap: 18px;
    justify-content: flex-start;
}

.ul-hr-video {
    position: relative;
    display: block;
    height: 140px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--hr-ink);
}

.ul-hr-video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s var(--hr-ease);
}

.ul-hr-video::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(11, 37, 78, .25);
}

.ul-hr-play {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--hr-gold);
    color: var(--hr-ink);
    font-size: 17px;
    transform: translate(-50%, -50%);
    transition: transform .3s var(--hr-ease), box-shadow .3s var(--hr-ease);
}

[dir="rtl"] .ul-hr-play {
    transform: translate(50%, -50%);
}

.ul-hr-video:hover img {
    transform: scale(1.05);
}

.ul-hr-video:hover .ul-hr-play {
    box-shadow: 0 0 0 8px rgba(254, 190, 53, .3);
}

.ul-hr-card.is-video .ul-hr-quote {
    -webkit-line-clamp: 2;
    padding-inline-end: 0;
}

.ul-hr-person {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ul-hr-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--hr-ink);
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(254, 190, 53, .5);
}

.ul-hr-avatar img {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
}

.ul-hr-initial {
    font-size: 20px;
    font-weight: 700;
    color: var(--hr-gold);
}

.ul-hr-who {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ul-hr-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--hr-ink);
}

.ul-hr-role {
    font-size: 13.5px;
    font-weight: 400;
    color: #b8862a;
}

/* --------------------------------------------------------------------------
   The rows always drift — on touch screens too, and whatever the system's
   animation setting (the site-wide policy in motion.css). A touch screen has
   no hover, so a tap would leave the row stuck paused; the hover pause and
   card lift above are therefore limited to real pointers.
   -------------------------------------------------------------------------- */
@media (hover: none) {
    .ul-hr-rail:hover .ul-hr-track {
        animation-play-state: running;
    }

    .ul-hr-card:hover {
        transform: none;
        border-color: rgba(11, 37, 78, .1);
        box-shadow: 0 10px 30px -18px rgba(11, 37, 78, .18);
    }
}

/* --------------------------------------------------------------------------
   The full list (/students-reviews): the same cards, laid out in a grid
   instead of drifting rows.
   -------------------------------------------------------------------------- */
.ul-hr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--hr-gap);
}

.ul-hr-grid .ul-hr-card {
    width: auto;
    margin-inline-end: 0;
}

@media screen and (max-width: 767px) {
    .ul-home-reviews {
        --hr-gap: 14px;
    }

    .ul-hr-grid {
        grid-template-columns: 1fr;
    }

    .ul-hr-card {
        width: 280px;
        min-height: 220px;
        padding: 24px 22px 20px;
        border-radius: 18px;
    }

    .ul-hr-quote {
        font-size: 14.5px;
    }

    .ul-hr-avatar {
        width: 46px;
        height: 46px;
    }
}
