/*
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 — Dragonfruit palette
   ===================================================================== */
:root {
    --crypto-accent: #E11C8A;
    --crypto-accent-alt: #F06707;
    --crypto-gold: #F9AF08;
    --crypto-purple: #68367F;
    --crypto-coral: #FD777A;
    --crypto-olive: #BBB256;

    --crypto-bg: #ffffff;
    --crypto-bg-soft: #fdf6f2;
    --crypto-text: #1f1a24;
    --crypto-text-muted: #6b6270;
    --crypto-border: rgba(104, 54, 127, 0.14);

    --crypto-section-y: 20px;
    --crypto-radius: 16px;
    --crypto-radius-sm: 10px;
    --crypto-shadow: 0 10px 30px rgba(104, 54, 127, 0.12);
    --crypto-shadow-hover: 0 18px 40px rgba(225, 28, 138, 0.22);
    --crypto-gradient: linear-gradient(135deg, var(--crypto-accent-alt), var(--crypto-accent) 55%, var(--crypto-purple));
}

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

html { scroll-behavior: smooth; }

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

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

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

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 16px; color: var(--crypto-text); font-weight: 800; }

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

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

table { border-collapse: collapse; }

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

/* Ссылки внутри текстовых абзацев всегда выделяются акцентом */
p a {
    color: var(--crypto-accent);
    text-decoration: underline;
    font-weight: 600;
    transition: color .2s ease;
}
p a:hover,
p a:focus-visible { color: var(--crypto-accent-alt); }

/* =====================================================================
   SCROLL-REVEAL ANIMATION
   ===================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}
.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 700;
    font-size: .95rem;
    border: none;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn--primary {
    background: var(--crypto-gradient);
    color: #fff;
    box-shadow: var(--crypto-shadow);
}
.btn--primary:hover,
.btn--primary:focus-visible {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--crypto-shadow-hover);
}
.btn--ghost {
    background: transparent;
    color: var(--crypto-accent);
    border: 2px solid var(--crypto-accent);
}
.btn--ghost:hover { background: var(--crypto-accent); color: #fff; transform: translateY(-2px); }

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    background: rgba(249, 175, 8, .16);
    color: #8a5b02;
    margin-bottom: 12px;
}
.badge--pink { background: rgba(225, 28, 138, .12); color: var(--crypto-accent); }
.badge--purple { background: rgba(104, 54, 127, .12); color: var(--crypto-purple); }

/* =====================================================================
   HEADER
   ===================================================================== */
.crypto-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--crypto-bg);
    border-bottom: 1px solid var(--crypto-border);
}
.crypto-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 78px;
    gap: 24px;
}
.crypto-header__logo { display: flex; align-items: center; }
.crypto-header__logo img { max-height: 44px; width: auto; }
.crypto-header__logo-text {
    font-weight: 800;
    font-size: 1.35rem;
    background: var(--crypto-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.crypto-header__nav { flex: 1; display: flex; justify-content: center; }
.crypto-header__menu {
    display: flex;
    align-items: center;
    gap: 30px;
}
.crypto-header__menu > li { position: relative; }
.crypto-header__menu > li > a {
    display: block;
    padding: 10px 2px;
    font-weight: 600;
    font-size: .95rem;
    color: var(--crypto-text);
    transition: color .2s ease;
    position: relative;
}
.crypto-header__menu > li > a::after {
    content: "";
    position: absolute;
    left: 0; bottom: 2px;
    width: 0; height: 2px;
    background: var(--crypto-gradient);
    transition: width .25s ease;
}
.crypto-header__menu > li > a:hover,
.crypto-header__menu > li.current-menu-item > a { color: var(--crypto-accent); }
.crypto-header__menu > li > a:hover::after,
.crypto-header__menu > li.current-menu-item > a::after { width: 100%; }

.crypto-header__menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--crypto-bg);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius-sm);
    box-shadow: var(--crypto-shadow);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 20;
}
.crypto-header__menu > li:hover > .sub-menu,
.crypto-header__menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.crypto-header__menu .sub-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--crypto-text-muted);
    transition: background .2s ease, color .2s ease;
}
.crypto-header__menu .sub-menu a:hover { background: var(--crypto-bg-soft); color: var(--crypto-accent); }

.crypto-header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
}
.crypto-header__burger-line {
    width: 100%;
    height: 2px;
    background: var(--crypto-text);
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease;
}
.crypto-header__burger[aria-expanded="true"] .crypto-header__burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.crypto-header__burger[aria-expanded="true"] .crypto-header__burger-line:nth-child(2) { opacity: 0; }
.crypto-header__burger[aria-expanded="true"] .crypto-header__burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =====================================================================
   MOBILE MENU
   ===================================================================== */
.crypto-mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(31, 26, 36, .55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 210;
}
.crypto-mobile-menu-overlay--open { opacity: 1; pointer-events: auto; }

.crypto-mobile-menu {
    position: fixed;
    top: 0; right: 0;
    width: min(86vw, 360px);
    height: 100vh;
    background: var(--crypto-bg);
    box-shadow: -18px 0 40px rgba(31, 26, 36, .18);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 220;
    overflow-y: auto;
}
.crypto-mobile-menu--open { transform: translateX(0); }

.crypto-mobile-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--crypto-border);
}
.crypto-mobile-menu__title { font-weight: 800; }
.crypto-mobile-menu__close {
    border: none;
    background: var(--crypto-bg-soft);
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    color: var(--crypto-text);
}

.crypto-mobile-menu__nav { padding: 12px 10px 30px; }
.crypto-mobile-menu__list > li { border-bottom: 1px solid var(--crypto-border); }
.crypto-mobile-menu__list a {
    display: block;
    padding: 14px 10px;
    font-weight: 600;
    color: var(--crypto-text);
}
.crypto-mobile-menu__list .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    padding-left: 12px;
}
.crypto-mobile-menu__item--open > .sub-menu { max-height: 600px; }
.crypto-mobile-menu__list .sub-menu a { padding: 10px; font-weight: 500; color: var(--crypto-text-muted); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.crypto-footer { background: var(--crypto-purple); color: rgba(255, 255, 255, .82); }
.crypto-footer__inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 28px;
    padding: 56px 20px 40px;
}
.crypto-footer__title {
    color: var(--crypto-gold);
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 18px;
}
.crypto-footer__list { display: flex; flex-direction: column; gap: 12px; }
.crypto-footer__list a { color: rgba(255, 255, 255, .78); font-size: .92rem; transition: color .2s ease, padding-left .2s ease; }
.crypto-footer__list a:hover { color: #fff; padding-left: 4px; }

.crypto-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .15); }
.crypto-footer__bottom-inner { padding: 18px 20px; text-align: center; }
.crypto-footer__copy { margin: 0; font-size: .85rem; color: rgba(255, 255, 255, .65); }

/* =====================================================================
   PAGE HERO (заголовок статьи/страницы, кроме главной)
   ===================================================================== */
.page-hero {
    position: relative;
    padding: 64px 0 56px;
    background: linear-gradient(160deg, var(--crypto-bg-soft), #fff 60%);
    overflow: hidden;
    isolation: isolate;
}
.page-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    object-fit: cover;
    width: 100%;
    height: 100%;
    opacity: .04;
}
.page-hero__inner { max-width: 820px; }
.page-hero__eyebrow {
    display: inline-block;
    color: var(--crypto-accent);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.page-hero__lead { font-size: 1.1rem; color: var(--crypto-text-muted); margin: 0; }

/* =====================================================================
   HOME HERO (с виджетом обменника)
   ===================================================================== */
.hero {
    background: var(--crypto-gradient);
    padding: 64px 0 76px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto auto;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
}
.hero__grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero__content { color: #fff; }
.hero__content h1 { color: #fff; }
.hero__content p { color: rgba(255, 255, 255, .88); font-size: 1.05rem; }
.hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.hero__widget { display: flex; justify-content: center; }
.hero__widget-frame {
    background: #fff;
    border-radius: var(--crypto-radius);
    padding: 14px;
    box-shadow: var(--crypto-shadow-hover);
    width: 100%;
}
.hero__widget-frame iframe { border-radius: var(--crypto-radius-sm); width: 100%; max-width: 500px; }

/* =====================================================================
   CONTENT SECTIONS
   ===================================================================== */
.content-section { margin: var(--crypto-section-y) 0; padding: 28px 0; }
.content-section__intro { max-width: 780px; margin-bottom: 8px; }

/* Текст + картинка бок о бок, чередуется через модификатор */
.media-block {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 24px;
}
.media-block--reverse { flex-direction: row-reverse; }
.media-block__media {
    flex: 0 0 42%;
    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.06); }
.media-block__body { flex: 1; }
.media-block__body h2, .media-block__body h3 { margin-top: 0; }

/* Карточки (подпункты внутри раздела) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-top: 22px;
}
.card {
    background: var(--crypto-bg-soft);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 26px;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--crypto-shadow-hover);
    border-color: var(--crypto-accent);
}
.card__icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--crypto-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #fff;
}
.card__icon svg { width: 24px; height: 24px; }
.card__img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--crypto-radius-sm);
    margin-bottom: 16px;
    transition: transform .4s ease;
}
.card:hover .card__img { transform: scale(1.04); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

/* Списки с иконками (чек-листы) */
.icon-list { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.icon-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--crypto-text);
}
.icon-list li svg {
    flex: 0 0 20px;
    width: 20px; height: 20px;
    margin-top: 2px;
    color: var(--crypto-accent);
}

/* Таблицы */
.table-wrap { overflow-x: auto; margin: 24px 0; border-radius: var(--crypto-radius); box-shadow: var(--crypto-shadow); }
.table-wrap table { width: 100%; min-width: 560px; background: var(--crypto-bg); }
.table-wrap th, .table-wrap td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--crypto-border); font-size: .93rem; }
.table-wrap th { background: var(--crypto-purple); color: #fff; font-weight: 700; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:nth-child(even) td { background: var(--crypto-bg-soft); }

/* Диаграмма-путь обмена (Sending Wallet -> Stage 1 -> ... ) */
.flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 26px 0;
}
.flow__step {
    background: var(--crypto-bg-soft);
    border: 1px solid var(--crypto-border);
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    font-size: .9rem;
    color: var(--crypto-purple);
}
.flow__arrow { color: var(--crypto-accent); font-size: 1.2rem; }

/* CTA-блок */
.cta {
    text-align: center;
    background: var(--crypto-gradient);
    border-radius: var(--crypto-radius);
    padding: 48px 24px;
    color: #fff;
    margin: var(--crypto-section-y) 0;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .88); }
.cta p a { color: #fff; text-decoration: underline; }
.cta p a:hover { color: var(--crypto-gold); }

/* FAQ */
.faq__item {
    border-bottom: 1px solid var(--crypto-border);
    padding: 22px 0;
}
.faq__item:first-child { padding-top: 0; }
.faq__item h3 { margin-bottom: 8px; color: var(--crypto-purple); }
.faq__item p { margin-bottom: 0; color: var(--crypto-text-muted); }

/* Обменный виджет вне главной (иллюстрация рядом разрешена) */
.exchange-widget {
    display: flex;
    gap: 32px;
    align-items: center;
    flex-wrap: wrap;
    background: var(--crypto-bg-soft);
    border-radius: var(--crypto-radius);
    padding: 28px;
}
.exchange-widget__media { flex: 1 1 260px; border-radius: var(--crypto-radius-sm); overflow: hidden; }
.exchange-widget__media img { width: 100%; height: 220px; object-fit: cover; }
.exchange-widget__iframe { border-radius: var(--crypto-radius-sm); }

/* =====================================================================
   BLOG LISTING
   ===================================================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 22px;
}
.blog-card {
    background: var(--crypto-bg);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 24px;
    box-shadow: var(--crypto-shadow);
    transition: transform .3s ease, box-shadow .3s ease;
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--crypto-shadow-hover); }
.blog-card__link { color: var(--crypto-accent); font-weight: 700; }
.blog-card h3 { margin-bottom: 6px; }

/* =====================================================================
   CONTACT FORM
   ===================================================================== */
.contact-form { display: grid; gap: 16px; max-width: 560px; margin-top: 20px; }
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--crypto-radius-sm);
    border: 1px solid var(--crypto-border);
    font-size: .95rem;
    font-family: inherit;
    background: var(--crypto-bg-soft);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--crypto-accent);
    box-shadow: 0 0 0 3px rgba(225, 28, 138, .15);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.form-notice { padding: 14px 18px; border-radius: var(--crypto-radius-sm); font-weight: 600; }
.form-notice--success { background: rgba(155, 197, 61, .15); color: #4a7a12; }
.form-notice--error { background: rgba(225, 28, 138, .12); color: var(--crypto-accent); }

/* =====================================================================
   404 PAGE
   ===================================================================== */
.error404__wrapper { padding: 100px 0; text-align: center; }
.error404__code {
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 900;
    background: var(--crypto-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
}
.error404__title { margin-top: 12px; }
.error404__text { color: var(--crypto-text-muted); max-width: 480px; margin: 0 auto 28px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media screen and (max-width: 992px) {
    .crypto-header__nav { display: none; }
    .crypto-header__burger { display: flex; }
    .hero__grid { grid-template-columns: 1fr; }
    .hero__widget { order: -1; }
    .crypto-footer__inner { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 768px) {
    .crypto-footer__inner { grid-template-columns: repeat(2, 1fr); }
    .media-block, .media-block--reverse { flex-direction: column; }
    .media-block__media { flex: none; width: 100%; }
    .media-block__media img { height: 220px; }
    .exchange-widget { flex-direction: column; }
    .page-hero { padding: 44px 0 36px; }
}

@media screen and (max-width: 480px) {
    .container { padding: 0 16px; }
    .crypto-footer__inner { grid-template-columns: 1fr; padding: 40px 16px 30px; }
    .hero { padding: 44px 0 56px; }
    .btn { width: 100%; justify-content: center; }
    .cta { padding: 36px 18px; }
}
