/*
Theme Name: Crypto
Theme URI: https://wordpress.org
Author: Orkhan Chichitov
Author URI: https://wordpress.org
Description: A simple and clean WordPress theme for cryptocurrency-related websites. It features a modern design, responsive layout, and customizable options to create a unique online presence for your crypto business or blog.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* =====================================================================
   ROOT VARIABLES — Basalt & Tangerine palette (референс: Binance, тёмная тема)
   ===================================================================== */
:root {
    --crypto-bg: #1a1a1a;
    --crypto-surface: #363636;
    --crypto-surface-alt: #2a2a2a;
    --crypto-border: #454545;
    --crypto-text: #f5f5f5;
    --crypto-text-muted: #a3a3a3;
    --crypto-accent: #F58F1F;
    --crypto-accent-hover: #ff9f3d;
    --crypto-accent-soft: rgba(245, 143, 31, 0.16);
    --crypto-success: #1fbf75;
    --crypto-radius: 14px;
    --crypto-radius-sm: 8px;
    --crypto-section-y: 22px;
    --crypto-container: 1200px;
    --crypto-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--crypto-bg);
    color: var(--crypto-text);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

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

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1, h2, h3, h4 {
    line-height: 1.25;
    margin: 0 0 16px;
}

p {
    margin: 0 0 16px;
    color: var(--crypto-text-muted);
}

.container {
    max-width: var(--crypto-container);
    margin: 0 auto;
    padding: 0 24px;
}

.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;
}

/* Ссылки внутри текста статьи выделяются акцентным цветом */
main p a,
.faq__answer a,
.content-block a {
    color: var(--crypto-accent);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

main p a:hover,
.faq__answer a:hover,
.content-block a:hover {
    color: var(--crypto-accent-hover);
}

/* =====================================================================
   SCROLL REVEAL ANIMATION
   ===================================================================== */
.reveal {
    opacity: 1;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn--primary {
    background: var(--crypto-accent);
    color: #1a1a1a;
}

.btn--primary:hover {
    background: var(--crypto-accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(245, 143, 31, 0.35);
}

.btn--secondary {
    background: transparent;
    border-color: var(--crypto-border);
    color: var(--crypto-text);
}

.btn--secondary:hover {
    border-color: var(--crypto-accent);
    color: var(--crypto-accent);
    transform: translateY(-3px);
}

/* =====================================================================
   SITE HEADER
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--crypto-border);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
}

.site-header__logo img {
    height: 40px;
    width: auto;
}

.site-header__logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--crypto-text);
}

.site-header__logo-text span {
    color: var(--crypto-accent);
}

/* Основное меню */
.nav {
    display: flex;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav__item {
    position: relative;
}

.nav__link {
    display: block;
    padding: 10px 16px;
    border-radius: var(--crypto-radius-sm);
    font-weight: 600;
    font-size: 15px;
    color: var(--crypto-text);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav__link:hover,
.nav__item:hover > .nav__link {
    color: var(--crypto-accent);
    background: var(--crypto-accent-soft);
}

.nav__item--has-children > .nav__link::after {
    content: '▾';
    margin-left: 6px;
    font-size: 11px;
}

.nav__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    box-shadow: var(--crypto-shadow);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav__item--has-children:hover > .nav__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__submenu .nav__link {
    padding: 10px 14px;
    font-weight: 500;
    font-size: 14px;
}

/* Бургер-кнопка (мобильная) */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    background: transparent;
    cursor: pointer;
}

.burger__line {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--crypto-text);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.is-active .burger__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger.is-active .burger__line:nth-child(2) {
    opacity: 0;
}

.burger.is-active .burger__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero {
    padding: 56px 0 var(--crypto-section-y);
    background: radial-gradient(circle at top right, rgba(245, 143, 31, 0.12), transparent 55%);
}

.hero__inner {
    display: flex;
    align-items: center;
    gap: 48px;
}

.hero__content {
    flex: 1 1 480px;
}

.hero__media {
    flex: 1 1 380px;
}

.hero__media img {
    border-radius: var(--crypto-radius);
    box-shadow: var(--crypto-shadow);
    transition: transform 0.5s ease;
}

.hero__media img:hover {
    transform: scale(1.03);
}

.hero__widget {
    flex: 1 1 380px;
    display: flex;
    justify-content: flex-end;
}

.hero__title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
}

.hero__text {
    font-size: 17px;
    max-width: 620px;
}

/* =====================================================================
   SECTIONS / TYPOGRAPHY
   ===================================================================== */
.section {
    padding: var(--crypto-section-y) 0;
}

.section__title {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
}

.section__title--sm {
    font-size: 22px;
    font-weight: 700;
}

.content-block {
    padding: var(--crypto-section-y) 0;
}

/* =====================================================================
   CARDS / GRID
   ===================================================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.card {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--crypto-shadow);
    border-color: var(--crypto-accent);
}

.card__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--crypto-accent-soft);
    color: var(--crypto-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.card:hover .card__icon {
    transform: scale(1.1) rotate(-4deg);
}

.card__icon img,
.card__icon svg {
    width: 26px;
    height: 26px;
}

.card__title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.card__text {
    margin: 0;
    font-size: 14.5px;
}

/* Карточка с изображением сверху (для "Learn more" / направлений обмена) */
.media-card {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--crypto-shadow);
}

.media-card__img {
    height: 160px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-card:hover .media-card__img {
    transform: scale(1.06);
}

.media-card__body {
    padding: 18px 20px;
}

.media-card__title {
    font-size: 15.5px;
    font-weight: 700;
    margin-bottom: 0;
}
ol {
    list-style-type: none;
}
/* =====================================================================
   SPLIT (текст + картинка, переиспользуется на всех страницах)
   ===================================================================== */
.split {
    display: flex;
    align-items: center;
    gap: 40px;
}

.split--reverse {
    flex-direction: row-reverse;
}

.split__media {
    flex: 1 1 380px;
    overflow: hidden;
    border-radius: var(--crypto-radius);
}

.split__media img {
    border-radius: var(--crypto-radius);
    box-shadow: var(--crypto-shadow);
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.split__media:hover img {
    transform: scale(1.06);
}

.split__content {
    flex: 1 1 420px;
}

@media (max-width: 768px) {
    .split,
    .split--reverse {
        flex-direction: column;
    }
}

/* =====================================================================
   STEPS (нумерованный процесс обмена)
   ===================================================================== */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    counter-reset: step;
    margin: 24px 0;
}

.steps__item {
    counter-increment: step;
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 24px 20px;
    position: relative;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.steps__item:hover {
    transform: translateY(-6px);
    border-color: var(--crypto-accent);
}

.steps__item::before {
    content: counter(step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--crypto-accent);
    color: #1a1a1a;
    font-weight: 800;
    margin-bottom: 14px;
}

/* =====================================================================
   TABLES (детали токена, allocation, чек-листы)
   ===================================================================== */
.table-wrap {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: var(--crypto-radius);
    border: 1px solid var(--crypto-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
    background: var(--crypto-surface);
}

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--crypto-border);
    font-size: 14.5px;
}

th {
    background: var(--crypto-surface-alt);
    color: var(--crypto-accent);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12.5px;
    letter-spacing: 0.04em;
}

tr:last-child td {
    border-bottom: none;
}

td code {
    background: var(--crypto-surface-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    word-break: break-all;
}

/* =====================================================================
   LINK LISTS ("Other exchange options" и т.п.)
   ===================================================================== */
.link-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.link-list__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    font-weight: 600;
    font-size: 14.5px;
    transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.link-list__item:hover {
    transform: translateX(4px);
    border-color: var(--crypto-accent);
    color: var(--crypto-accent);
}

.link-list--single-col {
    grid-template-columns: 1fr;
}

.link-list__item::before {
    content: '→';
    color: var(--crypto-accent);
    font-weight: 800;
}

/* =====================================================================
   EXCHANGE WIDGET
   ===================================================================== */
.exchange-widget {
    display: inline-block;
    border-radius: var(--crypto-radius);
    overflow: hidden;
    box-shadow: var(--crypto-shadow);
    border: 1px solid var(--crypto-border);
    max-width: 100%;
}

.exchange-widget iframe {
    display: block;
    max-width: 100%;
}

/* =====================================================================
   PRICE QUOTES / MARKET STATS / RATE TABLE / CONVERTER
   ===================================================================== */
.price-quotes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.price-quotes__card {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.price-quotes__card:hover {
    border-color: var(--crypto-accent);
    transform: translateY(-4px);
}

.price-quotes__pair {
    font-size: 12.5px;
    color: var(--crypto-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.price-quotes__value {
    font-size: 19px;
    font-weight: 800;
    color: var(--crypto-accent);
}

.market-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.market-stats__item {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    padding: 16px;
    text-align: center;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.market-stats__item:hover {
    transform: translateY(-4px);
    border-color: var(--crypto-accent);
}

.market-stats__label {
    display: block;
    font-size: 12.5px;
    color: var(--crypto-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.market-stats__value {
    display: block;
    font-size: 18px;
    font-weight: 800;
}

.rate-table__wrap {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: var(--crypto-radius);
    border: 1px solid var(--crypto-border);
}

.rate-table {
    min-width: 360px;
}

.converter {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 20px;
    margin: 20px 0;
}

.converter__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 180px;
}

.converter__label {
    font-size: 12.5px;
    color: var(--crypto-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.converter__input,
.converter__select {
    background: var(--crypto-surface-alt);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    color: var(--crypto-text);
    font-size: 16px;
    font-weight: 700;
    padding: 12px 14px;
    width: 100%;
    transition: border-color 0.2s ease;
}

.converter__input:focus,
.converter__select:focus {
    outline: none;
    border-color: var(--crypto-accent);
}

.converter__equals {
    font-size: 20px;
    color: var(--crypto-text-muted);
    padding-bottom: 12px;
}

/* =====================================================================
   CHART (инлайн SVG график, server-rendered)
   ===================================================================== */
.chart {
    margin: 20px 0;
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 16px;
}

.chart__svg {
    width: 100%;
    height: auto;
    display: block;
}

.chart__grid {
    stroke: var(--crypto-border);
    stroke-width: 1;
}

.chart__grid--v {
    stroke-dasharray: 4 4;
}

.chart__label {
    fill: var(--crypto-text-muted);
    font-size: 10px;
    font-family: inherit;
}

.chart__area {
    fill: var(--crypto-accent-soft);
    stroke: none;
}

.chart__line {
    fill: none;
    stroke: var(--crypto-accent);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart__dot {
    fill: var(--crypto-accent);
    stroke: var(--crypto-bg);
    stroke-width: 2;
}

.chart-empty {
    background: var(--crypto-surface);
    border: 1px dashed var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 24px;
    text-align: center;
    color: var(--crypto-text-muted);
    margin: 20px 0;
}

.chart-periods,
.chart-currency-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.chart-periods__item,
.chart-currency-tabs__item {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--crypto-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--crypto-text-muted);
}

.chart-periods__item--active,
.chart-currency-tabs__item--active {
    background: var(--crypto-accent);
    border-color: var(--crypto-accent);
    color: #1a1a1a;
}

/* =====================================================================
   FAQ
   ===================================================================== */
.faq {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 24px 0;
}

.faq__item {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 20px 24px;
    transition: border-color 0.25s ease;
}

.faq__item:hover {
    border-color: var(--crypto-accent);
}

.faq__item h3 {
    font-size: 16.5px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--crypto-text);
}

.faq__item p {
    margin: 0;
}

/* =====================================================================
   ERROR 404
   ===================================================================== */
.error404__wrapper {
    padding: 100px 0;
}

.error404__inner {
    text-align: center;
}

.error404__code {
    font-size: clamp(72px, 14vw, 140px);
    font-weight: 900;
    color: var(--crypto-accent);
    line-height: 1;
    margin-bottom: 16px;
}

.error404__title {
    font-size: 28px;
    font-weight: 800;
}

.error404__text {
    max-width: 480px;
    margin: 0 auto 28px;
}

.error404__actions {
    display: flex;
    justify-content: center;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
    background: var(--crypto-surface-alt);
    border-top: 1px solid var(--crypto-border);
    padding: 48px 0 24px;
    margin-top: 40px;
}

.site-footer__columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.site-footer__col-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--crypto-accent);
    margin-bottom: 16px;
}

.site-footer__menu li {
    margin-bottom: 10px;
}

.site-footer__menu a {
    color: var(--crypto-text-muted);
    font-size: 14.5px;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__menu a:hover {
    color: var(--crypto-accent);
    padding-left: 4px;
}

.site-footer__bottom {
    border-top: 1px solid var(--crypto-border);
    padding-top: 20px;
    text-align: center;
    color: var(--crypto-text-muted);
    font-size: 13.5px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 768px) {
    .hero__inner {
        flex-direction: column;
    }

    .hero__widget {
        justify-content: center;
        width: 100%;
    }

    .nav {
        display: none;
    }

    .nav.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--crypto-surface);
        border-bottom: 1px solid var(--crypto-border);
        padding: 12px;
        box-shadow: var(--crypto-shadow);
    }

    .nav.is-open .nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .nav.is-open .nav__submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        margin: 4px 0 4px 12px;
    }

    .nav.is-open .nav__item--open .nav__submenu {
        display: block;
    }

    .burger {
        display: flex;
    }

    .converter {
        flex-direction: column;
        align-items: stretch;
    }

    .converter__equals {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 36px 0 var(--crypto-section-y);
    }

    .site-footer__columns {
        grid-template-columns: 1fr;
    }

    .exchange-widget iframe {
        width: 100% !important;
    }

    th, td {
        padding: 10px 12px;
        font-size: 13px;
    }
}
