/* =====================================================
   CARD BASE STYLES
   Core card structure, images, content, typography
   NO RESPONSIVE RULES (see card-responsive.css)
   ===================================================== */

/* === CARD CONTAINER === */
.mtc-card {
    display: flex;
    flex-direction: column;
    height: 522.5px;
    width: 332.5px;
    background-color: var(--primary-orange);
    border-radius: 255px 255px 50px 50px;
    align-items: flex-end;
    box-sizing: border-box;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Remove link underlines */
.mtc-card a {
    text-decoration: none;
    color: inherit;
}

/* === IMAGE AREA === */

.mtc-card .card__image-area-wrapper {
    border-radius: var(--mtc-card-image-radius, 166.25px);
    border-bottom-right-radius: var(--mtc-card-image-br-radius, 47px);
    height: 332.5px;
    width: 332.5px;
    min-width: 332.5px;
    min-height: 332.5px;
    background-color: var(--mtc-card-image-gap-color, #ffffff);
    position: relative;
    box-sizing: border-box;
    z-index: 1;
    /* Uniform "white border" thickness around the image */
    padding: var(--mtc-card-image-gap, 5px);
    /* Do NOT clip: sale badge is positioned inside this wrapper */
    overflow: visible;
}

.mtc-card .card__image-pill {
    width: 100%;
    height: 100%;
    padding: 0;
    background-color: transparent;
    /* Inner radius = outer radius - padding, to prevent taper */
    border-radius: calc(var(--mtc-card-image-radius, 166.25px) - var(--mtc-card-image-gap, 5px));
    border-bottom-right-radius: calc(var(--mtc-card-image-br-radius, 47px) - var(--mtc-card-image-gap, 5px));
    overflow: hidden;
}

.mtc-card .card__image-link {
    display: block;
    cursor: pointer;
    /* position: absolute; */
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 6;
}

.mtc-card .card__image-container {
    /* position: absolute; */
    top: 0;
    height: 100%;
    width: 100%;
    background-color: var(--primary-dark);
    overflow: hidden;
    margin-left: 0;
    z-index: 5;
    box-sizing: border-box;
    left: 0;
    border-radius: calc(var(--mtc-card-image-radius, 166.25px) - var(--mtc-card-image-gap, 5px));
    border-bottom-right-radius: calc(var(--mtc-card-image-br-radius, 47px) - var(--mtc-card-image-gap, 5px));
}

.mtc-card .card__image-element {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s ease-in-out;
    background-color: #cccccc;
}

/* Image hover effect */
.mtc-card .card__image-link:hover .card__image-element {
    transform: scale(1.1);
}

/* Placeholder image */
.mtc-card .placeholder-bg {
    background-color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 1.2rem;
    font-weight: bold;
    overflow: hidden;
}

/* === SALE BADGE === */

.mtc-card .sale-badge {
    position: absolute;
    top: 1rem;
    right: 0;
    width: 13rem;
    height: 5rem;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-6deg);
}

.mtc-card .sale-badge__value {
    color: var(--text-white);
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-top: -0.2rem;
}

/* Legacy sale badge support */
.mtc-card .sale-badge__content {
    position: relative;
}

.mtc-card .sale-badge__img {
    top: 0;
    right: 0;
    height: 13rem;
    width: 5rem;
    display: block;
}

.mtc-card .sale-badge__text {
    color: var(--text-white);
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    /* position: absolute; */
    top: 2rem;
    right: 1.75rem;
    transform: rotate(-12deg);
}

/* === CONTENT AREA === */

.mtc-card .card__content-link {
    display: block;
    width: 100%;
    flex-grow: 1;
    cursor: pointer;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    overflow: hidden;
    position: relative;
}

/* Bottom-left corner cutout */
/*.mtc-card .card__content-link::before {
    content: "";
    display: block;
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 50px;
    height: 50px;
    background-color: var(--primary-orange);
    border-top-right-radius: 50px;
    z-index: 15;
}*/

.mtc-card .card__content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    /* slightly tighter horizontal padding to match production truncation behavior */
    padding: 1rem 0.875rem 1.5rem 0.875rem;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

/* === CONTENT TOP SECTION === */

.mtc-card .card__content-top {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

.mtc-card .card__text-group {
    flex-grow: 1;
    overflow: hidden;
    min-width: 0; /* allow proper text wrapping/clamping inside flex container */
    padding-right: 2.5rem; /* reserve space for absolute continent icon */
}

/* Line clamping */
.mtc-card .card__title-wrapper,
.mtc-card .card__subtitle-wrapper {
    overflow: hidden;
    width: 100%;
}

.mtc-card .card__title {
    color: var(--primary-dark);
    font-size: 1.25rem;
    line-height: 1.75rem;
    text-transform: uppercase;
    font-weight: 700;
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

.mtc-card .card__subtitle {
    color: var(--primary-dark);
    font-size: 1rem;
    line-height: 1.5rem;
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

.mtc-card .card__continent-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: block;
    flex-shrink: 0;
    position: absolute;
    top: 0;
    right: 0;
}

/* === CONTENT BOTTOM SECTION === */

.mtc-card .card__content-bottom {
    color: var(--text-white);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-end;
}

/* Wrapper for duration and terms on the right side */
.mtc-card .card__right-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.mtc-card .card__price-info,
.mtc-card .card__price-line,
.mtc-card .card__price-note,
.mtc-card .card__terms-link-text,
.mtc-card .card__price-prefix,
.mtc-card .card__price-amount {
    line-height: 1;
}

.mtc-card .card__price-line {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: flex-end;
}

.mtc-card .card__price-amount {
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
}

/* Special styling for "Price on request" */
.mtc-card .card__price-amount.price-on-request {
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
}

.mtc-card .card__price-note {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.mtc-card .card__terms-link-text {
    font-size: 0.875rem;
    text-align: right;
}

/* Trip duration display */
.mtc-card .card__duration {
    font-size: 1.125rem;
    text-align: right;
    font-weight: 700;
    color: var(--text-white);
}
