/*
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 — Private Swap palette (cream / gold / deep green / burgundy)
   ===================================================================== */
:root {
    --crypto-bg: #F8F4EC;
    --crypto-surface: #FFFFFF;
    --crypto-surface-alt: #F1EBDD;
    --crypto-accent: #B58A3C;
    --crypto-accent-dark: #8F6C2C;
    --crypto-accent-soft: rgba(181, 138, 60, 0.14);
    --crypto-deep: #0F5C4D;
    --crypto-deep-soft: rgba(15, 92, 77, 0.1);
    --crypto-danger: #7B1E2B;
    --crypto-danger-soft: rgba(123, 30, 43, 0.1);
    --crypto-text: #111827;
    --crypto-text-muted: #6B6558;
    --crypto-border: #E4DCC8;
    --crypto-positive: var(--crypto-deep);
    --crypto-negative: var(--crypto-danger);
    --crypto-section-y: 20px;
    --crypto-radius: 16px;
    --crypto-radius-sm: 10px;
    --crypto-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    --crypto-shadow-hover: 0 18px 40px rgba(181, 138, 60, 0.22);
    --crypto-header-h: 76px;
}

/* =====================================================================
   RESET / BASE
   ===================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--crypto-header-h);
}

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

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

a { color: var(--crypto-accent); text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--crypto-accent-dark); }

h1, h2, h3, h4 { color: var(--crypto-text); line-height: 1.25; margin: 0 0 16px; font-weight: 700; }
h1 { font-size: clamp(30px, 4vw, 48px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: clamp(18px, 2.2vw, 22px); }
p { margin: 0 0 16px; color: var(--crypto-text); }

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

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

main { display: block; overflow-x: hidden; }

.section { padding: calc(var(--crypto-section-y) * 2.4) 0; }
.section--alt { background: var(--crypto-surface-alt); }
.section--deep { background: var(--crypto-deep); color: #fff; }
.section--deep h2, .section--deep h3, .section--deep p { color: #fff; }
.section__head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section__head p { color: var(--crypto-text-muted); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn--primary {
    background: var(--crypto-accent);
    color: #fff;
}
.btn--primary:hover {
    background: var(--crypto-accent-dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--crypto-shadow-hover);
}
.btn--outline {
    background: transparent;
    border-color: var(--crypto-deep);
    color: var(--crypto-deep);
}
.btn--outline:hover {
    background: var(--crypto-deep);
    color: #fff;
    transform: translateY(-3px);
}

/* =====================================================================
   HEADER
   ===================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(248, 244, 236, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--crypto-border);
    height: var(--crypto-header-h);
}
.site-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.site-header__logo { display: flex; align-items: center; font-weight: 800; font-size: 20px; color: var(--crypto-text); }
.site-header__logo img { max-height: 42px; width: auto; }
.site-header__logo:hover { color: var(--crypto-accent); }

.site-header__nav { display: none; }
.site-header__menu { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-header__menu a {
    color: var(--crypto-text);
    font-weight: 600;
    font-size: 15px;
    position: relative;
    padding: 6px 0;
}
.site-header__menu a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 2px;
    background: var(--crypto-accent);
    transition: width .25s ease;
}
.site-header__menu a:hover::after,
.site-header__menu .current-menu-item a::after { width: 100%; }

.site-header__burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--crypto-border);
    border-radius: 10px;
    background: var(--crypto-surface);
    cursor: pointer;
    padding: 0;
}
.site-header__burger span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--crypto-text);
    transition: transform .3s ease, opacity .3s ease;
}
.site-header__burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__burger.is-active span:nth-child(2) { opacity: 0; }
.site-header__burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-header__mobile-nav {
    position: fixed;
    top: var(--crypto-header-h);
    left: 0; right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--crypto-surface);
    border-bottom: 1px solid var(--crypto-border);
    transition: max-height .35s ease;
    z-index: 99;
}
.site-header__mobile-nav.is-open { max-height: 80vh; overflow-y: auto; }
.site-header__mobile-menu { list-style: none; margin: 0; padding: 12px 24px 24px; }
.site-header__mobile-menu a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--crypto-border);
    color: var(--crypto-text);
    font-weight: 600;
}

/* =====================================================================
   HERO
   ===================================================================== */
.hero { padding: 56px 0 calc(var(--crypto-section-y) * 2); }
.hero__inner {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}
.hero--with-widget .hero__inner { flex-direction: row; justify-content: space-between; align-items: center; }
.hero__content { flex: 1 1 480px; }
.hero--with-widget .hero__content { order: 1; }
.hero__widget-col { order: 2; flex: 0 1 auto; display: flex; justify-content: center; 
    width: 50%;
    max-width: 500px;
    min-width: 400px;
}
.hero__media { flex: 1 1 420px; border-radius: var(--crypto-radius); overflow: hidden; box-shadow: var(--crypto-shadow); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; transition: transform .6s ease; }
.hero__media:hover img { transform: scale(1.06); }
.hero__eyebrow { color: var(--crypto-accent); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; margin-bottom: 12px; display: inline-block; }
.hero__text { color: var(--crypto-text-muted); font-size: 17px; }
.hero__actions { margin-top: 24px; }

/* =====================================================================
   SPLIT LAYOUT (текст + виджет/картинка, используется вне hero)
   ===================================================================== */
.split { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.split__content { flex: 1 1 420px; }
.split__aside { flex: 0 1 auto; display: flex; justify-content: center; }
.split--reverse { flex-direction: row-reverse; }
@media (max-width: 768px) {
    .split { flex-direction: column; }
    .split--reverse { flex-direction: column; }
}

/* =====================================================================
   EXCHANGE WIDGET
   ===================================================================== */
.exchange-widget {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    box-shadow: var(--crypto-shadow);
    padding: 12px;
    transition: box-shadow .3s ease, transform .3s ease;
}
.exchange-widget:hover { box-shadow: var(--crypto-shadow-hover); transform: translateY(-4px); }
.exchange-widget__iframe { border: 0; border-radius: var(--crypto-radius-sm); width: 100%; height: 400px; display: block; }

@media (min-width: 769px) {
    .exchange-widget { width: 100%; }
}

/* =====================================================================
   STAT CARDS
   ===================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stats__card {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 28px 22px;
    text-align: center;
    box-shadow: var(--crypto-shadow);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.stats__card:hover { transform: translateY(-6px); box-shadow: var(--crypto-shadow-hover); border-color: var(--crypto-accent); }
.stats__value { font-size: 30px; font-weight: 800; color: var(--crypto-accent); margin-bottom: 6px; }
.stats__label { font-weight: 700; margin-bottom: 8px; }
.stats__desc { color: var(--crypto-text-muted); font-size: 14px; margin: 0; }

/* =====================================================================
   CARDS (coins / use-cases / links)
   ===================================================================== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--5 { grid-template-columns: repeat(5, 1fr); }
.card {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    overflow: hidden;
    box-shadow: var(--crypto-shadow);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--crypto-shadow-hover); }
.card__media { aspect-ratio: 16/10; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__media img { transform: scale(1.08); }
.card__icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--crypto-accent-soft);
    display: flex; align-items: center; justify-content: center;
    margin: 22px 22px 0;
    transition: background .3s ease, transform .3s ease;
}
.card:hover .card__icon { background: var(--crypto-accent); transform: rotate(8deg) scale(1.05); }
.card__icon img { width: 26px; height: 26px; object-fit: contain; }
.card__body { padding: 18px 22px 24px; flex: 1; }
.card__title { font-size: 17px; margin-bottom: 8px; }
.card__text { color: var(--crypto-text-muted); font-size: 15px; margin: 0; }

/* =====================================================================
   TABLES
   ===================================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--crypto-radius); border: 1px solid var(--crypto-border); box-shadow: var(--crypto-shadow); }
table.crypto-table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--crypto-surface); }
table.crypto-table th, table.crypto-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--crypto-border); }
table.crypto-table th { background: var(--crypto-deep); color: #fff; font-weight: 700; }
table.crypto-table tr:last-child td { border-bottom: none; }
table.crypto-table tr:hover td { background: var(--crypto-accent-soft); }

/* =====================================================================
   COIN PRICE TABLE ([coin-price-data])
   ===================================================================== */
.coin-price-table { display: flex; flex-direction: column; border: 1px solid var(--crypto-border); border-radius: var(--crypto-radius); overflow: hidden; box-shadow: var(--crypto-shadow); background: var(--crypto-surface); }
.coin-price-table__row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--crypto-border);
    transition: background .25s ease;
}
.coin-price-table__row:last-child { border-bottom: none; }
.coin-price-table__row:hover { background: var(--crypto-accent-soft); }
.coin-price-table__asset { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.coin-price-table__icon { width: 32px; height: 32px; border-radius: 50%; transition: transform .3s ease; }
.coin-price-table__row:hover .coin-price-table__icon { transform: scale(1.15) rotate(6deg); }
.coin-price-table__ticker { display: block; font-weight: 500; color: var(--crypto-text-muted); font-size: 13px; }
.coin-price-table__price { font-weight: 700; }
.coin-price-table__change { font-weight: 700; }
.coin-price-table__change--up { color: var(--crypto-positive); }
.coin-price-table__change--down { color: var(--crypto-negative); }
.coin-price-table__updated { color: var(--crypto-text-muted); font-size: 14px; }
.coin-price-empty, .chart-empty { color: var(--crypto-text-muted); text-align: center; padding: 30px; border: 1px dashed var(--crypto-border); border-radius: var(--crypto-radius); }

/* =====================================================================
   CHART ([coin-price-chart])
   ===================================================================== */
.chart {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    box-shadow: var(--crypto-shadow);
    padding: 20px;
}
.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: 11px; 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-dark); stroke: #fff; stroke-width: 2; }

/* =====================================================================
   FAQ
   ===================================================================== */
.faq { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq__item {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    padding: 20px 24px;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.faq__item:hover { border-color: var(--crypto-accent); box-shadow: var(--crypto-shadow); }
.faq__item h3 {
    margin: 0;
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 0 !important;
}
.faq__item h3::after {
    content: "+";
    flex: 0 0 auto;
    color: var(--crypto-accent);
    font-size: 22px;
    font-weight: 400;
    transition: transform .3s ease;
}
.faq__item.is-open h3::after { transform: rotate(45deg); }
.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, opacity .3s ease, margin-top .3s ease;
    opacity: 0;
    color: var(--crypto-text-muted);
}
.faq__item.is-open .faq__answer { max-height: 600px; opacity: 1; margin-top: 12px; }

/* =====================================================================
   LISTS (checklists / use cases)
   ===================================================================== */
.list-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.list-check li {
    position: relative;
    padding-left: 30px;
    color: var(--crypto-text-muted);
}
.list-check li::before {
    content: "";
    position: absolute;
    left: 0; top: 6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--crypto-deep);
    box-shadow: inset 0 0 0 4px var(--crypto-surface), 0 0 0 1px var(--crypto-deep);
}

/* =====================================================================
   REVEAL / PARALLAX ANIMATIONS
   ===================================================================== */
.reveal { opacity: 1; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal--left { transform: translateX(-40px); }
.reveal--left.is-visible { transform: translateX(0); }
.reveal--right { transform: translateX(40px); }
.reveal--right.is-visible { transform: translateX(0); }
.parallax { will-change: transform; }

/* =====================================================================
   404 PAGE
   ===================================================================== */
.error404__wrapper { padding: 120px 0; text-align: center; }
.error404__code { font-size: clamp(90px, 16vw, 160px); font-weight: 800; color: var(--crypto-accent); line-height: 1; }
.error404__title { margin-top: 12px; }
.error404__text { color: var(--crypto-text-muted); max-width: 480px; margin: 0 auto 28px; }

/* =====================================================================
   POSTS / GUIDES
   ===================================================================== */
.guides-intro { max-width: 760px; margin: 0 auto 50px; text-align: center; color: var(--crypto-text-muted); }
.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.guide-card { }
.guide-card__excerpt { color: var(--crypto-text-muted); font-size: 14px; }

.post-content { max-width: 820px; margin: 0 auto; }
.post-content h2 { margin-top: 48px; }
.post-content h3 { margin-top: 28px; }
.post-content ul, .post-content ol { color: var(--crypto-text-muted); padding-left: 22px; }
.post-content li { margin-bottom: 8px; }
.post-hero { text-align: center; max-width: 820px; margin: 0 auto 40px; }
.post-hero__cover { border-radius: var(--crypto-radius); overflow: hidden; margin-bottom: 32px; box-shadow: var(--crypto-shadow); }
.post-hero__cover img { width: 100%; aspect-ratio: 16/7; object-fit: cover; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer { background: var(--crypto-deep); color: #EDEBE3; padding: 60px 0 24px; margin-top: 60px; }
.site-footer a { color: #EDEBE3; }
.site-footer a:hover { color: var(--crypto-accent); }
.site-footer__columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.14); }
.site-footer__title { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 18px; }
.site-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13px; color: rgba(237,235,227,.7); flex-wrap: wrap; gap: 12px; }

/* =====================================================================
   RESPONSIVE — 768px
   ===================================================================== */
@media (min-width: 769px) {
    .site-header__nav { display: block; }
    .site-header__burger { display: none; }
    .site-header__mobile-nav { display: none; }
}

@media (max-width: 768px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .cards--5 { grid-template-columns: repeat(2, 1fr); }
    .site-footer__columns { grid-template-columns: repeat(2, 1fr); }
    .guides-grid { grid-template-columns: repeat(2, 1fr); }
    .hero--with-widget .hero__inner { flex-direction: column; }
    .hero--with-widget .hero__widget-col { order: 2; width: 100%; }
    .exchange-widget__iframe { max-width: 100%; }
    .coin-price-table__row { grid-template-columns: 1.6fr 1fr 1fr; }
    .coin-price-table__updated { display: none; }
}

/* =====================================================================
   RESPONSIVE — 480px
   ===================================================================== */
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .stats { grid-template-columns: 1fr; }
    .cards { grid-template-columns: 1fr; }
    .cards--5 { grid-template-columns: 1fr; }
    .site-footer__columns { grid-template-columns: 1fr; }
    .guides-grid { grid-template-columns: 1fr; }
    .section { padding: calc(var(--crypto-section-y) * 1.6) 0; }
    .btn { width: 100%; }
    .coin-price-table__row { grid-template-columns: 1.4fr 1fr 1fr; padding: 12px 14px; }
    .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}
