/*
 * Trips to USA (page-templates/tripstousa.php, page 37) and a trip (single-tripstousapost.php) restyled after the new
 * home page (MILESTONES #20); both views share this stylesheet. The intro band, the counter, the icon cards, the
 * "TRAVEL WITH US" title, the carousel, the registration and the headquarters are shared blocks (site-components.css).
 * Here: the five reasons ([shortcode_show_tripstousa_items]) in a grid, the trips ([shortcode_show_tripstousa_posts],
 * template-parts/tripstousa_trip_post_*_tpl.php) as cards and the interest form of a trip
 * ([shortcode_show_trip_interest_form]). The trips list and the interest form are also the Member Area "My trips":
 * their old rules stay in the Divi copies, the ones below apply under body.amg-skin only.
 */

/* ---------- Intro band: "See our trips" (the description is a flex column). */

/* style-divi-child.css caps the band (#collage-sports 715 + 342px, #collage-sports-info and #collage-sports-desc-container
   715px with overflow hidden): this description with its button is longer and was cut off below 1100px. The cap
   stays on the photo. (Not in site-components.css: there it would move the slanted photo edge of the other bands.) */
body.amg-skin #page-container #collage-sports,
body.amg-skin #page-container #collage-sports-info,
body.amg-skin #page-container #collage-sports-desc-container {
    max-height: none;
}

body.amg-skin #page-container #collage-sports-desc-container {
    overflow: visible;
}

body.amg-skin #page-container #collage-sports-image {
    max-height: 715px;
    overflow: hidden;
}

body.amg-skin #page-container #collage-sports-desc-container .more-trips-bt {
    display: inline-flex;
    align-self: flex-start;
    width: auto;
    margin-top: 22px;
    padding-inline: 28px;
}

/* ---------- Five reasons: icon cards, three per row, the last row centred. */

body.amg-skin #page-container #tripstousa-items {
    padding: clamp(48px, 5vw, 80px) 0 clamp(8px, 1.6vw, 24px);
}

body.amg-skin #page-container #tripstousa-items-container {
    --amg-trips-gap: clamp(16px, 1.8vw, 26px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--amg-trips-gap);
    width: min(100% - 32px, 1180px);
    max-width: none;
    margin: 0 auto;
    padding: 0;
}

body.amg-skin #page-container #tripstousa-items .tripstousa-post-item {
    flex: 0 1 calc((100% - 2 * var(--amg-trips-gap)) / 3);
    min-width: 0;
}

/* ---------- Trips: one card each. */

body.amg-skin #page-container #tripstousa-posts {
    margin: 0;
    padding: 0 0 clamp(16px, 2vw, 32px);
}

body.amg-skin #page-container #tripstousa-posts-container {
    flex-direction: column;
    gap: clamp(18px, 2vw, 28px);
    width: min(100% - 32px, 1100px);
    max-width: none;
    margin: 0 auto;
    padding: 0;
}

body.amg-skin #page-container #tripstousa-posts .trips-post {
    height: auto;
    max-height: none;
    margin: 0;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-container {
    align-items: center;
    justify-content: flex-start;
    gap: clamp(24px, 3.4vw, 52px);
    padding: clamp(24px, 3vw, 44px);
    border: 1px solid var(--amg-line);
    border-radius: var(--amg-radius-lg);
    background: #fff;
    box-shadow: var(--amg-shadow);
}

body.amg-skin #page-container #tripstousa-posts .trips-post-image-container {
    flex: 0 0 auto;
    width: clamp(170px, 18vw, 240px);
    max-width: none;
    height: auto;
    max-height: none;
    margin: 0;
    aspect-ratio: 1;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-image {
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 0 0 6px var(--amg-soft-blue);
}

body.amg-skin #page-container #tripstousa-posts .trips-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-content {
    flex: 1 1 auto;
    min-width: 0;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-title {
    margin: 0 0 12px;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-title a,
body.amg-skin #page-container #tripstousa-posts .trips-post-title p {
    color: var(--amg-navy);
    font-family: var(--amg-font);
    font-size: clamp(20px, 1.8vw, 26px);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    text-decoration: none;
}

/* style-divi-child.css on narrow screens: .trips-post .trips-post-title a { border-bottom: 2px solid } (pink). */
body.amg-skin #page-container #tripstousa-posts .trips-post-title a {
    border-bottom: 0;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-title a:hover,
body.amg-skin #page-container #tripstousa-posts .trips-post-title a:focus-visible {
    color: var(--amg-blue-strong);
}

/* style-divi-child.css: .trips-post .trips-post-desc { max-height: 100px } (and the card 380px) — the description is
   shown whole. */
body.amg-skin #page-container #tripstousa-posts .trips-post-desc,
body.amg-skin #page-container #tripstousa-posts .trips-post-desc p {
    height: auto;
    max-height: none;
    overflow: visible;
    color: var(--amg-text);
    font-family: var(--amg-font);
    font-size: 16px;
    letter-spacing: 0;
    line-height: 1.7;
}

body.amg-skin #page-container #tripstousa-posts .read-more-bt {
    margin-top: 6px;
    color: var(--amg-blue-strong);
    font-weight: 600;
    text-underline-offset: 4px;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-dates {
    flex-wrap: wrap;
    align-items: baseline;
    margin-top: 14px;
}

/* On a trip the dates are inside this paragraph; as a flex row (.trips-post-dates > *) "Proposed date:" broke in two. */
body.amg-skin #page-container #tripstousa-posts .trips-post-dates p {
    display: block;
    color: var(--amg-muted);
    font-family: var(--amg-font);
    font-size: 15px;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-dates span {
    color: var(--amg-navy);
    font-family: var(--amg-font);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

/* style_tymek.css below 500px: .trips-post-dates p .date:nth-child(1) { padding-left: 0.9rem } (an odd gap). */
body.amg-skin #page-container #tripstousa-posts .trips-post-dates .date {
    padding-left: 4px;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-buttons {
    align-items: center;
    gap: 12px 14px;
    margin-top: 22px;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-buttons .my-button {
    width: auto;
    min-width: 160px;
    margin: 0;
    padding-inline: 24px;
}

/* "Register Profile free to book this trip" (logged out): stuck 8px out of the card at 390px. */
body.amg-skin #page-container #tripstousa-posts .trips-post-buttons .logged-out {
    margin: 0;
    color: var(--amg-text);
    font-family: var(--amg-font);
    font-size: 14px;
    font-style: normal;
    white-space: normal;
}

body.amg-skin #page-container #tripstousa-posts .trips-post-buttons .logged-out a {
    color: var(--amg-pink);
    font-weight: 700;
    font-style: normal;
}

body.amg-skin #page-container #tripstousa-posts .trips-spacer-section {
    display: none;
}

/* ---------- A trip: the trip card first (no intro band), then the interest form. */

body.amg-skin.single-tripstousapost #page-container #main-content > #tripstousa-posts:first-child {
    padding-top: clamp(40px, 4.6vw, 72px);
    background: linear-gradient(180deg, var(--amg-soft-blue) 0%, var(--amg-soft) 60%, #fff 100%);
}

/* The second step sits right of the first one until "Next" and stuck 60px out of the screen at 1440px. */
body.amg-skin #page-container #trip-interest-container {
    overflow-x: clip;
    margin-top: clamp(40px, 4.6vw, 72px);
}

body.amg-skin #page-container #tripinterestform .input {
    border-color: var(--amg-field);
    border-radius: 6px;
    color: var(--amg-navy);
    font-family: var(--amg-font);
}

body.amg-skin #page-container #tripinterestform .input:focus {
    border-color: var(--amg-blue);
    outline: 0;
    box-shadow: var(--amg-focus);
}

body.amg-skin #page-container .trip-interest-form .register-step-item .desc {
    color: var(--amg-text);
    font-family: var(--amg-font);
}

body.amg-skin #page-container #tripinterestform .custom-check-label {
    color: var(--amg-text);
    font-family: var(--amg-font);
}

/* ---------- Narrower screens. */

@media (max-width: 991px) {
    body.amg-skin #page-container #tripstousa-items .tripstousa-post-item {
        flex-basis: calc((100% - var(--amg-trips-gap)) / 2);
    }
}

@media (max-width: 700px) {
    body.amg-skin #page-container #tripstousa-posts .trips-post-container {
        flex-direction: column;
        align-items: stretch;
    }

    body.amg-skin #page-container #tripstousa-posts .trips-post-image-container {
        width: 170px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    body.amg-skin #page-container #tripstousa-items .tripstousa-post-item {
        flex-basis: 100%;
    }
}
