/* GCC resident pages (/uae-visa-for-{country}-living-in and the GCC hub).
   Scoped under .rv so nothing leaks into other templates. Tokens follow the
   site brand from style-updated.css (crimson + gold on warm surfaces). */

.rv {
    --rv-crimson: #8b1a1a;
    --rv-crimson-deep: #6b1212;
    --rv-gold: #c8a84b;
    --rv-ink: #2a1e15;
    --rv-ink-soft: #4f4239;
    --rv-muted: #5f5a55;
    --rv-surface: #ffffff;
    --rv-warm: #faf7f2;
    --rv-warm-2: #f3ede3;
    --rv-line: #e2d9cb;
    --rv-ok: #166534;
    --rv-ok-bg: #f0fdf4;
    --rv-radius: 14px;
    --rv-shadow: 0 1px 2px rgba(42, 30, 21, .06), 0 8px 24px rgba(42, 30, 21, .07);

    color: var(--rv-ink);
    font-size: 16px;
    line-height: 1.65;
    text-align: left;
    padding: 0;
}

.rv *, .rv *::before, .rv *::after { box-sizing: border-box; }

.rv h1, .rv h2, .rv h3, .rv p, .rv ul, .rv ol { margin: 0; padding: 0; }
.rv ul, .rv ol { list-style: none; }

.rv a { color: var(--rv-crimson); text-decoration: underline; text-underline-offset: 2px; }
.rv a:hover { color: var(--rv-crimson-deep); }

/* Component links opt out of the generic link style (specificity beats `.rv a`) */
.rv a.rv-btn, .rv a.rv-pill, .rv a.rv-country { text-decoration: none; }
.rv a.rv-btn { color: #fff; }
.rv a.rv-btn:hover { color: #fff; }
.rv a.rv-btn--ghost { color: var(--rv-crimson); }
.rv a.rv-btn--ghost:hover { color: #fff; }
.rv a.rv-pill { color: var(--rv-ink); }
.rv a.rv-pill:hover { color: var(--rv-crimson); }
.rv a.rv-country, .rv a.rv-country:hover { color: var(--rv-ink); }

.rv a:focus-visible,
.rv button:focus-visible,
.rv select:focus-visible,
.rv summary:focus-visible {
    outline: 3px solid var(--rv-gold);
    outline-offset: 2px;
}

.rv-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.rv-ico { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Hero ---------- */
.rv-hero { background: linear-gradient(180deg, var(--rv-warm) 0%, var(--rv-warm-2) 100%); border-bottom: 1px solid var(--rv-line); padding: 28px 0 44px; }

.rv-crumbs { font-size: 14px; color: var(--rv-muted); margin-bottom: 10px; }
.rv-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rv-crumbs li + li::before { content: "/"; margin-right: 6px; color: #a89b8c; }
.rv-crumbs a { color: var(--rv-ink-soft); display: inline-flex; align-items: center; min-height: 44px; }
.rv-crumbs [aria-current] { color: var(--rv-ink); font-weight: 500; }

.rv-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 44px; align-items: start; }

.rv-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: 999px; padding: 6px 14px 6px 8px; font-size: 14px; font-weight: 600; color: var(--rv-ink-soft); margin-bottom: 16px; }
.rv-eyebrow img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rv-line); }

.rv h1 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.12; letter-spacing: -.01em; font-weight: 700; color: var(--rv-ink); margin-bottom: 16px; text-align: left; }

.rv-lead { font-size: 18px; line-height: 1.6; color: var(--rv-ink-soft); max-width: 60ch; }
.rv-lead strong { color: var(--rv-ink); }

.rv-chips { display: grid; grid-template-columns: repeat(2, max-content); gap: 10px; margin-top: 22px; }
.rv-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: 10px; padding: 9px 14px; font-size: 14.5px; font-weight: 500; color: var(--rv-ink); }
.rv-chip .rv-ico { color: var(--rv-crimson); }

/* ---------- Apply card ---------- */
.rv-apply { background: var(--rv-surface); border: 1px solid var(--rv-line); border-top: 4px solid var(--rv-crimson); border-radius: var(--rv-radius); box-shadow: var(--rv-shadow); padding: 26px; }
.rv-apply h2 { font-size: 21px; line-height: 1.25; font-weight: 700; margin-bottom: 4px; }
.rv-apply-sub { color: var(--rv-muted); font-size: 15px; margin-bottom: 18px; }

.rv-locked { display: flex; align-items: center; gap: 10px; background: var(--rv-warm); border: 1px dashed #cdbfa9; border-radius: 10px; padding: 10px 14px; font-size: 15px; margin-bottom: 16px; }
.rv-locked img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rv-line); }
.rv-locked span { color: var(--rv-muted); }
.rv-locked strong { display: block; color: var(--rv-ink); line-height: 1.25; }

.rv-field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.rv-field select { width: 100%; min-height: 50px; padding: 10px 14px; font-size: 16px; color: var(--rv-ink); background-color: #fff; border: 1.5px solid #b9ab97; border-radius: 10px; }
.rv-field select:hover { border-color: var(--rv-crimson); }

.rv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 16px; padding: 12px 20px; font-size: 17px; font-weight: 700; color: #fff; background: var(--rv-crimson); border: 0; border-radius: 10px; cursor: pointer; text-decoration: none; touch-action: manipulation; transition: background-color .18s ease, transform .18s ease; }
.rv-btn:hover { background: var(--rv-crimson-deep); color: #fff; }
.rv-btn:active { transform: translateY(1px); }
.rv-btn .rv-ico { transition: transform .18s ease; }
.rv-btn:hover .rv-ico { transform: translateX(3px); }
.rv-btn--ghost { background: transparent; color: var(--rv-crimson); border: 1.5px solid var(--rv-crimson); width: auto; margin-top: 12px; }
.rv-btn--ghost:hover { background: var(--rv-crimson); color: #fff; }

.rv-apply-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; color: var(--rv-muted); font-size: 14px; }
.rv-apply-note .rv-ico { width: 18px; height: 18px; margin-top: 3px; color: var(--rv-ok); }

/* ---------- Body layout ---------- */
.rv-body { padding: 44px 0 56px; background: var(--rv-surface); }
.rv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.rv-main > * + * { margin-top: 44px; }
.rv-aside { position: sticky; top: 20px; display: grid; gap: 20px; }

.rv h2.rv-h2 { font-size: 26px; line-height: 1.25; font-weight: 700; margin-bottom: 8px; }
.rv-h2-sub { color: var(--rv-muted); margin-bottom: 18px; max-width: 62ch; }

/* "Check first" cards */
.rv-steps { display: grid; gap: 14px; counter-reset: rv; }
.rv-step { position: relative; background: var(--rv-warm); border: 1px solid var(--rv-line); border-radius: 12px; padding: 16px 18px 16px 64px; counter-increment: rv; }
.rv-step::before { content: counter(rv); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--rv-crimson); border-radius: 50%; }

/* Eligibility list */
.rv-checks { display: grid; gap: 12px; }
.rv-checks li { display: flex; gap: 12px; align-items: flex-start; }
.rv-checks .rv-ico { color: var(--rv-ok); margin-top: 3px; }
.rv-callout { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; background: var(--rv-warm); border-left: 4px solid var(--rv-gold); border-radius: 8px; padding: 14px 16px; }
.rv-callout .rv-ico { color: var(--rv-crimson); margin-top: 3px; }

/* Documents */
.rv-docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rv-doc { display: flex; gap: 14px; align-items: flex-start; background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: 12px; padding: 16px; }
.rv-doc-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; background: #fdf1f1; color: var(--rv-crimson); border-radius: 10px; }
.rv-doc strong { display: block; line-height: 1.35; }
.rv-doc small { display: block; color: var(--rv-muted); font-size: 14px; line-height: 1.45; margin-top: 2px; }
.rv-tag { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #7a5a00; background: #fbf1cf; border-radius: 6px; padding: 2px 8px; margin-bottom: 4px; }

/* Fees */
.rv-table-wrap { border: 1px solid var(--rv-line); border-radius: 12px; overflow: hidden; background: var(--rv-surface); }
.rv-table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.rv-table th { text-align: left; background: var(--rv-warm-2); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--rv-line); }
.rv-table td { padding: 13px 16px; border-bottom: 1px solid #eee5d8; vertical-align: top; }
.rv-table tr:last-child td { border-bottom: 0; }
.rv-table tbody tr:nth-child(even) { background: #fdfbf7; }
.rv-table .rv-price { font-weight: 700; color: var(--rv-crimson); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.rv-table th:last-child { text-align: right; }
.rv-fee-foot { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 14px; color: var(--rv-ink-soft); font-size: 15px; }
.rv-fee-foot strong { color: var(--rv-ink); }
.rv-fee-foot a { display: inline-flex; align-items: center; min-height: 44px; }

/* FAQ */
.rv-faq { border: 1px solid var(--rv-line); border-radius: 12px; overflow: hidden; background: var(--rv-surface); }
.rv-faq details + details { border-top: 1px solid var(--rv-line); }
.rv-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 18px; cursor: pointer; list-style: none; }
.rv-faq summary::-webkit-details-marker { display: none; }
.rv-faq summary:hover { background: var(--rv-warm); }
.rv-faq h3 { font-size: 17px; line-height: 1.4; font-weight: 600; margin: 0; }
.rv-faq .rv-ico { transition: transform .2s ease; color: var(--rv-crimson); }
.rv-faq details[open] > summary { background: var(--rv-warm); }
.rv-faq details[open] > summary .rv-ico { transform: rotate(180deg); }
.rv-faq-a { padding: 4px 18px 18px; color: var(--rv-ink-soft); max-width: 70ch; }

/* Aside cards */
.rv-card { background: var(--rv-warm); border: 1px solid var(--rv-line); border-radius: var(--rv-radius); padding: 20px; }
.rv-card h2, .rv-card h3 { font-size: 18px; line-height: 1.3; font-weight: 700; margin-bottom: 6px; }
.rv-card p { color: var(--rv-ink-soft); font-size: 15px; }
.rv-card--dark { background: var(--rv-crimson); border-color: var(--rv-crimson); color: #fff; }
.rv-card--dark p, .rv-card--dark h3 { color: #fff; }
.rv .rv-card--dark a.rv-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .8); }
.rv .rv-card--dark a.rv-btn--ghost:hover { background: #fff; color: var(--rv-crimson); }

/* Other countries */
.rv-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.rv-pill { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px 8px 10px; background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: 999px; font-weight: 600; color: var(--rv-ink); text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease; }
.rv-pill:hover { border-color: var(--rv-crimson); box-shadow: var(--rv-shadow); color: var(--rv-crimson); }
.rv-pill img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rv-line); }
.rv-links { margin-top: 16px; font-size: 15px; color: var(--rv-ink-soft); }

/* ---------- Hub ---------- */
.rv-country-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rv-country { display: flex; flex-direction: column; gap: 10px; min-height: 100%; padding: 22px; background: var(--rv-surface); border: 1px solid var(--rv-line); border-radius: var(--rv-radius); color: var(--rv-ink); text-decoration: none; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.rv-country:hover { border-color: var(--rv-crimson); box-shadow: var(--rv-shadow); transform: translateY(-2px); color: var(--rv-ink); }
.rv-country img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--rv-line); }
.rv-country h3 { font-size: 19px; line-height: 1.3; font-weight: 700; }
.rv-country p { color: var(--rv-muted); font-size: 15px; flex: 1; }
.rv-country-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--rv-crimson); }
.rv-hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .rv-hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .rv-layout { grid-template-columns: 1fr; }
    .rv-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rv-hub-grid { grid-template-columns: 1fr; }
    .rv-country-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .rv-wrap { padding: 0 16px; }
    .rv-hero { padding: 20px 0 32px; }
    .rv-lead { font-size: 17px; }
    .rv-apply { padding: 20px; }
    .rv-body { padding: 32px 0 44px; }
    .rv-main > * + * { margin-top: 36px; }
    .rv h2.rv-h2 { font-size: 23px; }
    .rv-docs { grid-template-columns: 1fr; }
    .rv-country-grid { grid-template-columns: 1fr; }
    .rv-aside { grid-template-columns: 1fr; }
    .rv-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    /* Fee table becomes stacked cards */
    .rv-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .rv-table, .rv-table tbody, .rv-table tr, .rv-table td { display: block; width: 100%; }
    .rv-table tbody tr { padding: 12px 16px; border-bottom: 1px solid var(--rv-line); }
    .rv-table tbody tr:last-child { border-bottom: 0; }
    .rv-table td { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border: 0; text-align: right; }
    .rv-table td::before { content: attr(data-label); font-weight: 600; color: var(--rv-muted); text-align: left; flex: 0 0 auto; }
    .rv-table td.rv-name { font-weight: 700; text-align: left; display: block; padding-bottom: 6px; }
    .rv-table td.rv-name::before { content: none; }
    .rv-table .rv-price { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .rv *, .rv *::before, .rv *::after { transition: none !important; animation: none !important; }
    .rv-country:hover, .rv-btn:hover .rv-ico { transform: none; }
}
