:root {
    --bg: #f5f7fb;
    --bg-soft: rgba(255, 255, 255, 0.78);
    --surface: #ffffff;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #fbbf24;
    --text: #1a1c24;
    --text-light: #5b6475;
    --border: rgba(37, 99, 235, 0.12);
    --success: #16a34a;
    --danger: #dc2626;
    --neutral: #9ca3af;
    font-family: 'Vazirmatn', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 55%, #eef2ff 100%);
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: min(1100px, 90vw);
    margin: 0 auto;
}

.site-header {
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(31, 45, 61, 0.08);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.currency-menu {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    padding: 18px 0 26px;
}

.currency-menu .menu-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.currency-menu .menu-heading h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text);
}

.currency-menu .eyebrow {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    padding: 6px 12px;
    border-radius: 999px;
}

.search-field {
    position: relative;
    display: inline-flex;
    align-items: center;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 999px;
    padding: 6px 16px;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.search-field input[type="search"] {
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text);
    width: clamp(160px, 40vw, 260px);
    min-width: 0;
    direction: rtl;
    outline: none;
}

.search-field input[type="search"]::placeholder {
    color: var(--text-light);
}

.menu-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.menu-scroll::-webkit-scrollbar {
    height: 6px;
}

.menu-scroll::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.2);
    border-radius: 999px;
}

.currency-pill {
    flex: 0 0 auto;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.02));
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 16px;
    padding: 14px 18px;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    color: var(--text);
}

.currency-pill .pill-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.currency-pill:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
}

.currency-pill .pill-name {
    font-weight: 600;
    font-size: 15px;
}

.currency-pill .pill-code {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.currency-pill .pill-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
}

.currency-pill .pill-price small {
    font-size: 11px;
    font-weight: 500;
}

.currency-pill .pill-change {
    font-size: 13px;
    color: var(--text-light);
}

.currency-pill.trend-up .pill-change {
    color: var(--success);
}

.currency-pill.trend-down .pill-change {
    color: var(--danger);
}

.currency-pill.trend-neutral .pill-change {
    color: var(--text-light);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.logo-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.brand span {
    color: var(--text);
}

.tagline {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

.main-nav {
    display: flex;
    gap: 18px;
}

.main-nav a {
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--primary);
}

.cta {
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 14px;
    font-weight: 700;
    box-shadow: 0 12px 20px rgba(58, 123, 213, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(58, 123, 213, 0.35);
}


.hero {
    padding: 32px 0 60px;
}

.hero .container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hero-header {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: right;
}

.hero-eyebrow {
    align-self: flex-start;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 6px 14px;
    border-radius: 999px;
}

.hero-header h1 {
    font-size: clamp(26px, 4vw, 34px);
    margin: 0;
}

.hero-header p {
    color: var(--text-light);
    line-height: 1.9;
    margin: 0;
}

.hero-update {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

.hero-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.hero-panel {
    background: var(--surface);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.08);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.panel-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-header h2 {
    margin: 0;
    font-size: 24px;
    color: var(--text);
}

.panel-header p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.8;
}

.metal-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.metal-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.metal-group h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text);
}

.btn {
    padding: 12px 26px;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 16px 24px rgba(58, 123, 213, 0.25);
}

.btn.primary:hover {
    box-shadow: 0 18px 28px rgba(58, 123, 213, 0.3);
}

.btn.ghost {
    border: 1px solid var(--border);
    color: var(--primary);
    background: transparent;
}

.btn.ghost:hover {
    background: rgba(58, 123, 213, 0.08);
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.price-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 18px rgba(31, 45, 61, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.price-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 28px rgba(31, 45, 61, 0.14);
}

.price-card header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.price-card .code {
    background: rgba(58, 123, 213, 0.12);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--primary);
}

.price-card .price-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.price-card .price-line .label {
    color: var(--text-light);
    font-size: 12px;
}

.price-card .price-line .value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.price-card .price-line .value small {
    font-size: 12px;
    margin-right: 4px;
    color: var(--text-light);
}

.price-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
}

.price-card .change,
.list-item .change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.price-card .change .suffix,
.list-item .change .suffix {
    font-size: 0.85em;
    color: currentColor;
}

.trend-up .change {
    color: var(--success);
}

.trend-down .change {
    color: var(--danger);
}

.trend-neutral .change {
    color: var(--neutral);
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.list-item {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr 1fr 0.8fr;
    align-items: center;
    gap: 12px;
    background: rgba(248, 251, 255, 0.9);
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.coin-row {
    grid-template-columns: 1.4fr 1fr 0.9fr;
}

.coin-row .unit {
    display: none;
}

.list-item .price {
    font-weight: 600;
}

.features {
    padding: 60px 0;
}

.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 22px;
    padding: 24px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.feature-card h3 {
    margin: 0;
    color: var(--text);
}

.feature-card p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.8;
}

.seo-content {
    padding: 60px 0 40px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(238, 242, 255, 0.7) 100%);
}

.seo-content .container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.seo-content h2 {
    margin: 0;
    font-size: clamp(24px, 3.5vw, 32px);
    color: var(--text);
}

.seo-content h3 {
    margin: 12px 0 0;
    font-size: 20px;
    color: var(--text);
}

.seo-content p {
    margin: 0;
    line-height: 2;
    color: var(--text-light);
    text-align: justify;
}

.seo-content ul {
    margin: 0;
    padding-inline-start: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-light);
    line-height: 1.8;
}

.seo-articles {
    padding: 60px 0 80px;
}

.articles-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    text-align: right;
}

.articles-header h2 {
    margin: 0;
    font-size: clamp(24px, 3.5vw, 30px);
    color: var(--text);
}

.articles-header p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.9;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
}

.article-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(37, 99, 235, 0.08);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.article-card h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text);
}

.article-card p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.8;
}

.article-link {
    align-self: flex-start;
    color: var(--primary-dark);
    font-weight: 600;
}

.site-footer {
    margin-top: 60px;
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
    color: var(--text);
    padding: 50px 0 30px;
    border-top: 1px solid rgba(37, 99, 235, 0.12);
}

.footer-top {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(6px);
    text-align: center;
    border: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
}

.stat-label {
    color: var(--text-light);
    font-size: 13px;
}

.footer-bottom {
    margin-top: 40px;
    border-top: 1px solid rgba(37, 99, 235, 0.12);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 12px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .currency-menu .menu-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .search-field {
        width: 100%;
    }

    .search-field input[type="search"] {
        width: 100%;
    }

    .hero-panels {
        grid-template-columns: 1fr;
    }

    .list-item {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 10px;
    }

    .list-item .name {
        grid-column: 1 / -1;
    }

    .list-item .unit {
        justify-self: start;
        color: var(--text-light);
    }

    .list-item .price {
        grid-column: 1 / 2;
    }

    .list-item .change {
        justify-self: end;
    }

    .coin-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-grid {
        grid-template-columns: 1fr;
    }
}
