/* Trevor on the site: the big panel (views/partials/advisor.html) and the small card (views/partials/advisor-card.html).
   Loaded on every page from layout.html, so it carries its own colours. */

.advisor,
.advisor-card {
    --navy: #153068;
    --ink: #28355a;
    --muted: #5a6684;
    --tint: #f3f6fb;
}

/* ===#PANEL=== Light panel, Trevor stands on its bottom edge.
   Phones and tablets: text, then his photo with a name card. Desktop: photo on the right, head above the panel. */
.advisor {
    position: relative;
    margin-top: 56px;
    padding: 32px 24px 0;
    border-radius: 8px;
    background: var(--tint);
}

.advisor__eyebrow {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.advisor__title {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 36px;
    font-weight: 700;
    color: var(--navy);
}

.advisor__text {
    max-width: 520px;
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 26px;
    color: var(--ink);
}

.advisor__alt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    margin: 20px 0 0;
    font-size: 15px;
    color: var(--ink);
}

/* p.advisor__alt so page link colours (e.g. .gd a:not(.btn) on guide pages) don't win */
.advisor p.advisor__alt a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--navy);
    text-decoration: none;
}

.advisor p.advisor__alt a:hover {
    text-decoration: underline;
}

.advisor__person {
    position: relative;
    width: min(100%, 260px);
    margin: 32px auto 0;
}

.advisor__person img {
    display: block;
    width: 100%;
    height: auto;
}

/* Name card over his shoulder */
.advisor__person figcaption {
    position: absolute;
    left: 0;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(21, 48, 104, 0.15);
    font-size: 13px;
    line-height: 18px;
    color: var(--muted);
}

.advisor__person strong {
    font-size: 15px;
    line-height: 21px;
    color: var(--navy);
}

@media (min-width: 992px) {
    .advisor {
        margin-top: 120px; /* room for his head above the panel */
        min-height: 340px;
        padding: 56px 440px 56px 56px; /* the right side is kept for the photo */
    }

    /* Photo is 64px taller than the panel, so his head always rises above it */
    .advisor__person {
        position: absolute;
        right: 40px;
        bottom: 0;
        width: auto;
        max-width: 360px;
        height: calc(100% + 64px);
        aspect-ratio: 760 / 970;
        margin: 0;
    }

    .advisor__person img {
        height: 100%;
        object-fit: contain;
        object-position: bottom;
    }
}

/* Wide screens: his name sits beside him at chin height instead of on a card */
@media (min-width: 1200px) {
    .advisor {
        padding-right: 600px;
    }

    .advisor__person {
        right: 220px;
    }

    .advisor__person figcaption {
        left: calc(100% + 24px);
        top: 34%;
        bottom: auto;
        width: 180px;
        padding: 0;
        background: none;
        box-shadow: none;
        font-size: 15px;
        line-height: 22px;
    }
}

/* ===#SMALL CARD=== Round photo and name, for the Contact page, the timelines enquiry and the sticky box */
.advisor-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 20px;
}

.advisor-card img {
    flex: none;
    width: 56px;
    height: 56px;
    box-sizing: border-box;
    padding-top: 4px; /* headroom so the circle doesn't clip his hair */
    border-radius: 50%;
    background: var(--tint);
    object-fit: cover;
    object-position: top;
}

.advisor-card p {
    display: flex;
    flex-direction: column;
    margin: 0;
    font-size: 13px;
    line-height: 18px;
    color: var(--muted);
}

.advisor-card strong {
    font-size: 15px;
    line-height: 21px;
    color: var(--navy);
}

/* On the tinted sticky box the photo needs a white disc behind it */
.svc-enquiry .advisor-card img {
    background: #fff;
}

/* On the navy enquiry band (About page) */
.svc-cta .advisor-card {
    margin: 24px 0 0;
}

.svc-cta .advisor-card img {
    background: rgba(255, 255, 255, 0.14);
}

.svc-cta .advisor-card strong {
    color: #fff;
}

.svc-cta .advisor-card span {
    color: rgba(255, 255, 255, 0.7);
}
