/* ============================================================================
 * TraPay — /نقد-کردن-وب-مانی custom layout
 * Sibling of cash-paypal.css. WebMoney blue palette. Scoped cw- classes only.
 * Service: نقد کردن وب مانی — FlashPay drawer webmoney:sell (cashout mode).
 * ============================================================================ */

:root {
    --cw-blue: #0070ba;
    --cw-blue-2: #1546a0;
    --cw-green: #16a34a;
    --cw-bg-1: #001a4d;
    --cw-bg-2: #0f172a;
}

/* HERO */
.cw-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cw-bg-1) 0%, var(--cw-bg-2) 100%);
    color: #f8fafc;
    padding: 5rem 1.5rem 6rem;
    isolation: isolate;
}
.cw-hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cw-hero__glow { position: absolute; width: 40rem; height: 40rem; border-radius: 50%; filter: blur(120px); opacity: 0.35; }
.cw-hero__glow--blue { background: var(--cw-blue-2); top: -10rem; right: -10rem; }
.cw-hero__glow--green { background: var(--cw-green); bottom: -15rem; left: -10rem; opacity: 0.4; }
.cw-hero__grid { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(255,255,255,0.08); }

.cw-hero__inner { position: relative; max-width: 72rem; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (min-width: 900px) { .cw-hero__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 5rem; } }

/* minmax(0,1fr) on the TRACK + min-width:0 on the ITEM both needed: a long LTR
   token (WMZ, WebMoney) sets the item's min-content, and a bare 1fr track grows to
   that min-content → column becomes wider than the viewport and shifts left in RTL. */
.cw-hero__inner > * { min-width: 0; }
.cw-hero__copy { max-width: 36rem; min-width: 0; }
.cw-title, .cw-lead { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.cw-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: rgba(26, 108, 180, 0.18);
    color: #7fb5e6;
    border: 1px solid rgba(47, 143, 214, 0.4);
    border-radius: 999px;
    font-size: 0.8125rem; font-weight: 600;
}
.cw-badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--cw-green); box-shadow: 0 0 12px var(--cw-green); animation: cw-pulse 2s ease-in-out infinite; }
@keyframes cw-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.cw-title {
    margin: 1.5rem 0 0;
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 1.5rem + 2vw, 3.2rem);
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.cw-title__accent {
    background: linear-gradient(120deg, var(--cw-blue-2) 0%, var(--cw-blue) 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.cw-lead { margin-top: 1.25rem; font-size: 1.0625rem; line-height: 1.95; color: rgba(248, 250, 252, 0.75); max-width: 32rem; }

/* SHARED H2 */
.cw-h2 {
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    line-height: 1.4;
    color: var(--ink, #111827);
    margin: 0 0 1.5rem;
}
.dark .cw-h2 { color: #f8fafc; }

/* WHY */
.cw-why { max-width: 72rem; margin: 0 auto; padding: 5rem 1.5rem; }
.cw-why__grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 700px) { .cw-why__grid { grid-template-columns: repeat(3, 1fr); } }
.cw-why__card {
    padding: 2rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.dark .cw-why__card { background: #1f2937; border-color: #374151; }
.cw-why__card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -16px rgba(0,0,0,0.15); }
.cw-why__icon {
    width: 48px; height: 48px; border-radius: 0.875rem;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
}
.cw-why__icon svg { width: 24px; height: 24px; }
.cw-why__icon--blue { background: color-mix(in srgb, var(--cw-blue) 12%, white); color: var(--cw-blue); }
.cw-why__icon--green { background: color-mix(in srgb, var(--cw-green) 12%, white); color: var(--cw-green); }
.cw-why__icon--amber { background: color-mix(in srgb, var(--accent, #f59e0b) 14%, white); color: var(--accent, #f59e0b); }
.cw-why__card h3 { margin: 0 0 0.5rem; font-size: 1.0625rem; font-weight: 700; color: var(--ink, #111827); }
.dark .cw-why__card h3 { color: #f8fafc; }
.cw-why__card p { margin: 0; font-size: 0.9375rem; line-height: 1.85; color: var(--muted, #6b7280); }

/* USES (4 use-case cards) */
.cw-uses { max-width: 72rem; margin: 0 auto; padding: 5rem 1.5rem; }
.cw-uses__sub { color: var(--muted, #6b7280); margin: -1rem 0 2rem; font-size: 0.9375rem; }
.cw-uses__grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .cw-uses__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cw-uses__grid { grid-template-columns: repeat(4, 1fr); } }
.cw-use {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.5rem; 
    background: white; border: 1px solid #e2e8f0; border-radius: 1.25rem;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.dark .cw-use { background: #1f2937; border-color: #374151; }
.cw-use:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -16px rgba(0,112,186,0.25); border-color: var(--cw-blue); }
.cw-use__icon { flex-shrink: 0;
    width: 44px; height: 44px; border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--cw-blue) 10%, white); color: var(--cw-blue);
    margin-bottom: 1rem;
}
.dark .cw-use__icon { background: color-mix(in srgb, var(--cw-blue) 22%, #1f2937); color: #7fb5e6; }
.cw-use__icon svg { width: 22px; height: 22px; }
.cw-use h3 { margin: 0 0 0.25rem; }
.cw-use h3 { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 700; color: var(--ink, #111827); }
.dark .cw-use h3 { color: #f8fafc; }
.cw-use p { margin: 0; font-size: 0.9rem; line-height: 1.8; color: var(--muted, #6b7280); }

/* FLOW (4 steps) */
.cw-flow { max-width: 72rem; margin: 0 auto; padding: 5rem 1.5rem; background: var(--brand-50, #eef4fc); }
.dark .cw-flow { background: #0b1220; }
.cw-flow__steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 700px) { .cw-flow__steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cw-flow__steps { grid-template-columns: repeat(4, 1fr); } }
.cw-flow__steps li {
    position: relative; padding: 2.5rem 1.5rem 1.75rem;
    background: white; border: 1px solid #e2e8f0; border-radius: 1.25rem;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.dark .cw-flow__steps li { background: #1f2937; border-color: #374151; }
.cw-flow__steps li:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -16px rgba(0,112,186,0.25); border-color: var(--cw-blue); }
.cw-flow__steps li span {
    position: absolute; top: -1rem; right: 1.5rem;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--cw-blue); color: white;
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-weight: 800; font-size: 0.95rem;
    border-radius: 50%; box-shadow: 0 6px 18px -4px rgba(0,112,186,0.45);
}
.cw-flow__steps li h3 { margin: 0 0 0.5rem; font-weight: 700; font-size: 1.0625rem; color: var(--ink, #111827); }
.dark .cw-flow__steps li h3 { color: #f8fafc; }
.cw-flow__steps li p { margin: 0; font-size: 0.9375rem; line-height: 1.75; color: var(--muted, #6b7280); }

/* FAQ */
.cw-faq { max-width: 60rem; margin: 0 auto; padding: 4rem 1.5rem; }
.cw-faq details { background: white; border: 1px solid #e2e8f0; border-radius: 1rem; padding: 1.25rem 1.5rem; margin-bottom: 0.75rem; transition: border-color 0.2s, background 0.2s; }
.dark .cw-faq details { background: #1f2937; border-color: #374151; }
.cw-faq details[open] { border-color: var(--cw-blue); background: color-mix(in srgb, var(--cw-blue) 3%, white); }
.dark .cw-faq details[open] { background: color-mix(in srgb, var(--cw-blue) 12%, #1f2937); }
.cw-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1rem; color: var(--ink, #111827); }
.dark .cw-faq summary { color: #f8fafc; }
.cw-faq summary::-webkit-details-marker { display: none; }
.cw-faq__chev { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 300; background: color-mix(in srgb, var(--cw-blue) 12%, white); color: var(--cw-blue); border-radius: 50%; transition: transform 0.25s, background 0.25s; }
.cw-faq details[open] .cw-faq__chev { transform: rotate(45deg); background: var(--cw-blue); color: white; }
.cw-faq p { margin: 1rem 0 0; color: var(--muted, #6b7280); line-height: 2; font-size: 0.9375rem; }
.cw-faq p a { color: var(--brand, #0d3e7e); font-weight: 600; text-decoration: none; }
.cw-faq p a:hover { text-decoration: underline; }

/* ARTICLE (SEO long-form) */
.cw-article { max-width: 60rem; margin: 0 auto; padding: 4rem 1.5rem; }
.cw-article__inner h2.cw-h2 { margin-bottom: 1.5rem; }
.cw-article__inner h3 {
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-weight: 700; font-size: 1.25rem; line-height: 1.5;
    color: var(--ink, #111827);
    margin: 2.5rem 0 1rem;
}
.dark .cw-article__inner h3 { color: #f8fafc; }
.cw-article__inner p { margin: 0 0 1rem; font-size: 1rem; line-height: 2; color: var(--ink, #111827); }
.dark .cw-article__inner p { color: #e5e7eb; }
.cw-article__inner ul { margin: 0 0 1.5rem; padding-inline-start: 1.5rem; list-style: disc; }
.cw-article__inner li { margin: 0.5rem 0; font-size: 1rem; line-height: 1.95; color: var(--ink, #111827); }
.dark .cw-article__inner li { color: #e5e7eb; }
.cw-article__inner li strong { color: var(--cw-blue); }
.dark .cw-article__inner li strong { color: #7fb5e6; }
.cw-article__inner a { color: var(--brand, #0d3e7e); font-weight: 600; text-decoration: none; }
.cw-article__inner a:hover { text-decoration: underline; }

/* RELATED (pillar → related down-links) */
.cw-related { max-width: 72rem; margin: 0 auto; padding: 3rem 1.5rem 1rem; }
.cw-related__grid { display: grid; grid-template-columns: 1fr; gap: 0.85rem; }
@media (min-width: 700px) { .cw-related__grid { grid-template-columns: repeat(2, 1fr); } }
.cw-related__grid a {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 1rem 1.25rem; border: 1px solid #e2e8f0; border-radius: 0.875rem;
    background: white; color: var(--ink, #111827); text-decoration: none; font-weight: 600;
    font-size: 0.95rem; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.dark .cw-related__grid a { background: #1f2937; border-color: #374151; color: #f8fafc; }
.cw-related__grid a::before { content: "←"; color: var(--cw-blue); font-weight: 800; }
.cw-related__grid a:hover { border-color: var(--cw-blue); transform: translateY(-2px); box-shadow: 0 12px 30px -14px rgba(0,112,186,0.4); }

/* FINAL CTA */
.cw-cta-end { padding: 4rem 1.5rem 6rem; }
.cw-cta-end__inner {
    max-width: 60rem; margin: 0 auto;
    background: linear-gradient(135deg, var(--cw-blue) 0%, #00256b 100%);
    border-radius: 1.75rem; padding: 2.5rem;
    display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: center;
    color: white;
    box-shadow: 0 30px 70px -20px rgba(0,112,186,0.45);
}
@media (min-width: 700px) { .cw-cta-end__inner { grid-template-columns: auto 1fr auto; padding: 2rem 3rem; gap: 2rem; } }
.cw-cta-end__coin {
    width: 64px; height: 64px;
    background: white;
    border-radius: 1rem; padding: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 30px -8px rgba(0,0,0,0.3);
}
.cw-cta-end__coin img { width: 100%; height: 100%; object-fit: contain; }
.cw-cta-end__inner h2 { margin: 0; font-family: 'Estedad','Vazirmatn',sans-serif; font-weight: 800; font-size: 1.5rem; }
.cw-cta-end__inner p { margin: 0.35rem 0 0; color: rgba(255,255,255,0.85); font-size: 0.9375rem; }
.cw-cta-end__inner a {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: white; color: var(--cw-blue);
    padding: 0.85rem 1.5rem; border-radius: 0.875rem;
    font-weight: 700; font-size: 0.9375rem; text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s; white-space: nowrap;
}
.cw-cta-end__inner a:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -8px rgba(0,0,0,0.3); }
.cw-cta-end__inner a svg { width: 16px; height: 16px; }

/* HERO CTA (inside the copy column, like the paypal landing) */
.cw-hero__cta {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
    margin-top: 1.5rem; padding: 1rem 1.5rem;
    background: linear-gradient(120deg, var(--cw-blue) 0%, var(--cw-blue-2) 100%);
    color: white; border-radius: 0.875rem;
    font-weight: 700; font-size: 0.95rem; text-decoration: none;
    box-shadow: 0 12px 32px -8px rgba(0,112,186,0.6);
    transition: transform 0.2s, box-shadow 0.2s;
}
.cw-hero__cta:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -8px rgba(0,112,186,0.7); }
.cw-hero__cta svg { width: 18px; height: 18px; }

/* HERO WALLET VISUAL (decorative WMZ purse mock — mirrors the paypal landing) */
.cw-visual {
    position: relative;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #003087 0%, #0070ba 58%, #1546a0 100%);
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
    padding: 1.75rem;
    color: #fff; overflow: hidden;
}
.cw-visual::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% 10%, rgba(255,255,255,0.20), transparent 42%); pointer-events: none; }
.cw-visual__head { position: relative; z-index: 1; display: flex; align-items: center; gap: 1rem; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.18); }
.cw-visual__logo { flex-shrink: 0; width: 64px; height: 64px; background: #fff; border-radius: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 30px -10px rgba(0,0,0,0.45); }
.cw-visual__logo img { width: 40px; height: 40px; object-fit: contain; }
.cw-visual__id strong { display: block; font-family: 'Estedad','Vazirmatn',sans-serif; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.01em; }
.cw-visual__id span { display: block; margin-top: 0.15rem; font-size: 0.85rem; opacity: 0.8; }
.cw-visual__list { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.cw-visual__list li { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; font-weight: 600; }
.cw-visual__list svg { flex-shrink: 0; width: 22px; height: 22px; padding: 6px; box-sizing: content-box; background: rgba(255,255,255,0.16); border-radius: 10px; }


/* WAYS — two compare cards (pay-with-paypal vs charge-and-pay-yourself) */
.cw-ways { max-width: 72rem; margin: 0 auto; padding: 5rem 1.5rem; }
.cw-ways__sub { color: var(--muted, #6b7280); margin: -1rem 0 2rem; font-size: 0.9375rem; }
.cw-ways__grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 800px) { .cw-ways__grid { grid-template-columns: repeat(2, 1fr); } }
.cw-way { background: white; border: 1px solid #e2e8f0; border-radius: 1.25rem; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; display: flex; flex-direction: column; }
.dark .cw-way { background: #1f2937; border-color: #374151; }
.cw-way:hover { transform: translateY(-4px); box-shadow: 0 20px 50px -16px rgba(0,0,0,0.15); }
.cw-way--pick { border-color: var(--cw-blue); box-shadow: 0 0 0 4px rgba(0, 112, 186, 0.08); }
.cw-way__head { display: grid; grid-template-columns: auto 1fr auto; gap: 0.85rem; align-items: center; padding: 1.25rem 1.5rem; background: color-mix(in srgb, var(--cw-blue) 8%, white); border-bottom: 1px solid color-mix(in srgb, var(--cw-blue) 15%, transparent); }
.dark .cw-way__head { background: color-mix(in srgb, var(--cw-blue) 18%, #1f2937); }
.cw-way__icon { width: 40px; height: 40px; background: var(--cw-blue); color: white; border-radius: 0.6rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px -6px rgba(0,112,186,0.6); }
.cw-way__icon svg { width: 22px; height: 22px; }
.cw-way__head strong { font-size: 1rem; font-weight: 800; color: var(--ink, #111827); }
.dark .cw-way__head strong { color: #f8fafc; }
.cw-way__head small { display: block; font-size: 0.8125rem; color: var(--muted, #6b7280); margin-top: 2px; }
.cw-way__star { font-size: 0.72rem; font-weight: 700; color: white; background: var(--cw-blue); padding: 0.3rem 0.65rem; border-radius: 999px; white-space: nowrap; }
.cw-way__body { padding: 1.25rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.cw-way__body ul { margin: 0 0 1.25rem; padding: 0; list-style: none; display: grid; gap: 0.6rem; flex: 1; }
.cw-way__body li { position: relative; padding-inline-start: 1.6rem; font-size: 0.9375rem; line-height: 1.8; color: var(--ink, #111827); }
.dark .cw-way__body li { color: #e5e7eb; }
.cw-way__body li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 0; color: var(--cw-blue); font-weight: 800; }
.cw-way__cta { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.85rem 1.25rem; border-radius: 0.75rem; margin-top: auto; background: linear-gradient(120deg, var(--cw-blue) 0%, var(--cw-blue-2) 100%); color: white; font-weight: 700; font-size: 0.9375rem; text-decoration: none; box-shadow: 0 10px 26px -10px rgba(0,48,135,0.6); transition: transform 0.15s, box-shadow 0.15s; }
.cw-way__cta:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(0,48,135,0.75); }
.cw-way__cta svg { width: 16px; height: 16px; }
