/*
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.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* =====================================================================
   ROOT VARIABLES — Cocoa & Cream palette
   ===================================================================== */
:root {
    --crypto-sugar: #fbf7ef;
    --crypto-ivory: #f3e9d8;
    --crypto-sand: #d8c29a;
    --crypto-beige: #c7a97d;
    --crypto-cocoa: #6b4a34;
    --crypto-chocolate: #4a2e22;
    --crypto-espresso: #2a1810;

    --crypto-bg: var(--crypto-sugar);
    --crypto-bg-alt: var(--crypto-ivory);
    --crypto-surface: #ffffff;
    --crypto-border: var(--crypto-sand);
    --crypto-text: var(--crypto-espresso);
    --crypto-text-muted: var(--crypto-cocoa);
    --crypto-accent: var(--crypto-chocolate);
    --crypto-accent-hover: var(--crypto-espresso);
    --crypto-accent-soft: rgba(74, 46, 34, 0.1);
    --crypto-shadow: 0 10px 30px rgba(42, 24, 16, 0.08);
    --crypto-shadow-hover: 0 18px 40px rgba(42, 24, 16, 0.14);
    --crypto-radius: 16px;
    --crypto-section-y: 20px;
}

/* =====================================================================
   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: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    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 0.2s ease;
}

p a {
    color: red;
    font-weight: 600;
    text-decoration: underline;
}

a:hover {
    color: var(--crypto-accent-hover);
    text-decoration: underline;
}

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

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =====================================================================
   SCROLL-REVEAL ANIMATION
   ===================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s 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: 999px;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
    text-decoration: none;
}

.btn--primary {
    background: var(--crypto-accent);
    color: #fff;
    box-shadow: var(--crypto-shadow);
}

.btn--primary:hover {
    background: var(--crypto-accent-hover);
    color: #fff;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: var(--crypto-shadow-hover);
}

.btn--outline {
    background: transparent;
    color: var(--crypto-accent);
    border-color: var(--crypto-border);
}

.btn--outline:hover {
    background: var(--crypto-accent);
    border-color: var(--crypto-accent);
    color: #fff;
    text-decoration: none;
    transform: translateY(-3px);
}

/* =====================================================================
   HEADER
   ===================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 247, 239, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--crypto-border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 20px;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--crypto-espresso);
}

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

.header__logo:hover {
    color: var(--crypto-chocolate);
    text-decoration: none;
}

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

.header__menu > li {
    position: relative;
}

.header__menu > li > a {
    display: block;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--crypto-espresso);
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s ease, color 0.2s ease;
}

.header__menu > li > a:hover {
    background: var(--crypto-accent-soft);
    color: var(--crypto-chocolate);
    text-decoration: none;
}

.header__menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 10px;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: 14px;
    box-shadow: var(--crypto-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 10;
}

.header__menu > li:hover > .sub-menu,
.header__menu > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__menu .sub-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--crypto-cocoa);
    font-size: 14px;
    font-weight: 500;
}

.header__menu .sub-menu a:hover {
    background: var(--crypto-bg-alt);
    color: var(--crypto-chocolate);
    text-decoration: none;
}

.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--crypto-border);
    border-radius: 12px;
    background: var(--crypto-surface);
    cursor: pointer;
    padding: 0;
}

.header__burger span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--crypto-espresso);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.header__burger.is-active span:nth-child(2) {
    opacity: 0;
}

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

.header__mobile-nav {
    display: none;
    max-height: 0;
    overflow: hidden;
    background: var(--crypto-surface);
    border-top: 1px solid var(--crypto-border);
    transition: max-height 0.35s ease;
}

.header__mobile-nav.is-open {
    max-height: 1200px;
}

.header__mobile-menu {
    list-style: none;
    margin: 0;
    padding: 12px 20px 20px;
}

.header__mobile-menu li {
    border-bottom: 1px solid var(--crypto-bg-alt);
}

.header__mobile-menu a {
    display: block;
    padding: 12px 4px;
    color: var(--crypto-espresso);
    font-weight: 600;
}

.header__mobile-menu .sub-menu {
    list-style: none;
    margin: 0 0 8px;
    padding-left: 14px;
}

.header__mobile-menu .sub-menu a {
    color: var(--crypto-cocoa);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 4px;
}

/* =====================================================================
   PAGE HERO
   ===================================================================== */
.page-hero {
    padding: var(--crypto-section-y) 0;
    overflow: hidden;
}

.page-hero__inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    padding: 40px 0;
}

.page-hero__title {
    font-size: 40px;
    line-height: 1.2;
    margin: 0 0 16px;
    color: var(--crypto-espresso);
}

.page-hero__lead {
    font-size: 18px;
    color: var(--crypto-text-muted);
}

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

.page-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    transition: transform 0.6s ease;
}

.page-hero__media:hover img {
    transform: scale(1.06);
}

/* =====================================================================
   CONTENT SECTIONS
   ===================================================================== */
.page-content {
    padding: var(--crypto-section-y) 0 60px;
}

.page-content h2 {
    font-size: 28px;
    margin: 44px 0 16px;
    color: var(--crypto-espresso);
}

.page-content h3 {
    font-size: 21px;
    margin: 28px 0 12px;
    color: var(--crypto-chocolate);
}

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

.page-content ul,
.page-content ol {
    margin: 0 0 16px;
}

.page-content li {
    margin-bottom: 8px;
}

.page-content > .container > p:first-of-type {
    font-size: 18px;
    color: var(--crypto-text-muted);
}

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

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.table caption {
    text-align: left;
    padding: 16px 20px 0;
    font-weight: 700;
    color: var(--crypto-espresso);
}

.table th,
.table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--crypto-bg-alt);
    font-size: 15px;
}

.table thead th {
    background: var(--crypto-accent);
    color: #fff;
    font-weight: 600;
}

.table tbody tr:hover {
    background: var(--crypto-bg-alt);
}

/* =====================================================================
   CARDS / GUIDE LINKS
   ===================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.card {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 22px;
    box-shadow: var(--crypto-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

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

.card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--crypto-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 20px;
}

.card__title {
    margin: 0 0 8px;
    font-size: 17px;
    color: var(--crypto-espresso);
}

.card__title a {
    color: inherit;
}

.card__title a:hover {
    color: var(--crypto-chocolate);
}

.card__text {
    margin: 0;
    color: var(--crypto-text-muted);
    font-size: 14px;
}

/* =====================================================================
   INLINE SECTION IMAGE
   ===================================================================== */
.section-media {
    border-radius: var(--crypto-radius);
    overflow: hidden;
    box-shadow: var(--crypto-shadow);
    margin: 24px 0;
    transition: box-shadow 0.3s ease;
}

.section-media img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    transition: transform 0.6s ease;
}

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

.section-media:hover img {
    transform: scale(1.05);
}

/* =====================================================================
   EXCHANGE WIDGET BLOCK
   ===================================================================== */
.widget-block {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--crypto-bg-alt);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 32px;
    margin: 32px 0;
}

.widget-block--home {
    flex-direction: row-reverse;
    justify-content: space-between;
}

.widget-block__text {
    flex: 1 1 320px;
}

.widget-block__text h2,
.widget-block__text h3 {
    margin-top: 0;
}

.widget-block__frame {
    flex: 0 0 auto;
    border-radius: var(--crypto-radius);
    overflow: hidden;
    box-shadow: var(--crypto-shadow);
    background: #fff;
}

.widget-block__frame iframe {
    display: block;
    max-width: 100%;
}

.widget-block__media {
    flex: 1 1 260px;
    border-radius: var(--crypto-radius);
    overflow: hidden;
    box-shadow: var(--crypto-shadow);
}

.widget-block__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    transition: transform 0.6s ease;
}

.widget-block__media:hover img {
    transform: scale(1.06);
}

/* =====================================================================
   FAQ
   ===================================================================== */
.faq {
    margin: 20px 0;
}

.faq__item {
    background: var(--crypto-surface);
    border: 1px solid var(--crypto-border);
    border-radius: var(--crypto-radius);
    padding: 20px 24px;
    margin-bottom: 14px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

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

.faq__question {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--crypto-espresso);
}

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

/* =====================================================================
   CHART (server-rendered inline SVG)
   ===================================================================== */
.chart {
    margin: 24px 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;
}

.chart__area {
    fill: var(--crypto-accent-soft);
    stroke: none;
}

.chart__line {
    fill: none;
    stroke: var(--crypto-accent);
    stroke-width: 2.5;
}

.chart__dot {
    fill: var(--crypto-accent);
}

.chart-empty {
    color: var(--crypto-text-muted);
    font-style: italic;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.site-footer {
    background: var(--crypto-espresso);
    color: var(--crypto-sand);
    padding: 56px 0 0;
    margin-top: 40px;
}

.footer__top {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(216, 194, 154, 0.2);
}

.footer__brand {
    flex: 1 1 260px;
}

.footer__col {
    flex: 1 1 150px;
}

.footer__brand-title {
    color: #fff;
    font-size: 20px;
    margin: 0 0 12px;
}

.footer__brand-text {
    color: var(--crypto-sand);
    font-size: 14px;
    max-width: 320px;
}

.footer__col-title {
    color: #fff;
    font-size: 15px;
    margin: 0 0 14px;
}

.footer__menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer__menu li {
    margin-bottom: 10px;
}

.footer__menu a {
    color: var(--crypto-sand);
    font-size: 14px;
}

.footer__menu a:hover {
    color: #fff;
    text-decoration: none;
}

.footer__bottom {
    padding: 22px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(216, 194, 154, 0.7);
}

/* =====================================================================
   404
   ===================================================================== */
.error404__wrapper {
    padding: 100px 0;
}

.error404__inner {
    text-align: center;
}

.error404__code {
    font-size: 120px;
    font-weight: 800;
    color: var(--crypto-accent);
    line-height: 1;
}

.error404__title {
    font-size: 30px;
    margin: 10px 0;
    color: var(--crypto-espresso);
}

.error404__text {
    color: var(--crypto-text-muted);
    margin-bottom: 24px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 768px) {
    .header__menu,
    .header__inner .btn {
        display: none;
    }

    .header__burger {
        display: flex;
    }

    .header__mobile-nav {
        display: block;
    }

    .page-hero__inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 0;
    }

    .page-hero__title {
        font-size: 30px;
    }

    .widget-block,
    .widget-block--home {
        flex-direction: column;
    }

    .widget-block__frame iframe {
        width: 100%;
    }

    .footer__top {
        flex-direction: column;
        gap: 24px;
    }

    .error404__code {
        font-size: 80px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .page-hero__title {
        font-size: 26px;
    }

    .widget-block {
        padding: 20px;
    }

    .btn {
        width: 100%;
    }
}
