/* ============================================================================
 * TraPay — /خرید-ترون-trx custom layout
 * Crypto-product page: interactive calc + wallet-mockup + network compare.
 * Self-contained — no DS classes, owns its visual language.
 * ============================================================================ */

:root {
    --trx-red: #EB0029;
    --trx-bg-1: #0f172a;
    --trx-bg-2: #1e293b;
}

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

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

.trx-hero__copy { max-width: 36rem; }

.trx-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: rgba(235, 0, 41, 0.12);
    color: #fda4af;
    border: 1px solid rgba(235, 0, 41, 0.35);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}
.trx-badge__dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--trx-red);
    box-shadow: 0 0 12px var(--trx-red);
    animation: trx-pulse 2s ease-in-out infinite;
}
@keyframes trx-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.trx-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;
}
.trx-title__accent {
    background: linear-gradient(120deg, var(--trx-red) 0%, #f97316 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.trx-lead {
    margin-top: 1.25rem;
    font-size: 1.0625rem; line-height: 1.95;
    color: rgba(248, 250, 252, 0.75);
    max-width: 32rem;
}

/* ------- CALCULATOR ------- */
.trx-calc {
    position: relative;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.5rem;
    padding: 1.75rem;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
}
.trx-calc__header {
    display: flex; align-items: center; gap: 0.85rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 1.5rem;
}
.trx-calc__mark {
    width: 48px; height: 48px;
    background: white;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px -8px rgba(235,0,41,0.6);
}
.trx-calc__mark img { width: 30px; height: 30px; }
.trx-calc__title { font-size: 1.0625rem; font-weight: 700; color: #f8fafc; }
.trx-calc__sub { font-size: 0.8125rem; color: rgba(248,250,252,0.55); margin-top: 2px; }

.trx-calc__field {
    display: block;
    margin-bottom: 0;
}
.trx-calc__field + .trx-calc__field { margin-top: 0.5rem; }
.trx-calc__label {
    display: block;
    font-size: 0.8125rem; font-weight: 600;
    color: rgba(248,250,252,0.55);
    margin-bottom: 0.5rem;
}
.trx-calc__input {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0.875rem;
    padding: 0.85rem 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.trx-calc__input:focus-within {
    border-color: rgba(235,0,41,0.5);
    background: rgba(255,255,255,0.08);
}
.trx-calc__input input,
.trx-calc__input output {
    flex: 1; min-width: 0;
    background: transparent;
    border: none; outline: none;
    color: #f8fafc;
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-size: 1.5rem; font-weight: 700;
    direction: ltr; text-align: end;
    font-variant-numeric: tabular-nums;
}
.trx-calc__unit {
    flex-shrink: 0;
    font-size: 0.875rem; font-weight: 600;
    color: rgba(248,250,252,0.55);
}
.trx-calc__unit--brand { color: var(--trx-red); }

.trx-calc__swap {
    display: flex; align-items: center; justify-content: center;
    margin: 0.75rem auto;
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--trx-red) 0%, #f97316 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(235,0,41,0.5);
    color: white;
}
.trx-calc__swap svg { width: 16px; height: 16px; }

.trx-calc__field--out .trx-calc__input { border-color: rgba(235,0,41,0.3); }

.trx-calc__cta {
    display: flex; align-items: center; justify-content: center; gap: 0.6rem;
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(120deg, var(--trx-red) 0%, #f97316 100%);
    color: white;
    border-radius: 0.875rem;
    font-weight: 700; font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 12px 32px -8px rgba(235,0,41,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}
.trx-calc__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -8px rgba(235,0,41,0.6);
}
.trx-calc__cta svg { width: 18px; height: 18px; }

.trx-calc__meta {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.8125rem;
    color: rgba(248,250,252,0.55);
    text-align: center;
}
.trx-calc__meta strong { color: #f8fafc; font-weight: 600; }

/* ------- SHARED H2 ------- */
.trx-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 .trx-h2 { color: #f8fafc; }

/* ------- FLOW ------- */
.trx-flow {
    max-width: 60rem;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}
.trx-flow__steps {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 700px) {
    .trx-flow__steps { grid-template-columns: repeat(3, 1fr); }
}
.trx-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 .trx-flow__steps li { background: #1f2937; border-color: #374151; }
.trx-flow__steps li:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px -16px rgba(13, 62, 126, 0.25);
    border-color: var(--brand, #0d3e7e);
}
.trx-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(--brand, #0d3e7e);
    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(13,62,126,0.45);
}
.trx-flow__steps li h3 {
    margin: 0 0 0.5rem;
    font-weight: 700; font-size: 1.0625rem;
    color: var(--ink, #111827);
}
.dark .trx-flow__steps li h3 { color: #f8fafc; }
.trx-flow__steps li p {
    margin: 0;
    font-size: 0.9375rem; line-height: 1.75;
    color: var(--muted, #6b7280);
}

/* ------- WHY + WALLET MOCKUP ------- */
.trx-why {
    background: var(--brand-50, #eef4fc);
    padding: 5rem 1.5rem;
}
.dark .trx-why { background: #0b1220; }
.trx-why__split {
    max-width: 72rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 900px) {
    .trx-why__split { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; }
}
.trx-why__story p {
    margin: 0 0 1rem;
    font-size: 1rem; line-height: 2;
    color: var(--ink, #111827);
}
.dark .trx-why__story p { color: #e5e7eb; }
.trx-why__story em {
    font-style: normal;
    background: linear-gradient(transparent 65%, rgba(235,0,41,0.25) 65%);
    padding: 0 0.25rem;
    font-weight: 600;
}
.trx-why__highlight {
    margin-top: 1.5rem !important;
    padding: 1.25rem 1.5rem;
    background: white;
    border-right: 4px solid var(--trx-red);
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px -12px rgba(0,0,0,0.1);
}
.dark .trx-why__highlight { background: #1f2937; }

.trx-wallet-card {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.4);
    color: #f8fafc;
}
.trx-wallet-card__head {
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.8125rem; font-weight: 600;
    color: rgba(248,250,252,0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.trx-wallet-card__body {
    padding: 1.25rem;
    display: grid;
    gap: 0.75rem;
    position: relative;
}
.trx-wallet-card__line {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.04);
    border-radius: 0.85rem;
    transition: background 0.25s;
}
.trx-wallet-card__line--after {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.trx-wallet-card__line strong { display: block; font-size: 0.95rem; font-weight: 700; }
.trx-wallet-card__line small {
    display: block;
    font-size: 0.8125rem;
    color: rgba(248,250,252,0.55);
    font-variant-numeric: tabular-nums;
    direction: ltr; text-align: end;
}
.trx-wallet-card__locked {
    font-size: 0.75rem; font-weight: 600;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
}
.trx-wallet-card__unlocked {
    font-size: 0.75rem; font-weight: 600;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.15);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
}
.trx-wallet-card__arrow {
    display: flex; justify-content: center;
    margin: 0.5rem 0;
    color: rgba(248,250,252,0.4);
}
.trx-wallet-card__arrow svg { width: 24px; height: 24px; }

.trx-coin {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-family: 'Estedad','Vazirmatn',sans-serif;
}
.trx-coin--usdt { background: #10b981; color: white; }
.trx-coin--trx { background: white; padding: 6px; }
.trx-coin--trx img { width: 100%; height: 100%; }

/* ------- NETWORKS ------- */
.trx-networks {
    max-width: 72rem;
    margin: 0 auto;
    padding: 5rem 1.5rem;
}
.trx-networks__sub {
    color: var(--muted, #6b7280);
    margin: -1rem 0 2rem;
    font-size: 0.9375rem;
}
.trx-networks__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 700px) {
    .trx-networks__grid { grid-template-columns: repeat(3, 1fr); }
}
.trx-net {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}
.dark .trx-net { background: #1f2937; border-color: #374151; }
.trx-net:hover { transform: translateY(-4px); box-shadow: 0 20px 50px -16px rgba(0,0,0,0.15); }
.trx-net--pick {
    border-color: var(--trx-red);
    box-shadow: 0 0 0 4px rgba(235, 0, 41, 0.08);
}
.trx-net__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(--c) 8%, white);
    border-bottom: 1px solid color-mix(in srgb, var(--c) 15%, transparent);
}
.dark .trx-net__head { background: color-mix(in srgb, var(--c) 18%, #1f2937); }
.trx-net__head img,
.trx-net__icon {
    width: 36px; height: 36px;
    background: white;
    border-radius: 0.5rem;
    padding: 4px;
    display: flex; align-items: center; justify-content: center;
    color: var(--c);
    font-size: 1.4rem; font-weight: 800;
    box-shadow: 0 4px 12px -4px color-mix(in srgb, var(--c) 50%, transparent);
}
.trx-net__head strong { font-size: 1rem; font-weight: 800; color: var(--ink, #111827); }
.dark .trx-net__head strong { color: #f8fafc; }
.trx-net__head small { display: block; font-size: 0.8125rem; color: var(--muted, #6b7280); margin-top: 2px; }
.trx-net__star {
    font-size: 0.75rem; font-weight: 700;
    color: white;
    background: var(--trx-red);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    white-space: nowrap;
}

.trx-net__spec {
    margin: 0; padding: 1rem 1.5rem;
}
.trx-net__spec > div {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px dashed #e2e8f0;
}
.dark .trx-net__spec > div { border-color: #374151; }
.trx-net__spec > div:last-child { border-bottom: none; }
.trx-net__spec dt {
    font-size: 0.8125rem;
    color: var(--muted, #6b7280);
}
.trx-net__spec dd {
    margin: 0;
    font-size: 0.9375rem; font-weight: 600;
    color: var(--ink, #111827);
}
.dark .trx-net__spec dd { color: #f8fafc; }
.trx-net__highlight {
    color: var(--trx-red) !important;
    font-size: 1.0625rem !important; font-weight: 800 !important;
}

/* ------- FAQ ------- */
.trx-faq {
    max-width: 60rem;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}
.trx-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 .trx-faq details { background: #1f2937; border-color: #374151; }
.trx-faq details[open] { border-color: var(--brand, #0d3e7e); background: color-mix(in srgb, var(--brand) 3%, white); }
.dark .trx-faq details[open] { background: color-mix(in srgb, var(--brand) 12%, #1f2937); }
.trx-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 .trx-faq summary { color: #f8fafc; }
.trx-faq summary::-webkit-details-marker { display: none; }
.trx-faq__chev {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 300;
    background: var(--brand-50, #eef4fc);
    color: var(--brand, #0d3e7e);
    border-radius: 50%;
    transition: transform 0.25s, background 0.25s;
}
.trx-faq details[open] .trx-faq__chev {
    transform: rotate(45deg);
    background: var(--brand, #0d3e7e);
    color: white;
}
.trx-faq p {
    margin: 1rem 0 0;
    color: var(--muted, #6b7280);
    line-height: 2; font-size: 0.9375rem;
}

/* ------- ARTICLE (SEO long-form) ------- */
.trx-article {
    max-width: 60rem;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}
.trx-article__inner h2.trx-h2 { margin-bottom: 1.5rem; }
.trx-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 .trx-article__inner h3 { color: #f8fafc; }
.trx-article__inner p {
    margin: 0 0 1rem;
    font-size: 1rem; line-height: 2;
    color: var(--ink, #111827);
}
.dark .trx-article__inner p { color: #e5e7eb; }
.trx-article__inner ul {
    margin: 0 0 1.5rem;
    padding-inline-start: 1.5rem;
    list-style: disc;
}
.trx-article__inner li {
    margin: 0.5rem 0;
    font-size: 1rem; line-height: 1.95;
    color: var(--ink, #111827);
}
.dark .trx-article__inner li { color: #e5e7eb; }
.trx-article__inner li strong { color: var(--brand, #0d3e7e); }
.dark .trx-article__inner li strong { color: #93c5fd; }
.trx-article__inner a { color: var(--brand, #0d3e7e); font-weight: 600; text-decoration: none; }
.trx-article__inner a:hover { text-decoration: underline; }

/* ------- FINAL CTA ------- */
.trx-cta-end {
    padding: 4rem 1.5rem 6rem;
}
.trx-cta-end__inner {
    max-width: 60rem;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--brand, #0d3e7e) 0%, #1f3d64 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(13,62,126,0.45);
}
@media (min-width: 700px) {
    .trx-cta-end__inner {
        grid-template-columns: auto 1fr auto;
        padding: 2rem 3rem;
        gap: 2rem;
    }
}
.trx-cta-end__inner img {
    width: 64px; height: 64px;
    background: white;
    border-radius: 1rem;
    padding: 10px;
    box-shadow: 0 12px 30px -8px rgba(0,0,0,0.3);
}
.trx-cta-end__inner h2 {
    margin: 0;
    font-family: 'Estedad','Vazirmatn',sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
}
.trx-cta-end__inner p {
    margin: 0.35rem 0 0;
    color: rgba(255,255,255,0.8);
    font-size: 0.9375rem;
}
.trx-cta-end__inner a {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: white;
    color: var(--brand, #0d3e7e);
    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;
}
.trx-cta-end__inner a:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -8px rgba(0,0,0,0.3);
}
.trx-cta-end__inner a svg { width: 16px; height: 16px; }

/* RTL flip helper for arrow svgs */
[dir="rtl"] .rtl-flip { transform: scaleX(-1); }
