/* =====================================================================
   Mazda UAE - Special offers and Owner offers pages, new design
   Loaded by Views/Partials/_OffersFacelift.cshtml (rendered by
   Views/B16Offer.cshtml, for now only with ?facelift=1). Every rule is
   scoped under .ofr. Same look as the sales campaign page
   (css/sales-campaign.css). Header and footer: css/site-chrome.css.
   ===================================================================== */

.ofr {
    --ofr-ink: #0b0b0c;
    --ofr-paper: #f4f4f2;
    --ofr-text: #101010;
    --ofr-muted: #5f5f5f;
    --ofr-line: #e3e3df;
    --ofr-ease: cubic-bezier(.2, .7, .2, 1);
    --ofr-gutter: clamp(16px, 4vw, 48px);
    --ofr-max: 1320px;
    --ofr-track: .1em;
    --ofr-font: "MazdaType", "Mazda Arabic", "Mazda Type", "IBM Plex Sans Arabic", Helvetica, Arial, sans-serif;
    padding: 48px 0 clamp(64px, 8vw, 128px);
    background: var(--ofr-paper);
    font-family: var(--ofr-font);
    color: var(--ofr-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.is-rtl .ofr { --ofr-track: 0; }

/* local reset (the site styles bare elements; its phone styles set p { width: 90% } and h2 sizes with !important;
   a site rule sets a { font-family: MazdaType !important }, which would drop the Arabic font on links) */
.ofr *, .ofr *::before, .ofr *::after { box-sizing: border-box; }
.ofr h1, .ofr h2, .ofr p, .ofr ul, .ofr li { margin: 0; padding: 0; color: inherit; }
.ofr p { width: auto !important; }
.ofr ul { list-style: none; }
.ofr h1, .ofr h2 { font-family: var(--ofr-font) !important; }
.ofr a { font-family: var(--ofr-font) !important; color: inherit; text-decoration: none; }
.ofr img { max-width: 100%; }
.ofr .ofr-icon { display: block; width: 24px; height: 24px; flex: none; }

/* container: 85% of the screen on desktop, as on the home page */
.ofr .ofr-container {
    width: 100%;
    max-width: calc(var(--ofr-max) + 2 * var(--ofr-gutter));
    margin-inline: auto;
    padding-inline: var(--ofr-gutter);
}
@media (min-width: 1200px) {
    .ofr .ofr-container { width: 85%; max-width: none; padding-inline: 0; }
}

/* ---------- type ---------- */
.ofr .ofr-intro { margin-bottom: 32px; }
.ofr .ofr-title {
    font-size: clamp(26px, 2.4vw, 40px) !important;
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: var(--ofr-track);
    text-transform: uppercase;
    text-align: start !important;
    color: var(--ofr-ink);
}
.ofr .ofr-lead {
    max-width: 62ch;
    margin-top: 14px;
    font-size: clamp(15px, 1.1vw, 17px);
    line-height: 1.65;
    color: var(--ofr-muted);
    text-align: start !important;
}
.ofr .ofr-h2 {
    margin-bottom: 24px;
    font-size: clamp(22px, 2vw, 32px) !important; /* the site sets "h2 { font-size: 1rem !important }" below 960px */
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: var(--ofr-track);
    text-transform: uppercase;
    text-align: start !important;
    color: var(--ofr-ink);
}
body.is-rtl .ofr .ofr-title,
body.is-rtl .ofr .ofr-h2 { text-transform: none; line-height: 1.35; }

/* ---------- buttons (capitals, like the header links) ---------- */
.ofr .ofr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color .25s var(--ofr-ease), color .25s var(--ofr-ease), border-color .25s var(--ofr-ease), transform .25s var(--ofr-ease);
}
.ofr .ofr-btn .ofr-icon { width: 18px; height: 18px; }
.ofr .ofr-btn--solid { background: var(--ofr-ink); color: #fff; }
.ofr .ofr-btn--solid:hover, .ofr .ofr-btn--solid:focus-visible { background: #2a2a2d; color: #fff; }
.ofr .ofr-btn--line { border-color: #cfcfca; background: #fff; color: var(--ofr-ink); }
.ofr .ofr-btn--line:hover, .ofr .ofr-btn--line:focus-visible { border-color: var(--ofr-ink); color: var(--ofr-ink); }
.ofr .ofr-btn:active { transform: translateY(1px); }
body.is-rtl .ofr .ofr-btn { letter-spacing: 0; font-size: 14px; font-weight: 500; }

/* ---------- offers ---------- */
.ofr .ofr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    align-items: start;
}
.ofr .ofr-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 40px 80px -56px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .04);
}
/* offer pictures carry their own text, so they are never cropped */
.ofr .ofr-card__media { background: var(--ofr-ink); line-height: 0; }
.ofr .ofr-card__img { display: block; width: 100%; max-width: none; height: auto; margin: 0; }
.ofr .ofr-card__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 32px 32px;
}
.ofr .ofr-card__date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ofr-muted);
}
.ofr .ofr-card__date .ofr-icon { width: 16px; height: 16px; }
body.is-rtl .ofr .ofr-card__date { letter-spacing: 0; font-size: 14px; font-weight: 500; }
.ofr .ofr-card__title {
    font-size: clamp(19px, 1.5vw, 24px) !important;
    line-height: 1.3;
    font-weight: 500;
    text-align: start !important;
    color: var(--ofr-ink);
}
.ofr .ofr-card__copy { font-size: 15px; line-height: 1.65; color: var(--ofr-muted); }
.ofr .ofr-card__copy p + p, .ofr .ofr-card__copy p + ul, .ofr .ofr-card__copy ul + p { margin-top: 10px; }
.ofr .ofr-card__copy ul { padding-inline-start: 20px; list-style: disc; }
.ofr .ofr-card__copy li + li { margin-top: 4px; }
.ofr .ofr-card__copy a { text-decoration: underline; text-underline-offset: 3px; color: var(--ofr-ink); }
.ofr .ofr-card__copy strong, .ofr .ofr-card__copy b { color: var(--ofr-ink); }
/* the offer's own button, written in the description by the editors
   (<p><a class="primary-dark" data-atom="button">Enquire Now</a></p>): the card's main button */
.ofr .ofr-card__copy p:has(> a[data-atom="button"]):not(:first-child) { margin-top: 20px; }
.ofr .ofr-card__copy a[data-atom="button"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    max-width: none;
    min-height: 48px;
    margin: 0;
    padding: 0 26px;
    border: 1px solid var(--ofr-ink);
    border-radius: 999px;
    background: var(--ofr-ink);
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .25s var(--ofr-ease), border-color .25s var(--ofr-ease), transform .25s var(--ofr-ease);
}
.ofr .ofr-card__copy a[data-atom="button"]:hover,
.ofr .ofr-card__copy a[data-atom="button"]:focus-visible { border-color: #2a2a2d; background: #2a2a2d; color: #fff; }
.ofr .ofr-card__copy a[data-atom="button"]:active { transform: translateY(1px); }
body.is-rtl .ofr .ofr-card__copy a[data-atom="button"] { letter-spacing: 0; font-size: 14px; font-weight: 500; }
.ofr .ofr-card__actions,
.ofr .ofr-card__cms { display: flex; flex-wrap: wrap; gap: 12px; }
.ofr .ofr-card__actions { margin-top: 8px; }
/* buttons the editors add to an offer (Views/A03CTA.cshtml) look like the line buttons */
.ofr .ofr-card__cms a[data-atom="button"] {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    margin: 0;
    padding: 0 22px;
    border: 1px solid #cfcfca;
    border-radius: 999px;
    background: #fff;
    color: var(--ofr-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.ofr .ofr-card__cms a[data-atom="button"]:first-child { border-color: var(--ofr-ink); background: var(--ofr-ink); color: #fff; }
body.is-rtl .ofr .ofr-card__cms a[data-atom="button"] { letter-spacing: 0; font-size: 14px; font-weight: 500; }

/* one offer: picture and text side by side */
@media (min-width: 960px) {
    .ofr .ofr-grid--single { grid-template-columns: minmax(0, 1fr); }
    .ofr .ofr-grid--single .ofr-card { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
    .ofr .ofr-grid--single .ofr-card__media { display: flex; align-items: center; }
    .ofr .ofr-grid--single .ofr-card__body { justify-content: center; padding: 40px clamp(32px, 3.5vw, 56px); }
}

/* ---------- no offers running ---------- */
.ofr .ofr-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon text" "icon actions";
    gap: 20px 28px;
    padding: clamp(28px, 3vw, 44px);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 40px 80px -56px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .04);
}
.ofr .ofr-empty__icon {
    grid-area: icon;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--ofr-ink);
    color: #fff;
}
.ofr .ofr-empty__icon .ofr-icon { width: 28px; height: 28px; }
.ofr .ofr-empty__text {
    grid-area: text;
    align-self: center;
    max-width: 60ch;
    font-size: clamp(17px, 1.4vw, 21px);
    line-height: 1.5;
    font-weight: 500;
    color: var(--ofr-ink);
    text-align: start !important;
}
.ofr .ofr-empty__actions { grid-area: actions; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- more: the range (Special offers) / owner pages (Owner offers) ---------- */
.ofr .ofr-more { margin-top: clamp(48px, 6vw, 88px); }

.ofr .ofr-models {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.ofr .ofr-model {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px 20px 22px;
    border-radius: 6px;
    background: #fff;
    color: var(--ofr-ink);
    transition: transform .35s var(--ofr-ease), box-shadow .35s var(--ofr-ease);
}
.ofr .ofr-model:hover, .ofr .ofr-model:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .45);
}
.ofr .ofr-model__media { display: block; aspect-ratio: 16 / 9; margin-bottom: 14px; }
.ofr .ofr-model__img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .5s var(--ofr-ease); }
.ofr .ofr-model:hover .ofr-model__img { transform: scale(1.04); }
.ofr .ofr-model__news {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--ofr-ink);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.ofr .ofr-model__name {
    padding-inline-end: 40px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.ofr .ofr-model__type { margin-top: 2px; padding-inline-end: 40px; font-size: 12px; line-height: 1.4; color: var(--ofr-muted); }
.ofr .ofr-model__price { margin-top: 6px; padding-inline-end: 40px; font-size: 13px; line-height: 1.4; color: var(--ofr-muted); }
.ofr .ofr-model__price strong { font-weight: 700; color: var(--ofr-ink); }
.ofr .ofr-model__go,
.ofr .ofr-tile__go {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--ofr-line);
    border-radius: 50%;
    color: var(--ofr-ink);
    transition: background-color .25s var(--ofr-ease), color .25s var(--ofr-ease), border-color .25s var(--ofr-ease);
}
.ofr .ofr-model__go { position: absolute; bottom: 20px; inset-inline-end: 20px; }
.ofr .ofr-model__go .ofr-icon, .ofr .ofr-tile__go .ofr-icon { width: 16px; height: 16px; }
.ofr .ofr-model:hover .ofr-model__go,
.ofr .ofr-tile:hover .ofr-tile__go { border-color: var(--ofr-ink); background: var(--ofr-ink); color: #fff; }
body.is-rtl .ofr .ofr-model__go .ofr-icon,
body.is-rtl .ofr .ofr-tile__go .ofr-icon { transform: scaleX(-1); }
body.is-rtl .ofr .ofr-model__name { letter-spacing: 0; text-transform: none; font-size: 16px; font-weight: 500; }
body.is-rtl .ofr .ofr-model__news { letter-spacing: 0; }

.ofr .ofr-tiles {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}
.ofr .ofr-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    height: 100%;
    padding: 24px;
    border-radius: 6px;
    background: #fff;
    color: var(--ofr-ink);
    transition: transform .35s var(--ofr-ease), box-shadow .35s var(--ofr-ease);
}
.ofr .ofr-tile:hover, .ofr .ofr-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .45); }
.ofr .ofr-tile__icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--ofr-ink);
    color: #fff;
}
.ofr .ofr-tile__name {
    flex: 1;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
body.is-rtl .ofr .ofr-tile__name { letter-spacing: 0; text-transform: none; font-size: 16px; font-weight: 500; }

/* ---------- tablet ---------- */
@media (max-width: 1199px) {
    .ofr .ofr-models { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ofr .ofr-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 959px) {
    .ofr { padding-top: 32px; }
    .ofr .ofr-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .ofr .ofr-card__body { padding: 24px 24px 28px; }
    .ofr .ofr-models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ofr .ofr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- phone ---------- */
@media (max-width: 599px) {
    .ofr { padding-bottom: 56px; }
    .ofr .ofr-intro { margin-bottom: 24px; }
    .ofr .ofr-empty {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "icon" "text" "actions";
        gap: 18px;
        padding: 28px 22px;
    }
    .ofr .ofr-empty__icon { width: 54px; height: 54px; }
    .ofr .ofr-empty__actions,
    .ofr .ofr-card__actions,
    .ofr .ofr-card__cms { flex-direction: column; align-items: stretch; }
    .ofr .ofr-btn,
    .ofr .ofr-card__cms a[data-atom="button"],
    .ofr .ofr-card__copy a[data-atom="button"] { justify-content: center; width: 100%; }
    .ofr .ofr-model__type { padding-inline-end: 0; font-size: 11.5px; }
    .ofr .ofr-models { gap: 10px; }
    .ofr .ofr-model { padding: 14px 14px 16px; }
    .ofr .ofr-model__name { padding-inline-end: 0; font-size: 12.5px; }
    .ofr .ofr-model__price { padding-inline-end: 0; font-size: 12px; }
    .ofr .ofr-model__go { display: none; }
    .ofr .ofr-tiles { gap: 10px; }
    .ofr .ofr-tile { padding: 18px; gap: 14px; }
    .ofr .ofr-tile__icon { width: 46px; height: 46px; }
    .ofr .ofr-tile__name { font-size: 12.5px; }
    .ofr .ofr-tile__go { display: none; }
    body.is-rtl .ofr .ofr-model__name,
    body.is-rtl .ofr .ofr-tile__name { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .ofr *, .ofr *::before, .ofr *::after { transition: none !important; }
}
