/*
 * components.css — pieces used on more than one page: sections and their
 * headings, text-and-image rows, the top of inner pages, the breadcrumb bar,
 * image boxes and their empty placeholders, accreditation logo rows, service
 * and sector cards, and the "Start a conversation" band.
 * Markup: template-parts/components/*.
 */

/* ------------------------------------------------------------------------
 * Sections
 * --------------------------------------------------------------------- */

.fdfs-section {
    padding-block: var(--fdfs-section-space);
}

.fdfs-section--alt {
    background: var(--fdfs-surface-alt);
}

.fdfs-section--dark {
    background: var(--fdfs-ink);
    color: var(--fdfs-text-on-dark);
}

/* A thin line between two light sections. --flush removes it where the design has none. */
.fdfs-section:not(.fdfs-section--dark) + .fdfs-section:not(.fdfs-section--dark):not(.fdfs-section--flush) {
    border-top: 1px solid var(--fdfs-line);
}

/* Label, heading and intro text at the top of a section. */
.fdfs-section-head {
    max-width: 780px;
}

.fdfs-section-head .fdfs-heading {
    max-width: 750px;
    margin-top: 17px;
}

.fdfs-section-head__text {
    margin-top: 20px;
    font-size: var(--fdfs-size-section-text);
    line-height: 1.6;
}

.fdfs-section-head--center {
    max-width: 800px;
    margin-inline: auto;
    text-align: center;
}

/* Centred headings split into even lines, as in the design. */
.fdfs-section-head--center .fdfs-heading {
    max-width: none;
    text-wrap: balance;
}

.fdfs-section-head--on-dark .fdfs-heading {
    color: var(--fdfs-white);
}

.fdfs-section-head--on-dark .fdfs-section-head__text {
    color: var(--fdfs-text-on-dark);
}

/* Text on the left, image on the right. */
.fdfs-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 39%;
    align-items: start;
    column-gap: 64px;
}

/* Text lines up with the bottom of the image. */
.fdfs-split--bottom {
    align-items: end;
}

.fdfs-split__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.fdfs-split__text .fdfs-heading {
    margin-top: 17px;
}

.fdfs-split__text .fdfs-section-head__text {
    margin-top: 20px;
}

.fdfs-split__text > .fdfs-button {
    margin-top: 38px;
}

@media (max-width: 1023px) {
    .fdfs-split {
        grid-template-columns: 1fr;
        row-gap: 48px;
    }
}

/* ------------------------------------------------------------------------
 * Images and empty image placeholders
 *
 * Keep this block above everything that places an image box (page top,
 * cards, the band): those rules use the same specificity, so they must come
 * later to override position and size.
 * --------------------------------------------------------------------- */

.fdfs-media {
    position: relative;
    overflow: hidden;
    background: var(--fdfs-placeholder);
}

.fdfs-media__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* An image slot waiting for a photo: same shape, plain box, image icon. */
.fdfs-media--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fdfs-media__icon {
    width: 44px;
    height: 44px;
    color: #b7b4ae;
    stroke-width: 1.5;
}

/* Empty image boxes inside dark sections. */
.fdfs-section--dark .fdfs-media--empty {
    background: #1b1c21;
}

.fdfs-section--dark .fdfs-media__icon {
    color: rgba(255, 255, 255, 0.22);
}

/* Background photo slots on dark sections. */
.fdfs-page-hero__media.fdfs-media--empty,
.fdfs-cta__media.fdfs-media--empty {
    justify-content: flex-end;
    padding-right: 14%;
    background: #15161a;
}

.fdfs-page-hero__media.fdfs-media--empty .fdfs-media__icon,
.fdfs-cta__media.fdfs-media--empty .fdfs-media__icon {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.16);
}

/* ------------------------------------------------------------------------
 * Top of inner pages
 * --------------------------------------------------------------------- */

.fdfs-page-hero {
    position: relative;
    overflow: hidden;
    background: var(--fdfs-ink);
    border-bottom: 2px solid var(--fdfs-red);
    color: var(--fdfs-white);
}

.fdfs-page-hero__media {
    position: absolute;
    inset: 0;
}

.fdfs-page-hero--image .fdfs-page-hero__media:not(.fdfs-media--empty)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(13, 14, 18, 0.88) 0%, rgba(13, 14, 18, 0.72) 45%, rgba(13, 14, 18, 0.45) 100%);
}

.fdfs-page-hero__inner {
    position: relative;
    padding-top: 116px;
    padding-bottom: 113px;
}

.fdfs-page-hero__heading {
    max-width: 790px;
    margin-top: 22px;
    color: var(--fdfs-white);
    font-family: var(--fdfs-font-heading);
    font-size: clamp(2.25rem, 3.67vw, 3.85rem);
    font-weight: 700;
    line-height: 1.045;
}

.fdfs-page-hero__text {
    max-width: 690px;
    margin-top: 23px;
    color: #d9dadc;
    font-size: 1.15rem;
    line-height: 1.65;
}

.fdfs-page-hero .fdfs-button-row {
    margin-top: 36px;
}

/* ------------------------------------------------------------------------
 * Breadcrumb bar
 * --------------------------------------------------------------------- */

.fdfs-breadcrumb {
    background: #efeeec;
    border-bottom: 1px solid #e6e5e3;
    font-family: var(--fdfs-font-mono);
    font-size: var(--fdfs-size-label);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fdfs-breadcrumb__list {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    color: #8a8986;
}

.fdfs-breadcrumb__list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fdfs-breadcrumb__list a:hover {
    color: var(--fdfs-red);
}

.fdfs-breadcrumb__list [aria-current] {
    color: var(--fdfs-black);
}

.fdfs-breadcrumb__separator {
    width: 12px;
    height: 12px;
    color: #a9a7a3;
}

/* ------------------------------------------------------------------------
 * Accreditation logos
 * --------------------------------------------------------------------- */

.fdfs-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.fdfs-logos__img {
    width: auto;
    object-fit: contain;
}

.fdfs-logos__item--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fdfs-placeholder);
}

.fdfs-logos__icon {
    width: 24px;
    height: 24px;
    color: #b7b4ae;
    stroke-width: 1.5;
}

/* Home page band and About page panel: four equal cells, each logo centred
   in its cell. Empty boxes keep the widths of the four logos in the design. */
.fdfs-logos--band,
.fdfs-logos--panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-items: center;
}

.fdfs-logos--band {
    column-gap: 31px;
}

/* The panel is a white box. */
.fdfs-logos--panel {
    padding: 42px 26px;
    background: var(--fdfs-white);
    border: 1px solid var(--fdfs-line);
}

.fdfs-logos--band .fdfs-logos__img,
.fdfs-logos--panel .fdfs-logos__img {
    height: 65px;
}

.fdfs-logos--band .fdfs-logos__item--empty,
.fdfs-logos--panel .fdfs-logos__item--empty {
    width: 82px;
    height: 65px;
}

.fdfs-logos--band .fdfs-logos__item--empty:nth-child(2),
.fdfs-logos--panel .fdfs-logos__item--empty:nth-child(2) {
    width: 139px;
}

.fdfs-logos--band .fdfs-logos__item--empty:nth-child(3),
.fdfs-logos--panel .fdfs-logos__item--empty:nth-child(3) {
    width: 66px;
}

.fdfs-logos--band .fdfs-logos__item--empty:nth-child(4),
.fdfs-logos--panel .fdfs-logos__item--empty:nth-child(4) {
    width: 129px;
}

/* Footer: small light tiles. Empty tiles keep the design's four tile widths. */
.fdfs-logos--footer {
    gap: 13px;
    margin-top: 31px;
}

.fdfs-logos--footer .fdfs-logos__item {
    padding: 5px;
    background: #edece7;
}

.fdfs-logos--footer .fdfs-logos__img {
    height: 48px;
}

.fdfs-logos--footer .fdfs-logos__item--empty {
    width: 68px;
    height: 58px;
    background: rgba(255, 255, 255, 0.08);
}

.fdfs-logos--footer .fdfs-logos__item--empty:nth-child(2) {
    width: 103px;
}

.fdfs-logos--footer .fdfs-logos__item--empty:nth-child(3) {
    width: 58px;
}

.fdfs-logos--footer .fdfs-logos__item--empty:nth-child(4) {
    width: 98px;
}

.fdfs-logos--footer .fdfs-logos__icon {
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 639px) {
    .fdfs-logos--band,
    .fdfs-logos--panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 24px;
    }
}

/* ------------------------------------------------------------------------
 * Bullet list with small red squares
 * --------------------------------------------------------------------- */

.fdfs-bullets li {
    position: relative;
    padding-left: 18px;
    color: var(--fdfs-text-strong);
    font-size: 0.834rem;
    line-height: 1.64;
}

.fdfs-bullets li + li {
    margin-top: 12px;
}

.fdfs-bullets li::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 0;
    width: 6px;
    height: 6px;
    background: var(--fdfs-red);
}

/* ------------------------------------------------------------------------
 * A capability and its service cards (home page, Services page)
 * --------------------------------------------------------------------- */

.fdfs-capability-group {
    margin-top: 68px;
}

.fdfs-capability-group__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 32px;
    margin-bottom: 34px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--fdfs-line);
}

.fdfs-capability-group__title {
    color: var(--fdfs-black);
    font-family: var(--fdfs-font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
}

/* 1 or 2 services: two columns (one service on the home page spans both, see
   --wide below). 3 or more: four columns. */
.fdfs-service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fdfs-service-grid--1,
.fdfs-service-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fdfs-service-card {
    display: flex;
    flex-direction: column;
}

.fdfs-service-card__image {
    aspect-ratio: 4 / 3;
}

.fdfs-service-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 31px 28px 30px;
}

.fdfs-service-card__title {
    color: var(--fdfs-black);
    font-family: var(--fdfs-font-heading);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.3;
}

.fdfs-service-card__text {
    margin-top: 14px;
    font-size: var(--fdfs-size-card-text);
    line-height: 1.6;
}

.fdfs-service-card__body .fdfs-link {
    margin-top: 22px;
}

/* A single service on the home page: image left, text right. */
.fdfs-service-card--wide {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
}

.fdfs-service-card--wide .fdfs-service-card__image {
    aspect-ratio: 856 / 651;
}

.fdfs-service-card--wide .fdfs-service-card__body {
    padding: 0 50px;
}

.fdfs-service-card--wide .fdfs-service-card__title {
    font-size: 1.55rem;
    line-height: 1.2;
}

.fdfs-service-card--wide .fdfs-service-card__text {
    margin-top: 18px;
    font-size: 1.025rem;
    line-height: 1.64;
}

.fdfs-service-card--wide .fdfs-link {
    margin-top: 26px;
}

/* Services page: numbered capability with its description, larger card
   titles, and "View service" links lined up along each row. */
.fdfs-capability-group--services {
    margin-top: 70px;
}

.fdfs-capability-group--services .fdfs-capability-group__head {
    align-items: flex-end;
    margin-bottom: 32px;
    padding-bottom: 26px;
}

.fdfs-capability-group__intro .fdfs-number {
    display: block;
}

.fdfs-capability-group--services .fdfs-capability-group__title {
    margin-top: 14px;
    font-size: 1.93rem;
}

.fdfs-capability-group__text {
    max-width: 680px;
    margin-top: 16px;
    font-size: var(--fdfs-size-card-text);
    line-height: 1.6;
}

.fdfs-capability-group--services .fdfs-service-card__body {
    padding: 30px 28px 28px;
}

.fdfs-capability-group--services .fdfs-service-card__title {
    font-size: 1.1rem;
    line-height: 1.45;
    transition: color 0.2s ease;
}

.fdfs-capability-group--services .fdfs-service-card:hover .fdfs-service-card__title {
    color: var(--fdfs-red);
}

.fdfs-capability-group--services .fdfs-service-card__text {
    margin-top: 12px;
    margin-bottom: 26px;
}

.fdfs-capability-group--services .fdfs-service-card__body .fdfs-link {
    margin-top: auto;
}

@media (max-width: 1023px) {
    .fdfs-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fdfs-service-card--wide {
        grid-template-columns: 1fr;
    }

    .fdfs-service-card--wide .fdfs-service-card__body {
        padding: 31px 28px 30px;
    }
}

@media (max-width: 639px) {
    .fdfs-service-grid,
    .fdfs-service-grid--1,
    .fdfs-service-grid--2 {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------------
 * Sector cards (home page, Sectors page)
 * --------------------------------------------------------------------- */

.fdfs-sector-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 58px;
}

.fdfs-sector-card__media {
    position: relative;
}

.fdfs-sector-card__image {
    aspect-ratio: 16 / 10;
}

.fdfs-sector-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 32px 28px 30px;
}

.fdfs-sector-card__title {
    color: var(--fdfs-black);
    font-family: var(--fdfs-font-heading);
    font-size: 1.105rem;
    font-weight: 700;
    line-height: 1.25;
}

.fdfs-sector-card__text {
    margin-top: 15px;
    font-size: var(--fdfs-size-card-text);
    line-height: 1.6;
}

.fdfs-section--dark .fdfs-sector-card__title {
    color: var(--fdfs-white);
}

.fdfs-section--dark .fdfs-sector-card__text {
    color: #b5b6ba;
}

/* Sectors page: bordered cells, the sector name over the photo, and
   "Sector detail" links lined up along each row. */
.fdfs-sector-grid--page {
    gap: 0;
    margin-top: 60px;
    border-top: 1px solid var(--fdfs-line);
    border-left: 1px solid var(--fdfs-line);
}

.fdfs-sector-card--sectors {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--fdfs-line);
    border-bottom: 1px solid var(--fdfs-line);
}

.fdfs-sector-card--sectors .fdfs-sector-card__image {
    aspect-ratio: 16 / 11;
}

/* Darkens the bottom of the photo (or empty box) so the white name stays readable. */
.fdfs-sector-card--sectors .fdfs-sector-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 14, 18, 0) 45%, rgba(13, 14, 18, 0.72) 100%);
    pointer-events: none;
}

.fdfs-sector-card__title--overlay {
    position: absolute;
    right: 25px;
    bottom: 21px;
    left: 25px;
    z-index: 1;
    color: var(--fdfs-white);
    font-size: 1.29rem;
}

.fdfs-sector-card--sectors .fdfs-sector-card__body {
    flex: 1;
    padding: 28px 29px 28px;
}

.fdfs-sector-card--sectors .fdfs-sector-card__text {
    margin-top: 0;
    margin-bottom: 26px;
}

.fdfs-sector-card--sectors .fdfs-link {
    margin-top: auto;
}

@media (max-width: 1023px) {
    .fdfs-sector-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 639px) {
    .fdfs-sector-grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------------
 * "Start a conversation" band
 * --------------------------------------------------------------------- */

.fdfs-cta {
    position: relative;
    overflow: hidden;
    background: #1b2127;
    color: var(--fdfs-white);
}

.fdfs-cta__media {
    position: absolute;
    inset: 0;
}

.fdfs-cta__media:not(.fdfs-media--empty)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(20, 26, 32, 0.78);
}

.fdfs-cta__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
    padding-top: 116px;
    padding-bottom: 116px;
}

.fdfs-cta__content {
    max-width: 760px;
}

.fdfs-cta__heading {
    margin-top: 16px;
    color: var(--fdfs-white);
    font-family: var(--fdfs-font-heading);
    font-size: var(--fdfs-size-h2);
    font-weight: 700;
    line-height: 1.08;
}

.fdfs-cta__text {
    max-width: 560px;
    margin-top: 23px;
    color: #c5ced7;
    font-size: var(--fdfs-size-body);
    line-height: 1.65;
}

.fdfs-cta .fdfs-button-row {
    margin-top: 34px;
}

.fdfs-cta__direct {
    display: flex;
    flex-direction: column;
    padding: 2px 0 0 28px;
    border-left: 3px solid var(--fdfs-red);
}

.fdfs-cta__phone {
    margin-top: 13px;
    color: var(--fdfs-white);
    font-family: var(--fdfs-font-heading);
    font-size: clamp(1.625rem, 1.8vw, 1.875rem);
    font-weight: 700;
    line-height: 1.05;
}

.fdfs-cta__email {
    margin-top: 10px;
    color: #c3c7d2;
    font-size: var(--fdfs-size-body);
    line-height: 1.4;
}

.fdfs-cta__phone:hover,
.fdfs-cta__email:hover {
    color: var(--fdfs-white);
}

@media (max-width: 1023px) {
    .fdfs-page-hero__inner {
        padding-top: 72px;
        padding-bottom: 80px;
    }

    .fdfs-cta__inner {
        align-items: flex-start;
        padding-top: 80px;
        padding-bottom: 80px;
    }

    /* Keep the empty-photo icon clear of the text. */
    .fdfs-page-hero__media.fdfs-media--empty,
    .fdfs-cta__media.fdfs-media--empty {
        align-items: flex-start;
        padding: 24px 24px 0 0;
    }
}
