/* ============================================================
   Contact QR – app.css
   Centralised stylesheet replacing ~40 inline style="" attrs.
   Loaded after Bootstrap 5 so these rules override defaults.
   ============================================================ */

/* ----------------------------------------------------------
   Design tokens
   ---------------------------------------------------------- */
:root {
    /* — legacy landing-page component tokens — */
    --cq-radius:        0.75rem;
    --cq-radius-sm:     0.5rem;
    --cq-shadow:        0 0.5rem 1rem rgba(0, 0, 0, 0.10);
    --cq-shadow-sm:     0 2px   6px  rgba(0, 0, 0, 0.08);
    --cq-icon-color:    #444;
    --cq-muted:         #555;

    /* — unified design system tokens — */
    --brand-primary:   #6366F1;
    --brand-dark:      #0F172A;

    --text-primary:    #0F172A;
    --text-secondary:  #475569;
    --text-muted:      #64748B;

    --bg-main:         #F8FAFC;
    --bg-glass:        rgba(255, 255, 255, 0.65);

    --border-soft:     rgba(99, 102, 241, 0.12);
    --border-light:    rgba(0, 0, 0, 0.06);

    --radius-xl:       24px;
    --radius-lg:       20px;
    --radius-md:       14px;
    --radius-sm:       10px;

    --shadow-soft:     0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md:       0 16px 40px rgba(15, 23, 42, 0.12);

    --space-xl:        5rem;
    --space-lg:        3rem;
    --space-md:        2rem;
    --space-sm:        1rem;
    --space-xs:        0.5rem;
}

/* ----------------------------------------------------------
   Base overrides
   ---------------------------------------------------------- */
body {
    background-color: var(--bg-main);
    padding-top:    1.5rem;
    padding-bottom: 3rem;
}

/* Global card reset: no border, consistent radius and shadow */
.card {
    border: none;
    border-radius: var(--cq-radius);
    box-shadow: var(--cq-shadow);
}

.form-control,
.form-select {
    border-radius: var(--cq-radius-sm);
}

.btn {
    border-radius: var(--cq-radius-sm);
    padding: 0.5rem 1.5rem;
}

/* ----------------------------------------------------------
   Flash / alert messages
   ---------------------------------------------------------- */
.alert {
    border-radius: var(--cq-radius-sm);
    font-size: 0.9375rem;
}

/* ----------------------------------------------------------
   Unified UI system
   Shared across all public pages
   ---------------------------------------------------------- */

/* Base glass card */
.ui-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 1.75rem;
}

/* Typography utilities */
.ui-title {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.ui-subtitle {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0;
}

.ui-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

/* Hairline divider */
.ui-divider {
    height: 1px;
    background: var(--border-light);
    border: none;
    margin: 1.25rem 0;
}

/* Primary CTA */
.ui-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--brand-dark), #1E293B);
    color: #fff;
    padding: 0.9rem 1.6rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ui-btn-primary:hover {
    background: linear-gradient(135deg, #1E293B, var(--brand-primary));
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
    color: #fff;
    text-decoration: none;
}

.ui-btn-primary:active { transform: translateY(0); transition-duration: 0.08s; }

/* Secondary */
.ui-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--border-soft);
    color: var(--text-primary);
    padding: 0.8rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ui-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    text-decoration: none;
}

/* Ghost */
.ui-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--brand-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: color 0.15s ease;
}

.ui-btn-ghost:hover { color: var(--brand-dark); text-decoration: none; }

/* ----------------------------------------------------------
   Contact card page  (/user/<id>)
   Optimised for mobile QR/NFC scan — symbol-first, fast load
   ---------------------------------------------------------- */

.contact-page {
    min-height: 100vh;
    background-color: var(--bg-main);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -5%,
            rgba(99, 102, 241, 0.13) 0%, transparent 65%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem 3.5rem;
}

.contact-card {
    width: min(420px, 96vw);
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    position: relative;
}

/* Banner: logo strip (or gradient fallback).
 * position: relative makes this the unambiguous offset parent for the
 * avatar wrapper — no dependency on any ancestor's layout context.
 * overflow: hidden is intentionally absent so the avatar can overflow
 * below the banner bottom edge. */
.contact-banner {
    height: 150px;
    background: linear-gradient(135deg, #1e293b 0%, var(--brand-primary) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;  /* offset parent for .contact-avatar-wrapper */
}

.contact-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.80;
    filter: grayscale(15%);
    display: block;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/*
 * Avatar wrapper — anchored to .contact-banner via bottom: -44px.
 * Geometry (banner = 150px, avatar = 88px, half = 44px):
 *   bottom: -44px  →  avatar center sits exactly on the banner's lower edge
 *   avatar top     = 150px - 44px = 106px from banner top
 *   avatar bottom  = 150px + 44px = 194px from banner top (44px below banner)
 * No knowledge of the card's total height is needed.
 */
.contact-avatar-wrapper {
    position: absolute;
    bottom: -44px;       /* half avatar height below banner bottom */
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    line-height: 0;      /* collapse inline gap below the img */
}

.contact-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
    display: block;
}

/* Body padding: default vs has-avatar */
.contact-body {
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.contact-body.has-avatar {
    /*
     * 44px  — half the avatar below the banner seam
     * 16px  — breathing room between avatar bottom and name
     * total = 60px ≈ 3.75rem
     */
    padding-top: 3.75rem;
}

/* Identity */
.contact-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0 0 0.2rem;
}

.contact-position {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.15rem;
}

.contact-company {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 0.25rem;
}

/* Action icon grid — 52 px tap targets */
.contact-actions {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.contact-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
}

.contact-action-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.07);
    border: 1px solid rgba(99, 102, 241, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--brand-dark);
    transition: background 0.15s ease, color 0.15s ease,
                transform 0.15s ease, border-color 0.15s ease;
}

.contact-action-label {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.contact-action:hover .contact-action-icon,
.contact-action:focus-visible .contact-action-icon {
    background: var(--brand-dark);
    color: #fff;
    transform: translateY(-2px);
    border-color: transparent;
}

/* Platform hover colours */
.contact-action.ca-whatsapp:hover .contact-action-icon  { background: #25D366; }
.contact-action.ca-linkedin:hover .contact-action-icon   { background: #0A66C2; }
.contact-action.ca-youtube:hover .contact-action-icon    { background: #FF0000; }
.contact-action.ca-twitter:hover .contact-action-icon    { background: #1DA1F2; }
.contact-action.ca-facebook:hover .contact-action-icon   { background: #1877F2; }
.contact-action.ca-instagram:hover .contact-action-icon  { background: #E1306C; }
.contact-action.ca-tiktok:hover .contact-action-icon     { background: #010101; }

/* Save Contact — dominant full-width button */
.save-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.95rem 1.5rem;
    background: linear-gradient(135deg, var(--brand-dark) 0%, #1E293B 50%, var(--brand-primary) 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    border-radius: var(--radius-md);
    text-decoration: none;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.save-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.30);
    color: #fff;
    text-decoration: none;
}

.save-contact-btn:active { transform: translateY(0); }

/* Product promo below the card */
.contact-promo {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
}

.contact-promo a {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
}

.contact-promo a:hover { text-decoration: underline; }

/* ----------------------------------------------------------
   Confirmation page  (/submit)
   ---------------------------------------------------------- */

.confirmation-page {
    min-height: 100vh;
    background-color: var(--bg-main);
    background-image:
        radial-gradient(ellipse 70% 45% at 50% -5%,
            rgba(99, 102, 241, 0.11) 0%, transparent 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.confirmation-card {
    width: min(460px, 96vw);
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 2.5rem 2rem;
    text-align: center;
}

.confirmation-qr {
    width: min(200px, 70vw);
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin: 1.25rem auto;
    display: block;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ----------------------------------------------------------
   Registration forms  (/en/ /ar/ /ku/)
   ---------------------------------------------------------- */

.registration-page {
    min-height: 100vh;
    background-color: var(--bg-main);
    background-image:
        radial-gradient(ellipse 70% 40% at 50% -5%,
            rgba(99, 102, 241, 0.09) 0%, transparent 60%);
    padding-bottom: 3rem;
}

/* ----------------------------------------------------------
   Registration form – action row (primary + secondary buttons)
   ---------------------------------------------------------- */
.cq-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Secondary back button — same radius/height as Bootstrap .btn,
   deliberately lower visual weight than the primary CTA             */
.cq-btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;          /* matches Bootstrap .btn */
    color: #64748b;
    background: transparent;
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: var(--cq-radius-sm);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.cq-btn-back:hover,
.cq-btn-back:focus {
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.04);
    text-decoration: none;
}

/* Mobile: stack buttons and stretch to full width */
@media (max-width: 480px) {
    .cq-action-row {
        flex-direction: column;
    }
    .cq-action-row .btn,
    .cq-action-row .cq-btn-back {
        width: 100%;
    }
}

/* ----------------------------------------------------------
   Registration form – submit area
   ---------------------------------------------------------- */
.cq-form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* ----------------------------------------------------------
   Admin panel
   ---------------------------------------------------------- */

/* Horizontal scroll wrapper — prevents table overflow on mobile */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Minimum touch-target width for action buttons inside tables */
.table .btn {
    min-width: 4.5rem;
}

/* Tabs: wrap onto a second line on narrow viewports */
#adminTab {
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* ----------------------------------------------------------
   Responsive overrides — ≤ 576 px
   ---------------------------------------------------------- */
@media (max-width: 576px) {
    :root {
        --cq-avatar-size:   76px;
        --cq-banner-height: 130px;
    }

    /* Prevent country-code select from overflowing the input group */
    .input-group select[name="country_code"] {
        max-width: 110px;
        flex-shrink: 0;
    }

    /* Gap between stacked social-link select + url input on mobile */
    .social-link-entry .row > [class^="col-"] + [class^="col-"] {
        margin-top: 0.5rem;
    }

    /* Tighter admin tab labels */
    #adminTab .nav-link {
        font-size: 0.82rem;
        padding: 0.35rem 0.55rem;
    }
}

/* ============================================================
   Landing page (landing.html — server-rendered per locale)
   All rules are scoped to .cq-landing-nav / .cq-landing-wrapper
   to prevent leakage into admin, registration, or card pages.
   ============================================================ */

/* ── Sticky glassmorphism navigation ── */
.cq-landing-nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(248, 250, 252, 0.88);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    padding: 0.7rem 1.5rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.cq-nav-inner {
    max-width: 820px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cq-nav-brand {
    font-size: 1rem;
    font-weight: 700;
    color: #0F172A;
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: color 0.15s ease;
}

.cq-nav-brand:hover { color: #6366F1; text-decoration: none; }

/* Language switcher — segmented pill group with full language names */
.cq-lang-switch {
    display: flex;
    gap: 0.1rem;
    background: rgba(15, 23, 42, 0.07);
    padding: 0.22rem;
    border-radius: 99px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
    flex-wrap: nowrap;
}

.cq-ls-btn {
    display: inline-block;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0.28rem 0.72rem;
    border-radius: 99px;
    font-size: 0.71rem;
    font-weight: 600;
    letter-spacing: 0.01em;   /* tighter — full words read better without wide tracking */
    color: #334155;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    font-family: 'Inter', system-ui, sans-serif;
    white-space: nowrap;
    line-height: 1.4;
}

.cq-ls-btn--active {
    background: #0F172A;
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    font-weight: 700;
}

.cq-ls-btn:hover:not(.cq-ls-btn--active) {
    background: rgba(99, 102, 241, 0.13);
    color: #4F46E5;
    text-decoration: none;
}

/* Sorani label uses Cairo (Arabic-script) even though the nav is dir=ltr */
.cq-ls-btn[hreflang="ckb"] {
    font-family: 'Cairo', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: 0;
}

/* ── Wrapper: scrollable multi-section page ── */
.cq-landing-wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #F8FAFC;
    background-image:
        radial-gradient(ellipse 80% 60% at 15% 15%, rgba(99, 102, 241, 0.22) 0%, transparent 65%),
        radial-gradient(ellipse 60% 80% at 85% 85%, rgba(148, 163, 184, 0.18) 0%, transparent 65%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Film grain (fixed so it covers the whole scroll area) */
.cq-landing-wrapper::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ── Ambient blobs (fixed — stay put while page scrolls) ── */
.cq-blob {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.cq-blob-1 {
    width: 560px;
    height: 560px;
    top: -160px;
    left: -120px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.30) 0%, transparent 68%);
    filter: blur(80px);
    animation: cq-drift-1 20s ease-in-out infinite;
}

.cq-blob-2 {
    width: 460px;
    height: 460px;
    bottom: -120px;
    right: -100px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(148, 163, 184, 0.22) 45%, transparent 68%);
    filter: blur(80px);
    animation: cq-drift-2 25s ease-in-out infinite;
}

@keyframes cq-drift-1 {
    0%   { transform: translate(0,      0)    scale(1);    }
    33%  { transform: translate(45px,  -35px) scale(1.07); }
    66%  { transform: translate(-25px,  22px) scale(0.95); }
    100% { transform: translate(0,      0)    scale(1);    }
}

@keyframes cq-drift-2 {
    0%   { transform: translate(0,      0)    scale(1);    }
    40%  { transform: translate(-40px,  30px) scale(1.09); }
    80%  { transform: translate(22px,  -18px) scale(0.93); }
    100% { transform: translate(0,      0)    scale(1);    }
}

/* ── SECTION 1: Hero ── */
.cq-hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem 3rem;
    position: relative;
    z-index: 1;
}

.cq-landing-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    width: 100%;
    max-width: 520px;
}

.cq-landing-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.cq-landing-kicker {
    display: inline-block;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.68rem;
    font-weight: 700;
    color: #6366F1;
    background: rgba(99, 102, 241, 0.08);
    padding: 0.28rem 0.9rem;
    border-radius: 99px;
    margin-bottom: 0.3rem;
}

.cq-landing-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.12;
    color: #0F172A;            /* solid fallback */
    letter-spacing: -0.025em;
    margin: 0;
    /* Gradient text — progressive enhancement */
    background: linear-gradient(135deg, #0F172A 5%, #4f46e5 50%, #0F172A 95%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: cq-title-gradient 10s ease-in-out infinite;
}

@keyframes cq-title-gradient {
    0%, 100% { background-position:   0% center; }
    50%       { background-position: 100% center; }
}

/* Arabic title: Cairo font, tighter clamp, relaxed line-height, no gradient animation */
html[lang="ar"] .cq-landing-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0;
    animation: none; /* Cairo + animated gradient causes jank on some browsers */
}

/* Arabic body font override */
html[lang="ar"] .cq-landing-wrapper {
    font-family: 'Cairo', system-ui, sans-serif;
}

.cq-landing-tagline {
    font-size: 0.925rem;
    color: #64748b;
    line-height: 1.8;
    max-width: 420px;
    margin: 0;
}

/* Scroll hint chevron */
.cq-scroll-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(99, 102, 241, 0.18);
    color: #475569;
    text-decoration: none;
    margin-top: 0.25rem;
    transition: background 0.2s, color 0.2s;
}

.cq-scroll-hint:hover { color: #6366F1; background: rgba(255, 255, 255, 0.65); }

.cq-scroll-hint i {
    animation: cq-bounce 2s ease-in-out infinite;
}

@keyframes cq-bounce {
    0%, 100% { transform: translateY(0);   }
    50%       { transform: translateY(5px); }
}

/* ── Glass card (language selector) ── */
.cq-glass-card {
    width: min(440px, 94vw);
    padding: 2.25rem 2rem;
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(99, 102, 241, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.80);
    position: relative;
}

/* Gradient border via mask (works with border-radius) */
.cq-glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.55),
        rgba(148, 163, 184, 0.25) 40%,
        rgba(255, 255, 255, 0.08) 60%,
        rgba(99, 102, 241, 0.35)
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* CTA card: localized heading + supporting text */
.cq-cta-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.cq-cta-subtext {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Navy magnetic button */
.cq-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #0F172A;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.015em;
    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease;
    will-change: transform;
}

/* Shimmer sweep — 6s loop */
.cq-lang-btn-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255, 255, 255, 0.13) 50%,
        transparent 65%
    );
    background-size: 250% 100%;
    animation: cq-shimmer 6s linear infinite;
    border-radius: inherit;
    pointer-events: none;
}

@keyframes cq-shimmer {
    from { background-position:  250% center; }
    to   { background-position: -250% center; }
}

.cq-lang-btn:hover,
.cq-lang-btn:focus-visible {
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.28);
    color: #fff;
    text-decoration: none;
}

.cq-lang-btn:active {
    transform: scale(0.98) translateY(0);
    transition-duration: 0.08s;
}

/* ── SECTIONS 2 / 3 / 4 shared layout ── */
.cq-steps-section,
.cq-features-section,
.cq-faq-section {
    position: relative;
    z-index: 1;
    padding: 5rem 1.5rem;
}

.cq-steps-section {
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cq-faq-section {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding-bottom: 6rem;
}

.cq-section-inner {
    max-width: 820px;
    margin-inline: auto;
}

.cq-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6366F1;
    margin-bottom: 0.5rem;
}

.cq-section-title {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.02em;
    margin-bottom: 2.5rem;
    line-height: 1.2;
}

/* ── SECTION 2: How It Works (3-step) ── */
.cq-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.cq-step-card {
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.10);
    box-shadow:
        0 4px 16px rgba(99, 102, 241, 0.07),
        0 1px 4px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.cq-step-num {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #6366F1;
    margin-bottom: 0.85rem;
}

.cq-step-icon {
    width: 52px;
    height: 52px;
    background: rgba(99, 102, 241, 0.10);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.4rem;
    color: #6366F1;
}

.cq-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 0.5rem;
}

.cq-step-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.72;
    margin: 0;
}

/* ── SECTION 3: Feature Inventory (3-column) ── */
.cq-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.cq-feat-card {
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    text-align: start;
}

.cq-feat-icon {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.10);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #6366F1;
    margin-bottom: 1rem;
}

.cq-feat-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 0.4rem;
}

.cq-feat-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
}

/* ── SECTION 4: Privacy commitment box ── */
.cq-privacy-box {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.75;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.cq-privacy-box a {
    color: #6366F1;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── SECTION 4: FAQ accordion in glass ── */
.cq-faq-glass {
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-radius: 20px;
    padding: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.10);
    box-shadow:
        0 4px 24px rgba(99, 102, 241, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04);
}

.cq-faq-accordion .accordion-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

.cq-faq-accordion .accordion-item:last-child {
    border-bottom: none;
}

.cq-faq-accordion .accordion-button {
    background: transparent;
    color: #0F172A;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Inter', system-ui, sans-serif;
    padding: 1.1rem 1.25rem;
    box-shadow: none;
    border-radius: 12px;
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.cq-faq-accordion .accordion-button:not(.collapsed) {
    background: rgba(99, 102, 241, 0.06);
    color: #6366F1;
    box-shadow: none;
}

/* Glow on hover */
.cq-faq-accordion .accordion-button:hover {
    background: rgba(99, 102, 241, 0.05);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.22);
    color: #4f46e5;
}

.cq-faq-accordion .accordion-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}

/* Tint the default chevron icon */
.cq-faq-accordion .accordion-button::after {
    filter: hue-rotate(200deg) saturate(0.8);
}

.cq-faq-accordion .accordion-button:not(.collapsed)::after {
    filter: hue-rotate(200deg) saturate(1.2) brightness(0.85);
}

.cq-faq-accordion .accordion-body {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.8;
    padding: 0.25rem 1.25rem 1.25rem;
}

.cq-faq-accordion .accordion-body a {
    color: #6366F1;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Sticky CTA ── */
.cq-sticky-cta {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #0F172A;
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1.35rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.25);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cq-sticky-cta.cq-sticky-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cq-sticky-cta:hover {
    background: #1e293b;
    color: #fff;
    text-decoration: none;
}

/* ── Page footer ── */
.cq-page-footer {
    text-align: center;
    padding: 2rem 1rem 3rem;
    font-size: 0.82rem;
    color: #94a3b8;
    position: relative;
    z-index: 1;
}

.cq-page-footer a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.cq-page-footer a:hover {
    color: #6366F1;
    text-decoration: underline;
}

/* ── Nav right group (lang switcher + CTA) ── */
.cq-nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cq-nav-cta {
    display: inline-flex;
    align-items: center;
    background: #0F172A;
    color: #fff;
    text-decoration: none;
    padding: 0.38rem 1rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.cq-nav-cta:hover {
    background: #4f46e5;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.30);
}

/* ── Hero stat strip ── */
.cq-stat-strip {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 99px;
    padding: 0.45rem 0;
    width: fit-content;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cq-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1.25rem;
    line-height: 1.25;
}

.cq-stat-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.01em;
}

.cq-stat-lab {
    font-size: 0.6rem;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cq-stat-div {
    width: 1px;
    height: 1.6rem;
    background: rgba(99, 102, 241, 0.15);
    flex-shrink: 0;
}

/* ── Step: large faded background number ── */
.cq-step-card {
    position: relative; /* needed for ::after connector and .cq-step-bg-num */
}

.cq-step-bg-num {
    position: absolute;
    top: 0.5rem;
    right: 0.85rem;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(99, 102, 241, 0.065);
    font-family: 'Inter', system-ui, sans-serif;
    pointer-events: none;
    user-select: none;
}

/* ── Step connector arrows (desktop 3-col only) ── */
@media (min-width: 721px) {
    .cq-step-card:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -0.9rem;
        transform: translateY(-50%);
        border-top: 6px solid transparent;
        border-bottom: 6px solid transparent;
        border-left: 8px solid rgba(99, 102, 241, 0.22);
        z-index: 2;
    }
}

/* ── RTL overrides for Arabic ── */

/* Contact + confirmation pages */
html[dir="rtl"] .contact-page,
html[dir="rtl"] .confirmation-page {
    direction: rtl;
}

html[dir="rtl"] .contact-action-label,
html[dir="rtl"] .contact-name,
html[dir="rtl"] .contact-position,
html[dir="rtl"] .contact-company {
    text-align: center; /* centered layouts stay centered in RTL */
}

html[dir="rtl"] .save-contact-btn,
html[dir="rtl"] .ui-btn-primary,
html[dir="rtl"] .ui-btn-secondary {
    flex-direction: row-reverse;
}

/* Landing page section alignment */
html[lang="ar"] .cq-section-title,
html[lang="ar"] .cq-step-title,
html[lang="ar"] .cq-feat-title,
html[lang="ar"] .cq-step-desc,
html[lang="ar"] .cq-feat-desc,
html[lang="ar"] .cq-landing-tagline {
    text-align: start;
}

/* Flip Bootstrap accordion chevron for RTL */
html[lang="ar"] .cq-faq-accordion .accordion-button::after {
    margin-inline-start: auto;
    margin-inline-end: 0;
}

/* Sticky CTA: left edge in RTL to avoid overlap with text */
html[lang="ar"] .cq-sticky-cta {
    right: auto;
    left: 1rem;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .cq-blob,
    .cq-lang-btn-shimmer,
    .cq-scroll-hint i,
    .cq-landing-title {
        animation: none;
    }

    .cq-lang-btn {
        transition: box-shadow 0.15s ease;
    }

    .cq-sticky-cta {
        transition: opacity 0.15s ease;
        transform: none;
    }
}

/* ── Mobile: stack grids, tighten sections ── */
@media (max-width: 720px) {
    .cq-steps-grid,
    .cq-features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .cq-steps-section,
    .cq-features-section,
    .cq-faq-section {
        padding: 3rem 1rem;
    }

    .cq-faq-section { padding-bottom: 4rem; }

    .cq-step-card  { padding: 1.5rem; }
    .cq-feat-card  { padding: 1.5rem; }

    .cq-blob-1 { width: 300px; height: 300px; }
    .cq-blob-2 { width: 260px; height: 260px; }

    .cq-landing-nav { padding: 0.6rem 1rem; }
    /* At 640px the full names still fit comfortably; CTA hides at 480 */
}

@media (max-width: 480px) {
    .cq-landing-inner { gap: 1.5rem; }
    .cq-glass-card    { padding: 1.75rem 1.5rem; }
    .cq-nav-brand     { font-size: 0.9rem; }
    /* Hide nav CTA on very small screens — glass card buttons remain */
    .cq-nav-cta       { display: none; }
    /* Tighten stat strip padding */
    .cq-stat          { padding: 0 0.85rem; }
    /* Compact language switcher — full names, smaller text + padding */
    .cq-lang-switch   { gap: 0.05rem; padding: 0.18rem; }
    .cq-ls-btn        { padding: 0.24rem 0.48rem; font-size: 0.63rem; }
}

@media (max-width: 360px) {
    /* Extra-small: brand hides to give switcher full width */
    .cq-nav-brand     { display: none; }
    /* "کوردی سۆرانی" is the longest label; keep all four buttons on one line */
    .cq-lang-switch   { gap: 0.02rem; padding: 0.15rem; }
    .cq-ls-btn        { padding: 0.2rem 0.32rem; font-size: 0.57rem; }
}
