/*
 * Header social icons (.headerNetwork): keep them right-aligned to the hero chevron
 * with a ~40-50px gap, matching how they sit on 1600px+ inner pages.
 *
 * "right" is relative to .header__wrapper:
 *   < 1600px  : viewport minus 2 x 80px container padding
 *   >= 1600px : 1540px container (1500px wrapper); homepage >= 2000px: 100vw - 280px container
 * Selectors start with body.<pageType> / body:has(...) so they beat the base rules in
 * assets/css/styles.css and the inline rules in _WebsiteLayout.cshtml.
 * Widths of 1200px and below keep their existing layouts.
 */

/* ---------------------------------------------------------------------------
 * Other inner pages (news, events, etc.): the top-right chevron is .page__sparator,
 * a fixed-size background (desktop-chevron-right-red.svg) at right: 97px (992-1199px: smaller,
 * at right: 177px). Below 1600px its edge stays ~355-405px from the viewport's right edge,
 * so a fixed offset follows it.
 * Below 1061px the icons no longer fit between the logo and the chevron, so they keep the
 * base layout (after the logo).
 * Pages with the hero chevron (.heroBanner__thumbnail--sparator) are excluded; they have their own rules below.
 * ------------------------------------------------------------------------- */
@media (min-width: 1061px) and (max-width: 1599px) {
    body:has(.page__sparator):not(:has(.heroBanner__thumbnail--sparator)) .headerNetwork {
        right: 340px;
        padding-left: 0;
    }
}

@media (min-width: 1600px) {
    body:has(.page__sparator):not(:has(.heroBanner__thumbnail--sparator)) .headerNetwork {
        right: 495px;
    }
}

/* ---------------------------------------------------------------------------
 * Homepage: hero carousel chevron (hero-arrow-*.svg, 701x1045) drawn in
 * .heroCarousel__vector--arrow, which spans 35%-85% of the page width and the full
 * carousel height. Its outer edge at icon height is ~0.605 x viewport - 51px.
 * ------------------------------------------------------------------------- */
@media (min-width: 1201px) and (max-width: 1599px) {
    body.homePage .headerNetwork {
        right: calc(39.5% + 76px);
        padding-left: 0;
    }
}

@media (min-width: 1600px) and (max-width: 1999px) {
    body.homePage .headerNetwork {
        right: calc(843px - 10.5vw);
    }
}

@media (min-width: 2000px) {
    body.homePage .headerNetwork {
        right: calc(39.5% + 59px);
    }
}

/* ---------------------------------------------------------------------------
 * Inner pages with the red hero chevron (.heroBanner__thumbnail--sparator):
 * About, Why Hong Kong detail, Industry detail, Setting Up.
 * 992-1499px: the chevron edge moves ~0.684px per 1px of viewport, so a % offset follows it.
 * This replaces the inline right: 42% (<=1400px) and the base "after the logo" layout (<=1200px).
 * ------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1499px) {
    body:has(.heroBanner__thumbnail--sparator):not(.clientsListingPage) .headerNetwork {
        right: calc(31.57% + 120px);
        left: auto;
        padding-left: 0;
    }
}

@media (min-width: 1500px) and (max-width: 1599px) {
    body:has(.heroBanner__thumbnail--sparator):not(.clientsListingPage) .headerNetwork {
        right: calc(66.67% - 350px);
    }
}

/* ---------------------------------------------------------------------------
 * Our Clients: clients-listing.css zooms the hero from a 1500px design between
 * 992px and 1499px (and zooms the chevron's thumbnail again). Measured at 1245px and 1402px,
 * the chevron edge stays ~585px from the viewport's right edge, so a fixed offset follows it.
 * 992-1499px replaces the inline left: 229px rule that put the icons after the logo.
 * At 1200px and below the hero CSS moves the chevron down, so it sits closer to the right
 * edge (~455px, measured at ~1150px) and needs its own offset.
 * ------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1200px) {
    body.clientsListingPage .headerNetwork {
        right: 420px;
        left: auto;
        padding-left: 0;
    }
}

@media (min-width: 1201px) and (max-width: 1499px) {
    body.clientsListingPage .headerNetwork {
        right: 550px;
        left: auto;
        padding-left: 0;
    }
}

@media (min-width: 1500px) and (max-width: 1599px) {
    body.clientsListingPage .headerNetwork {
        right: calc(66.67% - 344px);
    }
}
