/*
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 — Graphite / Red / White palette (референс: Bybit)
   ===================================================================== */
:root {
    --crypto-bg: #f8f9fa;
    --crypto-bg-elevated: #ffffff;
    --crypto-text: #1f2933;
    --crypto-text-muted: #5b6572;
    --crypto-accent: #e63946;
    --crypto-accent-hover: #c92a39;
    --crypto-accent-soft: rgba(230, 57, 70, .1);
    --crypto-dark: #1f2933;
    --crypto-border: #e3e6ea;
    --crypto-section-y: 20px;
    --crypto-radius: 16px;
    --crypto-shadow: 0 10px 30px rgba(31, 41, 51, .08);
}

/* =====================================================================
   RESET & BASE
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--crypto-bg);
    color: var(--crypto-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 16px; color: var(--crypto-text); }
h1 { font-size: 42px; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 16px; color: var(--crypto-text); }
ul { margin: 0 0 16px; padding-left: 20px; }
main { display: block; overflow-x: hidden; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.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;
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 28px; border-radius: 12px; font-weight: 700; font-size: 15px;
    text-decoration: none; cursor: pointer; border: 2px solid transparent;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn--primary { background: var(--crypto-accent); color: #fff; box-shadow: 0 10px 24px rgba(230, 57, 70, .28); }
.btn--primary:hover { background: var(--crypto-accent-hover); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(230, 57, 70, .34); }
.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(-2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* =====================================================================
   HEADER / NAV
   ===================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--crypto-bg-elevated);
    border-bottom: 1px solid var(--crypto-border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 0; }
.site-header__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; color: var(--crypto-text); }
.site-header__logo img { height: 36px; width: auto; }
.site-header__logo-mark { color: var(--crypto-accent); }

.site-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav__list li { position: relative; }
.site-nav__list a {
    display: block; padding: 10px 14px; color: var(--crypto-text); text-decoration: none;
    font-weight: 600; font-size: 14.5px; border-radius: 10px; transition: background .2s ease, color .2s ease;
}
.site-nav__list a:hover, .site-nav__list a:focus { background: var(--crypto-accent-soft); color: var(--crypto-accent); }
.site-nav__list .sub-menu {
    list-style: none; position: absolute; top: 100%; left: 0; min-width: 250px;
    background: var(--crypto-bg-elevated); border: 1px solid var(--crypto-border);
    border-radius: 14px; box-shadow: var(--crypto-shadow); padding: 8px; margin: 8px 0 0;
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 20;
}
.site-nav__list li:hover > .sub-menu,
.site-nav__list li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.site-nav__list .sub-menu a { padding: 10px 12px; border-radius: 8px; font-weight: 500; }

.burger {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 36px; background: none; border: none; cursor: pointer; padding: 6px;
}
.burger__line { display: block; height: 2px; width: 100%; background: var(--crypto-text); border-radius: 2px; transition: transform .25s ease, opacity .25s 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 / EXCHANGE WIDGET
   ===================================================================== */
.hero { padding: 56px 0 var(--crypto-section-y); }
.hero__inner { display: grid; grid-template-columns: 1fr 500px; gap: 44px; align-items: center; }
.hero__inner--plain { grid-template-columns: 1fr; max-width: 820px; }
.hero__eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--crypto-accent-soft); color: var(--crypto-accent); font-weight: 700; font-size: 13px; margin-bottom: 16px; }
.hero__content p { color: var(--crypto-text-muted); font-size: 17px; }
.hero__media { border-radius: var(--crypto-radius); overflow: hidden; box-shadow: var(--crypto-shadow); }
.hero__media img { width: 100%; height: 320px; object-fit: cover; transition: transform .5s ease; }
.hero__media:hover img { transform: scale(1.05); }

.exchange-widget { display: flex; justify-content: center; background: var(--crypto-bg-elevated); border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius); box-shadow: var(--crypto-shadow); padding: 12px; }
.exchange-widget__frame { width: 100%; max-width: 500px; height: 400px; border: 0; border-radius: 12px; display: block; }

/* =====================================================================
   SECTIONS / CARDS / GRIDS
   ===================================================================== */
.section { padding: 56px 0; margin-bottom: var(--crypto-section-y); }
.section--muted { background: var(--crypto-bg-elevated); border-top: 1px solid var(--crypto-border); border-bottom: 1px solid var(--crypto-border); }
.section__head { max-width: 760px; margin: 0 0 36px; }
.section__head p { color: var(--crypto-text-muted); font-size: 17px; }
.prose { max-width: 780px; }
.prose p { color: var(--crypto-text-muted); }
.prose ul { color: var(--crypto-text-muted); }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--crypto-bg-elevated); border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius); box-shadow: var(--crypto-shadow); padding: 28px;
    transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(31, 41, 51, .12); }
.card__image { width: 100%; height: 170px; object-fit: cover; border-radius: 12px; margin-bottom: 18px; transition: transform .5s ease; }
.card:hover .card__image { transform: scale(1.06); }
.card__icon { margin-bottom: 16px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--crypto-text-muted); margin-bottom: 0; font-size: 15px; }

/* Text + image two-column block (reused across pair pages) */
.media-block__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.media-block__inner--reverse { direction: rtl; }
.media-block__inner--reverse > * { direction: ltr; }
.media-block__media { border-radius: var(--crypto-radius); overflow: hidden; box-shadow: var(--crypto-shadow); }
.media-block__media img { width: 100%; height: 320px; object-fit: cover; transition: transform .5s ease; }
.media-block__media:hover img { transform: scale(1.05); }
.media-block__text p { color: var(--crypto-text-muted); }

/* Pair links */
.pair-links { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0 0 20px; }
.pair-link {
    display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px 11px 12px;
    background: var(--crypto-bg-elevated); border: 1px solid var(--crypto-border); border-radius: 999px;
    text-decoration: none; color: var(--crypto-text); font-weight: 600; font-size: 14.5px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, color .2s ease;
}
.pair-link:hover { border-color: var(--crypto-accent); color: var(--crypto-accent); transform: translateY(-3px); box-shadow: var(--crypto-shadow); }

/* Steps */
.steps { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); counter-reset: step; }
.step {
    position: relative; background: var(--crypto-bg-elevated); border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius); padding: 30px 24px 24px; box-shadow: var(--crypto-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}
.step:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(31, 41, 51, .12); }
.step__number {
    display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border-radius: 50%; background: var(--crypto-accent); color: #fff; font-weight: 800; font-size: 17px; margin-bottom: 16px;
}
.step p:last-child { margin-bottom: 0; }

/* Privacy explainer blocks */
.explainer { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.explainer__item { background: var(--crypto-bg-elevated); border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius); padding: 26px; box-shadow: var(--crypto-shadow); }
.explainer__item h3 { margin-bottom: 10px; }
.explainer__item p { color: var(--crypto-text-muted); margin-bottom: 0; font-size: 15px; }

/* Reviews */
.reviews { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.review-card { background: var(--crypto-bg-elevated); border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius); padding: 24px; box-shadow: var(--crypto-shadow); transition: transform .25s ease, box-shadow .25s ease; }
.review-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(31, 41, 51, .12); }
.review-card__stars { color: var(--crypto-accent); font-weight: 700; margin-bottom: 10px; letter-spacing: .04em; }
.review-card__author { font-weight: 700; margin-bottom: 8px; }
.review-card p:last-child { color: var(--crypto-text-muted); margin-bottom: 0; font-size: 15px; }

/* CTA banner */
.cta { position: relative; border-radius: var(--crypto-radius); overflow: hidden; padding: 56px 40px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--crypto-dark), #33424f); }
.cta__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; }
.cta__content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.cta__content h2 { color: #fff; }
.cta__content p { color: #d7dde3; }
.cta .btn-row { justify-content: center; }

/* Tables (benefits / conditions) */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; background: var(--crypto-bg-elevated); border-radius: var(--crypto-radius); overflow: hidden; box-shadow: var(--crypto-shadow); min-width: 480px; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--crypto-border); font-size: 14.5px; }
.data-table thead th { background: var(--crypto-bg); color: var(--crypto-text-muted); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.data-table tbody tr:hover { background: var(--crypto-accent-soft); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Numbered condition list */
.conditions { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.condition {
    background: var(--crypto-bg-elevated); border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius);
    padding: 24px; box-shadow: var(--crypto-shadow); transition: transform .25s ease, box-shadow .25s ease;
}
.condition:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(31, 41, 51, .12); }
.condition__icon { margin-bottom: 14px; }
.condition p { color: var(--crypto-text-muted); margin-bottom: 0; font-size: 14.5px; }

/* =====================================================================
   RATE TABLE SHORTCODE
   ===================================================================== */
.rate-table { overflow-x: auto; margin-bottom: 16px; }
.rate-table__table { width: 100%; border-collapse: collapse; background: var(--crypto-bg-elevated); border-radius: var(--crypto-radius); overflow: hidden; box-shadow: var(--crypto-shadow); min-width: 520px; }
.rate-table__cell { padding: 14px 18px; border-bottom: 1px solid var(--crypto-border); text-align: left; font-size: 14.5px; }
.rate-table__row--head .rate-table__cell { background: var(--crypto-bg); color: var(--crypto-text-muted); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.rate-table__row:hover .rate-table__cell { background: var(--crypto-accent-soft); }
.rate-table__row:last-child .rate-table__cell { border-bottom: none; }

/* =====================================================================
   CHART SHORTCODE (SVG)
   ===================================================================== */
.chart { width: 100%; }
.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 { font-size: 11px; fill: var(--crypto-text-muted); 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-linejoin: round; stroke-linecap: round; }
.chart__dot { fill: var(--crypto-accent); stroke: #fff; stroke-width: 2; }
.chart-empty { padding: 24px; text-align: center; color: var(--crypto-text-muted); background: var(--crypto-bg); border-radius: var(--crypto-radius); border: 1px dashed var(--crypto-border); }

/* Coin badge */
.coin-badge { display: inline-block; vertical-align: middle; }
.coin-badge__text { fill: #fff; font-weight: 800; font-family: inherit; }

/* =====================================================================
   FAQ + JSON-LD friendly markup
   ===================================================================== */
.faq { border-top: 1px solid var(--crypto-border); }
.faq-item { border-bottom: 1px solid var(--crypto-border); padding: 18px 0; }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 16.5px; }
.faq-item summary::after { content: '+'; flex: none; font-size: 22px; color: var(--crypto-accent); transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 12px; color: var(--crypto-text-muted); }
.faq-item p:last-child { margin-bottom: 0; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--crypto-dark); color: #cfd6dd; margin-top: 40px; padding: 56px 0 24px; }
.site-footer__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.site-footer__title { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer__list a { color: #cfd6dd; text-decoration: none; font-size: 14.5px; transition: color .2s ease; }
.site-footer__list a:hover { color: var(--crypto-accent); }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #9aa4ae; }
.site-footer__bottom a { color: #9aa4ae; text-decoration: none; }
.site-footer__bottom a:hover { color: var(--crypto-accent); }

/* =====================================================================
   404
   ===================================================================== */
.error404__wrapper { padding: 100px 0; text-align: center; }
.error404__code { font-size: 120px; font-weight: 900; line-height: 1; color: var(--crypto-accent); }
.error404__title { font-size: 32px; margin: 16px 0 8px; }
.error404__text { color: var(--crypto-text-muted); margin-bottom: 32px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 768px) {
    h1 { font-size: 32px; }
    h2 { font-size: 25px; }
    .hero { padding: 36px 0 var(--crypto-section-y); }
    .hero__inner { grid-template-columns: 1fr; gap: 28px; }
    .hero__widget { order: -1; }
    .section { padding: 40px 0; }
    .media-block__inner { grid-template-columns: 1fr; }
    .media-block__media img { height: 220px; }

    .burger { display: flex; }
    .site-nav {
        position: fixed; inset: 0 0 0 0; top: 65px; background: var(--crypto-bg-elevated);
        padding: 20px; transform: translateX(100%); transition: transform .3s ease;
        overflow-y: auto; height: calc(100vh - 65px);
    }
    .site-nav.is-open { transform: translateX(0); }
    .site-nav__list { flex-direction: column; align-items: stretch; gap: 4px; }
    .site-nav__list .sub-menu {
        position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
        border: none; margin: 4px 0 4px 12px; padding: 0; max-height: 0; overflow: hidden; transition: max-height .25s ease;
    }
    .site-nav__list li.is-open > .sub-menu { max-height: 600px; }

    .grid--2, .grid--3, .grid--4, .steps, .explainer, .reviews, .conditions { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
    .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .error404__code { font-size: 72px; }
    .cta { padding: 36px 20px; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 24px; }
    .btn { width: 100%; }
    .btn-row { flex-direction: column; }
}
