/* ==========================================================================
   مجمع الفارس التجاري — «contact» section  (Deliverable 2)
   Section «تواصل معنا» — the closing punch band (dark navy --title-dark).
   Loads AFTER elfares.css AND elfares-ui.css. Section-specific rules only,
   namespaced `ct-` (no elx-* primitives duplicated). Frosted-glass contact
   tiles on the dark band echo the .elx-card language while staying legible on
   navy — cohesive with the numbers/cta dark bands.
   RTL-first — logical properties only; Arabic is never letter-spaced.
   ========================================================================== */

/* ---------- Band ---------- */
.ct-section {
    isolation: isolate;                 /* contain the decorative layers */
    padding-block: clamp(64px, 8.5vw, 120px);
}

/* ==========================================================================
   Decorative motif layers — aria-hidden, pointer-events:none, z-index 0.
   Soft cyan aura pooling behind the head + a faint blueprint grid.
   ========================================================================== */
.ct-aura {
    position: absolute;
    inset-block-start: -12%;
    inset-inline: 0;
    margin-inline: auto;
    z-index: 0;
    width: min(820px, 90%);
    height: 420px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(0, 165, 229, .20) 0%, rgba(0, 165, 229, 0) 68%);
    filter: blur(12px);
}
.ct-grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right,  rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(120% 120% at 50% 32%, #000 0%, transparent 72%);
            mask-image: radial-gradient(120% 120% at 50% 32%, #000 0%, transparent 72%);
}
.ct-inner {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Cards grid
   ========================================================================== */
.ct-cards {
    align-items: stretch;               /* equal-height tiles across the row */
}

/* ---------- Frosted contact tile ---------- */
.ct-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: clamp(26px, 3vw, 38px) clamp(22px, 2.6vw, 32px);
    background: rgba(255, 255, 255, .045);
    border: 1px solid var(--elx-hairline-dark);
    border-radius: var(--elx-radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .30);
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    overflow: hidden;
    transition: transform .4s var(--elx-ease),
                background .4s var(--elx-ease),
                border-color .4s var(--elx-ease),
                box-shadow .4s var(--elx-ease);
}
/* cyan top accent that wipes in from the RTL start on hover */
.ct-card::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--theme-color), var(--theme-color2));
    transform: scaleX(0);
    transform-origin: right center;      /* RTL start = right edge */
    transition: transform .45s var(--elx-ease);
}
.ct-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, .07);
    border-color: rgba(0, 165, 229, .40);
    box-shadow: 0 34px 72px rgba(0, 0, 0, .42);
}
.ct-card:hover::before { transform: scaleX(1); }

/* ---------- Icon top — outlined by default, fills on hover ---------- */
.ct-card__icon {
    margin-bottom: var(--elx-5);
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .55);
    color: #fff;
    box-shadow: none;
    transition: transform .4s var(--elx-ease),
                background .4s var(--elx-ease),
                border-color .4s var(--elx-ease),
                color .4s var(--elx-ease),
                box-shadow .4s var(--elx-ease);
}
.ct-card:hover .ct-card__icon {
    transform: translateY(-4px);
    background: linear-gradient(135deg, var(--theme-color), var(--theme-color2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 26px rgba(46, 96, 158, .30);
}
/* WhatsApp channel → green outline that fills green on hover */
.ct-card__icon--wa {
    border-color: rgba(37, 211, 102, .7);
    color: #25d366;
}
.ct-card--wa:hover .ct-card__icon--wa {
    background: linear-gradient(135deg, #1faa54, #25d366);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 26px rgba(37, 211, 102, .30);
}

/* ---------- Title + hint ---------- */
.ct-card__title {
    margin: 0 0 var(--elx-2);
    font-family: var(--title-font);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--elx-on-dark);
}
.ct-card__hint {
    margin: 0;
    color: var(--elx-on-dark-dim);
    font-size: .95rem;
    line-height: 1.75;
}

/* ---------- Featured badge (WhatsApp tile) ---------- */
.ct-card__badge {
    position: absolute;
    inset-block-start: var(--elx-4);
    inset-inline-end: var(--elx-4);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--elx-radius-pill);
    background: rgba(37, 211, 102, .16);
    border: 1px solid rgba(37, 211, 102, .40);
    color: #6ff0a3;
    font-family: var(--title-font);
    font-weight: 700;
    font-size: .74rem;
    line-height: 1;
}

/* ---------- Interactive block pinned to the bottom (cross-tile alignment) ---------- */
.ct-card__foot {
    margin-block-start: auto;
    padding-block-start: var(--elx-5);
    display: flex;
    flex-direction: column;
    gap: var(--elx-3);
}

/* ---------- Contact line (tappable chip) ---------- */
.ct-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--elx-3);
    padding: 13px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--elx-hairline-dark);
    color: var(--elx-on-dark);
    font-weight: 600;
    transition: background .28s var(--elx-ease),
                border-color .28s var(--elx-ease),
                color .28s var(--elx-ease);
}
.ct-line:hover {
    background: rgba(0, 165, 229, .14);
    border-color: rgba(0, 165, 229, .50);
    color: #fff;
}
.ct-line__num {
    flex: 1;
    min-width: 0;
    text-align: start;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    letter-spacing: normal;             /* never track — latin/numeric run */
    word-break: break-word;
    font-size: clamp(.86rem, 2.1vw, .98rem);
}
.ct-line i {
    flex: none;
    font-size: .82em;
    color: var(--theme-color2);
    transition: transform .28s var(--elx-ease), color .28s var(--elx-ease);
}
/* fa-arrow-left is the forward arrow in RTL — nudge forward (left) on hover */
.ct-line:hover i { transform: translateX(-4px); color: #fff; }

/* ---------- WhatsApp button (uses .elx-btn--wa --block primitive) ---------- */
.ct-card__btn { margin-block-start: var(--elx-1); }

/* ---------- QR chip ---------- */
.ct-qr {
    display: flex;
    align-items: center;
    gap: var(--elx-4);
    margin-block-start: var(--elx-1);
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px dashed var(--elx-hairline-dark);
}
.ct-qr__img {
    flex: none;
    width: 64px;
    height: 64px;
    padding: 5px;
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
}
.ct-qr__cap {
    color: var(--elx-on-dark-dim);
    font-size: .82rem;
    line-height: 1.5;
}

/* ==========================================================================
   Location strip — hairline rule + address + directions link
   ========================================================================== */
.ct-strip {
    margin-block-start: clamp(40px, 5vw, 64px);
}
.ct-strip__rule {
    margin: 0 0 clamp(24px, 3vw, 34px);
    height: 0;
    background: none;
    border-top: 1px dashed var(--elx-hairline-dark);
}
.ct-strip__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--elx-4) var(--elx-6);
}
.ct-strip__addr {
    display: inline-flex;
    align-items: center;
    gap: var(--elx-3);
    color: var(--elx-on-dark-soft);
    font-weight: 500;
    font-size: clamp(.98rem, 1.4vw, 1.06rem);
    line-height: 1.6;
}
/* re-tint the soft marker for the dark band (overrides .elx-icon--soft) */
.ct-strip__pin {
    background: rgba(0, 165, 229, .12);
    color: var(--theme-color2);
}
.ct-strip__link {
    font-size: 1.02rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 575px) {
    .ct-card { padding: 26px 22px; }
    .ct-grid-bg { background-size: 48px 48px; }
    .ct-strip__row { gap: var(--elx-4); }
    .ct-qr__cap { font-size: .8rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .ct-card,
    .ct-card__icon,
    .ct-card::before,
    .ct-line,
    .ct-line i { transition: none; }
    .ct-card:hover { transform: none; }
    .ct-card:hover .ct-card__icon { transform: none; }
}
