/*
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 — palette from Pantone Classic Blue / Adobe orange reference
   ===================================================================== */
:root {
    --crypto-accent: #c1571f;
    --crypto-accent-dark: #9c4416;
    --crypto-accent-soft: rgba(193, 87, 31, 0.12);
    --crypto-navy: #16345c;
    --crypto-navy-soft: #1f4d82;
    --crypto-navy-soft-bg: rgba(22, 52, 92, 0.06);
    --crypto-bg: #fbf8f4;
    --crypto-bg-alt: #f2ece2;
    --crypto-surface: #ffffff;
    --crypto-text: #1b2430;
    --crypto-text-muted: #6b6f76;
    --crypto-border: #e3ded2;
    --crypto-shadow: 0 12px 32px rgba(22, 52, 92, 0.08);
    --crypto-shadow-hover: 0 20px 44px rgba(22, 52, 92, 0.16);
    --crypto-radius: 16px;
    --crypto-section-y: 20px;
    --crypto-container: 1180px;
}

/* =====================================================================
   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; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 16px; line-height: 1.25; color: var(--crypto-navy); }
h1 { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: clamp(26px, 4vw, 34px); }
h3 { font-size: 20px; }
p { margin: 0 0 16px; color: var(--crypto-text); }
table { border-collapse: collapse; width: 100%; }

.container { max-width: var(--crypto-container); 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;
}

/* Ссылки внутри текстовых блоков */
p a {
    color: var(--crypto-accent);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}
p a:hover { color: var(--crypto-accent-dark); }

/* Кнопки */
.btn, .button {
    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-color 0.25s ease, color 0.25s ease;
}
.btn--primary, .button {
    background: var(--crypto-accent);
    color: #fff;
    box-shadow: 0 10px 24px rgba(193, 87, 31, 0.28);
}
.btn--primary:hover, .button:hover {
    background: var(--crypto-accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(193, 87, 31, 0.36);
}
.btn--secondary {
    background: transparent;
    color: var(--crypto-navy);
    border-color: var(--crypto-navy);
}
.btn--secondary:hover {
    background: var(--crypto-navy);
    color: #fff;
    transform: translateY(-3px);
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 248, 244, 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 0;
}
.site-header__logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--crypto-navy); }
.site-header__logo img { height: 36px; width: auto; }
.site-header__nav-list { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.site-header__nav-list a {
    font-weight: 600;
    font-size: 15px;
    color: var(--crypto-navy);
    position: relative;
    padding-bottom: 4px;
    transition: color 0.2s ease;
}
.site-header__nav-list a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--crypto-accent);
    transition: width 0.25s ease;
}
.site-header__nav-list a:hover { color: var(--crypto-accent); }
.site-header__nav-list a:hover::after { width: 100%; }

.site-header__langs { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--crypto-text-muted); }
.site-header__langs a { padding: 2px 4px; border-radius: 6px; transition: color 0.2s ease, background-color 0.2s ease; }
.site-header__langs a:hover, .site-header__langs a.is-current { color: var(--crypto-accent); background: var(--crypto-accent-soft); }
.site-header__langs span { opacity: 0.5; }

.site-header__right { display: flex; align-items: center; gap: 18px; }

.site-header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
}
.site-header__burger span { display: block; width: 24px; height: 2px; background: var(--crypto-navy); transition: transform 0.25s ease, opacity 0.25s ease; }

/* Мобильное меню */
.crypto-page__mobile-menu-overlay {
    position: fixed; inset: 0;
    background: rgba(20, 24, 32, 0.55);
    z-index: 200;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.crypto-page__mobile-menu-overlay--open { opacity: 1; }

.crypto-page__mobile-menu {
    position: fixed;
    top: 0; right: 0;
    height: 100%;
    width: min(320px, 85vw);
    background: var(--crypto-surface);
    z-index: 201;
    padding: 24px 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.15);
}
.crypto-page__mobile-menu--open { transform: translateX(0); }
.crypto-page__mobile-menu-close {
    margin-left: auto;
    display: block;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--crypto-bg-alt);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}
.crypto-page__mobile-menu-list { margin-top: 20px; display: flex; flex-direction: column; gap: 4px; }
.crypto-page__mobile-menu-list a {
    display: block;
    padding: 12px 8px;
    font-weight: 700;
    font-size: 16px;
    color: var(--crypto-navy);
    border-bottom: 1px solid var(--crypto-border);
}
.crypto-page__mobile-menu-list a:hover { color: var(--crypto-accent); }
.crypto-page__mobile-menu-langs { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.crypto-page__mobile-menu-langs a {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--crypto-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--crypto-text-muted);
}
.crypto-page__mobile-menu-langs a.is-current, .crypto-page__mobile-menu-langs a:hover { color: var(--crypto-accent); border-color: var(--crypto-accent); }

/* =====================================================================
   ОБЩИЕ СЕКЦИИ
   ===================================================================== */
.section { padding: calc(var(--crypto-section-y) * 3) 0; }
.section--alt { background: var(--crypto-bg-alt); }
.section__head { max-width: 720px; margin: 0 auto calc(var(--crypto-section-y) * 2); text-align: center; }
.section__head p { color: var(--crypto-text-muted); }

/* =====================================================================
   HERO
   ===================================================================== */
.hero { padding: calc(var(--crypto-section-y) * 4) 0 calc(var(--crypto-section-y) * 3); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero__content p { font-size: 17px; color: var(--crypto-text-muted); }
.hero__widget { justify-self: end;width: 100%; }
.hero__widget .exchange-widget { border-radius: var(--crypto-radius); overflow: hidden; box-shadow: var(--crypto-shadow); background: var(--crypto-surface); padding: 12px; }
.hero__widget iframe { border-radius: 12px; width: 100%; }
.hero__actions { margin-top: 24px; }

/* =====================================================================
   КАРТОЧКИ / ПРЕИМУЩЕСТВА / ШАГИ / ОТЗЫВЫ
   ===================================================================== */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }

.card {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 28px;
    box-shadow: var(--crypto-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cards-grid .card:hover { transform: translateY(-6px); box-shadow: var(--crypto-shadow-hover); }
.card + .card { margin-top: var(--crypto-section-y); }
.card__icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--crypto-accent-soft);
    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; color: var(--crypto-accent); }
.card p:last-child { margin-bottom: 0; }

.media-card { overflow: hidden; padding: 0; }
.media-card__img { height: 180px; overflow: hidden; }
.media-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.media-card:hover .media-card__img img { transform: scale(1.08); }
.media-card__body { padding: 24px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; counter-reset: step; }
.step { position: relative; background: var(--crypto-surface); border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius); padding: 28px 24px; box-shadow: var(--crypto-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.step:hover { transform: translateY(-6px); box-shadow: var(--crypto-shadow-hover); }
.step__number { width: 40px; height: 40px; border-radius: 50%; background: var(--crypto-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 16px; }

.checklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.checklist__item { display: flex; gap: 14px; background: var(--crypto-surface); border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius); padding: 20px; box-shadow: var(--crypto-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.checklist__item:hover { transform: translateY(-4px); box-shadow: var(--crypto-shadow-hover); }
.checklist__icon { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--crypto-navy-soft-bg); display: flex; align-items: center; justify-content: center; }
.checklist__icon img, .checklist__icon svg { width: 20px; height: 20px; color: var(--crypto-navy); }

.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.review { background: var(--crypto-surface); border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius); padding: 24px; box-shadow: var(--crypto-shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.review:hover { transform: translateY(-6px); box-shadow: var(--crypto-shadow-hover); }
.review__top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.review__name { font-weight: 700; color: var(--crypto-navy); margin-bottom: 4px; }
.review__stars { display: inline-flex; gap: 2px; color: var(--crypto-accent); }
.review__stars svg { width: 15px; height: 15px; }
.review__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--crypto-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.review p { color: var(--crypto-text-muted); margin: 0; }

/* =====================================================================
   ТАБЛИЦЫ
   ===================================================================== */
.data-table-wrap { overflow-x: auto; border-radius: var(--crypto-radius); box-shadow: var(--crypto-shadow); }
.data-table { background: var(--crypto-surface); min-width: 480px; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--crypto-border); }
.data-table thead th { background: var(--crypto-navy); color: #fff; font-weight: 700; }
.data-table tbody tr { transition: background-color 0.2s ease; }
.data-table tbody tr:hover { background: var(--crypto-accent-soft); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Конвертер */
.converter { overflow-x: auto; border-radius: var(--crypto-radius); box-shadow: var(--crypto-shadow); margin: 24px 0; }
.converter__table { background: var(--crypto-surface); min-width: 420px; }
.converter__table th, .converter__table td { padding: 14px 18px; text-align: right; border-bottom: 1px solid var(--crypto-border); }
.converter__table th:first-child, .converter__table td:first-child { text-align: left; }
.converter__table thead th { background: var(--crypto-navy); color: #fff; }
.converter__label { font-weight: 700; color: var(--crypto-navy); }

/* =====================================================================
   ГРАФИК КУРСА (rate + chart)
   ===================================================================== */
.rate { background: var(--crypto-surface); border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius); padding: 24px; box-shadow: var(--crypto-shadow); margin: 24px 0; }
.rate__summary { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.rate__price { font-size: 28px; font-weight: 800; color: var(--crypto-navy); }
.rate__change { font-weight: 700; padding: 4px 10px; border-radius: 999px; font-size: 13px; }
.rate__change--up { color: #1a7a4c; background: rgba(26, 122, 76, 0.12); }
.rate__change--down { color: #b3261e; background: rgba(179, 38, 30, 0.12); }

.rate__tabs { display: flex; flex-wrap: wrap; }
.rate__tab-input { position: absolute; opacity: 0; pointer-events: none; }
.rate__tab-label {
    order: -1;
    padding: 8px 18px;
    margin-right: 8px;
    border-radius: 999px;
    background: var(--crypto-bg-alt);
    color: var(--crypto-text-muted);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.rate__tab-input:checked + .rate__tab-label { background: var(--crypto-accent); color: #fff; }
.rate__panel { display: none; width: 100%; margin-top: 20px; }
.rate__tab-input:checked + .rate__tab-label + .rate__panel { display: block; }

.chart { width: 100%; }
.chart__svg { width: 100%; height: auto; }
.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 { text-align: center; color: var(--crypto-text-muted); padding: 32px 0; }

/* =====================================================================
   FAQ
   ===================================================================== */
.faq { display: flex; flex-direction: column; gap: 16px; }
.faq__item { background: var(--crypto-surface); border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius); padding: 22px 26px; box-shadow: var(--crypto-shadow); transition: box-shadow 0.3s ease, transform 0.3s ease; }
.faq__item:hover { box-shadow: var(--crypto-shadow-hover); transform: translateY(-3px); }
.faq__item h3 { margin-bottom: 8px; font-size: 17px; }
.faq__item p { margin: 0; color: var(--crypto-text-muted); }

/* =====================================================================
   ФУТЕР
   ===================================================================== */
.site-footer { background: var(--crypto-navy); color: rgba(255, 255, 255, 0.82); margin-top: calc(var(--crypto-section-y) * 3); }
.site-footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: calc(var(--crypto-section-y) * 3) 0 calc(var(--crypto-section-y) * 2); }
.site-footer__col h3 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.site-footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer__col a { color: rgba(255, 255, 255, 0.72); font-size: 14px; transition: color 0.2s ease, padding-left 0.2s ease; }
.site-footer__col a:hover { color: var(--crypto-accent); padding-left: 4px; }
.site-footer__col a.is-current { color: var(--crypto-accent); font-weight: 700; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 18px 0; font-size: 13px; color: rgba(255, 255, 255, 0.55); }

/* =====================================================================
   RIVEAL / SCROLL ANIMATIONS
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--parallax { will-change: transform; }

/* =====================================================================
   404
   ===================================================================== */
.error404__wrapper { padding: calc(var(--crypto-section-y) * 5) 0; text-align: center; }
.error404__code { font-size: clamp(80px, 16vw, 160px); font-weight: 900; color: var(--crypto-accent); line-height: 1; }
.error404__title { margin-top: 8px; }
.error404__text { color: var(--crypto-text-muted); max-width: 420px; margin: 0 auto 24px; }

/* =====================================================================
   АДАПТИВ
   ===================================================================== */
@media (max-width: 768px) {
    .site-header__nav-list, .site-header__langs { display: none; }
    .site-header__burger { display: flex; }
    .hero__grid { grid-template-columns: 1fr; }
    .hero__widget { justify-self: center; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 28px; padding-top: calc(var(--crypto-section-y) * 2); }
    .section { padding: calc(var(--crypto-section-y) * 2) 0; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .btn, .button { width: 100%; }
    .card, .step, .review, .faq__item { padding: 20px; }
    .data-table th, .data-table td, .converter__table th, .converter__table td { padding: 10px 12px; font-size: 14px; }
}
