/*
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 taken from the reference cherry/leaf image
   ===================================================================== */
:root {
    --crypto-bg: #ffffff;
    --crypto-bg-soft: #f5f7fa;
    --crypto-text: #111827;
    --crypto-text-muted: #6b7280;
    --crypto-border: #e5e7eb;

    --crypto-accent: #c41e3a;
    --crypto-accent-hover: #7a0d1a;
    --crypto-accent-soft: rgba(196, 30, 58, 0.1);

    --crypto-positive: #4a8f2c;
    --crypto-positive-dark: #1e3b16;
    --crypto-positive-soft: rgba(74, 143, 44, 0.12);

    --crypto-section-y: 22px;
    --crypto-radius: 16px;
    --crypto-shadow: 0 4px 18px rgba(17, 24, 39, 0.07);
    --crypto-shadow-hover: 0 14px 30px rgba(17, 24, 39, 0.14);
}

/* =====================================================================
   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;
}

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

a {
    color: inherit;
}

ul, ol {
    padding-left: 1.2em;
}

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

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

p {
    margin: 0 0 16px;
}

/* Ссылки внутри текстовых абзацев визуально выделены */
p a {
    color: var(--crypto-accent);
    text-decoration: underline;
    font-weight: 600;
}

p a:hover {
    color: var(--crypto-accent-hover);
}

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

/* =====================================================================
   LAYOUT / SECTIONS
   ===================================================================== */
main {
    display: block;
}

.section {
    padding: calc(var(--crypto-section-y) * 2) 0;
}

.section + .section {
    border-top: 1px solid var(--crypto-border);
}

.section__media {
    margin: var(--crypto-section-y) 0;
    border-radius: var(--crypto-radius);
    overflow: hidden;
    box-shadow: var(--crypto-shadow);
}

.section__image {
    width: 100%;
    height: 340px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.section__media:hover .section__image,
.hero__media:hover .section__image {
    transform: scale(1.04);
}

.hero {
    padding: calc(var(--crypto-section-y) * 2) 0;
    background: var(--crypto-bg-soft);
}

.hero__layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
    align-items: center;
}

.hero__content h1 {
    margin-bottom: var(--crypto-section-y);
}

.hero__media {
    border-radius: var(--crypto-radius);
    overflow: hidden;
    box-shadow: var(--crypto-shadow);
}

code {
    background: var(--crypto-bg-soft);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
}

/* =====================================================================
   REVEAL / PARALLAX ANIMATIONS
   ===================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.parallax {
    will-change: transform;
    transition: transform 0.2s ease-out;
}

/* =====================================================================
   HEADER & NAVIGATION
   ===================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--crypto-bg);
    border-bottom: 1px solid var(--crypto-border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header__logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--crypto-accent);
}

.header__logo img {
    max-height: 44px;
    width: auto;
}

.header__menu {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.header__menu li {
    position: relative;
}

.header__menu a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    font-weight: 600;
    color: var(--crypto-text);
    transition: color 0.2s ease;
}

.header__menu a:hover {
    color: var(--crypto-accent);
}

.header__menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--crypto-bg);
    border: 1px solid var(--crypto-border);
    border-radius: 12px;
    box-shadow: var(--crypto-shadow-hover);
    padding: 8px;
    margin: 0;
    list-style: none;
    z-index: 10;
}

.header__menu li:hover > .sub-menu {
    display: block;
}

.header__menu .sub-menu a {
    padding: 8px 12px;
    border-radius: 8px;
}

.header__menu .sub-menu a:hover {
    background: var(--crypto-accent-soft);
}

.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.header__burger-line {
    width: 100%;
    height: 2px;
    background: var(--crypto-text);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.header__burger.is-open .header__burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header__burger.is-open .header__burger-line:nth-child(2) {
    opacity: 0;
}

.header__burger.is-open .header__burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer {
    background: var(--crypto-positive-dark);
    background-image: linear-gradient(rgba(10, 20, 8, 0.88), rgba(10, 20, 8, 0.92)), url("img/footer-crypto-coins-bg.jpg");
    background-size: cover;
    background-position: center;
    color: #f5f7fa;
    padding: calc(var(--crypto-section-y) * 2) 0;
    margin-top: calc(var(--crypto-section-y) * 2);
}

.footer__columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-bottom: calc(var(--crypto-section-y) * 1.5);
}

.footer__heading {
    display: block;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 1rem;
}

.footer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer__menu a {
    text-decoration: none;
    color: rgba(245, 247, 250, 0.8);
    transition: color 0.2s ease;
}

.footer__menu a:hover {
    color: #ffffff;
}

.footer__copyright {
    margin: 0;
    padding-top: var(--crypto-section-y);
    border-top: 1px solid rgba(245, 247, 250, 0.18);
    font-size: 0.875rem;
    color: rgba(245, 247, 250, 0.7);
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn--primary {
    background: var(--crypto-accent);
    color: #ffffff !important;
}

.btn--primary:hover {
    background: var(--crypto-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(196, 30, 58, 0.3);
}

/* =====================================================================
   CARDS / FEATURE GRID / MEDIA CARDS
   ===================================================================== */
.card {
    background: var(--crypto-bg);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    box-shadow: var(--crypto-shadow);
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.grid {
    display: grid;
    gap: var(--crypto-section-y);
}

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

.feature__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--crypto-accent-soft);
    color: var(--crypto-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    transition: transform 0.25s ease, background 0.25s ease;
}

.card:hover .feature__icon {
    transform: scale(1.1) rotate(-6deg);
    background: var(--crypto-accent);
    color: #ffffff;
}

.feature__icon svg {
    width: 26px;
    height: 26px;
}

.feature__title {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.feature__text {
    color: var(--crypto-text-muted);
    margin: 0;
}

.media-card {
    border-radius: var(--crypto-radius);
    overflow: hidden;
    box-shadow: var(--crypto-shadow);
    background: var(--crypto-bg);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

.media-card__image-wrap {
    overflow: hidden;
    height: 220px;
}

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

.media-card:hover .media-card__image {
    transform: scale(1.08);
}

.media-card__body {
    padding: 20px;
}

/* =====================================================================
   EXCHANGE WIDGET
   ===================================================================== */
.exchange-widget {
    display: flex;
    justify-content: center;
    margin: var(--crypto-section-y) 0;
}

.exchange-widget__frame {
    max-width: 100%;
    border-radius: var(--crypto-radius);
    box-shadow: var(--crypto-shadow);
}

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

.hero__widget .exchange-widget {
    margin: 0;
}

/* =====================================================================
   STEPS LIST
   ===================================================================== */
.steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--crypto-section-y);
}

.steps__item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.steps__number {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--crypto-accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* =====================================================================
   TABLES
   ===================================================================== */
.table-wrap {
    overflow-x: auto;
    margin: var(--crypto-section-y) 0;
    border-radius: var(--crypto-radius);
    box-shadow: var(--crypto-shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--crypto-bg);
}

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

thead th {
    background: var(--crypto-bg-soft);
    color: var(--crypto-text);
    font-weight: 700;
}

tbody tr:hover {
    background: var(--crypto-accent-soft);
}

/* =====================================================================
   FAQ
   ===================================================================== */
.faq {
    display: grid;
    gap: var(--crypto-section-y);
}

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

.faq__item:hover {
    box-shadow: var(--crypto-shadow-hover);
}

.faq__item h3 {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.faq__item p {
    margin: 0;
    color: var(--crypto-text-muted);
}

/* =====================================================================
   TESTIMONIALS
   ===================================================================== */
.testimonials {
    display: grid;
    gap: var(--crypto-section-y);
}

.testimonial {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.testimonial__avatar {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--crypto-positive);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.testimonial__name {
    font-weight: 700;
    margin-bottom: 4px;
}

.testimonial__rating {
    color: var(--crypto-positive);
    font-weight: 700;
    margin-left: 8px;
}

.testimonial__text {
    margin: 0;
    color: var(--crypto-text-muted);
}

/* =====================================================================
   CHART (server-rendered inline SVG)
   ===================================================================== */
.chart {
    margin: var(--crypto-section-y) 0;
}

.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);
    stroke: #ffffff;
    stroke-width: 2;
}

.chart-empty {
    padding: 20px;
    background: var(--crypto-bg-soft);
    border-radius: var(--crypto-radius);
    color: var(--crypto-text-muted);
    text-align: center;
}

.rate-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: var(--crypto-section-y);
}

.rate-stats__item {
    background: var(--crypto-bg-soft);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rate-stats__label {
    font-size: 0.8rem;
    color: var(--crypto-text-muted);
}

.rate-stats__value {
    font-weight: 700;
    font-size: 1.05rem;
}

.rate-stats__value--up {
    color: var(--crypto-positive);
}

.rate-stats__value--down {
    color: var(--crypto-accent);
}

/* =====================================================================
   AMOUNT BOARD / AMOUNT VALUES
   ===================================================================== */
.amount-board {
    margin: var(--crypto-section-y) 0;
}

.amount-values {
    background: var(--crypto-bg-soft);
    border-radius: var(--crypto-radius);
    padding: 20px 24px;
    margin: var(--crypto-section-y) 0;
}

.amount-values__amount {
    font-weight: 700;
    margin-bottom: 12px;
}

.amount-values__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.amount-values__item {
    display: flex;
    justify-content: space-between;
    background: var(--crypto-bg);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: var(--crypto-shadow);
}

.amount-values__asset {
    color: var(--crypto-text-muted);
    font-weight: 600;
}

.amount-values__value {
    font-weight: 700;
}

/* =====================================================================
   404 PAGE
   ===================================================================== */
.error404__wrapper {
    padding: calc(var(--crypto-section-y) * 3) 0;
}

.error404__inner {
    text-align: center;
    max-width: 560px;
}

.error404__code {
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 800;
    color: var(--crypto-accent);
    line-height: 1;
    margin-bottom: var(--crypto-section-y);
}

.error404__title {
    margin-bottom: 12px;
}

.error404__text {
    color: var(--crypto-text-muted);
    margin-bottom: calc(var(--crypto-section-y) * 1.2);
}

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

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 768px) {
    .hero__layout {
        grid-template-columns: 1fr;
    }

    .hero__widget {
        justify-content: center;
    }

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

    .footer__columns {
        grid-template-columns: repeat(2, 1fr);
    }

    .rate-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .amount-values__list {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: calc(var(--crypto-section-y) * 1.5) 0;
    }

    .header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--crypto-bg);
        border-bottom: 1px solid var(--crypto-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .header__nav.is-open {
        max-height: 600px;
        overflow-y: auto;
    }

    .header__menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px 20px 20px;
    }

    .header__menu li:hover > .sub-menu,
    .header__menu .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        display: block;
        padding-left: 12px;
    }

    .header__burger {
        display: flex;
    }
}

@media (max-width: 480px) {
    .grid--2,
    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }

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

    .rate-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .amount-values__list {
        grid-template-columns: 1fr;
    }

    .steps__item {
        flex-direction: column;
    }

    .testimonial {
        flex-direction: column;
    }
}
