/* Go Wild Expedition: destination archive content.
 * Match the existing light WP Travel Engine archive cards without changing
 * their filters, listings, heading, photographs or booking interfaces.
 * Only this file controls the destination description appearance.
 */

body.tax-destination .esn-tax-description {
    margin: 0;
    padding: clamp(26px, 3.6vw, 46px) 0 16px;
}

body.tax-destination .esn-tax-description > .esn-container {
    position: relative;
    box-sizing: border-box;
    width: calc(100% - 40px);
    max-width: var(--esn-container, 1200px);
    margin-inline: auto;
    padding: clamp(28px, 3.8vw, 48px) clamp(28px, 4vw, 54px);
    background: #ffffff;
    color: #303a34;
    border: 1px solid #e9eee9;
    border-radius: var(--esn-radius-lg, 12px);
    box-shadow: var(--esn-shadow, 0 2px 15px rgba(0, 0, 0, .08));
    column-count: 2;
    column-gap: clamp(32px, 5vw, 72px);
    column-rule: 1px solid #edf0ed;
    overflow-wrap: anywhere;
}

/* A restrained brand detail instead of another dark banner or decoration. */
body.tax-destination .esn-tax-description > .esn-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: clamp(28px, 4vw, 54px);
    width: 68px;
    height: 3px;
    background: var(--esn-primary, #1a5632);
    border-radius: 0 0 3px 3px;
}

/* Opening paragraph becomes the editorial lead, above the balanced columns. */
body.tax-destination .esn-tax-description p:first-of-type {
    column-span: all;
    max-width: 85ch;
    padding: 0 0 clamp(20px, 2.4vw, 27px);
    margin: 0 0 clamp(22px, 2.8vw, 32px);
    border-bottom: 1px solid #e9eee9;
    font-size: clamp(18px, 1.48vw, 20px);
    font-weight: 500;
    line-height: 1.75;
    color: #223a2c;
}

/* Keep descriptive copy readable and preserve the editor's paragraphs. */
body.tax-destination .esn-tax-description p {
    box-sizing: border-box;
    max-width: none;
    margin: 0 0 1.3em;
    color: #202820;
    font-family: var(--esn-font-body, Raleway, sans-serif);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.82;
    letter-spacing: 0;
    text-align: left;
    text-wrap: pretty;
    overflow-wrap: anywhere;
    break-inside: avoid-column;
}

body.tax-destination .esn-tax-description p:last-child {
    margin-bottom: 0;
}

/* Directory cards continue to show only their name and existing trip count. */
body.page-template-template-destinations-php .esn-dest-card__desc,
body.page-template-template-destinations-php .esn-dest-card__footer {
    display: none;
}

@media (max-width: 850px) {
    body.tax-destination .esn-tax-description > .esn-container {
        column-count: 1;
        column-rule: none;
        padding: 34px clamp(24px, 4vw, 40px);
    }

    body.tax-destination .esn-tax-description > .esn-container::before {
        left: clamp(24px, 4vw, 40px);
    }

    body.tax-destination .esn-tax-description p:first-of-type {
        max-width: 100%;
        padding-bottom: 22px;
        margin-bottom: 24px;
    }
}

@media (max-width: 600px) {
    body.tax-destination .esn-tax-description {
        padding: 22px 0 8px;
    }

    body.tax-destination .esn-tax-description > .esn-container {
        width: calc(100% - 28px);
        padding: 30px 22px 26px;
        border-radius: 12px;
    }

    body.tax-destination .esn-tax-description > .esn-container::before {
        left: 22px;
        width: 54px;
    }

    body.tax-destination .esn-tax-description p {
        font-size: 17px;
        line-height: 1.8;
        margin-bottom: 1.25em;
    }

    body.tax-destination .esn-tax-description p:first-of-type {
        font-size: 17.5px;
        line-height: 1.7;
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
}

@media (max-width: 360px) {
    body.tax-destination .esn-tax-description > .esn-container {
        width: calc(100% - 20px);
        padding-inline: 18px;
    }

    body.tax-destination .esn-tax-description > .esn-container::before {
        left: 18px;
    }
}
