/* Destinations page only. Loaded after main.css, which holds the shared blocks
   (hero, light section, site header, site nav, contact, footer links, contact modal, wide container…).

   Contents
   1. Destination hero
   2. Destination
   3. Fact card
*/


/* ==========================================================================
   Destination hero
   ========================================================================== */

/* Mixed with .hero__frame: the brand colour instead of the photo, and as tall as its content, as in the design */
.destination-hero {
    min-height: 0;
    padding-bottom: 45px;
    background-color: var(--color-main);
    background-image: none;
}

/* Text and map share one grid row: the text spans both columns and runs over the left edge of the map */
.destination-hero__layout {
    display: grid;
    grid-template-columns: minmax(0, 543fr) minmax(0, 807fr);
    align-items: center;
}

/* Mixed with .hero__intro. Above the map where they overlap.
   Centred on the map, then 10px lower as in the design (half the margin, since the margin is centred too) */
.destination-hero__intro {
    z-index: 1;
    grid-row: 1;
    grid-column: 1 / -1;
    margin-top: 20px;
}

/* Mixed with .hero__description: body font, and the width that wraps it on two lines as in the design.
   .hero__title has no bottom margin, so the padding is the whole gap below the title */
.destination-hero__description {
    max-width: 515px;
    padding-top: 40px;
    font-family: var(--font-body);
}

.destination-hero__map {
    grid-row: 1;
    grid-column: 2;
    align-self: start;
    width: 100%;
    height: auto;
}

@media (max-width: 991.98px) {
    .destination-hero {
        padding-bottom: 40px;
    }

    .destination-hero__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .destination-hero__intro {
        grid-column: 1;
        margin-top: 0;
    }

    .destination-hero__map {
        grid-row: 2;
        grid-column: 1;
        justify-self: center;
        max-width: 807px;
        margin-top: 40px;
    }
}

@media (max-width: 767.98px) {
    .destination-hero {
        padding-bottom: 24px;
    }
}


/* ==========================================================================
   Destination
   ========================================================================== */

/* scroll-margin-top: the "Voir la Destination" links of implementation.html jump to each section (#tunisie, #portugal, #senegal).
   Keeps the section top below the fixed site header, which is about the gutter plus the header height */
.destination {
    padding-top: 120px;
    scroll-margin-top: calc(var(--page-gutter) + var(--site-header-height));
}

/* Short bottom padding: .contact under it has the same background and its own top padding */
.destination:last-of-type {
    padding-bottom: 22px;
}

/* Photo on the left, or on the right with --reverse. The text comes first in the HTML, so each section starts with its heading */
.destination__layout {
    display: grid;
    grid-template-columns: minmax(0, 545fr) minmax(0, 709fr);
    grid-template-areas: "picture content";
    align-items: start;
    gap: 96px;
}

.destination__layout--reverse {
    grid-template-columns: minmax(0, 709fr) minmax(0, 545fr);
    grid-template-areas: "content picture";
}

/* --destination-indent: space for the check icons, which hang left of the text column.
   Negative margins, as in the design: the top lines the capitals of the title up with the top of the photo,
   and the bottom lets the text run up to 20px below the photo (Tunisie) without pushing the next section down */
.destination__content {
    --destination-indent: 49px;

    grid-area: content;
    margin: -7px 0 -20px 0;
    padding-left: var(--destination-indent);
}

.destination__country {
    margin: 0;
    font-size: var(--font-size-heading);
    font-weight: var(--font-weight-semibold);
    color: var(--color-main);
    text-shadow: 0 0 30px var(--color-white);
}

/* Negative: Bootstrap's line height on the <h2> leaves more space under the title than the design */
.destination__city {
    margin: -4px 0 0 0;
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: var(--font-weight-black);
    text-transform: uppercase;
    color: var(--color-primary);
}

.destination__lead {
    max-width: 430px;
    margin: 20px 0 0 0;
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-bold);
    color: var(--color-main);
}

.destination__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    max-width: 660px;
    margin: 24px 0 0 0;
}

/* Pulled back by the indent, so the icons sit left of the text */
.destination__list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 27px 0 0 calc(-1 * var(--destination-indent));
    padding: 0;
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-regular);
    color: var(--color-text);
    list-style: none;
}

.destination__item {
    position: relative;
    max-width: calc(430px + var(--destination-indent));
    padding-left: var(--destination-indent);
}

/* Check icon, centred on the first line */
.destination__item::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 0;
    width: 19px;
    height: 14px;
    background: url('../media/icon-check.svg') no-repeat;
}

.destination__picture {
    display: block;
    grid-area: picture;
}

.destination__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-small);
}

/* Narrower text column: closer cards, so "300+ pers." stays on one line (font size in Fact card) */
@media (max-width: 1399.98px) {
    .destination__facts {
        gap: 16px;
    }
}

@media (max-width: 1199.98px) {
    .destination__layout {
        gap: 48px;
    }
}

@media (max-width: 991.98px) {
    .destination {
        padding-top: 60px;
    }

    .destination__layout,
    .destination__layout--reverse {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "picture" "content";
        gap: 32px;
    }

    .destination__content {
        --destination-indent: 32px;

        margin: 0;
        padding-left: 0;
    }

    .destination__country {
        font-size: var(--font-size-heading-mobile);
    }

    .destination__list {
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .destination__city {
        font-size: var(--font-size-body);
    }

    .destination__facts {
        gap: 10px;
    }

    .destination__lead,
    .destination__list {
        font-size: var(--font-size-body-small);
    }

    .destination__item::before {
        top: 5px;
    }
}


/* ==========================================================================
   Fact card
   ========================================================================== */

.fact-card {
    padding: 15px 11px 9px 11px;
    background-color: var(--color-white);
    border: 2px solid var(--color-primary-pale);
    border-radius: var(--radius-small);
}

.fact-card__label {
    font-family: var(--font-body);
    font-size: var(--font-size-body-small);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    color: var(--color-primary);
}

.fact-card__value {
    margin: 5px 0 0 0;
    font-family: var(--font-heading);
    font-size: var(--font-size-heading-small);
    font-weight: var(--font-weight-bold);
    color: var(--color-main);
}

@media (max-width: 1399.98px) {
    .fact-card__value {
        font-size: 24px;
    }
}

@media (max-width: 1199.98px) {
    .fact-card__value {
        font-size: var(--font-size-body);
    }
}

@media (max-width: 991.98px) {
    .fact-card__value {
        font-size: 24px;
    }
}

/* Long figures ("~100 pers.") may wrap onto two lines here */
@media (max-width: 575.98px) {
    .fact-card {
        padding: 8px 8px 10px 8px;
    }

    .fact-card__label {
        font-size: var(--font-size-small);
    }

    .fact-card__value {
        font-size: 18px;
    }
}

