/* TQRES design fixes, November 2026.
   Loaded after styles.css. Every new class starts with tq- so the template's own components are
   untouched, except the few overrides grouped at the end.

   Direction: plain-spoken, local, sure-footed. The project photographs carry the colour; everything
   around them stays quiet. One accent, the brand olive, marks the primary action, the selection and
   the price. Signature: every price is tabular figures followed by the Saudi riyal mark.
   Spacing on a 4px grid. Tajawal at 400 and 500. Corners: 6 tags, 10 controls, 16 cards. */

:root {
    --tq-accent: #273e20;
    --tq-accent-hover: #1c2e17;
    --tq-band: #edf3eb;
    --tq-ink: #161e2d;
    --tq-text-2: #4a5157;
    --tq-muted: #6b7378;
    --tq-line: rgba(22, 30, 45, .1);
    --tq-surface: #ffffff;
    --tq-ease: cubic-bezier(.22, 1, .36, 1);
}

.tq-icon { flex: none; vertical-align: middle; }

/* The riyal mark: the site's own symbol, drawn in the colour of the text around it */
.tq-sar {
    display: inline-block;
    width: .7em;
    height: .78em;
    margin-inline-start: .2em;
    vertical-align: -.04em;
    background-color: currentColor;
    -webkit-mask: url("../images/icons/Saudi_Riyal_Symbol.png") no-repeat center / contain;
    mask: url("../images/icons/Saudi_Riyal_Symbol.png") no-repeat center / contain;
}
.tq-price { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Buttons */
.tq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 160ms var(--tq-ease), color 160ms var(--tq-ease), border-color 160ms var(--tq-ease), transform 120ms var(--tq-ease);
}
.tq-btn:active { transform: scale(.98); }
.tq-btn:focus-visible,
.tq-filter:focus-visible,
.tq-hero__project:focus-visible,
.tq-card a:focus-visible {
    outline: 2px solid #9cc48f;
    outline-offset: 2px;
}
.tq-btn--light { background: #f7f6f2; color: var(--tq-accent); }
.tq-btn--light:hover { background: #ffffff; color: var(--tq-accent-hover); }
.tq-btn--ghost { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, .4); }
.tq-btn--ghost:hover { background: rgba(255, 255, 255, .1); color: #ffffff; }
.tq-btn--outline { background: transparent; color: var(--tq-ink); border-color: var(--tq-line); }
.tq-btn--outline:hover { background: var(--tq-band); color: var(--tq-ink); }

/* Hero: the project photograph is the one bright thing on the page */
.tq-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: flex-end;
    min-height: 84svh;
    background: #1c2a18;
    color: #ffffff;
    overflow: hidden;
}
.tq-hero__media { position: absolute; inset: 0; z-index: -2; }
.tq-hero__swiper,
.tq-hero__swiper .swiper-slide { width: 100%; height: 100%; }
.tq-hero__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tq-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(16, 24, 13, .55) 0%, rgba(16, 24, 13, .35) 30%, rgba(16, 24, 13, .8) 62%, rgba(16, 24, 13, .92) 100%);
}
.tq-hero__content { width: 100%; padding: 128px 0 72px; }
.tq-hero__copy { max-width: 640px; }
.tq-hero__title {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: clamp(36px, 9.6vw, 64px);
    font-weight: 500;
    line-height: 1.2;
    text-wrap: balance;
}
.tq-hero__lead {
    margin: 0 0 24px;
    max-width: 36rem;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(17px, 4.4vw, 20px);
    font-weight: 400;
    line-height: 1.7;
}
.tq-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tq-hero__actions .tq-btn { flex: 1 1 160px; }
/* The name of the project in the photo, set like a caption in its corner */
.tq-hero__caption {
    position: absolute;
    bottom: 20px;
    inset-inline-end: max(16px, env(safe-area-inset-left, 0px));
    max-width: calc(100% - 32px);
}
.tq-hero__project {
    display: none;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    line-height: 20px;
    text-decoration: none;
    transition: color 160ms var(--tq-ease);
}
.tq-hero__project.is-active { display: inline-flex; }
.tq-hero__project:hover { color: #ffffff; }
.tq-hero__project span + span::before { content: "·"; margin-inline-end: 8px; }
@media (min-width: 992px) {
    .tq-hero { min-height: 680px; }
    .tq-hero__content { padding: 160px 0 96px; }
    .tq-hero__actions .tq-btn { flex: 0 0 auto; min-width: 176px; }
    .tq-hero__caption { bottom: 32px; inset-inline-end: 48px; }
}

/* Section headings */
.tq-section-title {
    margin: 0;
    color: var(--tq-ink);
    font-size: clamp(28px, 7.2vw, 36px);
    font-weight: 500;
    line-height: 1.25;
}

/* Projects */
.tq-projects { padding: 64px 0; }
.tq-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.tq-filters {
    display: inline-flex;
    gap: 4px;
    max-width: 100%;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid var(--tq-line);
    border-radius: 12px;
    background: var(--tq-surface);
    scrollbar-width: none;
}
.tq-filters::-webkit-scrollbar { display: none; }
.tq-filter {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--tq-text-2);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 160ms var(--tq-ease), color 160ms var(--tq-ease);
}
.tq-filter:hover { color: var(--tq-ink); background: var(--tq-band); }
.tq-filter span { color: var(--tq-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tq-filter.is-active { background: var(--tq-accent); color: #ffffff; }
.tq-filter.is-active span { color: rgba(255, 255, 255, .72); }
.tq-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
}
@media (min-width: 768px) { .tq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .tq-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.tq-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--tq-surface);
    border: 1px solid var(--tq-line);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 160ms var(--tq-ease);
}
.tq-card:hover { border-color: rgba(22, 30, 45, .2); }
.tq-card[hidden] { display: none; }
.tq-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--tq-band);
    overflow: hidden;
}
.tq-card__media img { width: 100%; height: 100%; object-fit: cover; }
.tq-card.is-sold .tq-card__media img { filter: grayscale(.8); opacity: .8; }
/* Status: a small tag on the photo, its colour only in the dot */
.tq-status {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(16, 24, 13, .72);
    color: #ffffff;
    font-size: 13px;
    line-height: 20px;
}
.tq-status__dot { width: 8px; height: 8px; border-radius: 50%; background: #4cc38a; }
.tq-status--sold .tq-status__dot { background: #e5484d; }
.tq-status--reserved .tq-status__dot { background: #f2b544; }
.tq-status--under_construction .tq-status__dot { background: #7aa7e0; }
.tq-card__body { display: grid; gap: 4px; padding: 16px 20px; }
.tq-card__title { margin: 0 0 4px; font-size: 18px; font-weight: 500; line-height: 1.5; }
.tq-card__title a { color: var(--tq-ink); text-decoration: none; transition: color 160ms var(--tq-ease); }
.tq-card__title a:hover { color: var(--tq-accent); }
.tq-card__place,
.tq-card__specs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--tq-text-2);
    font-size: 14px;
    line-height: 20px;
}
.tq-card__place .tq-icon { color: var(--tq-muted); }
.tq-card__specs { color: var(--tq-muted); font-variant-numeric: tabular-nums; }
.tq-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--tq-line);
}
.tq-card__dev {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--tq-muted);
    font-size: 13px;
}
.tq-card__dev img { flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--tq-line); }
.tq-card__dev-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--tq-line);
    color: var(--tq-muted);
}
.tq-card__dev-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-card__price { flex: none; margin: 0; text-align: end; line-height: 1.3; }
.tq-card__from { display: block; color: var(--tq-muted); font-size: 12px; line-height: 16px; }
.tq-card__price .tq-price { color: var(--tq-accent); font-size: 18px; font-weight: 500; }
.tq-center { display: flex; justify-content: center; margin-top: 32px; }
.tq-empty { grid-column: 1 / -1; text-align: center; color: var(--tq-muted); }

/* About and values: one band, a list separated by hairlines */
.tq-about { padding: 64px 0; }
.tq-about__inner { display: grid; gap: 32px; }
@media (min-width: 992px) {
    .tq-about { padding: 96px 0; }
    .tq-about__inner { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
}
.tq-about__intro h2 {
    margin: 0 0 12px;
    color: var(--tq-ink);
    font-size: clamp(28px, 7.2vw, 40px);
    font-weight: 500;
    line-height: 1.3;
}
.tq-about__intro h2 strong { font-weight: inherit; }
.tq-about__intro p { margin: 0; color: var(--tq-text-2); font-size: 17px; line-height: 1.8; }
.tq-about__intro p:has(> br:only-child) { display: none; }
.tq-values-title { margin: 0 0 8px; color: var(--tq-muted); font-size: 15px; font-weight: 500; }
.tq-values { margin: 0; padding: 0; list-style: none; }
.tq-value { padding: 16px 0; border-top: 1px solid var(--tq-line); }
.tq-value:last-child { border-bottom: 1px solid var(--tq-line); }
.tq-value h3 { margin: 0 0 4px; color: var(--tq-ink); font-size: 17px; font-weight: 500; line-height: 1.5; }
.tq-value p { margin: 0; color: var(--tq-text-2); font-size: 15px; line-height: 1.7; }

/* Testimonials: the slider runs left to right, the quote reads right to left */
.tq-testimonials .tq-section-title { text-align: center; margin-bottom: 32px; }
.tq-quote { margin: 0; text-align: right; }
.tq-quote blockquote { margin: 0 0 16px; font-size: 16px; line-height: 1.8; }

/* Partners */
.tq-partners__title { margin: 0 0 24px; text-align: center; color: var(--tq-muted); font-size: 15px; font-weight: 500; }

/* Contact form */
.tq-optional { font-weight: 400; color: var(--tq-muted); }
.tq-form-note { margin: 12px 0 0; color: var(--tq-muted); font-size: 13px; line-height: 20px; }
.tq-form-note a { color: var(--tq-accent); text-decoration: underline; }

/* Desktop header: a menu item or button never breaks inside ("اطلب / عقارك") */
@media (min-width: 992px) {
    .main-header .navigation > li > a,
    .main-header .header-account a { white-space: nowrap; }
}

/* Phone menu button: white over the homepage photo, and a 44px target instead of 26px */
.mobile-button { width: 44px; height: 44px; left: -9px; }
.mobile-button::before,
.mobile-button::after,
.mobile-button span { width: 26px; left: 9px; }
.header-style-2:not(.is-fixed) .mobile-button::before,
.header-style-2:not(.is-fixed) .mobile-button::after,
.header-style-2:not(.is-fixed) .mobile-button span { background-color: #ffffff; }

/* Floating WhatsApp button: clear of the phone's home bar, and the footer keeps room for it */
#whatsapp-chat {
    right: max(16px, env(safe-area-inset-right, 0px)) !important;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
}
#whatsapp-btn { box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
@media (max-width: 767px) {
    .footer .bottom-footer { padding-bottom: 88px; }
}

@media (prefers-reduced-motion: reduce) {
    .tq-btn, .tq-filter, .tq-card, .tq-card__title a, .tq-hero__project { transition: none; }
    .tq-btn:active { transform: none; }
}
