/* home-sections.css — homepage refinements for the student-affairs, academic
 * programs and faculty sections. Pushed once from each of those components, and
 * loaded after style.css / en.css so it serves both locales.
 */

/* ── Site button ─────────────────────────────────────────────────────────────
 * The site's button shape, taken from the opportunities CTA
 * (opportunities-section.css .ul-opp-cta): 10px radius, 600-weight label,
 * an arrow that steps the way the text reads — sized up a little here.
 *   .is-gold  — gold with navy text (navy on gold is ~10.9:1; white on gold
 *               is ~1.6:1, which is why the label is never white)
 *   .is-navy  — navy with white text, for light sections
 */
.ul-site-btn {
    --sb-ease: cubic-bezier(.22, 1, .36, 1);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: .95rem 1.7rem;
    border: 0;
    border-radius: 10px;
    font-family: inherit;
    /* label role */
    font-size: var(--t-label);
    font-weight: 700;
    line-height: var(--lh-ui);
    white-space: nowrap;
    text-decoration: none;
    transition:
        background-color .3s var(--sb-ease),
        color .3s var(--sb-ease),
        box-shadow .3s var(--sb-ease);
}

.ul-site-btn i {
    font-size: .85em;
    transition: transform .3s var(--sb-ease);
}

[dir="rtl"] .ul-site-btn:hover i { transform: translateX(-3px); }
[dir="ltr"] .ul-site-btn:hover i { transform: translateX(3px); }

.ul-site-btn.is-gold {
    background: var(--ul-c3);
    color: var(--ul-primary);
}

.ul-site-btn.is-gold:hover,
.ul-site-btn.is-gold:focus-visible {
    background: #ffd166;
    color: var(--ul-primary);
}

.ul-site-btn.is-navy {
    background: var(--ul-primary);
    color: #fff;
}

.ul-site-btn.is-navy:hover,
.ul-site-btn.is-navy:focus-visible {
    background: var(--ul-c3);
    color: var(--ul-primary);
}

/* Why-choose-us: a little air above the button. */
.ul-why-choose-us .ul-site-btn {
    margin-top: 8px;
}

/* ── Side headings: title at the reading edge, slider arrows level with it ── */
.ul-section-heading.ul-side-heading {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px 32px;
    text-align: start;
}

.ul-side-heading .left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
    /* Grows and, above all, SHRINKS. en.css gives this block `flex-shrink: 0`,
       so a long English title kept its one-line width (781px on a 390px
       screen) and the section's overflow:hidden cut it off. */
    flex: 1 1 18rem;
    min-width: 0;
    max-width: 100%;
}

.ul-side-heading .ul-section-title {
    margin-bottom: 0;
    text-align: start;
}

.ul-side-heading-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

/* One arrow style for both sections (the old ones differed: one bordered,
   one borderless, and a hover that jumped 3px and scaled). */
.ul-side-heading-nav button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(46px, 3.2vw, 54px);
    height: clamp(46px, 3.2vw, 54px);
    margin: 0;
    padding: 0;
    background: #fff;
    border: 1px solid rgba(11, 37, 78, .16);
    border-radius: 999px;
    color: var(--ul-primary);
    font-size: 16px;
    box-shadow: 0 6px 18px -10px rgba(11, 37, 78, .3);
    cursor: pointer;
    transform: none;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.ul-side-heading-nav button:hover,
.ul-side-heading-nav button:focus-visible {
    background: var(--ul-primary);
    border-color: var(--ul-primary);
    color: #fff;
    transform: none;
}

.ul-side-heading-nav button.swiper-button-disabled {
    opacity: .4;
    cursor: default;
}

/* ── Student affairs: the CMS body is joined into one paragraph ─────────────── */
.ul-2-about-txt .ul-2-about-descr {
    /* size and leading: body role, typography.css */
    color: #4a5568;
    text-align: justify;
    margin-bottom: clamp(22px, 2vw, 34px);
}

/* ── Academic programs: heading aligned to the reading edge, not centred ───── */
.ul-university-activities .ul-section-heading,
.ul-university-activities .ul-section-heading .left {
    align-items: flex-start;
    text-align: start;
}

.ul-university-activities .ul-section-heading .ul-section-title {
    text-align: start;
    margin-bottom: 0;
}

.ul-university-activities .ul-section-heading .ul-section-descr {
    margin: 0;
    font-size: clamp(14px, .9vw, 16px);
    line-height: 1.9;
    color: #4a5568;
    max-width: 60ch;
}

/* The category's icon from the CMS, inside the eyebrow pill before its name.
   style.css draws a built-in fa-users glyph on this eyebrow's ::before; with
   an icon filed in the CMS that glyph would sit next to it as a second icon,
   so it is dropped whenever the pill carries one. */
.ul-university-activities .ul-section-sub-title.has-icon::before {
    content: none;
}

.ul-university-activities .ul-section-icon {
    width: clamp(26px, 1.8vw, 34px);
    height: clamp(26px, 1.8vw, 34px);
    object-fit: contain;
    flex: none;
}

/* ── Faculty cards ───────────────────────────────────────────────────────────
 * Replaces the old hover (3px lift plus a gold wash growing from the centre)
 * with the same language as the resource cards: a real lift and shadow, a gold
 * rule drawing along the foot, a gold ring around the photo, and the role pill
 * turning gold.
 */
.ul-faculty-card {
    --fc-ease: cubic-bezier(.22, 1, .36, 1);
    /* Lighter than style.css's 0 8px 30px, which spread into a grey band
       under the row where the slider clips it. */
    box-shadow: 0 4px 14px -8px rgba(11, 37, 78, .12);
    transition:
        transform .42s var(--fc-ease),
        box-shadow .42s var(--fc-ease),
        border-color .42s var(--fc-ease);
}

.ul-faculty-card::before {
    display: none;
}

.ul-faculty-card::after {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    width: 0;
    height: 3px;
    background: var(--ul-c3);
    transition: width .45s var(--fc-ease);
}

.ul-faculty-card:hover,
.ul-faculty-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 14px 26px -18px rgba(4, 28, 51, .35);
    border-color: rgba(254, 190, 53, .45);
}

.ul-faculty-card:hover::after,
.ul-faculty-card:focus-within::after {
    width: 100%;
}

/* Photo: ring sits outside the circle so it does not crop the picture. */
.ul-faculty-card .ul-faculty-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 37, 78, .06);
    border: 0;
    box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(11, 37, 78, .08);
    transition: box-shadow .42s var(--fc-ease);
}

.ul-faculty-card .ul-faculty-image img {
    position: relative;
    z-index: 1;
    transition: transform .6s var(--fc-ease);
}

.ul-faculty-card:hover .ul-faculty-image {
    transform: none;
    box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ul-c3);
}

.ul-faculty-card:hover .ul-faculty-image img {
    transform: scale(1.06);
}

/* Fallback when there is no photo — covered by the <img> when one loads. */
.ul-faculty-avatar {
    position: absolute;
    font-size: 44px;
    color: rgba(11, 37, 78, .35);
}

.ul-faculty-card .ul-faculty-position {
    transition: background .35s var(--fc-ease), color .35s var(--fc-ease);
}

.ul-faculty-card:hover .ul-faculty-position {
    background: var(--ul-c3);
    color: var(--ul-primary);
    transform: none;
}

.ul-faculty-card:hover .ul-faculty-name {
    color: var(--ul-primary);
    transform: none;
}

/* Touch devices leave :hover stuck after a tap. */
@media (hover: none) {
    .ul-faculty-card:hover {
        transform: none;
        box-shadow: 0 4px 14px -8px rgba(11, 37, 78, .12);
    }

    .ul-faculty-card:hover::after {
        width: 0;
    }
}
